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
add this line in talkations.xml
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.
Enjoy =).
Lil update
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--------------------------
Code:
<talkaction words="!go" script="advtp.lua" />
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},
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: