<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Tuesday, March 29, 2005, 10:36 PM -->
<!-- MuClient version 3.65 -->
<!-- Plugin "Stats" generated by Plugin Wizard -->
<muclient>
<plugin
name="Stats"
author="Travis"
id="4624287bc3c0840692e4e0eb"
language="JScript"
save_state="y"
date_written="2005-03-29 22:34:53"
requires="3.65"
version="1.0"
>
</plugin>
<!-- Get our standard constants -->
<include name="constants.js"/>
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
group="Multi Line"
ignore_case="y"
lines_to_match="2"
keep_evaluating="y"
match="Hit Points: */* Practices: *\nSpell Points: */*\Z"
multi_line="y"
name="tmax"
regexp="y"
script="StatsMax"
send_to="12"
sequence="100"
>
<send>%2 %5</send> <---- ?
</trigger>
<trigger
enabled="y"
ignore_case="y"
keep_evaluating="y"
match="<*hp *sp *st>"
name="tprompt"
script="StatsChanged"
send_to="12"
sequence="100"
>
<send>%1 %2 %3</send> <--- ?
</trigger>
</triggers>
<!-- Script -->
<script>
<![CDATA[
function StatsChanged (Name, trig_line, wildcards)
{
wildcards = VBArray(wildcards).toarray();
xhp = wildcards[0] <----
xsp = wildcards[1] <----
world.Note( hpc spc );
}
function StatsMax (Name, trig_line, wildcards)
{
wildcards = VBArray(wildcards2).toarray();
maxhp = wildcards[1] <---
maxsp = wildcards[4] <---
}
var maxhp = 0
var maxsp = 0
var xhp = 0
var xsp = 0
var hpc = maxhp - xhp
var spc = maxsp - xsp
]]>
</script>
</muclient>
Need I a little guidance. Basically I want the numerically difference between my current hp and maxhp. Two triggers that catch current and max hp. Thanks in advance for any assistance.
I wasn't sure where exactly to put the world.Note() command. Is it in the correct place?