setting up a macro

Posted by Dragonlord on Wed 17 Dec 2014 03:38 AM — 10 posts, 38,173 views.

#0
Hello,

I am try to set up a macro that casts a spell but it needs to wait for several seconds while it casts before it removes the spellbook and stores it in my locker or pouch

open pouch
get viol pouch
wear viol
c 'enhanced strength'

DoAfter (10, "remove viol") --- this is the line i am having issues with so any ideas on what my problem is?

put voil pouch
close pouch
USA #1
What's the problem exactly? Is it trying to put the voil away before the doafter removes it or is there something else going on?
#2
That is what is happening, I thought it was supposed to wait 10 seconds before trying to remove the voil.. I am really new to this program I used to do zmud/cmud when i played before
Amended on Wed 17 Dec 2014 05:13 AM by Dragonlord
Australia Forum Administrator #3
Please post your exact alias.

What you have there seems to be a combination of scripting and MUD commands.

Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
#4
Macro type: F1+Shift

open pouch
get viol pouch
wear viol
c 'enhanced strength'
DoAfter (10, "remove viol")
put voil pouch
close pouch
USA #5
Off the top of my head, do you have timers enabled? Is the DoAfter actually firing to remove the spellbook? Have you tried using incremental DoAfter steps to putting the spellbook in the bag and closing the bag? Pretty sure the rest of the trigger evaluates immediately when you drop a doafter in the middle of things like that.
Australia Forum Administrator #6
DoAfter is a script function.

You cannot mix script functions and things you want to send to the MUD like that.
#7
okay I placed the main part of the script into an aliase named "ces"

<aliases>
<alias
match="ces"
enabled="y"
regexp="y"
send_to="10"
ignore_case="y"
sequence="100"
>
<send>open pouch
get viol pouch
wear viol
c 'enhanced strength'
DoAfter (10, "remove viol")
put voil pouch
close pouch</send>
</alias>
</aliases>
USA #8
More reliable approach would probably be to set a trigger against whatever your returned message from a successful enhanced strength cast is to handle the removal and storage of the spellbook. That would allow you to send the entire thing to script and set your delays on everything accordingly.
Australia Forum Administrator #9
Quote:

Put voil pouch


Spelling!

You need to "send to script" and then send the MUD commands using the send function.

E.g.


Send "open pouch"