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

[8.42+]Lua script, teleporter

Sargeras

Polish mapper :)
Joined
Nov 20, 2008
Messages
40
Reaction score
0
Location
Poland ! :)
Hi otlanders :D
I need a lua script for TFS 8.42+

when I click on some thing (for example, blue fire/mystic flame), it will teleport me to appointed coordinates.

Can you help me?
Pleaaaase :D
 
when you click on , they must be usable items
so if they are usable items
LUA:
local pos = (x=,y=,z=}
function onUse(cid, item, fromPosition, itemEx, toPosition)
doTeleportThing(cid,pos,FALSE)
doSendMagicEffect(getThingPos(cid),10)
return true
end

elseif you meant on walking on it then it need somthng else
 
Ok, i used this code and it works very well!

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        local telePos = {x=149 , y=388 , z=7}
        doTeleportThing(cid, telePos)
        doSendMagicEffect(getPlayerPosition(cid), 10)
        doSendMagicEffect(telePos, 10)
        doPlayerSendTextMessage(cid, 22, "You got teleported!")
    return TRUE
end
 
Back
Top