Cara é na pasta das source...
info
Grupo: Conde
Registrado: 14/02/13
Posts: 702
Reputação: +196
Gênero: Masculino

info
Grupo: Infante
Registrado: 06/03/13
Posts: 1.6k
Reputação: +319
Gênero: Masculino
Char no Tibia: Lord Sorte

Não SAbia Mals... Podes Me Dizer Aonde Eu Baixo ??
Editado Maio 27 por kttallan
info
Grupo: Visconde
Registrado: 26/08/12
Posts: 318
Reputação: +118
Gênero: Masculino

Editado Maio 27 por Noninhouh
Banana n tem como chamar isso em uma função lua? pra poder carregar mais facilmente por modulos??
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

pelo q banana flo, no serv dele eles chamam por funçao lua '--' mas vai tirar isso dele kk'
info
Grupo: Conde
Registrado: 14/02/13
Posts: 702
Reputação: +196
Gênero: Masculino

Isso eu não posso ajudar, porque não foi só eu que desenvolvi o sistema.
pelo q banana flo, no serv dele eles chamam por funçao lua '--' mas vai tirar isso dele kk'
Isso eu não posso ajudar, porque não foi só eu que desenvolvi o sistema.
Mas diz ai oque eu pensei em fazer eo seguinte ( como n sou um bom programador sou gambiarreiro as veses pode funcionar)
e usar assim
if hidePlayers and creature:isPlayer() then return false elseif hideNPCs and creature:isNpc() then return false elseif hideMonsters and creature:isMonster() then return false elseif hideSkulls and creature:isPlayer() and creature:getSkull() == SkullNone then return false elseif hideParty and creature:getShield() > ShieldWhiteBlue then return false end
esse codigo e para pegar as condições se e player, monstro, skull etc
ai dentro do if de cada condição entraria com isso
local COR= {}
table.insert(COR, {percentAbove = 92, color = '#00BC00' } )
table.insert(COR, {percentAbove = 60, color = '#50A150' } )
table.insert(COR, {percentAbove = 30, color = '#A1A100' } )
table.insert(COR, {percentAbove = 8, color = '#BF0A0A' } )
table.insert(COR, {percentAbove = 3, color = '#910F0F' } )
table.insert(COR, {percentAbove = -1, color = '#850C0C' } )
dando pra usar essa função tbm
function onCreatureHealthPercentChange(creature, health) local battleButton = battleButtonsByCreaturesList[creature:getId()] if battleButton then battleButton:setLifeBarPercent(creature:getHealthPercent()) end end
juntando tudo essa caraiada da pra faze alguma coisa??????
Aproveitando aqui Slicer ve se vc consegue responder minha duvida por favor xD
Editado Maio 27 por Darckx13
info
Grupo: Infante
Registrado: 06/03/13
Posts: 1.6k
Reputação: +319
Gênero: Masculino
Char no Tibia: Lord Sorte

Concordo Mexer Com Sources Me Lembra eu ficar com dor de cabeça baixei a sources mais era so o otclient master normal..
info
Grupo: Visconde
Registrado: 08/10/11
Posts: 444
Reputação: +71
Gênero: Feminino
Char no Tibia: No Have.

Otimo para servidores de Tibia , e esse projeto SAO , podiam colocar cores no nick indicando a dificuldade do monstro
Vermelho: Muito Dificil
Vermelho mais Claro: Dificil
Branco: Normal
Azul escuro: Facil
Muito bom, o ruim mesmo é mexer nas sources do OTC, que pra compilar é chatão ![]()
-----------------------------
Po aqui não funcionou não, compilei e continua igual ao padrão ![]()
Depois de ver muitos pedidos, Resolvi doar em nome da equipe DigiWo o código que muda a cor do nome dos monstros.
Este é uma versão 1.0 que não serve mais para o DigiWo por ja termos um sistema mais avançado.
Instalação
Creature.cpp procure por
if(healthPercent > 92)Embaixo você muda paraif (m_name == "Banana Fight"){ m_informationColor = Color(0xB2, 0x22, 0x22); }else{ m_informationColor = Color(0x00, 0xBC, 0x00); }Acho que deu de entender o que tem que fazer,
Adicionando Nomes
Isto representa o nome do monstro/player que terá a cor do nome alterada. (Sim, vai ter que cadastrar nome por nome nesse sistema.)
if (m_name == "Banana Fight")Para adicionar mais nomes é só seguindo a logica
if (m_name == "Banana Fight"){ m_informationColor = Color(0xB2, 0x22, 0x22); }else if (m_name == "Demon"){ m_informationColor = Color(0xFF, 0xFF, 0xFF); }else{ m_informationColor = Color(0x00, 0xBC, 0x00); }E para colorir o resto das porcentagens a mesma coisa
else if(healthPercent > 60) if (m_name == "Banana Fight"){ m_informationColor = Color(0xB2, 0x22, 0x22); }else{ m_informationColor = Color(0x50, 0xA1, 0x50); }Só recomendo que não mecha no ultimo, pois se não souber mexer pode dar erro.
else m_informationColor = Color(0x85, 0x0C, 0x0C);Adicionando Cores
Isto representa a porcentagem de hp que o player ou monstro vai estar
m_informationColor = Color(0x00, 0xBC, 0x00);Para mudar a cor você edita aqui :
Color(0x00, 0xBC, 0x00)As corer funcionam da seguinte maneira (RGB)
00 BC 00 < Está é uma cor RGB Hexadecimal
Aqui um link com uma tabela: http://shibolete.tripod.com/RGB.html
Você tem que pegar a cor hexadecimal e dividir em 3 partes
#FFFF00 > FF FF 00
Ai é só você preencher, Color(0xFF, 0xFF, 0x00) com cada letra/numero.
Exemplo Final
void Creature::setHealthPercent(uint8 healthPercent)[/center] { if(healthPercent > 92) if (m_name == "Banana Fight"){ m_informationColor = Color(0xB2, 0x22, 0x22); }else{ m_informationColor = Color(0x00, 0xBC, 0x00); } else if(healthPercent > 60) if (m_name == "Banana Fight"){ m_informationColor = Color(0xB2, 0x22, 0x22); }else{ m_informationColor = Color(0x50, 0xA1, 0x50); } else if(healthPercent > 30) if (m_name == "Banana Fight"){ m_informationColor = Color(0xB2, 0x22, 0x22); }else{ m_informationColor = Color(0xA1, 0xA1, 0x00); } else if(healthPercent > 8) if (m_name == "Banana Fight"){ m_informationColor = Color(0xB2, 0x22, 0x22); }else{ m_informationColor = Color(0xBF, 0x0A, 0x0A); } else if(healthPercent > 3) if (m_name == "Banana Fight"){ m_informationColor = Color(0xB2, 0x22, 0x22); }else{ m_informationColor = Color(0x91, 0x0F, 0x0F); } else m_informationColor = Color(0x85, 0x0C, 0x0C); m_healthPercent = healthPercent; callLuaField("onHealthPercentChange", healthPercent); if(healthPercent <= 0) onDeath(); }
Editado Julho 14 por xS0NYx
info
Grupo: Visconde
Registrado: 18/01/13
Posts: 319
Reputação: +66
Gênero: Masculino

Não consigo, kkk
Já mudei várias vezes,
aonde estou errando?
Valendo 10rep+
-- EDIT--
Consegui, não sabia que tinha que compilar, valeu!
Editado Julho 25 por Soulviling
info
Grupo: Campones
Registrado: 18/05/13
Posts: 6
Reputação: 0

serve para qualquer versão? eu tenho 8.54 aqui e não achei nada de percent em creature.cpp







info
Grupo: Infante
Registrado: 06/03/13
Posts: 1.6k
Reputação: +319
Gênero: Masculino
Char no Tibia: Lord Sorte
Man Aonde Fica Essa Pasta Que Duvida.. Aki No Meu e Creature.lua e ta assim
-- @docclass Creature -- @docconsts @{ SkullNone = 0 SkullYellow = 1 SkullGreen = 2 SkullWhite = 3 SkullRed = 4 SkullBlack = 5 SkullOrange = 6 ShieldNone = 0 ShieldWhiteYellow = 1 ShieldWhiteBlue = 2 ShieldBlue = 3 ShieldYellow = 4 ShieldBlueSharedExp = 5 ShieldYellowSharedExp = 6 ShieldBlueNoSharedExpBlink = 7 ShieldYellowNoSharedExpBlink = 8 ShieldBlueNoSharedExp = 9 ShieldYellowNoSharedExp = 10 EmblemNone = 0 EmblemGreen = 1 EmblemRed = 2 EmblemBlue = 3 -- @} function getSkullImagePath(skullId) local path if skullId == SkullYellow then path = '/images/game/skulls/skull_yellow' elseif skullId == SkullGreen then path = '/images/game/skulls/skull_green' elseif skullId == SkullWhite then path = '/images/game/skulls/skull_white' elseif skullId == SkullRed then path = '/images/game/skulls/skull_red' elseif skullId == SkullBlack then path = '/images/game/skulls/skull_black' elseif skullId == SkullOrange then path = '/images/game/skulls/skull_orange' end return path end function getShieldImagePathAndBlink(shieldId) local path, blink if shieldId == ShieldWhiteYellow then path, blink = '/images/game/shields/shield_yellow_white', false elseif shieldId == ShieldWhiteBlue then path, blink = '/images/game/shields//shield_blue_white', false elseif shieldId == ShieldBlue then path, blink = '/images/game/shields//shield_blue', false elseif shieldId == ShieldYellow then path, blink = '/images/game/shields//shield_yellow', false elseif shieldId == ShieldBlueSharedExp then path, blink = '/images/game/shields//shield_blue_shared', false elseif shieldId == ShieldYellowSharedExp then path, blink = '/images/game/shields//shield_yellow_shared', false elseif shieldId == ShieldBlueNoSharedExpBlink then path, blink = '/images/game/shields//shield_blue_not_shared', true elseif shieldId == ShieldYellowNoSharedExpBlink then path, blink = '/images/game/shields//shield_yellow_not_shared', true elseif shieldId == ShieldBlueNoSharedExp then path, blink = '/images/game/shields//shield_blue_not_shared', false elseif shieldId == ShieldYellowNoSharedExp then path, blink = '/images/game/shields//shield_yellow_not_shared', false end return path, blink end function getEmblemImagePath(emblemId) local path if emblemId == EmblemGreen then path = '/images/game/emblems/emblem_green' elseif emblemId == EmblemRed then path = '/images/game/emblems/emblem_red' elseif emblemId == EmblemBlue then path = '/images/game/emblems/emblem_blue' end return path end function Creature:onSkullChange(skullId) local imagePath = getSkullImagePath(skullId) if imagePath then self:setSkullTexture(imagePath) end end function Creature:onShieldChange(shieldId) local imagePath, blink = getShieldImagePathAndBlink(shieldId) if imagePath then self:setShieldTexture(imagePath, blink) end end function Creature:onEmblemChange(emblemId) local imagePath = getEmblemImagePath(emblemId) if imagePath then self:setEmblemTexture(imagePath) end end