PenUltima Online

It is currently Sat Sep 06, 2008 4:10 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject:
PostPosted: Fri May 26, 2006 4:41 am 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 137
Location: Illinois, USA
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.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 9:35 am 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1127
Location: Southern Central USA
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.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl