Score in Status Bar

Posted by GageEndal on Tue 19 Apr 2005 04:10 AM — 6 posts, 22,969 views.

#0
This one is probrobly pretty simple. I want to set up a trigger that will shove my current score into a variable and have that variable display in the Status Bar on the bottom of the screen. On top of that, whenever I get the message:

You receive 2100 experience points and 17 gil!

I want it to set 2100 to a wildcard and subtract that from the current score. I have no clue how to work scripts and I have gotten very good with triggers. Please reply if you think you can help with this one.
USA #1
What does the score line look like?
#2
| |---------------------------------------------------------------| |
| | You have 34582278 experience. | |
| | You need 299842 experience to gain a level. | |
| | You have been awarded 0 Roleplay points this level. | |
USA #3
In the future, you should put output in [code][/code] tags to preserve whitespace (it didn't matter in this case, since its a variable amount anyway). Of course then you have to escape a couple of things (which you can do in a mushclient notepad automatically).

I assumed you wanted the experience to level (since otherwise subtracting didn't make sense) and this will do it for you (assuming you're using VBScript):

<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="^\| \| You need (\d+) experience to gain a level\.[ ]+\| \|$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>setvariable "exptolevel", "%1"
setstatus "ExpToLevel: %1"</send>
  </trigger>

  <trigger
   enabled="y"
   keep_evaluating="y"
   match="^You receive (\d+) experience points? and (\d+) gil!$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>setvariable "exptolevel", getvariable("exptolevel") - %1
SetStatus "ExpToLevel: " &amp; getvariable("exptolevel")</send>
  </trigger>
</triggers>
#4
I put it in and I think it's working. I got an error message though that says

Quote:

| | You need 290676 experience to gain a level. | |
Send-to-script cannot execute because scripting is not enabled.
| | You have been awarded 0 Roleplay points this level. | |

Any clue how to fix this?
#5
Nevermind, I fixed it. Works like a charm! Thanks!