<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>
<!-- Saved on Friday, July 18, 2003, 6:28 AM -->
<!-- MuClient version 3.38 -->
<!-- Plugin "analyzer" generated by Plugin Wizard -->
<muclient>
<plugin
name="analyzer"
author="Mary Proctor"
id="fd6aa87a89f1e14d2473e0cf"
language="JScript"
purpose="To analyze the stats and tokenwork on a piece of eq"
save_state="y"
date_written="2003-07-18 06:25:58"
requires="3.38"
version="1.0"
>
</plugin>
<!-- Get our standard constants -->
<include name="constants.js"/>
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
group="sort"
match="*extra flags *unique*."
send_to="12"
sequence="99"
>
<send>world.setvariable ("unique", 1);
world.send ("gt Unique");</send>
</trigger>
<trigger
enabled="y"
group="sort"
match="Affects hit roll by -*."
send_to="12"
sequence="99"
>
<send>{
var hitmath;
hitmath = parseFloat (world.GetVariable ("hit"));
if (hitmath == null)
hitmath = 0;
var uni;
uni = parsefloat (world.getvariable ("unique;"));
if (uni == 0)
hitmath -= %1;
world.SetVariable ("hit", hitmath);
}</send>
</trigger>
<trigger
enabled="y"
expand_variables="y"
group="sort"
match="*tells the group 'Unique'"
send_to="12"
sequence="101"
>
<send>world.send ("emote reports:`RThis item is ``OUNIQUE``, and has the following properties:`RHps: `^@hps`` Mana: `^@man`` Moves: `^@mov``AC: `^@arm`` Saves: `^@sav`` Hitroll: `^@hit`` Damroll: `^@dam``");
var tenhit;
hit = parsefloat (world.getvariable ("hit"));
tenhit = 30 - hit;
world.setvariable ("tenhit", 0);
if (tenhit >= 0)
world.setvariable ("tenhit", tenhit);
var tendam;
dam = parsefloat (world.getvariable ("dam"));
tendam = 30 - dam;
world.setvariable ("tendam", 0);
if (tendam >= 0)
world.setvariable ("tendam", tendam);
var twohps;
hps = parsefloat (world.getvariable ("hps"));
twohps = 500 - hps;
world.setvariable ("twohps", 0);
if (twohps >= 0)
world.setvariable ("twohps", twohps);
var twoman;
man = parsefloat (world.getvariable ("man"));
twoman = 500 - man;
world.setvariable ("twoman", 0);
if (twoman >= 0)
world.setvariable ("twoman", twoman);
var twomov;
mov = parsefloat (world.getvariable ("mov"));
twomov = 500 - mov;
world.setvariable ("twomov", 0);
if (twomov >= 0)
world.setvariable ("twomov", twomov);
var newarm;
arm = parsefloat (world.getvariable ("arm"));
newarm = (-500 - arm)* -1;
world.setvariable ("newarm", 0);
if (twohps >= 0)
world.setvariable ("newarm", newarm);
var newsav;
sav = parsefloat (world.getvariable ("sav"));
newsav = (-25 - sav)* -1;
world.setvariable ("newsav", 0);
if (twohps >= 0)
world.setvariable ("newsav", newsav);
world.send ("emote reports: `RThe following amounts may be applied via tokens:`R`^250/250`` work: Hps (`#@twohps``) / Mana (`#@twoman``) / Moves (`#@twomov``)`R`^10/10`` work: Hitroll (`#@tenhit``) / Damroll (`#@tendam``)`R`^AC`` work: AC (`#@newarm``)`R`^Spellshield`` work: Saves (`#@newsav``)");
var tenten;
tenten = (tenhit + tendam) / 20;
if (tenten <= 0)
world.setvariable ("tenten", 0);
if (tenten >= 0)
world.setvariable ("tenten", 1);
if (tenten >= 1)
world.setvariable ("tenten", 2);
if (tenten >= 2)
world.setvariable ("tenten", 3);
if (tenten >= 3)
world.setvariable ("tenten", 4);
if (tenten >= 4)
world.setvariable ("tenten", 5);
if (tenten >= 5)
world.setvariable ("tenten", 6);
var twofifty;
twofifty = (twohps + twoman + twomov) / 500;
if (twofifty <= 0)
world.setvariable ("twofifty", 0);
if (twofifty >= 0)
world.setvariable ("twofifty", 1);
if (twofifty >= 1)
world.setvariable ("twofifty", 2);
if (twofifty >= 2)
world.setvariable ("twofifty", 3);
if (twofifty >= 3)
world.setvariable ("twofifty", 4);
if (twofifty >= 4)
world.setvariable ("twofifty", 5);
if (twofifty >= 5)
world.setvariable ("twofifty", 6);
if (twofifty >= 6)
world.setvariable ("twofifty", 7);
var ac;
ac = (newarm) / 250;
if (ac <= 0)
world.setvariable ("ac", 0);
if (ac >= 0)
world.setvariable ("ac", 1);
if (ac >= 1)
world.setvariable ("ac", 2);
if (ac >= 2)
world.setvariable ("ac", 3);
if (ac >= 3)
world.setvariable ("ac", 4);
if (ac >= 4)
world.setvariable ("ac", 5);
var spellshield;
spellshield = (newsav) / 25;
if (spellshield <= 0)
world.setvariable ("spellshield", 0);
if (spellshield >= 0)
world.setvariable ("spellshield", 1);
if (spellshield >= 1)
world.setvariable ("spellshield", 2);
if (spellshield >= 2)
world.setvariable ("spellshield", 3);
if (spellshield >= 3)
world.setvariable ("spellshield", 4);
world.send ("emote reports: `RThe following amounts of tokens would be used:`R`^250/250``: `#@twofifty```R`^10/10``: `#@tenten```R`^AC``: `#@ac```R`^Spellshield``: `#@spellshield```R`^Style``: `#@style```R`^Fireproof``: `#@fireproof```R`^Gems``: `#@gem``")
</send>
</trigger>
|