Action Bar

Posted by Bigwillscarlet on Sat 02 Jul 2016 04:35 PM — 6 posts, 25,905 views.

#0
Ok, sorry if this has already been addressed but I could not find it anywhere. I am using the icon bar from mr gammon. But i was wondering if there was a way to link the cooldown timers with triggers so that if I were to type sit instead of hitting the button, the spam of "you sit down" would activate that cooldown timer?
#1
It wont let me enter the entire code to show you, says its too long but its the standard code from the icon bar.
Australia Forum Administrator #2
I presume you are talking about this page?

http://www.gammon.com.au/forum/?id=9359
#3
Yes sir thats it, Im sorry i couldnt copy and paste it all on one post, Essentially I was wanting to try and make it to where I didnt have to click the buttons unless i wanted to. Was wanting to see if it was possible to either have the click feature or have a certain trigger cause the countdown for that particular ability/button to activate and let me know when the ability is up for casting again.
Amended on Sat 02 Jul 2016 09:13 PM by Bigwillscarlet
Australia Forum Administrator #4
You can interact with the plugin by using the CallPlugin script function.

Template:function=CallPlugin
CallPlugin

The documentation for the CallPlugin script function is available online. It is also in the MUSHclient help file.



In this case you could do this:


CallPlugin("ede0920fc1173d5a03140f0e", "SetCooldown", 1, 30)


This is saying to go to plugin with the ID "ede0920fc1173d5a03140f0e" (the action bar plugin), call the function "SetCooldown", and pass the arguments 1 (the button number) and 30 (the number of seconds).

Now just put that inside a trigger, for example:


<triggers>
  <trigger
   enabled="y"
   match="You sit down."
   send_to="12"
   sequence="100"
  >
  <send>

CallPlugin("ede0920fc1173d5a03140f0e", "SetCooldown", 1, 30)

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


Template:pasting
For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.
#5
awesome that worked like a charm sir, thank you very much :)