|
jorthus Newbie
Joined: 05 Jan 2016 Posts: 4
|
Posted: Tue Jan 05, 2016 5:31 pm
Old Zmud chase script not working on Cmud |
I used this script for years on Zmud and this week decided to upgrade to Cmud since I got a new laptop for Christmas. The majority of my Zmud stuff worked with some minor tweaking, but I can't get this one to fire off properly. There is a mark and unmark section to add someone to an enemylist and I was able to get that to fire. It won't perform the action or move in on the target. Any suggestions will be greatly appreciated.
Thanks
Jason
Code: |
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<class name="!HUNT" initdisable="true" enabled="false">
<var name="action">gt got'em boss</var>
<var name="EnemyList">
<value>jackass</value>
<default>Jackass</default>
</var>
<alias name="clear">
<value>#var EnemyList jackass</value>
</alias>
<alias name="elist">
<value>#echo @EnemyList</value>
</alias>
<alias name="mark">
<value>EnemyList=%additem( %-1, @EnemyList)</value>
</alias>
<alias name="peer">
<value>scan north
scan northeast
scan east
scan southeast
scan south
scan southwest
scan west
scan northwest</value>
</alias>
<alias name="unmark">
<value>EnemyList=%delitem( %-1, @EnemyList)</value>
</alias>
<trigger priority="5040">
<pattern>soars %2, on %1.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
@action %1
}</value>
</trigger>
<trigger priority="5050">
<pattern>soars in, rideing on %1.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5060">
<pattern>Your spell was absorbed by %1 spell eating rune.$</pattern>
<value>#echo Spelleating!!!</value>
</trigger>
<trigger priority="5080">
<pattern>^(*) appears in the room.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5090">
<pattern>^(*) disembarks from %2.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5100">
<pattern>^(*) flies %2.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
@action %1
}</value>
</trigger>
<trigger priority="5110">
<pattern>^(*) floats %2.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
@action %1
}</value>
</trigger>
<trigger priority="5120">
<pattern>^(*) has arrived through a gate.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5130">
<pattern>^(*) has arrived through a shimmering gate.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5140">
<pattern>^(*) has arrived, riding on %3.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5150">
<pattern>^(*) has arrived.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5160">
<pattern>^(*) has fled!$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
scan
}</value>
</trigger>
<trigger priority="5180">
<pattern>^(*) is here.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5190">
<pattern>^(*) is knocked %2.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
@action %1
}</value>
</trigger>
<trigger priority="5210">
<pattern>^(*) leaps at a wall, uses it as a springboard, and somersaults out of the fray!$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
scan
}</value>
</trigger>
<trigger priority="5220">
<pattern>^(*) leaves %2, riding on a %3.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
@action %1
}</value>
</trigger>
<trigger priority="5230">
<pattern>^(*) leaves %2, riding on a blue dolphin.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
@action %1
}</value>
</trigger>
<trigger priority="5240">
<pattern>^(*) runs %2.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
@action %1
}</value>
</trigger>
<trigger priority="5250">
<pattern>^(*) swims %2.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
@action %1
}</value>
</trigger>
<trigger priority="5260">
<pattern>^(*) walks %2.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
@action %1
}</value>
</trigger>
<trigger priority="5270">
<pattern>^(*), appears in the room.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5280">
<pattern>^(*), nearby to the %2.$</pattern>
<value>#if {%ismember( %-1, @EnemyList)}{
%2
@action %1
}</value>
</trigger>
<trigger priority="5290">
<pattern>^(*), not far %2.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
scan
}</value>
</trigger>
<trigger priority="5300">
<pattern>^(*), off in the distance %2.$</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
%2
peer
}</value>
</trigger>
<trigger priority="5320">
<pattern>^(*), right here.</pattern>
<value>#if {%ismember( %1, @EnemyList)}{
#color 79
@action %1
}</value>
</trigger>
<trigger priority="5330">
<pattern>^{@EnemyList} %s (*)</pattern>
<value>#color 79</value>
</trigger>
</class>
</cmud> |
Edit Vijilante: added code tags |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Jan 06, 2016 5:00 am |
I am seeing a lot of lines "@action %1". Executing from a variable was changed from zMud to CMud. If your "action" will only contain a MUD command then you should use #SEND as in "#SEND {@action %1}". If your variable will contain the name of a CMud alias that you want to call then you will need to use #EXECUTE as in "#EXEC {@action %1}".
The lines that are "%2" should be "#SEND {%2}". I would also recommend refining the patterns for those triggers. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
jorthus Newbie
Joined: 05 Jan 2016 Posts: 4
|
Posted: Wed Jan 06, 2016 6:00 pm |
Thanks! I'll make the updates. This was written for me years ago by a friend who no longer muds. I simply don't understand how to write this stuff out.
Oh..should I change those %2 (directions) to %t? |
|
|
|
jorthus Newbie
Joined: 05 Jan 2016 Posts: 4
|
Posted: Wed Jan 06, 2016 8:47 pm |
So, I am still getting some errors on the trigger firing.
I was able to mark Laiton and see my elist (jackass|Laiton)
sca
Looking around you see:
Laiton, nearby to the southeast.
ERROR: Trigger "^(*), nearby to the %2.$" fired but did not compile
Laiton is here.
ERROR: Trigger "^(*) is here.$" fired but did not compile
Patterns are as follows.
^(*) is here.$
#if {%ismember( %1, @EnemyList)}{
#color 79
#send {@action %1}
}
^(*), nearby to the %2.$
#if {%ismember( %-1, @EnemyList)}{
#send {%2}
#send {@action %1}
} |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Jan 08, 2016 1:40 pm |
CMud is more formal about its language syntax. You currently have "#if {condition}{" those need to be "#if (condition) {".
In the 'nearby to' you have a reference "%-1", that should be "%1". |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
jorthus Newbie
Joined: 05 Jan 2016 Posts: 4
|
Posted: Fri Jan 08, 2016 5:25 pm |
Thank you!
|
|
|
|
|
|
|
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
|
|