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
➜ General
➜ Using "If" in a script file
|
Using "If" in a script file
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Penguin
(46 posts) Bio
|
| Date
| Sat 27 Jul 2002 03:51 AM (UTC) |
| Message
| Hi,
is it possible to send different stuff to the world if a certain variable is of a certain value?
Like for example if my script is:
Sub Kill_duck (AliasName, TriggerLine, arrWildcards)
world.send "kill & _
world.getvariable ("duck")
End Sub
However can I get it to send a different thing if my variable "duck" is set to a particular value like "chicken"?
How then would I get it to work? | | Top |
|
| Posted by
| Penguin
(46 posts) Bio
|
| Date
| Reply #1 on Sat 27 Jul 2002 06:01 AM (UTC) |
| Message
| Sub Kill_duck (AliasName, TriggerLine, arrWildcards)
if world.getvariable ("duck") = "chicken"
world.send "seduce & _
world.getvariable ("duck")
end if
world.send "kill & _
world.getvariable ("duck")
End Sub
I am using this script currently, however if "duck" is "chicken", it will send "seduce chicken" then "kill chicken" as well. | | Top |
|
| Posted by
| Penguin
(46 posts) Bio
|
| Date
| Reply #2 on Sat 27 Jul 2002 06:03 AM (UTC) |
| Message
| Oops.. okay I managed to get it right by looking at another post in the forum. Thanks anyway:)
PS: Maybe a poster can be allowed to remove his own posts so as not to display his ignorance:P *grin* | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Sat 27 Jul 2002 06:28 AM (UTC) |
| Message
| | A poster can delete his/her own posts. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Penguin
(46 posts) Bio
|
| Date
| Reply #4 on Sat 27 Jul 2002 08:17 AM (UTC) |
| Message
| | Glad to see I just showed how high my intelligence level is again:) | | 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,761 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top