[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Scripting Help
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Scripting Help

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Salaz   (5 posts)  [Biography] bio
Date Thu 12 Feb 2009 03:27 AM (UTC)

Amended on Thu 12 Feb 2009 03:44 AM (UTC) by Nick Gammon

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"

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:


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:
Pt Akemi at Meditation pond.

(pt = party tell)
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #1 on Thu 12 Feb 2009 03:34 AM (UTC)
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.
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #2 on Thu 12 Feb 2009 03:37 AM (UTC)
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
[Go to top] top

Posted by Salaz   (5 posts)  [Biography] bio
Date Reply #3 on Sat 14 Feb 2009 07:06 PM (UTC)
Thank you so much!
I'll be back with more questions in the near future.! :)
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]