bartistcs Beginner
Joined: 15 Sep 2005 Posts: 14 Location: USA-CA
|
Posted: Sun Jul 30, 2006 10:10 pm
Comparing strings |
Maybe strings is a bit misleading...
I want to compare my prompt which looks like this:
[493:493|360:378|137:355|807|0]
with the 807 being my exp to next level (TNL). Because the battle system on the MUD I play on awards exp based on attack, spell, etc, the experience gained varies each battle. Tracking kill experience is no problem, but these little gains are slighly more difficult.
What I am working on, but can't seem to get working, is compare my prompt to the previous prompt and calculate the difference between TNL. This would run continously, checking exp gained and/or lost due to death,flees,etc. For example:
Your hit damages a ghost
[493:493|360:378|137:355|807|0]
Your hit damages a ghost
[493:493|360:378|137:355|806|0]
Your hit damages a ghost
A ghost is dead
You are awarded 7 experience
[493:493|360:378|137:355|800|0]
My current trigger sees that I only won 7xp from the battle, but in reality I received 8xp. This is what I would like to track by comparing the prompts. So in the above example, prompt 2 compared to prompt 1 sees I gained 1xp, so I would add that difference to my counter variable. Comparing prompt 3 to prompt 2 yields a gain of 7xp.
Is this possible to continoulsy compare my prompt and track it's numerical changes? If somebody could help push in the right direction, that would me excellent and much appreciated |
|