HP/MANA/PRMIUM no login

garep
Por garep
em Globalevents e Spells

garep

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 08/01/06Posts: 118Char no Tibia: Bahanot

Bom, uma amigo pedi o para mim fazer esse script porque o serve dele tem xp muito alta e depois de muitos leveis o hp e mana volta e nao da pra saber exato quanto de mana e life tem então resolvi isso para ele com esse script.

*E bem simples mais não tinha aqui no forum.

Oque faz ?: Assim que loga ele pucha os dados de mana e life do player e mostra para ele.

creatures add esse código em uma arquivo lua, info.lua

Toda vez que ele logar vai da a info do life e mana.

* Uma Print de como ficou.*
Sem título.png

local config = {life = MESSAGE_STATUS_CONSOLE_BLUE,mana = MESSAGE_STATUS_CONSOLE_RED,vipstatus = MESSAGE_STATUS_CONSOLE_RED};function onLogin(cid)doPlayerSendTextMessage(cid, (config.life), "Your health is: " .. getCreatureHealth(cid) .. "/".. getCreatureMaxHealth(cid) .." hp.")doPlayerSendTextMessage(cid, (config.mana), "Your mana is: " .. getCreatureMaxMana(cid) .. "/" .. getCreatureMaxMana(cid) .." mana.")if getPlayerPremiumDays(cid) > 0 thendoPlayerSendTextMessage(cid, (config.vipstatus), "You are premium and you have: " .. getPlayerPremiumDays(cid) .. " days left.")elsedoPlayerSendTextMessage(cid, (config.vipstatus), "You are no premium.")endreturn trueend

lembrar de registrar o evento:
no login.lua

registerCreatureEvent(cid, "info") -- NEWWW

agora vai em creaturescripts.xml

e add essa tag:
 

		 		 <event type="login" name="info" event="script" value="info.lua"/>

 

 

Se ajudei + rep.

bjs =*

5796b46953589_Semttulo.png.32517e4ac3463716c95411f6a5b65c97.png

LeoTK

Leo
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 05/12/11Posts: 1249Gênero: Masculino

@garep

Dei uma revisada tinha alguns códigos juntos etc.. arrumei e adaptei para o meu nto caso alguém se interessar esta ai

 

local config = {life = MESSAGE_STATUS_CONSOLE_RED,mana = MESSAGE_STATUS_CONSOLE_BLUE,vipstatus = MESSAGE_STATUS_CONSOLE_ORANGE};
function onLogin(cid)doPlayerSendTextMessage(cid, (config.life), "Sua Vida: " .. getCreatureHealth(cid) .. "/".. getCreatureMaxHealth(cid) .." Vida.")
doPlayerSendTextMessage(cid, (config.mana), "Seu Chakra: " .. getCreatureMaxMana(cid) .. "/" .. getCreatureMaxMana(cid) .." Chakra.")
if getPlayerPremiumDays(cid) > 0 
then doPlayerSendTextMessage(cid, (config.vipstatus), "Voce ainda tem: " .. getPlayerPremiumDays(cid) .. " Dias Premium.")
else doPlayerSendTextMessage(cid, (config.vipstatus), "Voce nao e premium.")
end
return true
end

 

 ?️ Projeto NTO NS ?️

? Detalhes ?

?️ Mapa próprio em produção ?️

?️ Versão: 8.60 ?️

? War System ?

⚔️ Jutsus Próprios baseado no anime ⚔️

? Itens com as características e efeitos do anime ?

? Para mais detalhes acesse as redes sociais do servidor abaixo ?

? Usando como referencias Anime/Jogos/Wallpapers etc... para trazer algo mais próximo possível do universo de Naruto ?

 

? Redes Sociais ?

? Facebook ?

? Youtube ?
? Discord ?

 

? Tutoriais / Conteúdos ?

♨️ Clique Aqui ♨️

 

 

ITALOx

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/07/15Posts: 99Gênero: MasculinoChar no Tibia: [ADM] Ricky
Em 24/11/2017 em 18:18, Brunds disse:

@garep

Dei uma revisada tinha alguns códigos juntos etc.. arrumei e adaptei para o meu nto caso alguém se interessar esta ai

 

local config = {life = MESSAGE_STATUS_CONSOLE_RED,mana = MESSAGE_STATUS_CONSOLE_BLUE,vipstatus = MESSAGE_STATUS_CONSOLE_ORANGE};
function onLogin(cid)doPlayerSendTextMessage(cid, (config.life), "Sua Vida: " .. getCreatureHealth(cid) .. "/".. getCreatureMaxHealth(cid) .." Vida.")
doPlayerSendTextMessage(cid, (config.mana), "Seu Chakra: " .. getCreatureMaxMana(cid) .. "/" .. getCreatureMaxMana(cid) .." Chakra.")
if getPlayerPremiumDays(cid) > 0 
then doPlayerSendTextMessage(cid, (config.vipstatus), "Voce ainda tem: " .. getPlayerPremiumDays(cid) .. " Dias Premium.")
else doPlayerSendTextMessage(cid, (config.vipstatus), "Voce nao e premium.")
end
return true
end

 

tem como adaptar para dbo tfs 0.4 8.60?

 

Servidor Dragon Ball Tibia: https://www.facebook.com/DBOevolutiononline (EM ANDAMENTO)