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

Solved lever help

MadMOOK

Hoo
Joined
Apr 20, 2011
Messages
802
Reaction score
44
This script is supposed to check level and take tokens to teleport u and if it dont, then get message..

Right now it does not check level and only thing that works is teleport no matter what xD

Code:
local p = {x=2079, y=1992, z=11}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) >= 25 then
     if getPlayerItemById(cid, 6527, 10) then
        doRemoveItem(cid, 6527, 10)
    doTeleportThing(cid, p)
else
       doSendMagicEffect(p, CONST_ME_TELEPORT)
        doPlayerSendCancel(cid, "You have to be below level 25 and have 10 instance tokens.")
    doSendMagicEffect(cid, CONST_ME_POFF)
    end
doTransformItem(item.uid, item.itemid == 1946 and 1945 or 1946)
return true
end
end
 
Last edited:
Code:
local p = {x=2079, y=1992, z=11}
function onUse(cid, item, fromPosition, itemEx, toPosition)
   if getPlayerLevel(cid) >= 25 then
     if getPlayerItemCount(cid, 6527) >= 10 then
       doPlayerRemoveItem(cid, 6527, 10)
     else
       doSendMagicEffect(cid, CONST_ME_POFF)
       doTeleportThing(cid, p)
       doSendMagicEffect(p, CONST_ME_TELEPORT)
       doPlayerSendCancel(cid, "You have to be below level 25 and have 10 instance tokens.")
     end
     doTransformItem(item.uid, item.itemid == 1946 and 1945 or 1946)
   else
     doPlayerSendCancel(cid, "You have to be below level 25 and have 10 instance tokens.")
   end
   return true
end
 
Back
Top