robe help
basically you can go into your itemdesc.cfg and create a new entry for your new robe. Something like this
change the 2 lines I have in caps and parentheses to valid entries.
Now in the equip script, you want something like
Code: Select all
Armor (PUT VALID OBJTYPE HERE!)
{
Name Robe
Graphic 0x1f03
AR 4
Coverage Body
Coverage Legs/feet
Coverage Arms
VendorSellsFor 68
VendorBuysFor 34
maxhp 20
equipscript (PUT SCRIPT YOU WANT TO RUN ON EQUIP HERE!)
}Now in the equip script, you want something like
Code: Select all
use util;
program equip(who, robe)
var validcolors := { 1, 2, 10, 20, 30, 40, 60, 80 }; //Put all valid colors here separated by commas.
var rint := RandomInt(validcolors.size())+1;
var color := validcolors[rint];
robe.color := color;
return 1;
endprogram