I have been searching vainly for something that will calculate how much XP I have gained for a kill. I could not figure out what commands/scripting code to use.
Basically, I will manually type an alias "startxp" that will first enable a COUNTXP1 trigger and then world.send "xp" to the MUD.
CountXP1 trigger is:
^Spare XP: (numbers I want remembered!) (white space!) Experience: (random gibberish!)
Once this matches, I want the client to remember the first wildcard (I will call it XP1) and then turn on a second trigger, called CountXP2, and then turn itself off.
CountXP2 trigger is:
^(You|> You|> > You) killed (.*)\.$
CountXP trigger will world.send "xp" to the MUD, turn on a trigger called CountXP3, and then turn itself off.
CountXP3 trigger is:
^Spare XP: (numbers I want remembered, XP2) (white space!) Experience: (random gibberish!)
Once this matches, the client will take the first wildcard (XP2) and subtract XP1 from it. And then I want the results of XP2-XP1 to be sent into a variable called ExperienceFromKill. It will then do: ansi & "You received @ExperienceFromKill points from @Target." Then finally, it will turn itself off.
So, I know how to do everything else but what to write to calculate the damage.
Basically, I will manually type an alias "startxp" that will first enable a COUNTXP1 trigger and then world.send "xp" to the MUD.
CountXP1 trigger is:
^Spare XP: (numbers I want remembered!) (white space!) Experience: (random gibberish!)
Once this matches, I want the client to remember the first wildcard (I will call it XP1) and then turn on a second trigger, called CountXP2, and then turn itself off.
CountXP2 trigger is:
^(You|> You|> > You) killed (.*)\.$
CountXP trigger will world.send "xp" to the MUD, turn on a trigger called CountXP3, and then turn itself off.
CountXP3 trigger is:
^Spare XP: (numbers I want remembered, XP2) (white space!) Experience: (random gibberish!)
Once this matches, the client will take the first wildcard (XP2) and subtract XP1 from it. And then I want the results of XP2-XP1 to be sent into a variable called ExperienceFromKill. It will then do: ansi & "You received @ExperienceFromKill points from @Target." Then finally, it will turn itself off.
So, I know how to do everything else but what to write to calculate the damage.