• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Teleport Scroll

D_Evans89

Member
Joined
Dec 3, 2014
Messages
175
Reaction score
12
This is the script I'm using and it works. mostly...
I'm trying edit it though, that way once its used 5 times it will "decay" from 2345 to 7722.
But I want it's decayed form (7722) to have a written message on it.
I have both set up:
-when I use /i 7722 it summons the item and the message is on it
-when I use scroll it decays after 6 uses (not 5, cant figure out how to change it)

I just can't seem to link the two.

Any Idea? I been messing around with it for 2 hours now.

Using The Forgotten Server - Version 0.2.13 (Mystic Spirit).

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
 
Back
Top