christiandb
Member
Code:
local config = {
place = { x = 32176, y = 31861, z = 15 },
blackPearl = { x = 32180, y = 31871, z = 15, stackpos = 1 },
whitePearl = { x = 32173, y = 31871, z = 15, stackpos = 1 },
text = "Sorry you can't be teleported."
}
function onStepIn(cid, item, position, fromPosition)
if item.uid == 7523 then
if getPlayerStorageValue(cid, 7500) == 20 then
if getThingfromPos(config.whitePearl).itemid == 2143 and getThingfromPos(config.blackPearl).itemid == 2144 then
doTeleportThing(cid, config.place, 0)
setPlayerStorageValue(cid, 7500, 21)
else
doTeleportThing(cid, fromPosition, 0)
end
else
doTeleportThing(cid, fromPosition, 0)
end
else
doPlayerSendCancel(cid, config.text)
end
return TRUE
end
Thanks in advance,
Chris~