local config = {
bosses={---aid of portal, position where it sends, value it sets, text it shows
[1001] = {pos={x=32881, y=31270, z=11, stackpos=1}, value=1, text="Entering The Crystal Caves"},
[1002] = {pos={x=32837, y=21283, z=11, stackpos=1}, value=2, text="Entering The Blood Halls"},
[1003] = {pos={x=32753, y=31338, z=12, stackpos=1}, value=3, text="Entering The Vats"},
[1004] = {pos={x=32860, y=31328, z=12, stackpos=1}, value=4, text="Entering The Arcanum"},
[1005] = {pos={x=32954, y=31429, z=11, stackpos=1}, value=5, text="Entering The Hive"},
[1006] = {pos={x=32772, y=31441, z=12, stackpos=1}, value=6, text="Entering The Shadow Nexus"}
},
mainroom={---aid, position, lowest value that can use this portal, text
[2001] = {pos={x=32881, y=31270, z=11, stackpos=1}, value=1, text="Entering The Crystal Caves"},
[2002] = {pos={x=32837, y=21283, z=11, stackpos=1}, value=2, text="Entering The Blood Halls"},
[2003] = {pos={x=32753, y=31338, z=12, stackpos=1}, value=3, text="Entering The Vats"},
[2004] = {pos={x=32860, y=31328, z=12, stackpos=1}, value=4, text="Entering The Arcanum"},
[2005] = {pos={x=32954, y=31429, z=11, stackpos=1}, value=5, text="Entering The Hive"} },
portals={---aid, position, text
[3000] = {pos={x=32768, y=31214, z=13}, text="Entering Inquisition Portals Room"},
[3001] = {pos={x=32806, y=31347, z=11}, text="Entering The Ward of Ushuriel"},
[3002] = {pos={x=32893, y=31200, z=11}, text="Entering The Undersea Kingdom"},
[3003] = {pos={x=32838, y=31346, z=11}, text="Entering The Ward of Zugurosh"},
[3004] = {pos={x=32856, y=31260, z=11}, text="Entering The Foundry"},
[3005] = {pos={x=32820, y=31386, z=11}, text="Entering The Ward of Madareth"},
[3006] = {pos={x=32751, y=31266, z=12}, text="Entering The Battlefield"},
[3007] = {pos={x=32855, y=31386, z=11}, text="Entering The Ward of The Demon Twins"},
[3008] = {pos={x=32947, y=31272, z=12}, text="Entering The Soul Wells"},
[3009] = {pos={x=32895, y=31346, z=11}, text="Entering The Ward of Annihilon"},
[3010] = {pos={x=32900, y=31388, z=11}, text="Entering The Ward of Hellgorak"} },
storage=56123,---storage used in boss and mainroom portals
walkback="You don't have enough energy to enter this portal",---message if you cannot use mainroom portal
e={} }----dunno whats this but have to be like this to make doCreatureSayWithDelay working, DON'T TOUCH}
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
if(config.bosses[item.actionid]) then
local t= config.bosses[item.actionid]
if getPlayerStorageValue(cid, config.storage)< t.value then
setPlayerStorageValue(cid, config.storage, t.value)
end
doTeleportThing(cid, t.pos)
doCreatureSayWithDelay(cid,t.text,19,1, config.e)
elseif(config.mainroom[item.actionid]) then
local t= config.mainroom[item.actionid]
if getPlayerStorageValue(cid, config.storage)>=t.value then
doTeleportThing(cid, t.pos)
doCreatureSayWithDelay(cid,t.text,19,1,config.e)
else
doTeleportThing(cid, fromPosition)
doCreatureSay(cid, config.walkback, 19)
end
elseif(config.portals[item.actionid]) then
local t= config.portals[item.actionid]
doTeleportThing(cid, t.pos)
doCreatureSayWithDelay(cid,t.text,19,1,config.e)
end
end
end