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

Solved Teleport script

fredde3436

Member
Joined
Jul 6, 2009
Messages
226
Reaction score
7
I was trying to crate a stepin teleport for sorcerers only.
When i walk on the tile it says "only sorcerers may enter"
Whats wrong?

Code:
function onStepIn(cid, item, pos)
local iceshrine = {x=1243, y=998, z=15}
         vocation = getPlayerVocation(cid) == 1
if item.actionid == 15111 then
if vocation == 1 then
doTeleportThing(cid,iceshrine)
doSendMagicEffect(getCreaturePosition(cid),10)
  else
  doPlayerSendTextMessage(cid,19,"Only sorcerers may enter.")
end
end
end
 
Code:
function onStepIn(cid, item, position, fromPosition)
    if isPlayer(cid) and isSorcerer(cid) then
        doTeleportThing(cid, {x = 1243, y = 998, z = 15})
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    else
        doPlayerSendCancel(cid, "Only sorcerers may enter.")
    end
end
 
Back
Top