function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = {x=666, y=666, z=7}
if itemEx.actionid == 1277 then
doTeleportThing(cid, pos)
end
return true
end
function onStepIn(cid, item, position, fromPosition)
local newPos = {x = 33427, y = 31829, z = 13}
local vocation = {2, 6, 10}
local lvl = {100}
if(isInArray(vocation, getPlayerVocation(cid)) and doPlayerRemoveItem(cid, 7761, 20) == true) and getPlayerLevel(cid, lvl) then
doTeleportThing(cid, newPos)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
else
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYHIT)
doPlayerSendTextMessage(0, cid, 22, 'Only druids with 20 enchanted small emeralds and 100 level may enter here.')
end
end
function onStepIn(cid, item, position, fromPosition)
local newPos = {x = 33427, y = 31829, z = 13}
local lvl = {100}
if(isInArray(getPlayerItem(cid, 7761) == true) and getPlayerLevel(cid, lvl) then
doTeleportThing(cid, newPos)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
else
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYHIT)
doPlayerSendTextMessage(0, cid, 22, 'Dude, you cannot enter there! You must take off your pirate pants to backpack and have 100 level.')
end
end
LUA:function onStepIn(cid, item, position, fromPosition) local newPos = {x = 33427, y = 31829, z = 13} local lvl = {100} if(isInArray(getPlayerItem(cid, 7761) == true) and getPlayerLevel(cid, lvl) then doTeleportThing(cid, newPos) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) else doTeleportThing(cid, fromPosition) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_ENERGYHIT) doPlayerSendTextMessage(0, cid, 22, 'Dude, you cannot enter there! You must take off your pirate pants to backpack and have 100 level.') end end
local t,l,i = {x = 33427, y = 31829, z = 13},100,7761
function onStepIn(cid,item,topos,itemEx,frompos)
local v = getThingPos(cid)
if getPlayerItemCount(cid,i) > 0 then
if getPlayerLevel(cid) >= l then
doTeleportThing(cid,t)
doSendMagicEffect(t,CONST_ME_TELEPORT)
else
doTeleportThing(cid,frompos)
doPlayerSendTextMessage(cid,MESSAGE_LAST,'You need to be level 100.')
doSendMagicEffect(v,CONST_ME_POFF)
end
else
doPlayerSendTextMessage(cid,MESSAGE_LAST,'You must have pirate legs to enter the teleport.')
doTeleportThing(cid,frompos)
doSendMagicEffect(v,CONST_ME_POFF)
end
return true
end