A friend asked me to port my zmud backstab reporter to mush client. Seems to work nicely so Id thought I post it here
This is my first mushclient script so if anything can be done better lemme know :)
Just a few notes theres only one command cbshow
this switches reporting to only you to all your active
chat connections.
Second BS Reporters work off your prompt and unfortunately everyones Prompt is different so you will need to tweak 2 parts of this script to get it to work for you this version is set up for my prompt which looks like :
(sfmpv)(LPK 0)<584/584hp 235/235m 490/490mv 100br>
this is the line in my script section you must first change
var promptreg = new RegExp("^.*\\(([a-zA-Z]+) \\d+\\)\\<(\\d+)/\\d+hp (\\d+)/\\d+m.*\\>");
that regexp pattern is set for my prompt it needs to be set for yours.
It needs to "capture" 3 things from your prompt , your current HPS, MANA and PK LOCATION, (PK LOCATION isnt required) inside the function OnPluginPartialLine you must change the code so the proper variables are set with your matches
Heres Mine:
var matches = promptreg.exec(sText);
if(matches == null)
return;
UserPkLoc = matches[1];
UserHpsOld = UserHpsNew;
UserHpsNew = matches[2];
UserMana = matches[3];
var Report = null;
So you set UserPkLoc to the Pk Loc Capture etc..
Note UserHpsOld must be set to UserHpsNew before UserHpsNew is set to the match from the prompt , i probably confuse things i know :)
Thats about it one other thing is the scripts color are themed, the Theme array is commented so you can easily change the color set ups if you want.
Enjoy.
Ok Too Big too paste so you can download it here
http://home.nc.rr.com/bushhog/Caebryn/scripts/calbackstab.xml
edit: Fixed Twist Bug, and 2 bad triggers.
This is my first mushclient script so if anything can be done better lemme know :)
Just a few notes theres only one command cbshow
this switches reporting to only you to all your active
chat connections.
Second BS Reporters work off your prompt and unfortunately everyones Prompt is different so you will need to tweak 2 parts of this script to get it to work for you this version is set up for my prompt which looks like :
(sfmpv)(LPK 0)<584/584hp 235/235m 490/490mv 100br>
this is the line in my script section you must first change
var promptreg = new RegExp("^.*\\(([a-zA-Z]+) \\d+\\)\\<(\\d+)/\\d+hp (\\d+)/\\d+m.*\\>");
that regexp pattern is set for my prompt it needs to be set for yours.
It needs to "capture" 3 things from your prompt , your current HPS, MANA and PK LOCATION, (PK LOCATION isnt required) inside the function OnPluginPartialLine you must change the code so the proper variables are set with your matches
Heres Mine:
var matches = promptreg.exec(sText);
if(matches == null)
return;
UserPkLoc = matches[1];
UserHpsOld = UserHpsNew;
UserHpsNew = matches[2];
UserMana = matches[3];
var Report = null;
So you set UserPkLoc to the Pk Loc Capture etc..
Note UserHpsOld must be set to UserHpsNew before UserHpsNew is set to the match from the prompt , i probably confuse things i know :)
Thats about it one other thing is the scripts color are themed, the Theme array is commented so you can easily change the color set ups if you want.
Enjoy.
Ok Too Big too paste so you can download it here
http://home.nc.rr.com/bushhog/Caebryn/scripts/calbackstab.xml
edit: Fixed Twist Bug, and 2 bad triggers.