Hey! I was wondering how you add charges to another item then a rune or items that have "built in" charges..
Lets say I got a regular scroll
Now I made it into an action, an onUse function which gives the player 100hp when using it.
But then it disappears cause I have the
line, to prevent spam clicking the hp in this case.
How would I make the scroll not only have one charge, but lets say 3?
Use this script as an example how to add it in please
Thanks!
Lets say I got a regular scroll
Code:
23:25 You see a scroll.
It weighs 0.50 oz.
ItemID: [1949].
Now I made it into an action, an onUse function which gives the player 100hp when using it.
But then it disappears cause I have the
Code:
doRemoveItem(item.uid)
How would I make the scroll not only have one charge, but lets say 3?
Use this script as an example how to add it in please
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) <= 200 then
doCreatureSay(cid, "You gained 15000000 experience!", TALKTYPE_ORANGE_1)
doPlayerAddExp(cid, 15000000)
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doRemoveItem(item.uid)
return TRUE
else
doCreatureSay(cid, "Can only be used lower then level 200.", TALKTYPE_ORANGE_1)
end
end
Thanks!