Hello, I got most of the grunt work for this plugin up and running. I only have one issue, when it fires, i can't get it to parse the information, before it tries to send. In other words, i can't get the level gains and such, before the trigger for level/pup fires, so it won't concatenate.
So, here it is:
So, here it is:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- $Id: Aardwolf_Level_Tracker.xml 132 2010-05-04 17:10:42Z endavis $ -->
<muclient>
<plugin
name="Aardwolf_Level_Tracker"
author="Chicomecoatl"
id="aab0ab9ed92f8fd614664bd1"
language="Lua"
purpose="broadcast info from leveling to gtell"
save_state="y"
date_written="2010-05-04 14:20:07"
requires="4.38"
version="1.0"
>
</plugin>
<!-- Get our standard constants -->
<include name="constants.lua"/>
<triggers>
<trigger
enabled="n"
match="^$"
regexp="y"
name="SendLevelInfo"
group="linfo"
send_to="12"
sequence="50"
>
<send>
if (pupped=="y" and levelled=="n") then
if (pups_today==nil or "") then
pups_today=1
end
msg="@RPup #@G".. pups_today.."! @R[@WGains: @G"..pup_gains.."@R]"
if (bonus_trains ~=nil or "") then
msg=msg.." @R[@WBonus Trains: @G"..bonus_trains.."@R]"
end
if (bonus_stats~=nil or "") then
msg=msg.." @R[@WBonus Stats: @G"..bonus_stats.."@R]"
end
msg=msg.."@w"
SendNoEcho("gt "..msg)
pups_today=pups_today+1
bonus_trains=nil
bonus_stats=nil
elseif (pupped=="n" and levelled=="y") then
msg="@RLevel @G"..level.."! @R[@WGains: @G"..level_gains.."@R]"
if (bonus_trains ~=nil or "") then
msg=msg.." @R[@WBonus Trains: @G"..bonus_trains.."@R]"
end
if (bonus_stats ~=nil or "") then
msg=msg.." @R[@WBonus Stats: @G"..bonus_stats.."@R]"
end
msg=msg.."@w"
SendNoEcho("gt "..msg)
bonus_trains=nil
bonus_stats=nil
end
EnableTrigger("SendLevelInfo", false)
</send>
</trigger>
<trigger
enabled="y"
match="You gain * hit points, * mana, * moves, * practices and * trains."
name="levelgains"
group="linfo"
send_to="12"
sequence="50"
>
<send>level_gains="%5"
</send>
</trigger>
<trigger
enabled="y"
match="You gain * trains."
name="pupgains"
group="linfo"
send_to="12"
sequence="50"
>
<send>pup_gains="%1"</send>
</trigger>
<trigger
enabled="y"
match="Lucky! You gain an extra * training sessions*!"
name="bonustrains"
group="linfo"
send_to="12"
sequence="50"
>
<send>bonus_trains="%1"</send>
</trigger>
<trigger
enabled="y"
keep_evaluating="y"
match="You gain a bonus * point!"
name="bonusstat"
send_to="12"
group="linfo"
sequence="50"
>
<send>
if (bonus_stats ~= nil) then
bonus_stats=bonus_stats..", %1"
else
bonus_stats="%1"
end
</send>
</trigger>
<trigger
enabled="y"
match="Congratulations hero. You have increased your powers!"
name="pup"
send_to="12"
sequence="100"
><send>levelled="n"
pupped="y"
EnableTrigger("SendLevelInfo", true)</send>
</trigger>
<trigger
enabled="y"
match="You raise a level! You are now level *."
name="level"
send_to="12"
sequence="100"
>
<send>levelled="y"
pupped="n"
level="%1"
EnableTrigger("SendLevelInfo", true)</send>
</trigger>
</triggers>
</muclient>