Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Icarus
Beginner


Joined: 18 Sep 2003
Posts: 23
Location: Norway

PostPosted: Tue Feb 12, 2013 5:25 pm   

Macro problem
 
ok, I have a macro, so when I press F1 it should "search here for <herb>", the herb is a variable, and not the problem, the problem is this:

Press F1:

output to mud:

search here for <herb>
search here for <herb>
search here for <herb>


Three rapid sends, and I can't figure out why....

I only have one macro on F1, first thing I checked...

Code:

<macro key="F1">
<value><![CDATA[
     #if (@herb_loc=="" && @herb_loc=="")
         {
              search here for herbs
         }
         {
              #if (@herb_loc=="" && @herb_here<>"")
              {
                   search here for @herb_here
              }
              {
                   #if (@herb_loc<>"" && @herb_here=="")
                   {
                   search @herb_loc for herbs
                   }
                   {
                   search @herb_loc for @herb_here
                   }
              }
     }
]]></value>
</macro>



Anyone?
Reply with quote
Icarus
Beginner


Joined: 18 Sep 2003
Posts: 23
Location: Norway

PostPosted: Tue Feb 12, 2013 5:29 pm   
 
oh, and ignore the values of the @herb_loc and @herb_here, they doesn't work as intended, but they do the trick... mostly ;) They contain either nothing or a location and a herb-name, and that should not affect the macro in itself.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Feb 12, 2013 6:19 pm   
 
That's a known bug, macros fire three times when you have macros override menu shortcuts disabled in prefs.
Reply with quote
Icarus
Beginner


Joined: 18 Sep 2003
Posts: 23
Location: Norway

PostPosted: Tue Feb 12, 2013 7:22 pm   
 
Any way to counteract that?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Feb 12, 2013 11:09 pm   
 
Only way I can think up (and no guarantees it'll even work) is to create a named alarm and a command-input trigger. The command-input trigger would use #NOINPUT to intercept the player command and %alarm() to reset the alarm interval, while the alarm would resend the command when it fires.
_________________
EDIT: I didn't like my old signature
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Wed Feb 13, 2013 1:30 am   
 
Not sure what you're saying Matt... you can just enable macros override menu shortcuts...
Reply with quote
Icarus
Beginner


Joined: 18 Sep 2003
Posts: 23
Location: Norway

PostPosted: Wed Feb 13, 2013 6:45 am   
 
Daern wrote:
Not sure what you're saying Matt... you can just enable macros override menu shortcuts...


Thank you SO much.... That worked perfectly, and I finally have "control" again ;)


Ic
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net