PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
New Logs.
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095)
Display posts from previous:   

Author Message
Tritan



Joined: 04 Feb 2006
Posts: 136
Location: Illinois, USA

PostPosted: Fri May 26, 2006 8:41 am    Post subject: Reply with quote

As for your second statement you will have some code to your crafting scripts to set the color and the name.

I am using a modified version of the Sanctuary scripts myself and am not sure how the distro crafting system works when it comes to crafting. But here is how I did it with my scripts. This is only a small snippet of code to set the color and name.

Code:

   created_item.color := logs.color;
   created_item.name := "a " + log_name + " " + TruncateArticle(item_name) + " [crafted by " + character.name + "]";


This gets added into your carpentry script when the item is created.

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Fri May 26, 2006 1:35 pm    Post subject: Reply with quote

Damien, did you create an entry for each new log you defined in the script? If not you'll need one.

Example:
Code:

Item 0x4001
{
    Name                yewlog
    desc                yew log%s%
    graphic             0x1bdd
    color               0x002c
    Weight      1/2
    VendorSellsFor      10
    VendorBuysFor       1
}


To add qualities to items based on wood type, in this example bows, you will need to edit each script that uses the wood, in this example bladed.src
Test for the wood type using if or case statements. Then apply the mods accordingly. Here is a small piece of my code that does that:

Code:

   if (wood == UOBJ_LOGS)
      return;
   elseif (wood == UOBJ_WOOD_OAK)
      bow.maxhp_mod := bow.maxhp_mod + 120;
      bow.hp := bow.maxhp_mod;
      bow.quality := bow.quality - 0.3;
      bow.dmg_mod := bow.dmg_mod - 3;
      bow.color := 0x002c; // Set to your colour for oak logs
      SetName(bow, ("an oaken " + tname) );


As I said that is an example and not a fully working script. Hopefully using that you can see how mods are made and build your own sections in the appropriate scripts.

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095) All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty