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

[Solved] Script Problem

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Solutions
2
Reaction score
115
Problem Solved - Close/Delete Thread -
 
Last edited:
This worked perfect for me,
doCreateTeleport(1387, {x=1, y=1, z=7}, getClosestFreeTile(cid, toPosition, false, false))

EDIT:
lol, sometimes I could put the tp on walls and sometimes I couldn't -.-

Edit 2:
Seems like that function only detects players/monsters.
 
I need an item that has "Use With" on it...
otherwise it just makes TP on me.
 
Yeah, I thought that was what you were using. ^^

Maybe you could do something like
if getThingFromPos({x=toPosition.x, y=toPosition.y, z=toPosition.z, stackpos=1}) == FALSE then
and add the other stackpos too?
 
It works now, but now my "doRemoveTeleport" function wont remove the TP,
and I can create the TP anywhere...

There has to be another function:
Lua:
local teleportPosition =
 
With this you can only create the tp on ground.
Lua:
local teleportPosition = getThingFromPos({x=toPosition.x, y=toPosition.y, z=toPosition.z, stackpos=1})
if teleportPosition.itemid <= 0 then 
	doCreateTeleport(1387, {x=1, y=1, z=7}, toPosition)
end

What about the remove teleport? how does it look?
 
Back
Top