Ir para conteúdo
  • 0

Dúvida/Pedido Healthinfo


morphsx

Pergunta

Olá pessoal, estou tentando entender o onStatesChange do healthinfo.lua, mais especificamente, eu gostaria de dar um tratamento especial pra quando o state mudar para combat (you cannot logout during a fight) sabem? Como faço? Obrigado des de já.

Link para o comentário
https://xtibia.com/forum/topic/214850-d%C3%BAvidapedido-healthinfo/
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

Olá pessoal, estou tentando entender o onStatesChange do healthinfo.lua, mais especificamente, eu gostaria de dar um tratamento especial pra quando o state mudar para combat (you cannot logout during a fight) sabem? Como faço? Obrigado des de já.

 

 

vou te explicar como funciona essa parte certinho blz, essa parte funciona com o client- side e server- side

 

na sua lib constant.lua na pasta lib do SERVIDOR tem um trecho com o code abaixo

 

[/color]
[color=#000000]CONDITION_NONE = 0
CONDITION_POISON = 1
CONDITION_FIRE = 2
CONDITION_ENERGY = 4
CONDITION_PHYSICAL = 8
CONDITION_HASTE = 16
CONDITION_PARALYZE = 32
CONDITION_OUTFIT = 64
CONDITION_INVISIBLE = 128
CONDITION_LIGHT = 256
CONDITION_MANASHIELD = 512
CONDITION_INFIGHT = 1024
CONDITION_DRUNK = 2048
CONDITION_EXHAUST = 4096
CONDITION_FOOD = 8192
CONDITION_REGENERATION = 8192
CONDITION_SOUL = 16384
CONDITION_DROWN = 32768
CONDITION_MUTED = 65536
CONDITION_ATTRIBUTES = 131072
CONDITION_FREEZING = 262144
CONDITION_DAZZLED = 524288
CONDITION_CURSED = 1048576
CONDITION_PACIFIED = 2097152
CONDITION_GAMEMASTER = 4194304
CONDITION_HUNTING = 8388608
CONDITION_MISS = 8388609

 

blzzzzzz!!!!!

 

Agora a parte Cliente - side

no modulo health existe as variaveis em uma tabela com esse codigo

 

[/color]
[color=#000000]Icons = {}
Icons[1] = { tooltip = tr('You are poisoned'), path = '/images/game/states/poisoned', id = 'condition_poisoned' }
Icons[2] = { tooltip = tr('You are burning'), path = '/images/game/states/burning', id = 'condition_burning' }
Icons[4] = { tooltip = tr('You are electrified'), path = '/images/game/states/electrified', id = 'condition_electrified' }
Icons[8] = { tooltip = tr('You are drunk'), path = '/images/game/states/drunk', id = 'condition_drunk' }
Icons[16] = { tooltip = tr('You are protected by a magic shield'), path = '/images/game/states/magic_shield', id = 'condition_magic_shield' }
Icons[32] = { tooltip = tr('You are paralysed'), path = '/images/game/states/slowed', id = 'condition_slowed' }
Icons[64] = { tooltip = tr('You are hasted'), path = '/images/game/states/haste', id = 'condition_haste' }
Icons[128] = { tooltip = tr('You may not logout during a fight'), path = '/images/game/states/logout_block', id = 'condition_logout_block' }
Icons[256] = { tooltip = tr('You are drowning'), path = '/images/game/states/drowning', id = 'condition_drowning' }
Icons[512] = { tooltip = tr('You are freezing'), path = '/images/game/states/freezing', id = 'condition_freezing' }
Icons[1024] = { tooltip = tr('You are dazzled'), path = '/images/game/states/dazzled', id = 'condition_dazzled' }
Icons[2048] = { tooltip = tr('You are cursed'), path = '/images/game/states/cursed', id = 'condition_cursed' }
Icons[4096] = { tooltip = tr('You are strengthened'), path = '/images/game/states/strengthened', id = 'condition_strengthened' }
Icons[8192] = { tooltip = tr('You may not logout or enter a protection zone'), path = '/images/game/states/protection_zone_block', id = 'condition_protection_zone_block' }
Icons[16384] = { tooltip = tr('You are within a protection zone'), path = '/images/game/states/protection_zone', id = 'condition_protection_zone' }
Icons[32768] = { tooltip = tr('You are bleeding'), path = '/images/game/states/bleeding', id = 'condition_bleeding' }
Icons[65536] = { tooltip = tr('You are hungry'), path = '/images/game/states/hungry', id = 'condition_hungry' }

 

 

então tudo que esta dentro da tabela Icons usa refetencia a lib do deu servidor

Espero ter esclarecido parte da sua duvida

se vc colocar sua ideia aqui posso de ajudar de modo mais aprofundado ou mande por pvt

 

 

Se te Ajudei Rep++ ;)

Link para o comentário
https://xtibia.com/forum/topic/214850-d%C3%BAvidapedido-healthinfo/#findComment-1523770
Compartilhar em outros sites

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...