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

Gammon Software Solutions forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Random outputs

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Random outputs
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Absolute Zero   (3 posts)  [Biography] bio
Date Tue 28 Feb 2012 11:45 AM (UTC)  quote  ]
Message
Hate to ressurect this thread, But I can't figure out how to transfer this script into a similar scenario but for a timer.


I'd like to make a timer that every time it fires, sends a random input from a list, but this time each repetition of the timer should be able to do two inputs, for instance

option one:
ping
@me doing is=option one

option two:
ping
@me doing is=this is option two

option three:
ping
@me doing is=and this is option three

It should be similar to the previous in that those two inputs could be anything, and that more should be readily addable to the list... I look forward to your reply and would like to thank you for your previous help and hope you can help me again.
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Sun 06 Feb 2011 08:26 AM (UTC)  quote  ]
Message
Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Absolute Zero   (3 posts)  [Biography] bio
Date Sun 06 Feb 2011 08:23 AM (UTC)  quote  ]
Message
Ok and how do I implement this? I've been adding triggers through the in game trigger menu.
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Sat 05 Feb 2011 08:27 PM (UTC)  quote  ]
Message
The trigger would look like this:


<triggers>
  <trigger
   enabled="y"
   match="* attacks you!"
   send_to="12"
   sequence="100"
  >
  <send>

local responses = {
  "yell OH HELP",
  "page fcpd %1 is killing me!",
  "say Dead or alive you're coming with me",

-- more here

}

Send (responses  [math.random (1, #responses)])

</send>
  </trigger>
</triggers>


The alias will be similar.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Absolute Zero   (3 posts)  [Biography] bio
Date Sat 05 Feb 2011 06:42 AM (UTC)  quote  ]

Amended on Sat 05 Feb 2011 12:15 PM (UTC) by Absolute Zero

Message
Ok so I don't know how simple or complex this is but I would like to make a simple trigger and alias to do two different things

My trigger is to match '* attacks you!'

What I'd like it to do is output one of four different things at random:

1) yell OH HELP

2) page fcpd %1 is killing me!

3) say Dead or alive you're coming with me

and the alias is 'grief *'

I want it to attack %1 and also output one of three different things at random

1) yell DEAD OR ALIVE YOU'RE COMING WITH ME

2) -%1 You are being greifed please hold still

3) -%1 hey check out my new camera

I'd also like space to add extra ones as I think of them with an equal chance of any among them being used...

I don't know how to do this myself so thanks for any help you can give.
[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.


1,304 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]