function onStepIn(cid, item, frompos, item2, topos)
local teleporter = 8001 -- actionid of the tp
local storagevalue = 5000 -- storagevalue which he'll get if the option "getValue" is set as "TRUE"
local hellgorak = {x=,y=,z=}
local annihilion = {x=,y=,z=}
local golgordan = {x=,y=,z=}
local latrivan = {x=,y=,z=}
local madareth = {x=,y=,z=}
local ushuriel = {x=,y=,z=}
local zugurosh = {x=,y=,z=}
if item.actionid == teleporter then
if getGlobalStorageValue(5001) == TRUE then
doTeleportThing(cid,hellgorak,0)
setPlayerStorageValue(cid,storagevalue +1,1)
doPlayerSendTextMessage(cid,21,"You where granted to leave this place.")
elseif getGlobalStorageValue(5002) == TRUE then
doTeleportThing(cid,annihilion,0)
setPlayerStorageValue(cid,storagevalue +2,1)
doPlayerSendTextMessage(cid,21,"You where granted to leave this place.")
elseif getGlobalStorageValue(5003) == TRUE then
doTeleportThing(cid,golgordan,0)
setPlayerStorageValue(cid,storagevalue +3,1)
doPlayerSendTextMessage(cid,21,"You where granted to leave this place.")
elseif getGlobalStorageValue(5004) == TRUE then
doTeleportThing(cid,latrivan,0)
setPlayerStorageValue(cid,storagevalue +4,1)
doPlayerSendTextMessage(cid,21,"You where granted to leave this place.")
elseif getGlobalStorageValue(5005) == TRUE then
doTeleportThing(cid,madareth,0)
setPlayerStorageValue(cid,storagevalue +5,1)
doPlayerSendTextMessage(cid,21,"You where granted to leave this place.")
elseif getGlobalStorageValue(5006) == TRUE then
doTeleportThing(cid,ushuriel,0)
setPlayerStorageValue(cid,storagevalue +6,1)
doPlayerSendTextMessage(cid,21,"You where granted to leave this place.")
elseif getGlobalStorageValue(5007) == TRUE then
doTeleportThing(cid,zugurosh,0)
setPlayerStorageValue(cid,storagevalue +7,1)
doPlayerSendTextMessage(cid,21,"You where granted to leave this place.")
else
doPlayerSendCancel(cid,"You may not pass before you defeated the Boss.")
end
end
return TRUE
end