.Qual servidor ou website você utiliza como base?
Qual o motivo deste tópico?
Queria saber o que estou colocando de errado.
Está surgindo algum erro? Se sim coloque-o aqui.
Você tem o código disponível? Se tiver publique-o aqui:
-- AQUI TA NA PASTA \data\talkactions\lib --
function onSay(cid, words, param)
local config = {
pz = true, -- players precisam estar em protection zone para usar? (true or false)
battle = false, -- players deve estar sem battle? (true or false)
custo = true, -- precisa de dinheiro para teleportar? (true or false)
need_level = false, -- nível necessario para usar o comando (true or false)
vip = true -- se precisa ser vip account ou premium account (true or false)
}
--[[ Config lugares]]-- level é o nivel necessario para usar o comando, e price é o dinheiro necessario para usar o comando
local lugar = {
["carlin"] = { -- nome do lugar
pos = {x= 32360, y= 31782, z= 7},level = 5,price = 1000},
["thais"] = { -- nome do lugar
pos = {x= 32369, y= 32241, z= 7},level = 10, price = 1000},
["venore"] = { -- nome do lugar
pos = {x= 32957, y= 32076, z= 7},level = 15,price = 1000},
["area vip"] ={ -- nome do lugar
pos = {x=305, y=934, z=7},level = 20,price = 1000}
}
--[[ Lista de Viagem (Não mexa) ]]--
if (param == "list") then
local str = ""
str = str .. "Citys list:\n\n"
for name, pos in pairs(lugar) do
str = str..name.."\n"
end
str = str .. ""
doShowTextDialog(cid, 6579, str)
return TRUE
end
local a = lugar[param]
if not(a) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, this city does not exist.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
elseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You must be in the protection zone.")
return TRUE
elseif config.vip == true and isPremium(cid) == false then -- Se você tiver um sistema de VIP, pegar o comando isVip, ou algo semelhante e trocar por isPremium
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Only VIP players can telepot.")
return TRUE
elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need no battle for teleport.")
return TRUE
elseif config.need_level == true and getPlayerLevel(cid) < a.level then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have level, you need a "..a.level.." level for teleport.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have suficiently money, you need of "..a.price.." gp's for teleport.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
end
doTeleportThing(cid, a.pos)
doSendMagicEffect(a.pos, CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You is teleported for " .. param .. ".")
return TRUE
end
---- ESSE AQUI TA NA PASTA \data\talkactions -----
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>,
<talkaction words="!go" event="script" value="go.lua"/>
</talkactions>
Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.