I would like to share this as it took considerable effort to figure out for a programming newbie so here it is.
If you want to track progress throughout your adventure on any given MUD that supports Lua scripting you can do so within MUSHclient using the following:
first make a trigger by pressing ALT + Enter and clicking on the "Triggers" section in the list on the left hand side
Secondly create the trigger that you want to match on so for example if you wanted to track gold from mob corpses in the case of Aardwolf the trigger would be something like this:
You get * gold * from the * corpse of *.
The easiest way to do this is to copy and paste the line you wish to match on (containing the data you wish to track) from the output window of MUSH client into the Trigger and change anything in that line that will be different each time into a WILDCARD (asterisk).
Those asterisks are wildcards which will match on anything that is sent from the MUD server, you may be wondering why the second one for coins... it's because from time to time you may come across a mob that only drops 1 COIN.
Now this is where it gets fiddly, in the send box you need to put this :
SetVariable ("corpse_gold", (tonumber (GetVariable ("corpse_gold")) + %1 ))
Finally, you need to Send To : Script in the dropdown menu within the trigger creation window and also click the "Expand Variables" Checkbox and make sure it is ticked.
Without going into much detail this retrieves the variable corpse_gold from the variables table in the MUSH config (in the same list as the triggers section right at the bottom on the left in the config window (ALT + Enter) and sets it to it's current value plus the gold received from the mob's corpse. NOTE : You MUST create the variable and give it a starting value !!
(%1 will match the first wildcard, to match a different wildcard use whichever position the wildcard is in for example you want to manipulate with wildcard 4's data, you would use %4 in the same way as %1 above)
This Variable/Counter trick can be used as a counter for anything as long as the trigger matches the output from the MUD and fires, you could count total exp earned, rare MOB exp, Trivia Points from various things (Aardwolf) etc.
I hope this proves useful to others as it did me when someone kindly offered assistance when I couldn't work it out.
If you want to track progress throughout your adventure on any given MUD that supports Lua scripting you can do so within MUSHclient using the following:
first make a trigger by pressing ALT + Enter and clicking on the "Triggers" section in the list on the left hand side
Secondly create the trigger that you want to match on so for example if you wanted to track gold from mob corpses in the case of Aardwolf the trigger would be something like this:
You get * gold * from the * corpse of *.
The easiest way to do this is to copy and paste the line you wish to match on (containing the data you wish to track) from the output window of MUSH client into the Trigger and change anything in that line that will be different each time into a WILDCARD (asterisk).
Those asterisks are wildcards which will match on anything that is sent from the MUD server, you may be wondering why the second one for coins... it's because from time to time you may come across a mob that only drops 1 COIN.
Now this is where it gets fiddly, in the send box you need to put this :
SetVariable ("corpse_gold", (tonumber (GetVariable ("corpse_gold")) + %1 ))
Finally, you need to Send To : Script in the dropdown menu within the trigger creation window and also click the "Expand Variables" Checkbox and make sure it is ticked.
Without going into much detail this retrieves the variable corpse_gold from the variables table in the MUSH config (in the same list as the triggers section right at the bottom on the left in the config window (ALT + Enter) and sets it to it's current value plus the gold received from the mob's corpse. NOTE : You MUST create the variable and give it a starting value !!
(%1 will match the first wildcard, to match a different wildcard use whichever position the wildcard is in for example you want to manipulate with wildcard 4's data, you would use %4 in the same way as %1 above)
This Variable/Counter trick can be used as a counter for anything as long as the trigger matches the output from the MUD and fires, you could count total exp earned, rare MOB exp, Trivia Points from various things (Aardwolf) etc.
I hope this proves useful to others as it did me when someone kindly offered assistance when I couldn't work it out.