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 ➜ Duration and random socials or Emotes

Duration and random socials or Emotes

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


Posted by Spiegel06   (3 posts)  Bio
Date Tue 04 Mar 2008 05:12 PM (UTC)
Message
I am new to the forum so if there is a post about this already could someone please post the link here so I am be directed to it.

I am new to this, I do not know coding or such, and would like to know how to do a emote or social during the duration of a spell. For example, I have the spell: shield up and at random times it will do something like light shimmers off the shield or something like that. Though I would like that only to happen when that specific affect is up.

Thanks for your time.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 04 Mar 2008 07:09 PM (UTC)
Message
This is a bit similar to a recent post by someone who wanted to cast a spell when in combat but not otherwise.

You say you want to do something "during the duration of a spell" - OK so what you need to "tell" the client is:


  • When the spell starts (presumably a trigger can match the message you get)

  • When the spell ends (another trigger)


Without seeing the messages it is hard to be more specific.

The first trigger could "send to script" and enable a timer that fires at your desired interval, see:

http://www.gammon.com.au/scripts/doc.php?function=EnableTimer

The second trigger disables this timer.

Thus the timer only fires when the spell is active, and the timer itself (when active) can display every few seconds or so a note to yourself that the light is shimmering or whatever.

- Nick Gammon

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

Posted by Spiegel06   (3 posts)  Bio
Date Reply #2 on Wed 05 Mar 2008 07:19 PM (UTC)
Message
I am sorry to bother you but I still am not getting it.

The messages I will use to trigger the effect is

"Your body twists and forms into the shape of a tree."

then to end it is this one below.

"Your body returns to its normal form."

but I do not know how to connect the timer to the triggers and been trying and reading it but it does not work. And I thank you for trying to aid me.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 05 Mar 2008 07:38 PM (UTC)

Amended on Wed 05 Mar 2008 07:40 PM (UTC) by Nick Gammon

Message
Here are the two triggers:


<triggers>

  <trigger
   enabled="y"
   match="Your body returns to its normal form."
   send_to="12"
   sequence="100"
  >
  <send>
EnableTimer ("treeform", false)
</send>
  </trigger>

  <trigger
   enabled="y"
   match="Your body twists and forms into the shape of a tree."
   send_to="12"
   sequence="100"
  >
  <send>
EnableTimer ("treeform", true)
ResetTimer ("treeform")
</send>
  </trigger>

</triggers>



Here is the timer:


<timers>
  <timer 
    name="treeform"
    second="5.00"    
    send_to="2"
  >
  <send>Branches sprout from your head, making you look strange.</send>

  </timer>
</timers>



The connection is the timer name - the triggers enable / disable the timer "treeform" by name.

See http://www.mushclient.com/pasting for how to copy these examples directly into the client.

- Nick Gammon

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

Posted by Spiegel06   (3 posts)  Bio
Date Reply #4 on Wed 05 Mar 2008 10:03 PM (UTC)
Message
Thanks so very much, you have helped me alot.
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.


20,705 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.