Hello i wrote code, it work but when we use chest that give % skills, i dont know why, i need to get from chest always +1 skill, can you help me?
@edit
ok i fix it xd
@edit
ok i fix it xd
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 1740 then
queststatus = getPlayerStorageValue(cid, 3939)
if queststatus == -1 then
setPlayerStorageValue(cid, 3939, 1)
doPlayerAddItem(cid, 2160, 1)
doSendAnimatedText(getPlayerPosition(cid),"SKILL!", TEXTCOLOR_GREEN)
doPlayerAddSkill(cid, SKILL_SHIELD, 1)
else
doPlayerSendTextMessage(cid, 22, "it is empty.")
end
end
return 1
end
Last edited: