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
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Fri Feb 29, 2008 2:06 pm   

possible setting corruption
 
Not quite sure what is causing this.. problem. I have noticed on several rare occasions, 4-5 that at some point one or two of my multi-state triggers will become confused for lack of a better deffinition. The primary state is shown in the tree view as a state of an alias, and the secondary states of the trigger get deleted. I am able to drag the primary state back to the aproppraite folder and it does become a working trigger, but only the primary state. I have had this happen in different packages, and in the same package after i have exported settings, and imported them back into a new blank package, any suggestions besides lots of backups?[/img]
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Feb 29, 2008 8:08 pm   
 
That is really odd. Have you tried looking at the XML tab for the trigger to see what's specified there? What about changing the type?
_________________
Asati di tempari!
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Mon Mar 03, 2008 7:35 pm   
 
Sadly I had already fixed the one that led me to post here. But spent a little time looking/trying to get another instance to occure and it did finaly.. here is the code from the xml tab:


Code:
func name="reversedir" id="46">
  <value>#switch (%lower(%1)=north) {#return south}
        (%lower(%1)=east) {#return west}
        (%lower(%1)=sout) {#return north}
        (%lower(%1)=west) {#return east}
        (%lower(%1)=up) {#return north}
        (%lower(%1)=down) {#return up}
        (%lower(%1)=n) {#return south}
        (%lower(%1)=e) {#return west}
        (%lower(%1)=s) {#return north}
        (%lower(%1)=w) {#return east}
        (%lower(%1)=u) {#return north}
        (%lower(%1)=d) {#return up}</value>
  <trigger name="map_follow" priority="840" id="84">
    <pattern>^* leaves ({@all_dirs})*$</pattern>
    <value>#TEMP "map_folreset" {^$} {#STATE map_follow 0}</value>
  </trigger>
</func>
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Mar 03, 2008 8:43 pm   
 
Not sure how it's occurring but you definitely have some corruption going on. For instance, that XML says you have a trigger as a child state of a function. A quick attempt prevented it from happening for me. Can you post the the entire XML for you package? What about the types of things you are doing that cause this error.
_________________
Asati di tempari!
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Mar 03, 2008 9:50 pm   
 
Make a copy of your corrupt package so that, if you fix it, you can still mail a copy to Zugg so he can see the problem. As Tech says, in short, it's proper buggered. I have no idea how it's even possible to create something like that.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Mon Mar 03, 2008 10:53 pm   
 
In addition, I would like to see the script as is in the Settings Editor. That is, what you typed in.
_________________
Sic itur ad astra.
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Tue Mar 04, 2008 2:18 am   
 
Have a copy of buggy package, is just a module with a number of #nomap and #nodir triggers mostly, has a few... in-progress settings for helping map maizes. As for what causes the problems I have no clue, haven't been able to come up with a... method to repeat these results. What email address would be best to send the buggy package to?

as for the scripts, I've been adapting them from some that Nexela gave me, at the time that this corruption occured the trigger it's self should have been this;
Code:

<trigger name="map_follow" priority="7060" id="706">
  <pattern>^* leaves ({@all_dirs})*$</pattern>
  <value>#TEMP "map_folreset" {^$} {#STATE map_follow 0}</value>
  <trigger type="Manual">
    <pattern>^You follow *</pattern>
    <value>#MOVE %t1</value>
  </trigger>
</trigger>


Which I have changed and simplifed when I added it back in, the fuction that it got added to was unchanged.
Here is the entire package xml code, its in a state of semi completedness:
Code:
module name="mapper" global="true">
  <uid>{A0698096-6D8E-424E-89F5-77B11B65AA65}</uid>
  <class name="auto marker" enabled="false" id="1">
    <alias name="mark" id="2">
      <value>#if (%numparam!=0) {
  #If (%db(@markset,%1)=%null) {
    #addkey markset  {%1=%roomvnum()}
    drop 1 coin %1*
  } {
  #say Mark number already exists
  }
} {
  #addkey markset  {@markindex=%roomvnum()}
drop 1 coin @markindex*
#add markindex 1
}</value>
    </alias>
    <var name="markindex" type="Integer" id="3">10</var>
    <var name="markset" type="Record" id="4"/>
    <alias name="clearmarks" id="5">
      <value>markset=%null
markindex=2</value>
    </alias>
    <trigger priority="5620" id="6">
      <pattern>One miserable gold coin lies here. ~[(%d)~]</pattern>
      <value>coinroom =%db(@markset,%1)
#say roomVnum is @coinroom
#if (%roomvnum!=@coinroom) {
  #say {Map %ansi(red)room%ansi(cyan) and %ansi(yellow)coin%ansi(cyan) room don't match, Teleport to coin room?}
  #call %roomcol(@coinroom,yellow)
  #call %roomcol(,red)
  #alias telecoin {#teleport @coinroom}
}

</value>
    </trigger>
    <event event="onRoomEnter" priority="6550" id="7">
      <value>prevcoinroom=@coinroom
#unalias telecoin</value>
    </event>
    <var name="prevcoinroom" id="8"/>
    <var name="coinroom" id="9"/>
    <alias name="maizelink" id="10">
      <value>#call %roomlink(@prevcoinroom,%1,@coinroom)</value>
    </alias>
    <alias name="checkexits" id="11">
      <value>#forall %roomexit() {
$temproomnum = %roomlink(,%i,)
$temproomcol = @roomcolorgen(%i)
#say %ansi($temproomcol)%i exits to $temproomnum
#call %roomcol($temproomnum,$temproomcol)
}
#wait 2000
#forall %roomexit() {
#call %roomcol(%roomlink(,%i,),536870911)
}
</value>
    </alias>
    <func name="roomcolorgen" id="12">
      <value>#switch (%lower(%1)=north) {#return red}
        (%lower(%1)=east) {#return yellow}
        (%lower(%1)=sout) {#return blue}
        (%lower(%1)=west) {#return green}
        (%lower(%1)=up) {#return cyan}
        (%lower(%1)=down) {#return indigo}
        (%lower(%1)=n) {#return red}
        (%lower(%1)=e) {#return yellow}
        (%lower(%1)=s) {#return blue}
        (%lower(%1)=w) {#return green}
        (%lower(%1)=u) {#return cyan}
        (%lower(%1)=d) {#return indigo}</value>
    </func>
    <alias name="notele" id="13">
      <value>#unalias telecoin</value>
    </alias>
  </class>
  <var name="nocol" id="14">536870911</var>
  <class name="dir aliases" id="15">
    <alias name="w" id="16">
      <value>west</value>
    </alias>
    <alias name="e" id="17">
      <value>east</value>
    </alias>
    <alias name="n" id="18">
      <value>north</value>
    </alias>
    <alias name="u" id="19">
      <value>up</value>
    </alias>
    <alias name="d" id="20">
      <value>down</value>
    </alias>
    <alias name="s" id="21">
      <value>south</value>
    </alias>
  </class>
  <class name="nodir" id="22">
    <trigger priority="19430" id="24">
      <pattern>^What, trying to fly?$</pattern>
      <value>#nodir</value>
    </trigger>
    <trigger priority="8450" id="28">
      <pattern>prevents you from passing.^</pattern>
      <value>#nodir</value>
    </trigger>
    <trigger priority="16500" id="31">
      <pattern>^You can't hold your breath long enough to go there.$</pattern>
      <value>#nodir</value>
    </trigger>
    <trigger priority="28310" id="35">
      <pattern>It's locked.^</pattern>
      <value>#nodir</value>
    </trigger>
    <trigger priority="520" id="52">
      <pattern>^You cannot leave or enter the recalltag arena at this time.</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="530" id="53">
      <pattern>^Perhaps you need a treasure map before you can find pirate gold?^</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="540" id="54">
      <pattern>^What, trying to fly?$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="550" id="55">
      <pattern>^The foresters quickly catch you and haul you back to Will o' the Green.$</pattern>
      <value>#TELE will;#SEND stand</value>
    </trigger>
    <trigger priority="560" id="56">
      <pattern>^You leave %w, but quickly find yourself back where you started.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="570" id="57">
      <pattern>(*) is closed.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="580" id="58">
      <pattern>^Alas, you cannot go that way.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="590" id="59">
      <pattern>^It is too dark to see...$</pattern>
      <value>#OK</value>
    </trigger>
    <trigger priority="600" id="60">
      <pattern>^Nah... You feel too relaxed...$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="610" id="61">
      <pattern>^You can't do that sitting down.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="620" id="62">
      <pattern>^You can't just walk there...$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="630" id="63">
      <pattern>^You can't take * in that direction!$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="640" id="64">
      <pattern>* forges through the waters.$</pattern>
      <value>#NOMAP</value>
    </trigger>
    <trigger priority="650" id="65">
      <pattern>^You are too exhausted.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="660" id="66">
      <pattern>^No way, you are fighting!$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="670" id="67">
      <pattern>^The sheer number of vines make it impossible to fly here. You quickly become entangled.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="680" id="68">
      <pattern>^Barring any magical means, you need a boat to go there.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="690" id="69">
      <pattern>^An old warrior says to you, 'Ye must be paying the gate tax.'$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="700" id="70">
      <pattern>^Your mount refuses to go inside!$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="710" id="71">
      <pattern>^You can't take your * inside!$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="720" id="72">
      <pattern>^You fly through the air.$</pattern>
      <value>#NOMAP</value>
    </trigger>
    <trigger priority="730" id="73">
      <pattern>^You are too encumbered to move!$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="740" id="74">
      <pattern>^You skillfully climb right over the steep part!</pattern>
      <value>#NOMAP</value>
    </trigger>
    <trigger priority="750" id="75">
      <pattern>^You slip and fall as you try to climb.$</pattern>
      <value>#NODIR;#SEND Stand</value>
    </trigger>
    <trigger priority="760" id="76">
      <pattern>^You don't have to climb to get there.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="770" id="77">
      <pattern>^You can't climb there.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="780" id="78">
      <pattern>^You take off, dashing (%t).$</pattern>
      <value>#MOVE %1</value>
    </trigger>
    <trigger priority="790" id="79">
      <pattern>^You dash in, then dash (%t).$</pattern>
      <value>#MOVE %1</value>
    </trigger>
    <trigger priority="800" id="80">
      <pattern>^You dive under the water!$</pattern>
      <value>#NOMAP</value>
    </trigger>
    <trigger priority="810" id="81">
      <pattern>^You can't manage to lift yourself over the bridge.$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="820" id="82">
      <pattern>^Your attempts at music echo back from all exits save the</pattern>
      <value>#NOMAP</value>
    </trigger>
    <trigger priority="830" id="83">
      <pattern>^You are bound to this room and cannot leave it!$</pattern>
      <value>#NODIR</value>
    </trigger>
    <trigger priority="900" id="90">
      <pattern>and suddenly you are transported.$</pattern>
      <value>#find</value>
    </trigger>
    <trigger priority="910" id="91">
      <pattern>He inspects you closely, and quickly determines that you have no reason to approach the camp.</pattern>
      <value>#nodir</value>
    </trigger>
    <trigger priority="920" id="92">
      <pattern>A voice echoes in your head, 'Without protection of the kami, you cannot pass.'</pattern>
      <value>#nodir</value>
    </trigger>
  </class>
  <trigger priority="930" id="40">
    <pattern>* forges through the waters.</pattern>
    <value>#nomap</value>
  </trigger>
  <alias name="mdoor" id="49">
    <value>#IF (%maplocked) {#CALL %maplocked(0);#DOOR %1;#CALL %maplocked(1)} {#DOOR %1}</value>
  </alias>
  <alias name="roomnote" id="50">
    <value>#IF (%maplocked) {
#CALL %maplocked(0)
#CALL %roomnote( , %additem( "%-1", %roomnote( )))
#CALL %maplocked(1)
} {
#CALL %roomnote( , %additem( "%-1", %roomnote( )))
}</value>
  </alias>
  <alias name="clear" id="51">
    <value>#SEND clear;#NODIR 1</value>
  </alias>
  <var name="Flee" type="Record" id="89">Found|RoomDesc=It is too dark to see...|RoomName=You move through the water!</var>
  <class name="makeroom" id="93">
    <alias name="clearcol" id="36">
      <value>#call %roomcol(,@nocol)</value>
    </alias>
    <alias name="makeroom" id="37">
      <value>#switch (%lower(%1)=north) {%if(@rooms.North!=%null,@makeroomvalid(north,6),#say invalid direction)}
        (%lower(%1)=east) {%if(@rooms.East!=%null,@makeroomvalid(east,6),#say invalid direction)}
        (%lower(%1)=south) {%if(@rooms.South!=%null,@makeroomvalid(south,6),#say invalid direction)}
        (%lower(%1)=west) {%if(@rooms.West!=%null,@makeroomvalid(west,6),#say invalid direction)}
        (%lower(%1)=up) {%if(@rooms.Up!=%null,@makeroomvalid(up,6),#say invalid direction)}
        (%lower(%1)=down) {%if(@rooms.Down!=%null,@makeroomvalid(down,6),#say invalid direction)}
</value>
    </alias>
    <var name="rooms" type="Record" id="38">West=Narthex of St. Denis Abbey|East=The Nave|South=The Aisle|North=The Aisle</var>
    <trigger priority="24020" id="41">
      <pattern>Obvious exits:</pattern>
      <value>rooms=%null
#nodir

</value>
    </trigger>
    <trigger priority="3640" id="42">
      <pattern>You leave (*), but quickly find yourself back where you started.</pattern>
      <value>#nodir
#call %roomlink(,%1,-3)</value>
    </trigger>
    <trigger priority="24010" id="43">
      <pattern>^ ({North|East |South|West |Up   |Down })- (*)</pattern>
      <value>rooms.%word(%1,1,) = %2
#say makeroom %1, to add room > %2 <</value>
    </trigger>
    <func name="makeroomvalid" id="45">
      <value>#if (%1=n||e||s||w||u||d||north||east||south||west||up||down) {
#say running make script

#makeroom %1 @rooms.%1
#call %roomload(,%2)
#move @reversedir(%1)
}</value>
    </func>
    <func name="reversedir" id="46">
      <value>#switch (%lower(%1)=north) {#return south}
        (%lower(%1)=east) {#return west}
        (%lower(%1)=sout) {#return north}
        (%lower(%1)=west) {#return east}
        (%lower(%1)=up) {#return north}
        (%lower(%1)=down) {#return up}
        (%lower(%1)=n) {#return south}
        (%lower(%1)=e) {#return west}
        (%lower(%1)=s) {#return north}
        (%lower(%1)=w) {#return east}
        (%lower(%1)=u) {#return north}
        (%lower(%1)=d) {#return up}</value>
    </func>
  </class>
  <class name="areasight" id="94">
    <trigger priority="18280" id="95">
      <pattern>It costs you (%d) move to leave this room.</pattern>
      <value>#call %roomcost(,%1)</value>
    </trigger>
    <alias name="asarea" id="96">
      <value>$asareas = "o:1|P:Please select area for AreaSighting>"
#say asarea prescript running
#loop %numzones {
  //#additem $asareas {%concat( %zonename( %i, ), ":", %1)}
  #additem $asareas {%zonename(%i,)}
}
$areasightarea = %pick($asareas)
$rooms = %mapquery(%concat("ZoneID =",%zonenum($areasightarea)))
$roomsfailed = %null
#forall $rooms {
  #if (%walk(%i)!=%null()) {
  #walk %i
  #waitsignal roomreached
  } {
  #additem $roomsfailed %i
  #call %roomcol("Green",%i)
  }
}
</value>
    </alias>
  </class>
  <trigger name="map_follow" priority="7060" id="99">
    <pattern>^* leaves ({north|east|south|west|up|down})*$</pattern>
    <trigger type="Within Lines" param="1">
      <pattern>^You follow *</pattern>
      <value>#MOVE %t1</value>
    </trigger>
  </trigger>
  <trigger type="Within Lines" param="1">
    <pattern>^You follow *</pattern>
    <value>#MOVE %t1</value>
  </trigger>
</module>


The other multi state trigger i have had in this package is based off of this code, from zmud, but had been significantly cleanedup and been working with cmud.
Code:
<trigger name="map_fleetrig" priority="7080" id="708">
  <pattern>^You panic, and attempt to flee.$</pattern>
  <trigger name="" type="Within Lines" param="1">
    <pattern>^(*)$</pattern>
    <value>#IF (%pos( "forges through the waters.", %1)) {#STATE map_fleetrig 1};#IF (%pos( "You fly through the air.", %1)) {#STATE map_fleetrig 1};Flee.RoomName=%replace( "%1", "'", "''")</value>
  </trigger>
  <trigger name="" type="Within Lines" param="1">
    <pattern>^(*)$</pattern>
    <value>Flee.Found="";Flee.RoomDesc=%replace( "%1", "'", "''");#PRIORITY {#FORALL %roomexit {#FORALL %roomlink( ,%i) {#IF (%ismember( %j, %mapquery( {[Name] = '@Flee.RoomName' and [Desc] LIKE '@Flee.RoomDesc%'}))) {#ADDITEM Flee.Found %j}}}};#IF (%numitems( @Flee.Found)=1) {#TELEPORT @Flee.Found} {#IF (%numitems( @Flee.Found)>1) {#SAY Multi Rooms Found Teleporting to First;#TELEPORT %item( @Flee.Found, 1)} {#SAY No Connecting Rooms Found}}</value>
  </trigger>
</trigger>


which i've not taken the time to add back in yet.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Tue Mar 04, 2008 3:47 am   
 
Did you notice this?

Code:

(%lower(%1)=sout) {#return blue}

(%lower(%1)=sout) {#return north} 


You have "south" spelled "sout" both times.
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Tue Mar 04, 2008 5:35 am   
 
oldguy2 - didn't notice that, haven't used it since I first made those settings, I got tired of maps that looked like spaghitti, and moved on to more pratical and pressing scripts... i did think it worked thou, will have to check it
_________________
"To the engineer, all matter in the universe can be placed into one of two categories: (1) things that need to be fixed, and (2) things that will need to be fixed after you've had a few minutes to play with them" - Scott Adams, The Dilbert Principle
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