• 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!

Levels For teleporters. TFS 0.4

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) == 1000 then
        doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
    else
        doPlayerSendCancel(cid, "Sorry, you are not level 1000.")
    end
    return true
end
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerLevel(cid) == 1000 then
        doTeleportThing(cid, {x = 1000, y = 1000, z = 7})
    else
        doPlayerSendCancel(cid, "Sorry, you are not level 1000.")
    end
    return true
end



Mate im sorry if this is nooby ahaha, where would i put this??? what folder?
 
onUse is an action script.
You can easily change it to a movement script if you wanted to, though.

--Edit
data/actions


i have made a file in actions/scripts and added that code, then i went into actions.xml and added the registration, but it doesnt seem to work and i get no error while testing, would the registration be "actionid=" or "itemid="?
 
Back
Top