|
scbKOO Newbie
Joined: 13 Sep 2008 Posts: 9
|
Posted: Sat Sep 13, 2008 5:11 pm
Macros are not working |
I have Macros set to override menu shortcuts, and allow any key to be a macro, but I still get nothing. Nothing fires, not even my variables are set.
Code: |
<macro key="CTRL-KEY8" id="43">
<value>bowkill = 1
direction = south
north
wieldbow
#var bowshot %additem ( incen, @bowshot)
#var bowshot %additem ( bd, @bowshot)
#var bowshot %additem ( nt, @bowshot)
#var bowshot %additem ( bd, @bowshot)
#var bowshot %additem ( bd, @bowshot)
go_bow = "on"
usebow</value>
</macro>
|
Quoted in XML[/code][/quote] |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sat Sep 13, 2008 9:29 pm |
The reason is because the macro isn't compiling. The problem is the space between %additem and the '('.
This should work.
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<macro key="CTRL-KEY8" copy="yes">
<value>bowkill = 1
direction = south
north
wieldbow
#var bowshot %additem(incen, @bowshot)
#var bowshot %additem( bd, @bowshot)
#var bowshot %additem( nt, @bowshot)
#var bowshot %additem( bd, @bowshot)
#var bowshot %additem( bd, @bowshot)
go_bow = "on"
usebow</value>
</macro>
</cmud> |
Remember if you are using a laptop, NumLock must be on for it to work. |
|
_________________ Asati di tempari! |
|
|
|
scbKOO Newbie
Joined: 13 Sep 2008 Posts: 9
|
Posted: Sun Sep 14, 2008 3:00 pm |
Thanks a ton!
One more quick question for me to squeeze in here, and I'll be done. At least until I run into another problem.
I use mudbot, and need to be able to use the character " ` " frequently. Is there a way to have CMUD allow me to use the character other than having to turn off parsing? |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Sun Sep 14, 2008 3:13 pm |
Since that is the Line Quote special character, if you don't use or need it for that purpose you can disable it in Preferences, or change what character is used for it.
|
|
|
|
scbKOO Newbie
Joined: 13 Sep 2008 Posts: 9
|
Posted: Sun Sep 14, 2008 9:09 pm |
Thanks again, but I'm still running into real minor problems with new program.
My current one is using the same script as above (but fixed). I'm using %additem to add aliases to a queue, and setting them up to fire when a line hits. However, CMUD is ignoring the aliases, and using the alias name as a command. An example:
Quote: |
north
unwield left
unwield right
remove bow
wield bow
incen
|
That happens first, but what I should be getting is:
Quote: |
north
unwield left
unwield right
remove bow
wield bow
switch incendiary
shoot so-and-so south
|
If I manually type the alias in, it fires, but will not in %additem. How can I change that? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sun Sep 14, 2008 9:15 pm |
#SEND {alias}
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
scbKOO Newbie
Joined: 13 Sep 2008 Posts: 9
|
Posted: Sun Sep 14, 2008 10:41 pm |
That doesn't work, if I do that I have an error with unmatched parenthesis.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Mon Sep 15, 2008 2:06 am |
my bad, its #EXEC not #SEND
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
scbKOO Newbie
Joined: 13 Sep 2008 Posts: 9
|
Posted: Mon Sep 15, 2008 12:15 pm |
That isn't working either, when I use #execute or #send I get this
Code: |
north
unwield left
unwield right
remove bow
wield bow
#executeincen
|
but only if I don't use brackets over {incen} (alias). If I do use them, I have an error in unmatched paranthesis, and if I use neither it sends the text "incen" and not the alias value. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Sep 15, 2008 5:11 pm |
You need to show us the exact alias code that you are using now.
|
|
|
|
scbKOO Newbie
Joined: 13 Sep 2008 Posts: 9
|
Posted: Mon Sep 15, 2008 7:13 pm |
Here's my macro, which has been fixed and is now compiling, but is not firing the alias, just the actual text of the alias. It's supposed to move me a direction, wield my bow, and start a queue of arrows to shoot.
Code: |
<macro key="CTRL-KEY8" id="43">
<value>bowkill = 1
direction = south
north
wieldbow
#var bowshot %additem( incen, @bowshot)
#var bowshot %additem( bd, @bowshot)
#var bowshot %additem( nt, @bowshot)
#var bowshot %additem( bd, @bowshot)
#var bowshot %additem( bd, @bowshot)
go_bow = "on"
usebow</value>
</macro>
|
and here's my list of aliases
Code: |
alias name="incen" id="27">
<value>switch incendiary
shoot @target @direction
</value>
</alias>
alias name="bd" id="39">
<value>switch broad
shoot @target @direction</value>
</alias>
<alias name="nt" id="38">
<value>switch net
shoot @target @direction</value>
</alias>
|
What I get now is this
Quote: |
north
unwield left
unwield right
remove bow
wield bow
incen
|
What I want is this
Quote: |
north
unwield left
unwield right
remove bow
wield bow
switch incendiary
shoot so-and-so south
|
I'm moving this system over manually from Zmud 7.04 to CMUD 2.36, and it worked fine like this in Zmud. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Sep 15, 2008 8:43 pm |
It looks like it is not recognizing 'incen' as an alias. In the Package Editor, in the definition of the macro, is 'incen' colored in red or in blue? If it is red, it's not recognizing the alias. Is 'incen' in a class that is disabled? Or in a different package which is not global?
|
|
|
|
scbKOO Newbie
Joined: 13 Sep 2008 Posts: 9
|
Posted: Mon Sep 15, 2008 9:10 pm |
It's not colored at all, and it was not colored in the previous version of the system in which it worked.
Oh, and everything is enabled as well, and they are in the same class. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Sep 15, 2008 11:40 pm |
I don't see anything in our macro that is calling your "incen" alias. Is your "usebow" an alias? If so, you need to show that too.
|
|
|
|
scbKOO Newbie
Joined: 13 Sep 2008 Posts: 9
|
Posted: Mon Sep 15, 2008 11:50 pm |
Yes, this is it.
Code: |
<alias name="usebow" id="31">
<value>#var attack_to_do %pop( bowshot)
#if (%numitems( @bowshot) = -1) {go_bow = "off"} {#if (@go_bow="on") {@attack_to_do}}</value>
</alias>
|
and it triggers of this.
Code: |
trigger priority="110" id="11">
<pattern>You have recovered balance.</pattern>
#if (@bowkill = 1) {usebow}
</value>
</trigger>
|
What do you mean that there is nothing in the macro that is calling "incen" ? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Tue Sep 16, 2008 12:54 am |
#if (%numitems( @bowshot) = -1) {go_bow = "off"} {#if (@go_bow="on") {#EXEC {@attack_do_do}}}
the variable value is the alias in this case
I am unsure how @bowshot will ever be a negative value when all your doing is popping off the list members. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
scbKOO Newbie
Joined: 13 Sep 2008 Posts: 9
|
Posted: Tue Sep 16, 2008 1:22 am |
Ah, you were right after all, I was just putting it the command in the wrong place. Thanks Again!
|
|
|
|
|
|