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 ➜ General ➜ Cutting the queue line

Cutting the queue line

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


Posted by David B   USA  (80 posts)  Bio
Date Wed 07 May 2003 03:16 AM (UTC)
Message
i'd like to be able to bump commands to the beginning fo the queue line if possible. If you can do it how, I couldn't find anything in the search engine, searched: queue command queue, discardqueue.

I'd set it up to save the current queue, discard it, insert the new command then resume the previous queue, if I know hoe to do that. I hope there is an easier way to do it.

My code(with a LOT of Nicks help) to fame:

sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Wed 07 May 2003 06:29 AM (UTC)
Message
Well, If you actually need it Queue'd, I believe saving, editing, and then resuming is the preferred method, but if you dont need to send it with the queue, and just need it sent now, you can use SendImmediate, which sends it directly to the world, when the command is called, bypassing the Queue all together (this is all rephrased from the online scripting reference)

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by David B   USA  (80 posts)  Bio
Date Reply #2 on Wed 07 May 2003 11:06 PM (UTC)

Amended on Wed 07 May 2003 11:44 PM (UTC) by David B

Message
Ok that works perfectly for me

Sub Blah (name, line, wilds)
world.SendImmediate wilds (1)
end sub


Would that be how it might look?

Error number: -2146827850
Event: Execution of line 1 column 1
Description: Object doesn't support this property or method: 'world.SendImmediate'
Line in error:

Called by: Immediate execution

That was what happened.

Also tried doing it from the cmd prompt, got the same thing.

Basically what I want to do is something along the lines of:

Alias: send *
Example: send reply blah blah
exmaple: send say Hello

It scripts: world.SendImmediate wilds (1)

Or something like that.

My code(with a LOT of Nicks help) to fame:

sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Thu 08 May 2003 04:05 AM (UTC)
Message
You need v3.41 or later, that'd be the only thing I can see...

But yeah, Your scripts look good, and you've got the right idea... Make sure you have 3.41 or higher, If you've got that, then its Nicks Realm.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by David B   USA  (80 posts)  Bio
Date Reply #4 on Thu 08 May 2003 04:39 AM (UTC)
Message
That was the problem, I got the newest version and it worked wonderful!

My code(with a LOT of Nicks help) to fame:

sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 08 May 2003 09:49 AM (UTC)
Message
If you check out the function page SendImmediate it tells you what version is required to use it. All recent functions have that in them, so I can document a function, and you can see whether you have the appropriate version that supports it.

- Nick Gammon

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

Posted by NinjaKick   USA  (17 posts)  Bio
Date Reply #6 on Sun 11 May 2003 08:57 PM (UTC)
Message
I tried what david had posted

Sub Blah (name, line, wilds)
world.SendImmediate wilds (1)
end sub


With an alias called send
it didnt have anything that is sent directly
for label I put Blah
and for script I put blah


But it doesnt do anything
I have scripts enabled too
Any help?

I'm tired.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #7 on Sun 11 May 2003 10:48 PM (UTC)
Message
Your alias should really be "send *", or it won't pick up the rest of the line. However you don't need a script file, in recent versions this will work:


<aliases>
  <alias
   match="send *"
   enabled="y"
   echo_alias="y"
   send_to="12"
   sequence="100"
  >
  <send>world.SendImmediate &quot;%1&quot;</send>
  </alias>
</aliases>


- Nick Gammon

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

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #8 on Sun 11 May 2003 10:53 PM (UTC)
Message
Or even more simply, recent MUSHclient versions let an alias send to "immediate". So, just make an alias that sends its wildcard to "world (immediate)" like this:


<aliases>
  <alias
   match="send *"
   enabled="y"
   echo_alias="y"
   send_to="13"
   sequence="100"
  >
  <send>%1</send>
  </alias>
</aliases>


- Nick Gammon

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

Posted by NinjaKick   USA  (17 posts)  Bio
Date Reply #9 on Mon 12 May 2003 06:27 AM (UTC)
Message
Ahh, thanks Nick... I love you

I'm tired.
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.


35,855 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.