There was this script in a 8.4 server i used to play that you'd say !tp Lidrox , (Lidrox would be a character on the server) and it would send a message saying, Silyx(the other char on that server that said !tp Lidrox) is trying to teleport you, to be teleported say !accept, and it would teleport Lidrox to Silyx. I could get my hand in part of that talkaction but it wont work in 9.82 can some1 try to fix it please. Thank you.
PHP:
function onSay(cid, words, param, channel)
if(param ~= "")then
local player = getPlayerByName(param)
local pos = getCreaturePosition(cid)
local expire = 30 -- time to expire invocation
if(isPlayer(player))then
setPlayerStorageValue(player, 30000, os.time()+expire)
setPlayerStorageValue(player, 30001, pos.x)
setPlayerStorageValue(player, 30002, pos.y)
setPlayerStorageValue(player, 30003, pos.z)
doPlayerSendTextMessage(cid, 19, "Please wait for "..getPlayerName(player).." to !accept")
doPlayerSendTextMessage(player, 19, ""..getPlayerName(cid).." is trying to tp you. !accept if you want.")
else
doPlayerSendCancel(cid, "Wrong player.")
end
else
doPlayerSendCancel(cid, "Please write the player name.")
end
return TRUE
end
PHP:
function onSay(cid, words, param, channel)
local pos = {x=getPlayerStorageValue(cid, 30001), y=getPlayerStorageValue(cid, 30002), z=getPlayerStorageValue(cid, 30003), stackpos=1}
if getCreatureCondition(cid, CONDITION_INFIGHT) > 0 then
doPlayerSendCancel(cid, "You cannot use this while in battle.") else
doTeleportThing(cid, pos)
end
return TRUE
end