Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Plugins ➜ Modification to Random Socials Plugin?

Modification to Random Socials Plugin?

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


Posted by Herb   United Kingdom  (5 posts)  Bio
Date Wed 07 Aug 2002 01:05 PM (UTC)
Message
Many socials on my mud require a target.
If there is no target the mud returns 'Pardon?'
Could the plugin be expanded to automatically remove any socials that generate a 'Pardon?' response?

*******************************************************

herbert@asylum-mud.org Co-founder of Asylum MUD
http://www.asylum-mud.org/
telnet asylum-mud.org 6715
telnet www.asylum-mud.org (portless)

*******************************************************
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 09 Aug 2002 02:06 AM (UTC)
Message
It would be a bit tricky. For instance, on SMAUG, the error messages are different every time, eg.


tickle
Whom do you want to tickle?


So, you would have to detect each one, which would be a lot more work than just removing them as you find them.

The random socials currently has built-in to remove one, so for instance, you might type:


socials:remove tickle


In your case, with one word "Pardon?" it is easier, but then you have to know if the word relates to a recent random social, or just a typing error you made.

Personally I just ignore them - the occasional one that fails just adds to the colour a bit, and if the "pardon" annoys you, use the "remove" function to gradually prune your list.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Herb   United Kingdom  (5 posts)  Bio
Date Reply #2 on Fri 09 Aug 2002 07:56 AM (UTC)
Message
Fair comment.
To be honest I was more interested in the mechanics of a solution rather than actually being bugged by the pardon response.

*******************************************************

herbert@asylum-mud.org Co-founder of Asylum MUD
http://www.asylum-mud.org/
telnet asylum-mud.org 6715
telnet www.asylum-mud.org (portless)

*******************************************************
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Fri 09 Aug 2002 08:33 AM (UTC)
Message
Ah, OK.

In that case I would do something like this...

When a random social is sent, remember the date/time (and the social itself).

Then make a trigger to match on "Pardon?", the trigger calls a script, and if this happens within (say) 2 seconds of the last random social, delete the saved random social from the list.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #4 on Fri 09 Aug 2002 08:57 AM (UTC)
Message
The way I would do it, is like this (is semi-pseudo code):

world.enabletrigger "emote watchdog", true
world.addtimer "emote watchdog timer", 2 seconds
save emote to variable
world.send "emote target"

OnEmoteTimerEnd
  world.enabletrigger "emote watchdog", false

OnWatchdogTrigger
  Delete appropriate emote

Fairly simplistic, and efficient in that the trigger doesn't waste execution time when it's not needed.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
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.


17,777 views.

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

Go to topic:           Search the forum


[Go to top] top

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