VI
talkaction

!vida E !mana

Por viitiinhoow3, 30 de jul. de 2012 em Actions e Talkactions

otserv
tibia
script
10
2k
viitiinhoow3V
30 de julho de 2012 às 13:53

Boa Tarde, Xtibianos

 

Este script é bem simples éo comando !vida eo !mana só que ele também pode ser usado ex: !mana apolo 13:50

Mana de [ Apolo ] atual: 5112

Mana de [ Apolo ] máxima: 19955

 

eo !vida

 

13:51

Vida de [ Apolo ] atual: 3505

Vida de [ Apolo ] máxima: 3505

 

!vida \/

 

function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nVida atual: " .. getCreatureHealth(cid) .. "\nVida
máxima: " .. getCreatureMaxHealth(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, "\nVida de [ " .. getCreatureName(pid) .. " ] atual: "
.. getCreatureHealth(pid) .. "\nVida de [ " .. getCreatureName(pid) .. " ] máxima: " .. getCreatureMaxHealth(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

 

!mana

 

function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nMana atual: " .. getCreatureMana(cid) .. "\nMana máxima: " .. getCreatureMaxMana(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, "\nMana de [ " .. getCreatureName(pid) .. " ] atual: " .. getCreatureMana(pid) .. "\nMana de [ " .. getCreatureName(pid) .. " ] máxima: " .. getCreatureMaxMana(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

 

EM talkactions.xml

 

<talkaction log="yes" words="!vida" event="script" value="vida.lua"/>
<talkaction log="yes" words="!mana" event="script" value="mana.lua"/>

 

 

Configurando /\ é só uma coisa que é para PREMIUM OU FREE if

 

está linha

 

if isPremium(cid) == TRUE then

 

se for deixar para vip deixe assim e se for para free mude o TRUE para FALSE

 

 

CREDITOS: NÃO SEI uhu se ajudei REP+ plx '-'

Editado Julho 30 por viitiinhoow3

TchubakaT
30 de julho de 2012 às 14:01

você poderia diminuir mt esse script. e por em 1 so.

nao precisa criar 2

viitiinhoow3V
30 de julho de 2012 às 14:07

Assim está bom lek ta suave ;d

TchubakaT
30 de julho de 2012 às 14:20


function onSay(cid, words, param)
if(words == "!mana") then
doPlayerSendTextMessage(cid,22,"You have " .. getCreatureMana(cid) .. " mana now\nYou have " .. getCreatureMaxMana(cid) .. " mana to the total")
return TRUE
elseif(words == "!life") then
doPlayerSendTextMessage(cid,22,"You have " .. getCreatureHealth(cid) .. " of life now\nYou have " .. getCreatureMaxHealth(cid) .. " of the total life")
return TRUE
end
end

como o oneshot fez.

viitiinhoow3V
30 de julho de 2012 às 14:33

a cara axo q assim está otimo ;p

1 mês depois...
ddkD
10 de agosto de 2012 às 17:38

Valeu maluco tava atras disso para o meu servidor de dragon ball rep +.

2 semanas depois...
19 de agosto de 2012 às 02:36

me ajuda ai meu ot nao funfo o de !vida do rep

yugnaithY
22 de agosto de 2012 às 15:49

me ajuda ai meu ot nao funfo o de !vida do rep

 

Aki esta a script arrumada \/ ( Não esquessa do meu primeiro rap em kk' ;D )

 

function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "\nVida atual: " .. getCreatureHealth(cid) .. "\nVida máxima: " .. getCreatureMaxHealth(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, "\nVida de [ " .. getCreatureName(pid) .. " ] atual: " .. getCreatureHealth(pid) .. "\nVida de [ " .. getCreatureName(pid) .. " ] máxima: " .. getCreatureMaxHealth(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

Editado Agosto 22 por yugnaith

10 meses depois...
vinnevinneV
04 de junho de 2013 às 15:29

o meu n funciona o da vida pq?

 

testei os 2 scripts

3 semanas depois...
BomBestB
20 de junho de 2013 às 22:01

Flood.

Editado Junho 20 por Skymagnum