Kaboo
New Member
- Joined
- Feb 14, 2009
- Messages
- 142
- Reaction score
- 0
Hi, i'm trying to use the following script for an armor, so it will improve Club in 15 (i'll configure it for more skills later).
When you equip the armor, it must adds 15 skills, and then when it is deequiped it will decrease club fighting in 15:
But it just add 2 Club Skills when i equip it, and it adds 1 more Club Skill when i deequip.
Is something wrong? I cannot just configure it in items.xml because it needs a storage value to equip the armor.
Any tips of what's wrong?
When you equip the armor, it must adds 15 skills, and then when it is deequiped it will decrease club fighting in 15:
Code:
function onEquip(cid, item, slot)
if (getPlayerStorageValue(cid, 312423) == 1) then
doCreatureSay(cid, "You have storage!", TALKTYPE_ORANGE_1)
[B]doPlayerAddSkill(cid,1,15)[/B]
return TRUE
elseif (getPlayerStorageValue(cid, 312423) == -1) then
doCreatureSay(cid, "Must Have Storage!", TALKTYPE_ORANGE_1)
return FALSE
end
end
function onDeEquip(cid, item, slot)
[B]doPlayerAddSkill(cid,1,-15)[/B]
end
But it just add 2 Club Skills when i equip it, and it adds 1 more Club Skill when i deequip.
Is something wrong? I cannot just configure it in items.xml because it needs a storage value to equip the armor.
Any tips of what's wrong?