Untitled

 avatar
unknown
plain_text
3 years ago
4.1 kB
5
Indexable

health = tonumber(gmcp.Char.Vitals.hp)
healthPercent = round((tonumber(gmcp.Char.Vitals.hp) / tonumber(gmcp.Char.Vitals.maxhp)) * 100, 0)
mana = tonumber(gmcp.Char.Vitals.mp)
manaPercent = round((tonumber(gmcp.Char.Vitals.mp) / tonumber(gmcp.Char.Vitals.maxmp)) * 100, 0)
bleed = tonumber(gmcp.Char.Vitals.bleeding)
bloodLevel = tonumber(gmcp.Char.Vitals.blood)
endurance = round((tonumber(gmcp.Char.Vitals.ep) / tonumber(gmcp.Char.Vitals.maxep) * 100), 0)
willpower = round((tonumber(gmcp.Char.Vitals.wp) / tonumber(gmcp.Char.Vitals.maxwp) * 100), 0)
xp = gmcp.Char.Vitals.nl



if health == tonumber(gmcp.Char.Vitals.maxhp) then
 hpColor = "<B>"
elseif health < tonumber(gmcp.Char.Vitals.maxhp) then
 hpColor = "<B2>"
elseif health < (tonumber(gmcp.Char.Vitals.maxhp) * 0.9) then
 hpColor = "<B3>"
elseif health < (tonumber(gmcp.Char.Vitals.maxhp) * 0.7) then
 hpColor = "<B4>"
elseif health < (tonumber(gmcp.Char.Vitals.maxhp) * 0.5) then
 hpColor = "<B5>"
elseif health < (tonumber(gmcp.Char.Vitals.maxhp) * 0.3) then
 hpColor = "<B6>"
elseif health < (tonumber(gmcp.Char.Vitals.maxhp) * 0.1) then
 hpColor = "<B7>"
end

if healthPercent == 100 then
 healthPercentColor = "<C>"
elseif healthPercent < 100 then
 healthPercentColor = "<C2>"
elseif healthPercent < 90 then
 healthPercentColor = "<C3>"
elseif healthPercent < 70 then
 healthPercentColor = "<C4>"
elseif healthPercent < 50 then
 healthPercentColor = "<C5>"
elseif healthPercent < 30 then
 healthPercentColor = "<C6>"
elseif healthPercent < 10 then
 healthPercentColor = "<C7>"
end


if mana == tonumber(gmcp.Char.Vitals.maxmp)then
 mpColor = "<D>"
elseif mana < tonumber(gmcp.Char.Vitals.maxmp) then
 mpColor = "<D2>"
elseif mana < (tonumber(gmcp.Char.Vitals.maxmp) * 0.9) then
 mpColor = "<D3>"
elseif mana < (tonumber(gmcp.Char.Vitals.maxmp) * 0.7) then
 mpColor = "<D4>"
elseif mana < (tonumber(gmcp.Char.Vitals.maxmp) * 0.5) then
 mpColor = "<D5>"
elseif mana < (tonumber(gmcp.Char.Vitals.maxmp) * 0.3) then
 mpColor = "<D6>"
elseif mana < (tonumber(gmcp.Char.Vitals.maxmp) * 0.1) then
 mpColor = "<D7>"
else mpColor = "<D>"
end


if manaPercent == 100 then
 manaPercentColor = "<E>"
elseif manaPercent < 100 then
 manaPercentColor = "<E2>"
elseif manaPercent < 90 then
 manaPercentColor = "<E3>"
elseif manaPercent < 70 then
 manaPercentColor = "<E4>"
elseif manaPercent < 50 then
 manaPercentColor = "<E5>"
elseif manaPercent < 30 then
 manaPercentColor = "<E6>"
elseif manaPercent < 10 then
 manaPercentColor = "<E7>"
else manaPercentColor = "<E>"
end

if bleed == 0 then
  bleedColor = "<F>"
elseif bleed > 0 then
  bleedColor = "<F2a>"
elseif bleed > 300 then
  bleedColor = "<F3a>"
elseif bleed > 600 then
  bleedColor = "<F4a>"
elseif bleed > 1000 then
  bleedColor = "<F5a>"
end

if bloodLevel == 100 then 
  bloodColor = "<F>"
elseif bloodLevel < 100 then
  bloodColor = "<F2b>"
elseif bloodLevel < 80 then
  bloodColor = "<F3b>"
elseif bloodLevel < 50 then
  bloodColor = "<F4b>"
elseif bloodLevel < 30 then
  bloodColor = "<F5b>"
elseif bloodLevel < 10 then
  bloodColor = "<F6b>"
end

if endurance > 95 then 
  enduranceColor = "<G>"
elseif endurance < 95 then
  enduranceColor = "<G2>"
elseif endurance < 80 then
  enduranceColor = "<G3>"
elseif endurance < 50 then
  enduranceColor = "<G4>"
elseif endurance < 30 then
  enduranceColor = "<G5>"
elseif endurance < 10 then
  enduranceColor = "<G6>"
end

if willpower > 95 then 
  willpowerColor = "<H>"
elseif willpower < 95 then
  willpowerColor = "<H2>"
elseif willpower < 80 then
  willpowerColor = "<H3>"
elseif willpower < 50 then
  willpowerColor = "<H4>"
elseif willpower < 30 then
  willpowerColor = "<H5>"
elseif willpower < 10 then
  willpowerColor = "<H6>"
end


creplaceLine("<A>H:<"..hpColor..gmcp.Char.Vitals.hp.."<B>/"..gmcp.Char.Vitals.maxhp.."<C>>("..healthPercentColor..healthPercent.."<C>%) | M:<"..mpColor..gmcp.Char.Vitals.mp.."<D>/"..gmcp.Char.Vitals.maxmp.."<E>>("..manaPercentColor..manaPercent.."%<E>) | B:("..bleedColor..bleed.."<F>) | BL:("..bloodColor..bloodLevel.."<G>) | EP:("..enduranceColor..endurance.."<G>%)<H> | WP:("..willpowerColor..willpower.."<H>%) | <I>XP:("..xp.."%)")     
Editor is loading...