Posta o script que não pego.
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

info
Grupo: Campones
Registrado: 18/08/12
Posts: 61
Reputação: -1

Posta o script que não pego.
<talkaction words="!vida" event="script" value="vida.lua"/>
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nVida atual: " .. getCreatureVida(cid) .. "\nVida máxima: " .. getCreatureMaxVida(cid) .. "")
return true
end
if isPremium(cid) == TRUE then
local pid = getPlayerByNameWildcard(param)
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O jogador com o nome " .. param .. " não esta online ou não existe.")
return true
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\n de Vida[ " .. getCreatureName(pid) .. " ] atual: " .. getCreatureVida(pid) .. "\nVida de [ " .. getCreatureName(pid) .. " ] máxima: " .. getCreatureMaxVida(pid) .. "")
return true
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Apenas jogadores VIP podem utilizar este comando para visualizar informações de outros jogadores.")
return true
end
end
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

criei aki agr.
function onSay(cid, words, param) function getCreatureHealth(cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Voce tem " .. getCreatureHealth(cid) end
em talkactions.xml
<talkaction words="!Vida" script="nome do arquivo.lua"/>
Editado Novembro 23 por SkyLigh
info
Grupo: Campones
Registrado: 18/08/12
Posts: 61
Reputação: -1

criei aki agr.
function onSay(cid, words, param) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Voce tem " .. getCreatureHealth(cid) .. " health points.") end
em talkactions.xml
<talkaction words="!Vida" script="nome do arquivo.lua"/>
Não Funfo , Olha o Erro
[23/11/2012 17:48:43] [Error - TalkAction Interface]
[23/11/2012 17:48:43] data/talkactions/scripts/vida.lua:onSay
[23/11/2012 17:48:43] Description:
[23/11/2012 17:48:43] data/talkactions/scripts/vida.lua:3: attempt to call global 'getCreatureHealth' (a nil value)
[23/11/2012 17:48:43] stack traceback:
[23/11/2012 17:48:43] data/talkactions/scripts/vida.lua:3: in function <data/talkactions/scripts/vida.lua:1>
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

editei o script ver se vai.
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

Tenta assim:
function onSay(cid, words, param) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Voce tem " .. doPlayerAddHealth(cid, 2222) .. " health points.") end
em talkactions.xml
<talkaction words="!Vida" script="nome do arquivo.lua"/>
Obs: Copiei do SkyLigh e editei.
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

@sky
mano... por favor! teste as coisas antes de postar... teu script esta bem no sense... ;/
achu q ja eh a 10* vez q vejo vc postar scripts assim no sense... tenta usar o OTScript Live!, ele tem um debugger proprio, apertando F5, ajuda muito no inicio....
@topic
function onSay(cid, words, param) doPlayerSendTextMessage(cid, 20, "Voce tem " .. getCreatureHealth(cid) .. " / ".. getCreatureMaxHealth(cid).." health points.") return true end
Editado Novembro 23 por Slicer
info
Grupo: Infante
Registrado: 04/03/11
Posts: 1.6k
Reputação: +393
Char no Tibia: No Have

Skyligh como estagiário você sabe muito bem que scripts muito bugados(non - sense) são considerados flood.
Como o slicer disse debbuger são ótimos.
Recomendo Lua Demo




info
Grupo: Campones
Registrado: 18/08/12
Posts: 61
Reputação: -1
Alguen Pode Me ajuda meu script de vida do meu ot sever mapa radbr full não pega ja tentei varios scripts, mais nunca pego alguen pode me ajudar?