• 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!

It refuses to teleporting players

Acrenactive

★Designer★
Joined
Mar 21, 2013
Messages
224
Reaction score
55
Location
Los Angels L.A
Hello Guys!

i use 0.4 tfs and is 8.6

I have now solved my old problem with this script but I now have a new problem, why it would not teleporting players to the position. that it say in script a position there should tp the players to.
can someone help me with this why this dont work? :rolleyes:




local createpos = {x=705,y=1246,z=5}
local topos = {x=748,y=1296,z=7}
local msg = "Eleminator Boss TP has now closed! It will open again in 1 Hours!"
local timetoclose = 60 -- in second

local function remove()
local tp = getTileItemById(createpos,1387).uid
if tp ~= 0 then
doRemoveItem(tp)
doBroadcastMessage(msg)
end
end

function onThink(interval)
local tp = doCreateItem(1387, 1, createpos)
doItemSetAttribute(tp, "aid", 37720)
doBroadcastMessage("Eleminator Boss TP is now open!\nCatch the teleport within "..timetoclose.." seconds quickly! Located in Underground Depo.")
addEvent(remove,timetoclose*1000)
return true
end
 
i dont really understand. what you mean with "did you edit your action id's position?"
since your script sets an action id to the teleport, i'm assuming it teleports the player using a movement script
so im asking did you edit the position for that aid movement script?
 
The script you pasted is an interval based Globalevent script.
What your script does is create the TP every given interval of time.

What Xeraphus is saying is that the part that actually teleports the players would be the Movement script associated with the Teleport you created with the AID of 37720.

To find the solution to your problem you should check that movement script and see if it's configured to teleport players to the correct position.
 
The script you pasted is an interval based Globalevent script.
What your script does is create the TP every given interval of time.

What Xeraphus is saying is that the part that actually teleports the players would be the Movement script associated with the Teleport you created with the AID of 37720.

To find the solution to your problem you should check that movement script and see if it's configured to teleport players to the correct position.
Thank you but when i made a movement script so do not create the tp

<movevent type="StepIn" uniqueid="37720" event="script" value="boss.lua"/>

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local positions = {
{x = 748, y = 1296, z = 7},
{x = 706, y = 1255, z = 7}
}
local teleported = false
for _, pos in ipairs(positions) do
local creature = getTopCreature(pos).uid
if creature < 1 then
doPlayerSendTextMessage(cid, 19, "Welcome to the boss room")
doTeleportThing(cid, pos, TRUE)
teleported = true
break
end
end
if teleported ~= true then
doPlayerSendTextMessage(cid, 19, "Looks like the boss room was full!")
doTeleportThing(cid, fromPosition)
end
return true
end
 
A simple solution to determine how a script is working is send the player a text message using doPlayerSendTextMessage or to the console using print, since you said you created a movement script but it is not working you should have no issue placing either at different execution levels.

Also please do not center the code or your question if you are looking for help its very unlikely that you constructed the code in that fasion and if you did its probably one of the reasons you are having issues with your codes execution.
 
Back
Top