Scripting Help

Posted by Salaz on Thu 12 Feb 2009 03:27 AM — 4 posts, 19,442 views.

#0
This i what i'm trying to do. I play the mud Achaea as a monk and we have a certain skill called fullsense that shows you a list of people within your area. this is the format you see"

Quote:
You seek out all mental presences within your reach:
You sense Kurik at Meditation pond.
You sense Akemi at The Silverdrop Inn.
You sense Elone at A cosy teal living room (house).
You sense Arfaroth at Hillwalk Way.
You sense Brivius at Sulaiman Avenue.


So far, i've been able to create a variable containing a list of all enemies so the variabe "enemylist" has name1|name2|name3 and with:


<triggers>
  <trigger
   custom_colour="14"
   enabled="y"
   expand_variables="y"
   ignore_case="y"
   keep_evaluating="y"
   match="(@!enemylist)"
   regexp="y"
   repeat="y"
   sequence="100"
  >
  </trigger>
</triggers> 


i'm able to color anyone on that list.
But i also want to be able to announce the names of those people over a party channel when i use the fullsense ability. How would i do this?
So let say Akemi was an enemy, i want to be able to capture her name from the fullsense list and do:
Quote:
Pt Akemi at Meditation pond.

(pt = party tell)
Amended on Thu 12 Feb 2009 03:44 AM by Nick Gammon
USA #1
Easiest way is to change the Send To: to script, and in the send box put

SendNoEcho "partytalk %0"


%0 matches the entire line matched, so "partytalk You sense Foo at Somewhere easy to kill." will be sent to the mud. (without spamming your display)

I don't play Acachea, so substitute partytalk for the real command.
USA #2
Or change the pattern to be "^You sense ((@!enemylist) at .+)$"

and then

either send to World: pt %1

or send to script: SendNoEcho "pt %1"

That'll crop the You Sense
#3
Thank you so much!
I'll be back with more questions in the near future.! :)