• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

INQ TP doesn't appear when you kill you

Tyson12302

New Member
Joined
Aug 6, 2014
Messages
264
Reaction score
4
Whenever i kill the first INQ Boss i get the Message "You have 2 minutes to enter the TP" But the TP doesn't appear hear is my TP script.
Code:
local config = {
timeToRemove = 120, -- seconds
message = "You now have 2 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear",
teleportId = 9773,
bosses = { -- Monster Name, Teleport Position
["Ushuriel"] = { pos={ x=33157, y=31725, z=11, stackpos=1 }, aid=1001 },
["Zugurosh"] = { pos={ x=33123, y=31689, z=11, stackpos=1 }, aid=1002},
["Madareth"] = { pos={ x=33194, y=31768, z=11, stackpos=1 }, aid=1003},
["Annihilon"] = { pos={ x=33200, y=31704, z=11, stackpos=1 }, aid=1005},
["Hellgorak"] = { pos={ x=33107, y=31735, z=11, stackpos=1 }, aid=1006}
},
brothers ={
["Golgordan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Latrivan"},
["Latrivan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Golgordan"},
brothersArea ={
fromPos = {x = 33224, y = 31722, z = 11},
toPos = {x = 33240, y = 31734, z = 11} } }
}
local function removal(position)
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
return TRUE
end

function onKill(cid, target, lastHit)
if(config.bosses[getCreatureName(target)]) then
local t = config.bosses[getCreatureName(target)]
local teleport = doCreateItem(config.teleportId, t.pos)
local position = t.pos
doItemSetAttribute(teleport, "aid", t.aid)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
elseif(config.brothers[getCreatureName(target)]) then
local t = config.brothers[getCreatureName(target)]
local brother = getCreatureByName(t.brother)
if(isMonster(brother) == true) then
if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then
return TRUE
end
else
local teleport = doCreateItem(config.teleportId, t.pos)
local position = t.pos
doItemSetAttribute(teleport, "aid", t.aid)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
end
end
return TRUE
end
 
Last edited by a moderator:
I got the TP to appear but when i go into it, it doesnt TP me it just says "Entering...." and i stand on the TP. How do i change the TP destination on RME?
 
This tp is with actionid instead of destination, which means there needs to be a movement stepin script that tps the player.
You can also just add doCreateTeleport if you only want the player to be teleported.
Code:
doCreateTeleport(itemid, topos, createpos)
 
I'm totally confused now. I used this script that i got and it came with no Movement.xml scripts. I want to just get one Movement.xml script but my positions are different than the others
 
Then you can just use doCreateTeleport instead.
The itemid should be one with a destination, so you can use 1387, topos should be the position the players are teleported to and the createpos where the tp should be created.
 
Remove this
Code:
local teleport = doCreateItem(config.teleportId, t.pos)
doItemSetAttribute(teleport, "aid", t.aid)
Add this
Code:
doCreateTeleport(itemid, topos, createpos)
With the right parameters, so change itemid to 1387, topos to the position it should teleport to and createpos to the position where the tp should be created.

You can also use this or use it as example.
https://otland.net/threads/how-to-kill-a-boss-and-make-a-teleport-appear.201231/#post-1935477
 
Back
Top