Page 1 of 1

CProp to equipped item question

PostPosted: Mon Aug 09, 2004 6:30 am
by Rena
Alright, here is what I got, this script is supposed to place a cprop on the gloves that actually have to be equipped, now my problem is that although it is supposed to do it, it doesnt seem to be doing it, so below is my script, and I am hoping that someone could help me out here.

script:
---------------------------------------------
var monkgloves := GetEquipmentByLayer(who, 7);
var gloves := 0xA66;
var spikedgloves := 0xA67;
var myskill := GetAttribute(who, "anatomy");
var duration := CInt(myskill/20);

SetObjProperty(who, "#usingmonkability", 0x1);

if (!who)
EraseObjProperty(who, "#usingmonkability");
return 0;
endif

if (!CheckSkill(who, SKILLID_ANATOMY, -1, modify_points(who, SKILLID_ANATOMY, 0)))
SendSysMessage(who,"You fail at attempting this move.");
EraseObjProperty(who, "#usingmonkability");
return 0;
endif

if(monkgloves == gloves || spikedgloves)
SetObjProperty(gloves, "#surgfists", 0x1);
SetObjProperty(gloves, "#duration", duration);
EraseObjProperty(who, "#usingmonkability");
SetStamina(who, GetStamina(who) + -25);
elseif(monkgloves == spikedgloves)
SetObjProperty(spikedgloves, "#surgfists", 0x1);
SetObjProperty(spikedgloves, "#duration", duration);
EraseObjProperty(who, "#usingmonkability");
SetStamina(who, GetStamina(who) + -25);
else
SendSysMessage(who, "You must have spiked or horned gloves equipped.");
EraseObjProperty(who, "#usingmonkability");
return;
endif
-------------------------------------------

So uhh..there it is, I would apreciate any help on this, would be most grateful. Thanks.