Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sat Oct 20, 2007 3:55 am   

[CMUD 2.07] Lock up ESC works to unlock.
 
I've had this lockup for the past few versions but haven't been able to narrow it down.

I don't have an exact set of steps that locks it up %100 but when I do the following I get about an %80 chance of a lockup that is repeatable infinitum with the same chances. Escape does release the lock now though at least!

First I have a little walking class that I use for Achaea. <It is also good for Bot making thus the name, and no I don't bot Achaea> You will need to have this class enabled and an area of at least 10 or so rooms mapped on a mud. Again I am using Achaea not sure if that matters.

There is also an Oninput trigger that is created by this XML.
It is not within the walkbot class.
It is currently disabled.
With the trigger disabled all is fine and your character walks about as intended.
When the trigger is enabled I have not been able to walk more than three steps without CMUD locking up

To use the bot you need the room number or shortID of the destination room

You would type 'go shortID' or 'go roomnumber' to start the walk.
If you want to pause the walk you would type Stopwalk
If you want to continue after you have typed Stopwalk you type cwalk

Sorry about not narrowing it down more but I really haven't had the time that i used to for this stuff.

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<cmud>
  <class name="WalkBot">
    <alias name="cWalk">
      <value>walk=1
#T+ MoveOn</value>
      <notes>Resume a walk after you have typed Stopwalk.</notes>
    </alias>
    <alias name="go">
      <value>path = %exec( %walk( %1))
walkmode=%walkmode
#call %walkmode(0)
#if (@path != %null) {
  #show {%ansi(high,cyan)Going to, '%roomname(%1)' room number, '%roomnum(%1)' room id, '%roomid(%1)'.%{e}[0m}
  walk = 1
  madeIt=1
  step
  #T+ MoveOn
 } {
  #if ((%null != %proper(%roomid)) and (%proper(%1)=%proper(%roomid)))
   {
    #show {%ansi(high,cyan)What, I'm not there now?%{e}[0m}
   } {
    #show {%ansi(high,cyan)I do not know the way!%{e}[0m}
   }
 }</value>
    </alias>
    <alias name="step">
      <value>#if (@walk=1 and @path!=%null) {
  nextstep=%item( @path, 1)
    #send {@nextstep}
    madeIt=0
    #t+ okExit Trigger
  } {
   #if (@path=%null) {
      #show {%ansi(high,cyan)End of path.%{e}[0m}
      walk=0
      #call %walkmode( @walkmode)
    }
    }</value>
    </alias>
    <alias name="StopWalk">
      <value>walk=0</value>
      <notes>Pause a walk in mid stream.</notes>
    </alias>
    <var name="madeIt" usedef="true">
      <value>1</value>
      <default>0</default>
    </var>
    <var name="nextstep" usedef="true">
      <value>s</value>
      <default>""</default>
    </var>
    <var name="path" usedef="true">
      <default>""</default>
    </var>
    <var name="walk" usedef="true">
      <value>0</value>
      <default>0</default>
    </var>
    <var name="walkmode">
      <value>0</value>
      <default>""</default>
    </var>
    <trigger name="MoveOn" type="Alarm" priority="9530" enabled="false">
      <pattern>*.75</pattern>
      <value>#if (@walk = 1) {#if (@madeIt=1) {step} {#show {%ansi(high,cyan)Waiting for lag.%{e}[0m}}} {#T- MoveOn}</value>
    </trigger>
    <trigger name="OkExit" priority="5160" regex="true" prompt="true" enabled="false">
      <pattern>(?:exit|exits)</pattern>
      <value>#call @OkExit()</value>
      <notes>The pattern can be the Room Name or the Exit line of the room.
I use ANSI "\033\[33;44m.*" for my pattern</notes>
    </trigger>
    <alias name="Now now, don't be so hasty!" autoappend="true">
      <value>$walking=@walk
stopwalk
#move %reversedir(@nextstep)
#if ($walking=1)
 {
  madeIt=1
  cwalk
 }</value>
    </alias>
    <func name="OkExit">
      <value>#call %pop(path)
madeIt=1
#t- okExit Trigger
#Return %null</value>
    </func>
  </class>
  <trigger type="Command Input" priority="590" prompt="true" enabled="false">
    <pattern>(*)</pattern>
    <value>#noinput
#send {%1}</value>
  </trigger>
</cmud>
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sat Oct 20, 2007 12:34 pm   
 
Looking at this I noticed something strange.

Code:
<alias name="Now now, don't be so hasty!" autoappend="true" id="75">
  <value>$walking=@walk
stopwalk
#move %reversedir(@nextstep)
#if ($walking=1)
 {
  madeIt=1
  cwalk
 }</value>
</alias>


This USED to be a trigger and somehow transformed itself into an alias!

Here is what it is supposed to be.

Code:
<trigger id="78">
  <pattern>^Now now, don't be so hasty!$</pattern>
  <value>$walking=@walk
stopwalk
#move %reversedir(@nextstep)
#if ($walking=1)
 {
  madeIt=1
  cwalk
 }</value>
</trigger>
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Oct 22, 2007 7:14 pm   
 
That's very odd that the trigger got converted to an alias. If you find a way to make that happen again, let me know. I can't imagine how that could happen in the code since aliases and triggers use different class objects in Delphi.

As far as the hang, which trigger is it that needs to be enabled to see the hang? Is it the Oninput trigger, or is it the "Now now, don't be so hasty" trigger that you show above?
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Oct 22, 2007 8:26 pm   
 
It's the Oninput trigger.

The now now don't be hasty trigger really shouldn't be needed it is just a part of the class.
As for how it happened I don't know. Like I mentioned my time is at a premium lately so it could have happened from a bug many versions ago or I could have done it while making changes.

There IS a bug that is changing class folder names to the names of things that are in an XML, but I did a lot of stuff before I noticed that happened. If I can narrow that down I'll of course start another thread.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Oct 23, 2007 7:17 pm   
 
This appears to be fixed in 2.08, Thanks Zugg Very Happy
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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