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

TalkAction Advanced Teleport System

Jano

oturhaN
Joined
Feb 21, 2008
Messages
876
Solutions
1
Reaction score
68
Location
Chile
Advanced Teleport System, You can add more teleport points in the script, it also have the back option that teleport you back to the pos where you used the command.

in talkations/script create a new file called advtp.lua
Code:
local storage = 1900 ---Here Will save the save point, if you set it to 1900 make you sure you dont have use the storages 1900,1901 and 1902
local naccess = 3 ---change it to the acces that you need to use the comand.
function onSay(cid, words, param)
if getPlayerAccess(cid) >= naccess then
newpos = {
["depot"] = {x=1029, y=996, z=7},
["enigma"] = {x=1000, y=1000, z=7}, 
["dragon"] = {x=980, y=1117, z=7}, 
["back"] = { x = getPlayerStorageValue(cid, storage), y = getPlayerStorageValue(cid, storage+1), z = getPlayerStorageValue(cid, storage+2)}
} 
----------------------------------End Config--------------------------------------------------------------------------------
npos = newpos[param]
setPlayerStorageValue(cid, storage, getPlayerPosition(cid).x)
setPlayerStorageValue(cid, storage+1, getPlayerPosition(cid).y)
setPlayerStorageValue(cid, storage+2, getPlayerPosition(cid).z)
doTeleportThing(cid, npos)
doSendMagicEffect(npos, 10)
end
end
-----------------------By Nahruto--------------------------
add this line in talkations.xml
Code:
<talkaction words="!go" script="advtp.lua" />
How to Use?
you say !go "somewhere ,and it teleport you there.
you say !go "back ,and it teleport back where you used the command.

to add more teleport point you would add this in the lua script.

Code:
["where"] = {x=xxxx, y=xxxx, z=x},
Enjoy =).

Lil update

Lua:
local storage = 1900
local naccess = 3

local newPos = 
    {
        ["depot"] = {x = 1029, y = 996, z = 7},
        ["enigma"] = {x = 1000, y = 1000, z = 7}, 
        ["dragon"] = {x = 980, y = 1117, z = 7}
    } 

function onSay(cid, words, param)
    newPos["back"] = {x = getPlayerStorageValue(cid, storage), y = getPlayerStorageValue(cid, storage+1), z = getPlayerStorageValue(cid, storage+2)}
    local nPos = newPos[param]
    if nPos then
        setPlayerStorageValue(cid, storage, getPlayerPosition(cid).x)
        setPlayerStorageValue(cid, storage+1, getPlayerPosition(cid).y)
        setPlayerStorageValue(cid, storage+2, getPlayerPosition(cid).z)
        doTeleportThing(cid, nPos)
    end
    return true
end
 
Last edited:
@up
too manual? all you gotta do is add the name of the tlp and the coords, what do you want? that it read your thoughts and then teleport you where you're thinking to?
 
How to me edit this for PZ players don't use??? i'm want to edit this for VIP players, but don't want the PZ players can teleported....

No more, thx....

F@bio
 
Its more like a GM tool than a normal player tool :p
 
Ehm, so does this one. The only difference is that he's got the locations in the same file as the script..
 
Ehm, so does this one. The only difference is that he's got the locations in the same file as the script..

And with his script you can go back to where you were at - useless ;o
 
dont work for me >_<
i think im doing something wrong but i follow all the insctructions :S
im using TFS 0.2.13 rev 1000 modified by gesior
when i try to use it with a normal player or my gm (acces 5) nothing happens :S
 
@up
thxx! now i can use it :)
but how to make that only a few players can use it? and how to make that players who have the attack symbol doesnt use it?
 
@up
thxx! now i can use it :)
but how to make that only a few players can use it? and how to make that players who have the attack symbol doesnt use it?

Access needed can be defined in talkactions.xml, if youre using an older revision add at the beginning of the script (after function onSay()):
Code:
if getPlayerGroupId(cid) < x then
    return FALSE
end
And about battle (again at the beginning):
Code:
if getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
    doPlayerSendTextMessage(cid, 17, "Tou cannot you this command while in battle!")
    return FALSE
end
 
TFS already has somethings like this, but not as configurable.
/t = takes you to your temple POS.
/town Thais = takes you to the temple of the town.
 
Back
Top