|
meddlesome Wanderer
Joined: 24 Aug 2012 Posts: 70
|
Posted: Sun Aug 26, 2012 6:15 pm
Can a Macro be executed inside a script? <SOLVED> |
I have this window that I want to copy the room I am in too. So I am doing this:
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<window name="ROOM" commandline="false" statusbar="false" dockalign="Top" width="652" height="414" host="none" copy="yes">
<uid>{8216901C-195A-4BA5-9FC9-96F0BA670ED4}</uid>
<dockuid>{9295D7A7-C7E2-4C84-9125-E061ED79C0B4}</dockuid>
<trigger priority="250" copy="yes">
<pattern>CAPTURING TO ROOM</pattern>
<value>#CLR
#SHOW {}</value>
</trigger>
</window>
</cmud>
|
I can use my macro KEY5 and I get perfect Results
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<macro key="KEY5" copy="yes">
<value>Look
#T+ SnatchRoom
;DO NOT REMOVE THE FOLLOWING, IT IS TRIGGERED.
#SHOW CAPTURING TO ROOM
#WAITFOR {~<%d~/%dhp %d~/%dm %d~/%dmv %dbr~>}
#T- SnatchRoom
</value>
</macro>
</cmud>
|
But if I copy that code and move it into a trigger, say I bounce against the wall or get attacked that stops my moving, it fails. The reason is because right after I LOOK, the prompt pops up and turns off the SnatchRoom class. What's odd is it doesn't do that when I use the KEY5 Macro.
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger priority="1100" copy="yes">
<pattern>The combat you are engaged in prevents you.</pattern>
<value>Look
#T+ SnatchRoom
;DO NOT REMOVE THE FOLLOWING, IT IS TRIGGERED.
#SHOW CAPTURING TO ROOM
#WAITFOR {~<%d~/%dhp %d~/%dm %d~/%dmv %dbr~>}
#T- SnatchRoom</value>
</trigger>
</cmud>
|
The SnatchRoom follows as:
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<class name="SnatchRoom" copy="yes">
<trigger priority="90" copy="yes">
<pattern>%*</pattern>
<value>#CAP ROOM
#GAG</value>
</trigger>
</class>
</cmud>
|
Can I just call the Macro and execute it, or is there more to my fail here. Can I tell CMUD somehow to ignore the return of the prompt when I send data to the MUD. What is a good work around for this?
CMUD v237
Order number: **7829 |
|
Last edited by meddlesome on Sun Aug 26, 2012 6:44 pm; edited 1 time in total |
|
|
|
meddlesome Wanderer
Joined: 24 Aug 2012 Posts: 70
|
Posted: Sun Aug 26, 2012 6:37 pm |
This is the output from the trigger
Quote: |
Alas, you cannot go that way...
Look
CAPTURING TO ROOM
<817/855hp 209/209m 590/590mv 100br>
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ³
³ ³
³ ³
³ ³
³ ³
³ à©©©©ààààààààͳ
³ àê©©©©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
³ à©©© ©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Next to a Stone Wall in a Tower Courtyard
<855/855hp 209/209m 590/590mv 100br>
|
This is the output from the KEY5 Macro
Quote: |
<855/855hp 209/209m 590/590mv 100br> Look
CAPTURING TO ROOM
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ³
³ ³
³ ³
³ ³
³ ³
³ à©©©©ààààààààͳ
³ àê©©©©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
³ à©©© ©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
³ à©©©©©©©©©©©ââ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Next to a Stone Wall in a Tower Courtyard
<855/855hp 209/209m 590/590mv 100br>
|
Notice how the macro doesn't bring the prompt back up? What gives there? |
|
|
|
meddlesome Wanderer
Joined: 24 Aug 2012 Posts: 70
|
Posted: Sun Aug 26, 2012 6:44 pm |
Hrm. Crud. I just fixed it. The prompt that was interfering was the prompt from the mud after it told me "Alas, you cannot go that way... "
The fix was to add another
#WAITFOR {~<%d~/%dhp %d~/%dm %d~/%dmv %dbr~>}
before I used LOOK |
|
_________________ Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829 |
|
|
|
|
|