Humm amigo, o código está aqui
Vá em data\talkactions.xml,e cole isso dentro.
<talkaction words="/cp" event="script" value="areareturn.lua"/>
Depois vá em Data/talkactions/scripts, e crie um arquivo.lua com nome de areareturn e bote isso dentro.
AR = {x=2097, y=911, z=7}
--
local msg_to = "You as bee a teleported to Arena. You need to use /cp return to leave to here."
--
local sto_enter = 85315
--//--
function onSay(cid, words, param, channel)
local t = string.explode(param, ",")
if param == "" then
--
if getPlayerStorageValue(cid, 52480) >= 1 then
sendMsgToPlayer(cid, 27, "You are already dueling!")
return true end
if getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
sendMsgToPlayer(cid, 27, "You can't do that while is in battle!")
return true end
if getPlayerLevel(cid) < 50 then
sendMsgToPlayer(cid, 27, "Sorry, you need level 50 + to enter to arena Duel!")
return true end
--
setPlayerStorageValue(cid, sto_enter, 1)
doTeleportThing(cid, AR)
sendMsgToPlayer(cid, 20, msg_to)
end
-----------------------------------------------------------------
if param and param == "return" then
--
if getPlayerStorageValue(cid, sto_enter) > 1 then
return true end
if getPlayerStorageValue(cid, 52480) >= 1 then
sendMsgToPlayer(cid, 27, "You are already dueling!")
return true end
if getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
sendMsgToPlayer(cid, 27, "You can't do that while is in battle!")
return true end
if getPlayerLevel(cid) < 50 then
sendMsgToPlayer(cid, 27, "Sorry, you need level 50 + to enter to arena Duel.")
return true end
--
setPlayerStorageValue(cid, 154585, -1)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
end
return true
end
Mas slyton como edito e como eo comando?
Bom para editar o Level E para falar o comando, eo local para aonde será teleportado, bom mecha nessas linhas
Para aonde será teleportado mexa aqui: AR = {x=xxxx, y=yyy, z=z}
Para o level é aqui nessas 2 linhas : if getPlayerLevel(cid) < 50 then /if getPlayerLevel(cid) < 50 then
O comando é : /cp return
SE AJUDEI REP++ ![]()






info
Grupo: Campones
Registrado: 07/02/13
Posts: 24
Reputação: 0
Char no Tibia: Wingeon
Boa tarde pessoal do xTibia estou aqui para pedir uma script de quando algum player fica preso usa esse comando e voltar pro cp.

Gostaria que o comando fosse /cp return
quando fizerem me digam onde colocar também obrigado