XxDeathAvenger
New Member
- Joined
- May 5, 2011
- Messages
- 95
- Reaction score
- 2
If I have my teleport scroll actionid set to 45001, and the itemid is 2345, what should I change on this?
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not getCreatureCondition(cid, CONDITION_INFIGHT) then
doTeleportThing(cid, getPlayerMasterPos(cid))
doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
doSetItemActionId(item.uid, item.actionid ~= 0 and item.actionid + 100 or 100)
if item.actionid == 500 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This item was used to many times and has been worn out.")
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid, "Please go to a safe area before using this scroll.")
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
return true
end