local config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
bosses = {
["Ushuriel"] = { x = 3486, y = 3373, z = 5 },
["Annihilon"] = { x = 3547, y = 3601, z = 5 },
["Hellgorak"] = { x = 3365, y = 3613, z = 6 },
["Madareth"] = { x = 3346, y = 3510, z = 6 },
["Zugurosh"] = { x = 3429, y = 3455, z = 5 },
["Latrivan"] = { x = 3541, y = 3444, z = 6}
}
}
local function removal(position)
position.stackpos = 1
if getThingfromPos(position).itemid == config.teleportId then
doRemoveItem(getThingfromPos(position).uid)
end
return TRUE
end
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortals")
local position = getCreaturePosition(cid)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(cid) then
teleport = doCreateTeleport(config.teleportId, pos, position)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
end
end
return TRUE
end
<event type="death" name="inquisitionPortals" script="Inquisition/teleports_inquisition.lua"/>
registerCreatureEvent(cid, "inquisitionPortals")
<script>
<event name="inquisitionPortals"/>
</script>
Dont forget to Rep++ me
i am using this and working perfect 100%
Here you are the inq teleports all u have to do is to create this script
data/creaturescripts/scripts/inquisition/teleports_inquisition.lua
and paste the following:
Code:local config = { message = "Go into the teleporter in 3 minutes, else it will disappear.", timeToRemove = 180, -- seconds teleportId = 1387, bosses = { ["Ushuriel"] = { x = 3486, y = 3373, z = 5 }, ["Annihilon"] = { x = 3547, y = 3601, z = 5 }, ["Hellgorak"] = { x = 3365, y = 3613, z = 6 }, ["Madareth"] = { x = 3346, y = 3510, z = 6 }, ["Zugurosh"] = { x = 3429, y = 3455, z = 5 }, ["Latrivan"] = { x = 3541, y = 3444, z = 6} } } local function removal(position) position.stackpos = 1 if getThingfromPos(position).itemid == config.teleportId then doRemoveItem(getThingfromPos(position).uid) end return TRUE end function onDeath(cid, corpse, killer) registerCreatureEvent(cid, "inquisitionPortals") local position = getCreaturePosition(cid) for name, pos in pairs(config.bosses) do if name == getCreatureName(cid) then teleport = doCreateTeleport(config.teleportId, pos, position) doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1) addEvent(removal, config.timeToRemove * 1000, position) end end return TRUE end
Dont forget to put you own Coordinates x-y-z that u want the tp to teleport the player to.
then
add this line to data/creaturescripts/creaturescripts.xml
Code:<event type="death" name="inquisitionPortals" script="Inquisition/teleports_inquisition.lua"/>
then go to data/creaturescriptes/login.lua
and add the foloowing after Function onLogin(cid)
Code:registerCreatureEvent(cid, "inquisitionPortals")
now your almost done
go to each monester that u want to to create tp and the are shown in the first script then add like that example
to make Ushuriel working goto
data/monester/bosses/ushuriel.xml
then add this after flags
Code:<script> <event name="inquisitionPortals"/> </script>
then when u kill the monester it will make the tp and this tp will disappear after 3 minutes
Rep++ if it worked it's tested on my server and workign perfect
Dont forget to Rep++ me
i am using this and working perfect 100%
Here you are the inq teleports all u have to do is to create this script
data/creaturescripts/scripts/inquisition/teleports_inquisition.lua
and paste the following:
Code:local config = { message = "Go into the teleporter in 3 minutes, else it will disappear.", timeToRemove = 180, -- seconds teleportId = 1387, bosses = { ["Ushuriel"] = { x = 3486, y = 3373, z = 5 }, ["Annihilon"] = { x = 3547, y = 3601, z = 5 }, ["Hellgorak"] = { x = 3365, y = 3613, z = 6 }, ["Madareth"] = { x = 3346, y = 3510, z = 6 }, ["Zugurosh"] = { x = 3429, y = 3455, z = 5 }, ["Latrivan"] = { x = 3541, y = 3444, z = 6} } } local function removal(position) position.stackpos = 1 if getThingfromPos(position).itemid == config.teleportId then doRemoveItem(getThingfromPos(position).uid) end return TRUE end function onDeath(cid, corpse, killer) registerCreatureEvent(cid, "inquisitionPortals") local position = getCreaturePosition(cid) for name, pos in pairs(config.bosses) do if name == getCreatureName(cid) then teleport = doCreateTeleport(config.teleportId, pos, position) doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1) addEvent(removal, config.timeToRemove * 1000, position) end end return TRUE end
Dont forget to put you own Coordinates x-y-z that u want the tp to teleport the player to.
then
add this line to data/creaturescripts/creaturescripts.xml
Code:<event type="death" name="inquisitionPortals" script="Inquisition/teleports_inquisition.lua"/>
then go to data/creaturescriptes/login.lua
and add the foloowing after Function onLogin(cid)
Code:registerCreatureEvent(cid, "inquisitionPortals")
now your almost done
go to each monester that u want to to create tp and the are shown in the first script then add like that example
to make Ushuriel working goto
data/monester/bosses/ushuriel.xml
then add this after flags
Code:<script> <event name="inquisitionPortals"/> </script>
then when u kill the monester it will make the tp and this tp will disappear after 3 minutes
Rep++ if it worked it's tested on my server and workign perfect
[04/12/2009 09:05:12] Lua Script Error: [CreatureScript Interface]
[04/12/2009 09:05:12] buffer: onKill
[04/12/2009 09:05:12] luaDoCreateTeleport(). Tile not found
change tp creation positions of he? <,<do i have to put a actionid or a uid on the tp cause when i step onto it, it does nothing
EDIT: i have got it working now but i get this error
also is there a way to make the boss's corpse not go into the teleport when it is moveable
Anyone know how do I make teleporters which tp me in the different Seals only possible if you done this seal? Can't find anything with the Search function.
I'll give rep++
Yours,
Sue Mea
<!-- Inquisition -->
<movement type="StepIn" uniqueid="5900" event="script" value="teleportsgo.lua" />
<movement type="StepIn" uniqueid="5901" event="script" value="teleportsgo.lua" />
<movement type="StepIn" uniqueid="5902" event="script" value="teleportsgo.lua" />
<movement type="StepIn" uniqueid="5903" event="script" value="teleportsgo.lua" />
<movement type="StepIn" uniqueid="5904" event="script" value="teleportsgo.lua" />
<movement type="StepIn" uniqueid="5905" event="script" value="teleportsback.lua" />
<movement type="StepIn" uniqueid="5906" event="script" value="teleportsback.lua" />
<movement type="StepIn" uniqueid="5907" event="script" value="teleportsback.lua" />
<movement type="StepIn" uniqueid="5908" event="script" value="teleportsback.lua" />
<movement type="StepIn" uniqueid="5909" event="script" value="teleportsback.lua" />
function onStepIn(cid, item, pos)
if item.uid == 5900 then
if getPlayerStorageValue(cid,5900) == -1 then
doTeleportThing(cid,{x=1067, y=1081, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MORTAREA)
doCreatureSay(cid, "You haven't passed Ushuriel's seal yet.", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid,{x=1176, y=1140, z=12})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
end
elseif item.uid == 5901 then
if getPlayerStorageValue(cid,5901) == -1 then
doTeleportThing(cid,{x=1069, y=1082, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MORTAREA)
doCreatureSay(cid, "You haven't passed Zugurosh's seal yet.", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid,{x=1128, y=1151, z=12})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
end
elseif item.uid == 5902 then
if getPlayerStorageValue(cid,5902) == -1 then
doTeleportThing(cid,{x=1069, y=1087, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MORTAREA)
doCreatureSay(cid, "You haven't passed Madareth's seal yet.", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid,{x=1045, y=1205, z=13})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
end
elseif item.uid == 5903 then
if getPlayerStorageValue(cid,5903) == -1 then
doTeleportThing(cid,{x=1067, y=1089, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MORTAREA)
doCreatureSay(cid, "You haven't passed the Brother's seal yet.", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid,{x=1152, y=1195, z=13})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
end
elseif item.uid == 5904 then
if getPlayerStorageValue(cid,5904) == -1 then
doTeleportThing(cid,{x=1062, y=1089, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MORTAREA)
doCreatureSay(cid, "You haven't passed Annihilon's seal yet.", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid,{x=1245, y=1297, z=12})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
end
end
return 1
end
function onStepIn(cid, item, pos)
if item.uid == 5905 then
setPlayerStorageValue(cid,5900,1)
doTeleportThing(cid,{x=1064, y=1085, z=14}) -- Coordinates of main room.
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
elseif item.uid == 5906 then
setPlayerStorageValue(cid,5901,1)
doTeleportThing(cid,{x=1064, y=1085, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
elseif item.uid == 5907 then
setPlayerStorageValue(cid,5902,1)
doTeleportThing(cid,{x=1064, y=1085, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
elseif item.uid == 5908 then
setPlayerStorageValue(cid,5903,1)
doTeleportThing(cid,{x=1064, y=1085, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
elseif item.uid == 5909 then
setPlayerStorageValue(cid,5904,1)
doTeleportThing(cid,{x=1064, y=1085, z=14})
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_TELEPORT)
end
return 1
end