Reporting?

Posted by Keith on Mon 12 Oct 2009 04:31 PM — 2 posts, 15,348 views.

#0
I was wondering if there is a way to make a trigger to report how much experience i have? My Prompt looks like this:
<100% 2% 100% 99(0) 13%% N> and my experience is the number with the two %% after it. I can change my prompt if i need to in order to get the trigger to work if needed. I was just wondering if i could just make it so if someone says report
i tell them i have <> experience. Can anyone help me with this please?
#1
I think this is what your looking for.
<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="<*% *% *% *(*) *%% *>"
   name="Capture_Experience"
   send_to="9"
   sequence="100"
   variable="expereince"
  >
  <send>%6</send>
  </trigger>
</triggers>

This trigger matches the prompt line and then sets variable "experience" to the wildcard 6 (your experience).
<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   keep_evaluating="y"
   match="* tells you: report"
   name="Report_Expereince"
   sequence="100"
  >
  <send>Tell %1 @expereince</send>
  </trigger>
</triggers>

This trigger catches "any_player tells you: report" it then uses the wildcard for the name of the player and Tells the "any_player" the value of the variable experience.
Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.