I use this Trigger on Aardwolf, to make a single line prompt and battle prompt into a multi-line one, that dynamically colors itself, and provides a percentage of HP and MN, and a colored difference in HP (i.e. +5 = Green, - 15 = RED), Also displays enemy percent diferences, and GOLD, as there are several mobs that are "thieves", and "spill your purse".
Prompt it will work on looks like this...
Quote: <1000/1000hps 2000/2000mps 1500/1500mvs 500xptnl Gold: 1000>
<%h/%Hhps %m/%Mmps %v/%Vmvs %Xxptnl Gold: %g>%c
BPrompt looks like this...
Quote: <1000/1000hps 2000/2000mps 1500/1500mvs 500xptnl Gold: 1000 Enemy: 100%>
<%h/%Hhps %m/%Mmps %v/%Vmvs %Xxptnl Gold: %g %b>%c
Hope this can and will be useful to some. :)
Quote:<triggers>
<trigger
enabled="y"
ignore_case="y"
match="^\<([-]?\d{1,})\/(\d{1,})hps\s([-]?\d+)\/(\d+)mps\s([-]?\d+)\/(\d+)mvs\s(\d{1,})xptnl\sGold\:\s(\d{1,})(\s{2}Enemy\: ([-]?\d{1,3})\%)?\>"
name="ULTIMATE_PROMPT"
omit_from_output="y"
regexp="y"
send_to="12"
sequence="1"
>
<send>
hppct = math.floor((tonumber("%1")/tonumber("%2")) * 100)
hp = tonumber("%1")
hp_old = tonumber(GetVariable("hp"))
mppct = math.floor((tonumber("%3")/tonumber("%4")) * 100)
mvpct = math.floor((tonumber("%5")/tonumber("%6")) * 100)
exp = tonumber("%7")
gold = tonumber("%8")
gold_old = tonumber(GetVariable("gold"))
enemypct = tonumber("%<10>")
enemy_old = tonumber(GetVariable("enemy"))
hp_low = 50
hp_danger = 25
mp_low = 33
mp_danger = 10
mv_low = 33
mv_danger = 10
exp_watch = 200
gold_watch = 150000
enemy_low = 40
enemy_dead = 10
enemy = 1
function Battle()
ColourNote("white","black","<",hpcolor,"black","%1/%2hps ",mpcolor,"black","%3/%4mps ",mvcolor,"black","%5/%6mvs ",expcolor,"black","%7xptnl ",goldcolor,goldback,"Gold: %8",enemycolor,"black"," Enemy: %<10>\%","white","black",">")
HPs()
Enemy()
end -- function
function NoEnemy()
ColourNote("white","black","<",hpcolor,"black","%1/%2hps ",mpcolor,"black","%3/%4mps ",mvcolor,"black","%5/%6mvs ",expcolor,"black","%7xptnl ",goldcolor,goldback,"Gold: %8","white","black",">")
HPs()
end -- function
function HPs()
if hp_old ~= nil and hp < hp_old then
hp_dif = math.abs(hp - hp_old)
ColourNote("limegreen","black","Health: " .. hppct .. "%","red","black"," -" .. hp_dif)
elseif hp_old ~= nil and hp > hp_old then
hp_dif = math.abs(hp_old - hp)
ColourNote("limegreen","black","Health: " .. hppct .. "%","green","black"," +" .. hp_dif)
else
ColourNote("limegreen","black","Health: " .. hppct .. "%")
end -- if
Mana()
end -- function
function Mana()
ColourNote("darkturquoise","black","Mana: " .. mppct .. "%")
Gold()
end -- function
function Gold()
if gold_old ~= nil then
if gold < gold_old then
gold_dif = math.abs(gold - gold_old)
ColourNote("gold","black","Gold: ","red","black","-" .. gold_dif)
elseif gold > gold_old then
gold_dif = math.abs(gold_old - gold)
ColourNote("gold","black","Gold: ","green","black","+" .. gold_dif)
end -- if
end -- if
end -- function
function Enemy()
if enemy_old ~= nil and enemypct ~= nil then
if enemypct < enemy_old then
enemy_dif = math.abs(enemypct - enemy_old)
ColourNote("plum","black","Enemy: ","red","black","-" .. enemy_dif .. "%")
elseif enemypct > enemy_old then
enemy_dif = math.abs(enemy_old - enemypct)
ColourNote("plum","black","Enemy: ","green","black","+" .. enemy_dif .. "%")
end -- if
end -- if
end -- function
if hppct <= hp_danger then
hpcolor = "orangered"
elseif hppct > hp_danger and hppct <= hp_low then
hpcolor = "yellow"
else
hpcolor = "lime"
end -- if
if mppct <= mp_danger then
mpcolor = "orangered"
elseif mppct > mp_danger and mppct <= mp_low then
mpcolor = "yellow"
else
mpcolor = "paleturquoise"
end -- if
if mvpct <= mv_danger then
mvcolor = "orangered"
elseif mvpct > mv_danger and mvpct <= mv_low then
mvcolor = "yellow"
else
mvcolor = "darkorange"
end -- if
if exp <= exp_watch then
expcolor = "cyan"
else
expcolor = "plum"
end -- if
if gold >= gold_watch then
goldcolor = "black"
goldback = "gold"
else
goldcolor = "gold"
goldback = "black"
end -- if
if enemypct ~= nil then
if enemypct <= enemy_dead then
enemycolor = "red"
elseif enemypct > enemy_dead and enemypct <= enemy_low then
enemycolor = "yellow"
else
enemycolor = "lime"
end -- if
end -- if
if enemypct ~= nil then
DoAfterSpecial(0.1,'Battle()',12)
else
DoAfterSpecial(0.1,'NoEnemy()',12)
enemy = 0
end -- if
SetVariable("gold","%8")
SetVariable("hp",hp)
if enemy == 0 then
SetVariable("enemy",100)
elseif enemypct ~= nil then
SetVariable("enemy",enemypct)
end -- if</send>
</trigger>
</triggers>
|