About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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
Ansaron
Newbie


Joined: 17 Dec 2008
Posts: 3

PostPosted: Wed Dec 17, 2008 2:52 pm   

Imported "Teleport" Script from zMUD
 
Code:


<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="FadeScript">
    <class name="Getter" initdisable="true">
      <var name="CurrentPosition">23</var>
      <var name="LookupTable">gap|gap2|gap3|bl|bl2|bl3|rcmoss|rc2|rc3|sg|sg2|sg3|tkd|tkd2|tkd3|ls|ls2|ls3|stedding|keep|rk2|rk3|nspine|nspine2|nspine3|dpass|dpass2|dpass3|fdrd|fdrd2|fdrd3|dusty|dusty2|dusty3|shady|shady2|shady3|twist|twist2|twist_rent|sls|sls2|sls3|orch|orch2|orch3|camp|camp2|camp3|liz|liz2|liz3|sm|sm2|sm3|esh|esh2|esh3|blpass|blpass2|blpass3|sh|sh2|sh3|ssh|ssh2|ssh3|nkeep|nkeep2|nkeep3|lithe|4trees|4t1e|hut|waterwall|rocks|rockss|bears|bears2|nest|df|df2|df3|hollow|spiders2|spiders|brfade|brfade2|brfade3|ij|ij2|ij3|rene|rene2|rene3|dkrd|dkrd2|dkrd3|bvall|bvall2|bvall3|ashen|ashen2|ashen3|swsh|swsh2|swsh3|nsg|nsg2|nsg3|malf|malf2|malf3|bltunnel|bltunnel2|bltunnel3|nls|nls2|nls3|maradon|maradon2|dhs|dhs2|dhs3|arafel|arafel2|arafel3|rhahime|rhahime2|rhahime3|gorthel|gorthel2|gorthel3|wdog|wdog2|wdog3|twist4|twist5|twist6|legbase|legbase2|negf|negf2|negf3|odfort|odfort2|odfort3|sdfort|do|do2|do3|sdfort2|sdfort3|wdkrd|wdkrd2|wdkrd3|dfort|dfort2|dfort3|ssdfort|ssdfort2|ssdfort3|sedfort|sedfort2|dfortvulc|dfortvulc2|dogier|dogier2|dogier3</var>
      <trigger priority="7090">
        <pattern>- ~[(&amp;32)~] - somewhere</pattern>
        <value>#IF (%item( @LookupTable, @CurrentPosition) <> "none") {#SAY Assigned %1 to %item( @LookupTable, @CurrentPosition);#ALIAS %item( @LookupTable, @CurrentPosition) {fade %1} {FadeScript|TempAliases}};#ADD CurrentPosition 1;#IF (@CurrentPosition > %numitems( @LookupTable)) {#T- {FadeScript|Getter}}</value>
      </trigger>
    </class>
    <class name="Spiders" initdisable="true" enabled="false">
      <var name="SpidersPos">280</var>
      <var name="SpidersTable">caem|4k|4k2|4k3|gap|gap2|gap3|braem|braem2|braem3|roland|roland2|roland3|cara|cara2|cara3|obscure|bhills2|bhills3|bl|bl2|bl3|lich|rcmoss|rc2|rc3|sg|sg2|sg3|tkd|tkd2|tkd3|caemrd|caemrd2|caemrd3|ncaem|ncaem2|ncaem3|ls|ls2|ls3|stedding|wtv|wtv2|wtv3|tvfor|tvfor2|tvfor3|kdag|kgad2|kdag3|keep|rk2|rk3|insidetv|insidetv2|insidetv3|nlug|nlug2|nlug3|nspine|nspine2|nspine3|aringill|aringill2|aringill3|dpass|dpass2|dpass3|kint|kint2|kint3|wwbfade2|wbfade|wwbfade|ncara|ncara2|ncara3|fdrd|fdrd2|fdrd3|spine|spine2|spine3|dusty|dusty2|dusty3|sgf|sgf2|sgf3|shady|shady2|shady3|stv|stv2|stv3|ngf|ngf2|ngf3|ntv|ntv2|ntv3|glancor|maerone|maerone2|maerone3|banditsh|twist|twist2|twist_rent|sls|sls2|sls3|orch|orch2|orch3|camp|camp2|camp3|liz|liz2|liz3|sm|sm2|sm3|esh|esh2|esh3|blpass|blpass2|blpass3|nwb|nwb2|nwb3|spliz|spliz2|spliz3|spreds|spreds2|spreds3|scorps|crackedslab|scorps3|lf|lf2|lf3|sh|sh2|sh3|imre|imre2|imre3|crh|crh2|crh3|aiel|aiel2|aiel3|aiel4|aielfade|aiel6|ssh|ssh2|ssh3|nkeep|nkeep2|nkeep3|lithe|4trees|4t1e|hut|waterwall|rocks|sekand4|shrub|bears|nest|ssettle|ssettle2|ssettle3|ssaldaea|ssaldaea2|ssaldaea3|sunpalace|sunpalace2|sunpalace3|df|df2|df3|hollow|spiders3|spiders|sfdrd|sfdrd2|sfdrd3|settle|settle2|settle3|rene|rene2|rene3|dkrd|dkrd2|dkrd3|bvall|bvall2|bvall3|ashen|blackstone2|ashen3|swsh|swsh2|swsh3|nsg|nsg2|nsg3|malf|malf2|malf3|bltunnel|bltunnel2|bltunnel3|nls|nls2|nls3|maradon|maradon2|dhs|dhs2|dhs3|arafel|arafel2|arafel3|rhahime|rhahime2|rhahime3|gorthel|gorthel2|gorthel3|wdog|wdog2|wdog3|twist4|twist5|twist6|legbase|legbase2|legbase3|negf|negf2|negf3|kreeza|kreeza2|kreeza3|nbh|nbh2|nbh3|sdfort|sdfort2|sdfort3|wdkrd|wdkrd2|wdkrd3|sdfort4|sdfort5|sdfort6|sedfort|sedfort2|sedfort3|tvcairrd|tvcairrd2|tvcairrd3|tvcairrd4|necair|necair2|necair3|nk|nk2|nk3</var>
      <trigger priority="7120">
        <pattern>- ~[(&amp;32)~] - somewhere</pattern>
        <value>#IF (%item( @SpidersTable, @SpidersPos) <> "none") {#SAY Assigned %1 to %item( @SpidersTable, @SpidersPos);#ALIAS %item( @SpidersTable, @SpidersPos) {fade %1} {FadeScript|SpiderAliases}};#ADD SpidersPos 1;#IF (@SpidersPos > %numitems( @SpidersTable)) {#T- {FadeScript|Spiders}}</value>
      </trigger>
    </class>
    <class name="WBFade" initdisable="true" enabled="false">
      <var name="WBFadeTable">caem|4k|4k2|4k3|braem|braem2|braem3|roland|roland2|roland3|drfade|devride|cara|cara2|cara3|whalley|whattic|whponies|tf|tf2|tf3|althor|ef2|ef|ef3|obscure|bh2|bh3|lich|sef2|sef3|sef|caemrd|caemrd2|caemrd3|nwh2|nwh|nwh3|ebaer|ebaer2|ebaer3|ncaem|ncaem2|ncaem3|efhill|longbottom|noose|noose2|touchan|touchan2|touchan3|wtv3|wtv2|wtv|tvfor|tvfor2|tvfor3|wwb|wwb2|wwb3|kdag|kdag2|kdag3|insidetv|insidetv2|insidetv3|nlug|nlug2|nlug3|wmist|wmist2|wmist3|aringill|aringill2|aringill3|kint|kint2|kint3|wbfade2|wbfade|wbfade3|ecara|ecara2|ecara3|volcano|volcano2|volcano3|mtnking|mtnking2|mtnking3|sbraem|sbraem2|sbraem3|ragnor|ragnor2|ragnor3|plmiss|plmiss2|plmiss3|fdrd|fdrd2|fdrd3|mirk|mirk2|mirk3|spine|spine2|spine3|wlug|sgf|sgf2|sgf3|efmines|efmines2|efmines3|stv|stv2|stv3|maredo|maredo2|maredo3|ttc|ttc2|ttc3|etv|etv2|etv3|glancour|maerone|maerone2|maerone3|eef|eef2|eef3|banditscaem|twist|twist2|twist_rent|lug|elug|tearrd|tearrd2|tearrd3|aielw|aielw2|aielw3|spliz|spliz2|spliz3|spreds|spreds2|spreds3|scorps|crackedslab|scorps3|lf|lf2|lf3|hut|waterwall|rocks|rockss|bears|bears2|nest|ssettle|ssettle2|ssettle3|gf|gf2|gf3|sunpalace|sunpalace2|sunpalace3|brfade|brfade2|brfade3|ij|ij2|ij3|katar|katar2|katar3|aradmnt|aradmnt2|aradmnt3|aradpat|aradpigs|arad3|mistmnt|mistmnt2|mistmnt3|arad4|slug|slug2|slug3|slug4|illrd|illfade|illfade2|illrd4|illrd5|illrd6|malf|malf2|malf3|mara|mara2|mara3|dhs|dhs2|dhs3|arafel|arafel2|arafel3|wwh2|wwh3|wwh|rhahime|rhahime2|rhahime3|gorthel|gorthel2|gorthel3|twist4|twist5|twist6|legbase|legbase2|legbase3|negf|negf2|negf3|kreeza|kreeza2|kreeza3|ncara|ncara2|ncara3|thr|ramena|farmadding|tvcrrd|tvcrrd2|tvcrrd3|tvcrrd4|sfm|sfm2|gwall|gwall2|gwall3|gwall4|gwall5|wgwall|wgwall2|wgwall3|sedr|sedr2|sedr3|necair|necair2|necair3</var>
      <trigger priority="7150">
        <pattern>- ~[(&amp;32)~] - somewhere</pattern>
        <value>#IF (%item( @WBFadeTable, @WBFadePos) <> "none") {#SAY Assigned %1 to %item( @WBFadeTable, @WBFadePos);#ALIAS %item( @WBFadeTable, @WBFadePos) {fade %1} {FadeScript|WBFadeAliases}};#ADD WBFadePos 1;#IF (@WBFadePos > %numitems( @WBFadeTable)) {#T- {FadeScript|WBFade}}</value>
      </trigger>
    </class>
    <class name="GarensWall" initdisable="true" enabled="false">
      <var name="GarensWallTable">caem|4k|4k2|4k3|braem|braem2|braem3|roland|roland2|roland3|drfade|devride|cara|cara2|cara3|whalley|whattic|whponies|tf|tf2|tf3|althor|ef2|ef|ef3|ntear|ntear2|ntear3|sef2|sef3|sef|caemrd|caemrd2|caemrd3|nwh2|nwh|nwh3|ebaer|ebaer2|ebaer3|efhill|longbottom|noose|noose2|touchan|touchan2|touchan3|wwb|wwb2|wwb3|nlug|nlug2|nlug3|wmist|wmist2|wmist3|aringill|aringill2|aringill3|kint|kint2|kint3|wbfade2|wbfade|wbfade3|volcano|volcano2|volcano3|mntking|mntking2|mntking3|sbraem|sbraem2|sbraem3|ragnor|ragnor2|ragnor3|plmiss|plmiss2|plmiss3|mirk|mirk2|mirk3|wlug|sgf|sgf2|sgf3|efmines|efmines2|efmines3|maredo|maredo2|maredo3|namad|namad2|namad3|inamad|inamad2|inamad3|glancour|amadic|amadic2|amadic3|eef|eef2|eef3|lug|elug|tearrd|tearrd2|tearrd3|tallthief|tallthief2|tallthief3|nwb|nwb2|nwb3|deadwood|deadwood2|deadwood3|ants|ants2|ants3|almoth|almoth2|almoth3|tanchrd|tanchrd2|gwall_127|katar|katar2|katar3|aradmnt|aradmnt2|aradmnt3|aradpat|aradpigs|arad3|mistmnt|mistmnt2|mistmnt3|arad4|nmayene|nmayene2|nmayene3|slug|slug2|slug3|slug4|illrd|illfade|illfade2|ill|ill2|ill3|illrd4|illrd5|illrd6|wwh2|wwh3|wwh|ilpalace|ilpalace2|ilpalace3|thr|ramena|shcoast|shcoast2|shcoast3|shcoast4|shcoast5|shcoast6|windbite|windbite2|windbite3|fm|nmayene4|nmayene5|nmayene6|eamad|eamad2|eamad3|eamfarm|eamfarm2|eamfarm3|amwoods|amwoods2|amwoods3|amilfade2|amilfade3|amilfade|amilrd|amilrd2|amilrd3|amiltun|amiltun2|amiltun3|amilhill|amilhill2|tanchico|tanchico2|tanchico3|tanchico4|tanchico5|tanchico6|sfm|sfm2|gwall|gwall2|gwall3|gwall4|gwall5|wgwall|wgwall2|wgwall3|sedr|sedr2|sedr3|iltearrd|iltearrd2|iltearrd3|iltearrd4|iltearrd5|iltearrd6</var>
      <trigger priority="7180">
        <pattern>- ~[(&amp;32)~] - somewhere</pattern>
        <value>#IF (%item( @GarensWallTable, @GarensWallPos) <> "none") {#SAY Assigned %1 to %item( @GarensWallTable, @GarensWallPos);#ALIAS %item( @GarensWallTable, @GarensWallPos) {fade %1} {FadeScript|GarensWallAliases}};#ADD GarensWallPos 1;#IF (@GarensWallPos > %numitems( @GarensWallTable)) {#T- {FadeScript|GarensWall}}</value>
      </trigger>
    </class>
    <class name="FA"/>
    <alias name="getcodes" autoappend="true">
      <value>#say Note: This will ONLY work from TKD.;sense;#DELCLASS FadeScript|TempAliases;#+T {FadeScript|Getter};#VAR CurrentPosition 1</value>
    </alias>
    <alias name="spidercodes" autoappend="true">
      <value>#say Note: This will ONLY work from Clear Spiders.;sense;#T+ {FadeScript|Spiders};#VARIABLE SpidersPos 1;#DELCLASS FadeScript|SpiderAliases</value>
    </alias>
    <alias name="wbfadecodes" autoappend="true">
      <value>#say Note: This will ONLY work from Whitebridge Fade Zone.;sense;#T+ {FadeScript|WBFade};#VARIABLE WBFadePos 1;#DELCLASS FadeScript|WBFadeAliases</value>
    </alias>
    <alias name="garwallcodes" autoappend="true">
      <value>#say Note: This will ONLY work from Garens Wall Cavern Patrol (garwall3).;sense;#T+ {FadeScript|GarensWall};#VARIABLE GarensWallPos 1;#DELCLASS FadeScript|GarensWallAliases</value>
    </alias>
    <alias name="resetcodes" autoappend="true">
      <value>#delclass FadeScript|TempAliases
#delclass FadeScript|SpiderAliases
#delclass FadeScript|WBFadeAliases
#delclass FadeScript|GarensWallAliases
#delclass FadeScript|FA</value>
    </alias>
    <trigger priority="7060" enabled="false">
      <pattern>- ~[(&amp;32)~] - somewhere</pattern>
      <value>#SUB "- [%1] - somewhere"</value>
    </trigger>
    <class name="TempAliases"/>
  </class>
</cmud>

--------------------------------
#alias getcodes {#say Note: This will ONLY work from TKD.;sense;#DELCLASS FadeScript|TempAliases;#+T {FadeScript|Getter};#VAR CurrentPosition 1}
#trigger {- ~[(&32)~] - somewhere} {#IF (%item( @LookupTable, @CurrentPosition) <> "none") {#SAY Assigned %1 to %item( @LookupTable, @CurrentPosition);#ALIAS %item( @LookupTable, @CurrentPosition) {fade %1} {FadeScript|TempAliases}};#ADD CurrentPosition 1;#IF (@CurrentPosition > %numitems( @LookupTable)) {#T- {FadeScript|Getter}}

Are the ones that seems to be the trouble - I have 4 places where I get codes and if only one of them is fixed I can probably figure out the rest (getcodes, spidercodes, wbfadecodes and garwallcodes)


When I type getcodes I get:

Error parsing command:
Error in trigger pattern:
The (%a} seems to be closed.
missing ) (166)

--------------------------

Even though it doesnt seem like it would work trigger seems to echo out that it is in order:

ex.:

an empty dark place - [WGxwdiA4IDA4ZmY4YjQ2YmEgOTU5OQ==] - somewhere southeast of here
Assigned WGxwdiA4IDA4ZmY4YjQ2YmEgOTU5OQ== to gap2
a dark place - [WGxweSA4IDcwMjJhN2M3YmYgOTU5OQ==] - somewhere southeast of here
Assigned WGxweSA4IDcwMjJhN2M3YmYgOTU5OQ== to gap3

However when I type gap2, it just says "fade ". The alias lying in the class folder says #alias gap2 {fade %1}

Also when I MANUALLY type #alias gap2 {fade WGxwdiA4IDA4ZmY4YjQ2YmEgOTU5OQ==} it says that ==} is illegal characters.

I installed normally, did not install to same folder I had zMUD etc. I need a solution to these problems because its my main character and I cannot "teleport" around.

The person that compiled this script is rarely playing and unavailable. Im a bit stuck since Im no wizkid!
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Dec 17, 2008 6:04 pm   
 
In the definition of getcodes, you have "#+T", this should be "#T+"
Reply with quote
whorn
Wanderer


Joined: 04 May 2002
Posts: 52
Location: USA

PostPosted: Thu Dec 18, 2008 4:31 pm   
 
I remember one thing I had to do to get this work was change the triggers that assign the codes:

Pattern:
Code:

 - ~[(&28)~] - somewhere


Trigger:
Code:

$code = %1
#IF (%item( @LookupTable, @CurrentPosition) <> "none") {
  #SAY Assigned $code to %item( @LookupTable, @CurrentPosition)
  #ALIAS %item( @LookupTable, @CurrentPosition) {fade $code} {FadeScript|FadeAliases}
  }
#ADD CurrentPosition 1
#IF (@CurrentPosition > %numitems( @LookupTable)) {#T- {FadeScript|Getter}}


It seemed that I had to use the $code = %1 to get things to work right. So try changing each of those triggers and see if that helps. You can contact me in game if you need help. This is Track btw.
Reply with quote
calesta
Apprentice


Joined: 07 Dec 2008
Posts: 102
Location: New Hampshire, USA

PostPosted: Thu Dec 18, 2008 5:46 pm   
 
You could also change the triggers to use the named sub-pattern syntax:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger priority="7120" copy="yes">
    <pattern>- ~[($code:&amp;32)~] - somewhere</pattern>
    <value>#IF (%item( @SpidersTable, @SpidersPos) <> "none") {
  #SAY Assigned %1 to %item( @SpidersTable, @SpidersPos)
  #ALIAS %item( @SpidersTable, @SpidersPos) {fade $code} {FadeScript|SpiderAliases}
}
#ADD SpidersPos 1
#IF (@SpidersPos > %numitems( @SpidersTable)) {#T- {FadeScript|Spiders}}</value>
    <arglist>$code</arglist>
  </trigger>
</cmud>

I believe the other alternative was to use %%1 instead of %1 when defining the alias, but I can't seem to find where I read that information currently. Maybe I'm dreaming.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Dec 18, 2008 6:45 pm   
 
It was that way in zMUD, but the syntax has been removed in favour of local variables - and frankly, good riddance. %%1 looks awful :(

You're doing in the right way here.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Ansaron
Newbie


Joined: 17 Dec 2008
Posts: 3

PostPosted: Thu Dec 18, 2008 7:14 pm   
 
Quote:

In the definition of getcodes, you have "#+T", this should be "#T+"


Yeah was too tired and messed around with it a bit too much, but thanks ;)

Thanks Track, only problem I get now is (%a} being closed when I type getcodes like I said above.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Dec 18, 2008 9:30 pm   
 
Is that an error message? Because I don't see anything like that in the code you've given.

Is 'sense' an alias? Perhaps the error is coming from there.
Reply with quote
whorn
Wanderer


Joined: 04 May 2002
Posts: 52
Location: USA

PostPosted: Thu Dec 18, 2008 10:22 pm   
 
Sense is a mud command that is used to list all the codes available for you. Basically the script is setup so that when you type 'getcodes' it will do a 'sense' and put all the codes into a table and assign an alias to it. When you type that alias in it will do 'fade <code>'. I think the %a is coming from some other trigger that is conflicting or something.
Reply with quote
Ansaron
Newbie


Joined: 17 Dec 2008
Posts: 3

PostPosted: Fri Dec 19, 2008 12:47 am   
 
Whorn is correct :o

Didnt find any %a} though.. Started new test connection and imported script in question.

Thanks people
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