Page 1 of 1

please help =( >> adding effects to items

Posted: Mon Nov 06, 2006 1:09 am
by Damo307
could someone tell me how i can add effects to an item and so it works? i can get the item to make but the effect i have no clue on what to do e.g. like a flame tile, i can get the tile done but when you walk on it, nothing happens..

please help

Posted: Mon Nov 06, 2006 2:03 am
by CWO
add an entry in itemdesc.cfg called WalkOnScript for the item. The value of WalkOnScript should be the name of the script you want to fire when they walk on it.

Posted: Mon Nov 06, 2006 9:07 pm
by Yukiko
If you look at the main itemdesc file in \pol\config and search for rexcob1 you'll find the following:

Code: Select all

// Resurrection-field cobblestones
Item 0xEE01
{
    Name                rescob1
    graphic             0x515
    WalkOnScript        resField
    Movable             0
}
Note the line: WalkOnScript resField

Now if you look in \pol\scripts\items you will find resField.src. I reproduce it below.

Code: Select all

use os;
use uo;

include "include/res";
include "include/resPenalty";
include ":poisonwatcher:poisons";

const EFFECT_SPARKLE := 0x373a;
const SOUND_EFFECT_RES := 0x215;

program resfield(mobile)
  set_critical(1);
  if(mobile.dead)
    start_script("itemRes", mobile);
    return;
  else
    SendSysMessage(mobile,"You are at peace...");
  endif
endprogram
You can use that as an example of what is needed to make a walokon script and tile.

Posted: Thu Nov 09, 2006 4:14 am
by Gnafu
Just an intrusion...

Where can i find a complete list of options that can be used in itemdesc.cfg?

In example, the "CanInsertScript" option is not on the head-comments in the pol\config\itemdes.cfg .

Is there a complete list somewhere?

Posted: Thu Nov 09, 2006 4:58 am
by Bytehawk
Go to this page and scroll down bit, until you reach "itemdesc.cfg"

Posted: Mon Nov 27, 2006 10:36 pm
by Damo307
i have an little error with my "item.cfg" so can someone help me out with it please?



-------------------------------------
item 0x0ecq
{
Name ft
Desc Flame Tile
color 1176
Graphic 6173
WalkOnScript tile
Movable 0
}
-------------------------------------

Posted: Mon Nov 27, 2006 11:38 pm
by Xadhoom
0x0ecq it's not a valid Hex value :eek:

Posted: Mon Nov 27, 2006 11:52 pm
by Damo307
oh okay, do you know one that will work :( ?

Posted: Tue Nov 28, 2006 6:57 am
by Pierce
Hex Values go from 0 to 9 and from a to f.
To find an unused value you have to look inside your objtypes.txt in your main pol directory.

Posted: Tue Nov 28, 2006 7:34 am
by Marilla
And be sure to use a value over 0x5000, but below 0xf000. It may work if you violate that rule, but you would be highly likely to have problems with collisions in the future with core/distro items, or new items you need to create later.