Hello, i made some quests in my server that give you items that give you life & mana etc, but i cant get the item to work :l this is the script i made with my amateur skills lol feel free to call me a noob xD
this is just one of the scripts, according to me, the script will give 50k of life to the player that uses it, and if the player tries to use another scroll, it will not let him hehe, and yes i put the item in actions, this is what i have in actions
help me i dont know why it isnt working, i dont get any errors when i click on the items nothing happens, it just says " you cannot use this item "
btw what do you guys think about my mapping skills lol?

that door only allow players to pass if they have vip 2 hehe
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 3332 then
queststatus = getPlayerStorageValue(cid,3332)
if queststatus == -1 or queststatus == 0 then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+50000)
doCreatureSay(cid, "You gained 50k of life, now your health is ".. getCreatureMaxHealth(cid) .."!" ,19)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED)
doRemoveItem(item.uid)
setPlayerStorageValue(cid,3332,1)
else
doPlayerSendTextMessage(cid,22,"You already got your life.")
end
else
return 0
end
return 1
end
Code:
<action itemid="6571" event="script" value="itemlife.lua"/>
btw what do you guys think about my mapping skills lol?

that door only allow players to pass if they have vip 2 hehe