Nomes coloridos
Saltar para a navegação
Saltar para a pesquisa
Script Lua:
local colorTable = { ['Dragon'] = {'#008C9A', '#00707B', '#00545C', '#00383E', '#000E0F', '#000000'}, ['Dragon Lord'] = {'#F59E03', '#C47E02', '#935F02', '#623F01', '#191000', '#000000'}, ['Default'] = {'#D5082F', '#AA0626', '#80051C', '#550313', '#150105', '#000000'}, } function doChangeColor(creature, healthPercent) if creature:isMonster() then local name = creature:getName() local color = colorTable[name] if not color then color = colorTable['Default'] end if color then if healthPercent >= 95 then creature:setInformationColor(color[1]) elseif healthPercent > 60 then creature:setInformationColor(color[2]) elseif healthPercent > 30 then creature:setInformationColor(color[3]) elseif healthPercent > 10 then creature:setInformationColor(color[4]) elseif healthPercent > 3 then creature:setInformationColor(color[5]) elseif healthPercent >= 0 then creature:setInformationColor(color[6]) end end end end local monstercolor = macro(20000, "Coloured names", function() end) onCreatureAppear(function(creature) if monstercolor:isOff() then return end doChangeColor(creature, creature:getHealthPercent()) end) onCreatureHealthPercentChange(function(creature, healthPercent) doChangeColor(creature, healthPercent) end)
Para que a macro funcione corretamente, será necessário:
Inserir a macro em Tolls > Ingame script editor (Caso possua outros scripts, você deverá rolar a barra até o final, saltar alguns espaços e colar o nome em seguida).