!vida E !mana

viitiinhoow3
em Actions e Talkactions

viitiinhoow3

Apolo
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/07/12Posts: 14Char no Tibia: -

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 '-'

1pt43t.jpg

+ Sign by PedrOkas

kakashi__sig_by_dns_km-d3e5387.png

+ Kakashi Hatake

Copyright © 2011 Viitin, Inc. All rights reserved.[/b]

Tchubaka

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 19/07/12Posts: 395Char no Tibia: Billy Poul

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

nao precisa criar 2

Te Ajudei? Então REP+ button_ok.png

viitiinhoow3

Apolo
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/07/12Posts: 14Char no Tibia: -

Assim está bom lek ta suave ;d

1pt43t.jpg

+ Sign by PedrOkas

kakashi__sig_by_dns_km-d3e5387.png

+ Kakashi Hatake

Copyright © 2011 Viitin, Inc. All rights reserved.[/b]

Tchubaka

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 19/07/12Posts: 395Char no Tibia: Billy Poul


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.

Te Ajudei? Então REP+ button_ok.png

viitiinhoow3

Apolo
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/07/12Posts: 14Char no Tibia: -

a cara axo q assim está otimo ;p

1pt43t.jpg

+ Sign by PedrOkas

kakashi__sig_by_dns_km-d3e5387.png

+ Kakashi Hatake

Copyright © 2011 Viitin, Inc. All rights reserved.[/b]

ddk

Ei virj's posso ajudar ?
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/08/12Posts: 65Char no Tibia: Varios

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

felipeomatad

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 19/08/12Posts: 61

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

yugnaith

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/06/12Posts: 43

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

memes.gif



Ajudei? Rep+ | So enrolei? Rep-

vinnevinne

Xtibia New
avatar
Banidos
Banidos

INFOS

Grupo: BanidosRegistrado: 16/10/12Posts: 596Char no Tibia: Nao Sei

o meu n funciona o da vida pq?

 

testei os 2 scripts

BomBest

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/12/12Posts: 1

Flood.