--sorcerer and master sorcerers tp-
local id = 1000
local place = {x=1001, y=1000, z=7}
--druid and elder druid tp--
local id2 = 2000 -- unique id you will set to item
local place2 = {x=1006, y=1000, z=7} -- potition
function onStepIn(cid, item, position, fromPosition)
if getPlayerLookDir(cid) == 0 then
newdir = 2
elseif getPlayerLookDir(cid) == 1 then
newdir = 3
elseif getPlayerLookDir(cid) == 2 then
newdir = 0
else
newdir = 1
end
if item.actionid == id then
if getPlayerVocation(cid) ~= 5 and getPlayerLevel(cid) >= 30 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING,"Only Master Sorcerer's are alowed to pass!")
doMoveCreature(cid, newdir)
end
if getPlayerVocation(cid) ~= 5 and getPlayerLevel(cid) < 30 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Only Master Sorcerers With lvl 30 over are allowed to pass!")
doMoveCreature(cid, newdir)
end
if getPlayerVocation(cid) == 5 and getPlayerLevel(cid) < 30 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Only lvl 30+ or over are allowed to pass!")
doMoveCreature(cid, newdir)
end
end
if item.actionid == id2 then
if getPlayerVocation(cid) ~= 6 and getPlayerLevel(cid) >= 30 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Only Elder Druids are alowed to pass!")
doMoveCreature(cid, newdir)
end
if getPlayerVocation(cid) ~= 6 and getPlayerLevel(cid) < 30 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Only Elder Druids With lvl 30 over are allowed to pass!")
doMoveCreature(cid, newdir)
end
if getPlayerVocation(cid) == 6 and getPlayerLevel(cid) < 30 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Only lvl 30+ or over are allowed to pass!")
doMoveCreature(cid, newdir)
end
end
if item.actionid == id then
if getPlayerVocation(cid) == 5 and getPlayerLevel(cid) >= 30 then
doTeleportThing(cid, place)
doPlayerSendTextMessage(cid, TALKTYPE_MONSTER_YELL, "You are teleported to Enchanted Temple!")
doSendMagicEffect(getPlayerPosition(cid), 10)
end
end
if item.actionid == id2 then
if getPlayerVocation(cid) == 6 and getPlayerLevel(cid) >= 30 then
doTeleportThing(cid, place2)
doPlayerSendTextMessage(cid, TALKTYPE_MONSTER_YELL, "You are teleported to Enchanted Temple!")
doSendMagicEffect(getPlayerPosition(cid), 10)
end
end
end