Ir para conteúdo

System Fly Para Vip Dando Erro Quando Player Free Fala


churupetinha

Posts Recomendados

ola galera eu tenho aki em meu ot um system fly para vip mas quando o player free falar erra pra apareser uma mesaguem falando que ele nao e vip ou que o comando so e para vips,mas nao aparese nada nem no defalt so da erro no distro da pra alguem me ajudar ?

vou postar aki o script e o erro que da no distro quando o player fala o comando!

Erro

 

 

[29/11/2010 23:12:33] [Error - TalkAction Interface]

[29/11/2010 23:12:33] data/talkactions/scripts/teleportvip.lua:onSay

[29/11/2010 23:12:33] Description:

[29/11/2010 23:12:33] (luaDoPlayerSendCancel) Player not found

 

 

 

Script

 

 

function onSay(cid, words, param)

 

 

local config = {

pz = "yes", -- players precisam estar em protection zone para usar? ("yes" or "no").

battle = "no", -- players deve estar sem battle ("yes" or "no")

custo = "no", -- se os teleport irão custa ("yes" or "no")

vip = "yes", -- somente vip players poderam usar o comando? ("yes" or "no")

storage = 13540 -- Storage Id da sua vip account caso for usar somente vips

 

}

 

-------------Config Lugares----------------

local lugar = {

["depot"] = {{x=129, y=53, z=6}, 1, 0},

["temple"] = {{x=160, y=54, z=7}, 1, 0},

["arena"] = {{x=162, y=53, z=8}, 1, 0},

["trainer"] = {{x=454, y=51, z=13}, 1, 0},

["viparea"] = {{x=387, y=294, z=7}, 1, 0}

}

-------------/Config Checkar não mecha----------------

local lugar = lugar[param]

if (param == "check") then

for name, pos in pairs(lugar) do

text = "Destino: "..name..", Level necessario: "..pos[2]..","

if(config.battle == "yes") then

text = text.." Voce pode usar estando battler: SIM"

else

text = text.." Voce pode usar estando battler: Não"

end

if(config.pz == "yes") then

text = text.." Voce DeVe Usar estando PZ: SIM"

else

text = text.." Voce DeVe Usar estando PZ: Não"

end

if (pos[3] == TRUE) then

text = text..", Cost: "..pos[4]..";"

end

doPlayerSendTextMessage(cid, 22, ""..text.."")

end

return TRUE

end

 

if(config.pz == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.")

return TRUE

end

 

if(config.battle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder teleportar.")

return TRUE

end

 

if (config.vip == "yes") and getPlayerStorageValue(cid, tonumber(config.storage)) - os.time() <= 0 then

doPlayerSendCancel(cid,MESSAGE_EVENT_DEFAULT,"Comando so para player vip's.")

return TRUE

end

 

if not(lugar) then

doPlayerSendTextMessage(cid, 25, "desculpe,este lugar não existe,duvida fale !flyinfo vai ver todos os comandos de fly")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return TRUE

end

 

if (getPlayerLevel(cid) <= lugar[2]) then

doPlayerSendTextMessage(cid, 25, "Desculpe,Voce não tem level. voce precisa "..lugar[2].." level ou mais para ser teleportado.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return TRUE

end

 

 

if(config.custo == "yes") and (doPlayerRemoveMoney(cid, lugar[3]) == FALSE) then

doPlayerSendTextMessage(cid, 25, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..lugar[3].." gp para ser teleportado.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return TRUE

end

doTeleportThing(cid, lugar[1])

doSendMagicEffect(lugar[1], CONST_ME_TELEPORT)

doBroadcastMessage("" .. getPlayerName(cid) .. " has flown to " .. param .. " using !fly ", MESSAGE_INFO_DESCR)

 

end

 

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...