Code: Select all
#nop Pretty Hurt triggers (pht), gsay conditions while exping
#class pht kill
#alias {phton} {#class pht read $dir/phurt.tin}
#alias {phtoff}
{
#class pht kill;
#nop loot and co are aliases to abstract looting and ammo collection
#nop co is typically #nop, and loot is typically g coins corpse, but can change separately
#act {You receive your share of experience.} {loot;co;save;}
}
create file phurt.tin in the appropriate directory with the following code to be loaded
Code: Select all
#var cond 0
#alias {phtreset} {#var cond 0}
#act {You receive your share of experience.} {loot;co;save;phtreset}
#act {< T: %1 TC: %2 E: %3 EC: %4}
{
#if {"%4" == "nasty wounds" && $cond < 1}
{
#var cond 1;
p %3 is at nasty;
}
#if {"%4" == "pretty hurt" && $cond < 2}
{
#var cond 2;
p %3 is at phurt;
}
#if {"%4" == "awful" && $cond < 3}
{
#var cond 3;
p %3 is at awful;
}
}