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
NeverNor
Novice


Joined: 18 Nov 2006
Posts: 32

PostPosted: Tue Jul 24, 2007 7:12 pm   

The tedium of CMUD
 
Well I would post the cMUD versions of these zMUD scripts, but I can't seem to export the scripts into anything readable from cMUD, suffice to say that the compatibility report has no issues with the cMUD versions of these zMUD scripts.

Code:
#CLASS {Roundtime} {enable}
#VAR rt {0}
#VAR maxrt {6}
#VAR roundTime {1185221962}
#VAR worldtime {1185221957}
#TRIGGER "rtTrig" {Q} {
  #var roundTime {%gsl( Q)}
  #PAUSE
  } "" {gsl}
#COND {q} {
  #var worldtime {%gsl( q)}
  #var rt {%eval( @roundtime-@worldtime)}
  #var maxrt {@rt}
  #add maxrt (+1)
  #T+ rtAlarm
  } {gsl}
#ALARM "rtAlarm" {1} {
  #IF (@rt>0) {#ADD rt {-1}} {
    #STEP
    #T- rtAlarm
    }
  } "" {disable}
#TRIGGER {DumpTable} {
  #add rt (-1)
  #if (@rt>0) {#state rtTrig (2)} {#state rtTrig (0)}
  }
#BUTTON 13 {@rt} {} {} {} {@rt} {} {} {Size} {66} {34} {Pos} {18} {24} {32816} {} {Gauge||12|@maxrt||15} {} "" {Explore|Inset} {} {}
#BUTTON 14 {RT:} {} {} {} {} {} {} {Size} {25} {36} {Pos} {20} {0} {} {} {Separ} {} "" {} {} {}
#CLASS 0


Code:
#CLASS {MindStatus} {disable}
#VAR skillmindstates {clear|learning|thoughtful|pondering|concentrating|muddled|very muddled|perplexing|perplexed|bewildering|bewildered|dazed|mind lock}
#TRIGGER {mindStatusAlarm} {exp @skillName}
#TRIGGER {~% ({@SkillMindstates})} {
  #var skillStatus %ismember( "%1", @skillmindstates)
  #var maxrt 2
  #T- MindStatus
  #SAY {STATE OF MIND FOUND}
  }
#CLASS 0


Code:
#CLASS {Braiding} {disable}
#VAR BraidingVarAlarm {for @BraidingVar|braid my @BraidingVar|#T+ BraidingTR;#var skillName mech;#T+ MindStatus;#SAY {mindStatusAlarm}|app my rope careful|#var iBraidingVarAlarm 1;put my @BraidState in @wastebin;drop my @BraidState;#var maxrt 2|pull my @BraidingVar}
#VAR BraidingVar {vine}
#VAR iBraidingVarAlarm {1} {1}
#VAR BraidState {@BraidingVar} {@BraidingVar}
#VAR BraidStillLearning {0} {0}
#ALARM "BraidingAlarm" {@maxrt} {#T- BraidingAlarm;#EXEC {%item( @BraidingVarAlarm, @iBraidingVarAlarm)}} "" {disable}
#TRIGGER {you are making} {#VAR BraidStillLearning 1}
#TRIGGER {{begin to carefully braid|manage to find}} {#add iBraidingVarAlarm (+1);#T+ BraidingAlarm}
#TRIGGER "BraidLearningTR" {{isn't usable|could become}} {#IF (@BraidStillLearning) {#add iBraidingVarAlarm (+1);#STATE BraidLearningTR (0)} {#VAR iBraidingVarAlarm 6};#T+ BraidingAlarm;#VAR BraidStillLearning 0}
#COND {You tug and pull} {#VAR iBraidingVarAlarm 4;#var BraidState rope;#T+ BraidingAlarm}
#COND {is worth} {#ADD iBraidingVarAlarm (+1);#T+ BraidingAlarm}
#COND {{You drop a * rope.|You drop*rope in*@wastebin}} {#T+ BraidingAlarm}
#TRIGGER "BraidingTR" {STATE OF MIND FOUND} {#IF (@skillStatus <=12) {#ADD iBraidingVarAlarm (-1);braid my @BraidingVar;#STATE BraidingTR (0);#T- BraidingTR} {#ADD iBraidingVarAlarm (+1);pull my @BraidingVar;#var BraidState rope}} "" {disable}
#COND {You tug and pull} {#VAR iBraidingVarAlarm 4;#var BraidState rope;#T+ BraidingAlarm} {disable}
#COND {is worth} {#ADD iBraidingVarAlarm (+1);#T+ BraidingAlarm} {disable}
#COND {{You drop a * rope.|You drop*rope in*@wastebin}} {#T- BraidingTR;#RESET {Braiding};#SAY {BraidingDone}} {disable}
#TRIGGER {You need to have more material in your other hand to continue braiding} {#add iBraidingVarAlarm (-1);#var maxrt 1;#T+ BraidingAlarm}
#TRIGGER {But that would give away your hiding place!} {rel;#var maxrt 2;#T+ BraidingAlarm}
#TRIGGER {wasted effort} {#VAR iBraidingVarAlarm 6;#T+ BraidingAlarm}
#COND {You tug and pull} {#VAR iBraidingVarAlarm 5;#var BraidState rope;#T+ BraidingAlarm}
#COND {You drop a * rope.} {#T+ BraidingAlarm}
#TRIGGER {think you can still work with what you have left} {#VAR iBraidingVarAlarm 2;#T+ BraidingAlarm}
#TRIGGER {muttered curse} {#VAR iBraidingVarAlarm 1;#VAR maxrt 2;#VAR BraidState @BraidingVar;#T+ BraidingAlarm}
#TRIGGER {Appraise what?} {drop my @BraidingVar}
#COND {You drop*@BraidingVar} {#T- BraidingTR;#STATE BraidingTR (0);#RESET {Braiding};#SAY {BraidingDone}}
#CLASS 0


CMUD does correctly assign the appropriate value to maxrt, but for some reason it just runs over it, when it does work, it seems to wait a good deal of time longer than what is specified by @maxrt, as follows:

Quote:
> Recoreded maxrt: 9
> for vine

You move forward slightly, hoping to find a better foraging spot.
You manage to find a vine.
Roundtime: 4 sec.

> Recoreded maxrt: 5
> braid my vine

You begin to carefully braid your vine.
Roundtime: 5 seconds.

> Recoreded maxrt: 6

A light rain begins to patter down from above.
> mindStatusAlarm
exp mech

Circle: 48

SKILL: Rank/Percent towards next rank/Amount learning
Mechanical Lore: 161 27.57% clear

STATE OF MIND FOUND
braid my vine

Time Development Points: 251 Favors: 7 Deaths: 23
Overall state of mind: clear
EXP HELP for more information

>
Your efforts are hindered by your mail gloves.
You confidently braid your vines, certain that you are making excellent progress.
You are certain that the braided vines isn't usable for anything yet.
Roundtime: 5 seconds.

> Recoreded maxrt: 6
mindStatusAlarm
exp mech

Circle: 48

SKILL: Rank/Percent towards next rank/Amount learning
Mechanical Lore: 161 27.57% learning

STATE OF MIND FOUND
braid my vine

Time Development Points: 251 Favors: 7 Deaths: 23
Overall state of mind: clear
EXP HELP for more information

>
...wait 2 seconds.

** I only included Mindstatus and Roundtime so you could see the whole picture
** I can post the cMUD versions via xml export, but that just looked like a headache to try to read, let me know if that would help you debug this.
Reply with quote
tomcat025
Wanderer


Joined: 30 Dec 2001
Posts: 66
Location: USA

PostPosted: Wed Jul 25, 2007 4:45 am   
 
I am assuming this is for DR. Are you looking for a working RT gauge?

Have you looked in the DR forums for help or a working RT gauge?

All forums >> Dragonrealms >> Discussions with Dragonrealms Staff and Players >> Support - Zmud

If I remember properly there is at least one there that is said to work. The one I use is just a readout in seconds. It is not the gauge type that we are used to with the wizard or Stormfront.
_________________
You can pick your nose. You can pick your friends... but you can't pick your friends nose.

~Arwin Hochhauser
Reply with quote
NeverNor
Novice


Joined: 18 Nov 2006
Posts: 32

PostPosted: Wed Jul 25, 2007 6:17 am   
 
No no my gauge works in zMUD, doesn't work in cMUD. I am trying to convert my scripts to cMUD. Everything is fine in zMUD, but for the existence of cMUD and I would not be posting. And I am not sure what it is as the roundtime is being updated correctly, the other script is just ignoring it. I'll look/post there too. Thanks
Reply with quote
tomcat025
Wanderer


Joined: 30 Dec 2001
Posts: 66
Location: USA

PostPosted: Wed Jul 25, 2007 8:01 am   
 
Well NeverNor, if you wish to contact me I can let you know what I have for a roundtime gauge in Cmud. I would post it here but you cannot export as text.

I use trillian so I can be contacted at the following.
AIM: tomcat025
Yahoo: tomcat025
MSN: tomcat025@hotmail.com
_________________
You can pick your nose. You can pick your friends... but you can't pick your friends nose.

~Arwin Hochhauser
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jul 25, 2007 5:07 pm   
 
I see several issues in your script, but they are mostly "style" issues. For example, you have:
Code:
#VAR rt {0}
#VAR maxrt {6}
#VAR roundTime {1185221962}
#VAR worldtime {1185221957}

The {} is used for *string* values in CMUD. {} are like " quotes except that they allow variable expansion within them. When using numbers, you don't need the {}. Just doing this will work fine and will be a bit faster:
Code:
#VAR rt 0
#VAR maxrt 6
#VAR roundTime 1185221962
#VAR worldtime 1185221957


Next, you have a line like:
Code:
#var rt {%eval( @roundtime-@worldtime)}

You don't need the extra %eval in CMUD. CMUD evaluates expressions as you'd expect (which zMUD did not). So this line becomes:
Code:
#var rt (@roundtime-@worldtime)


Similarly, your lines:
Code:
#add maxrt (+1)
#ADD rt {-1}

should just be this:
Code:
#add maxrt 1
#ADD rt -1


Again, these are just speed and style issues and shouldn't cause your script not to work.

It's hard for me to read through the entire long script to try and figure out what is wrong. You said that the @maxrt is being calculated correctly, but then you said
Quote:
but for some reason it just runs over it

and I'm not sure what you mean by that. Can you tell me more specifically how your script is supposed to work and exactly what is wrong? If there is a bug in CMUD, I'd like to find it. But it might just be that using the {} is causing CMUD to treat something as a string instead of a number, which might be messing up a calculation somewhere. CMUD is a lot more strict about correct syntax than zMUD was.
Reply with quote
NeverNor
Novice


Joined: 18 Nov 2006
Posts: 32

PostPosted: Wed Jul 25, 2007 5:55 pm   
 
Oh, as I tried to say in the quote the script is suppose to forgage for a vine and start braiding. It does do the foraging part, and starts braiding, but then it begins to issue commands regardless if it there is in a roundtime or not hence the part where it tries to braid and while there are still 2 seconds left in the previous @maxrt
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jul 25, 2007 7:40 pm   
 
I guess someone who is more familiar with this will have to answer more. I've done some basic testing of your maxrt BraidingAlarm and cannot find any problem with it. Keep in mind that while your alarm is running, some other trigger might cause the alarm to get re-enabled. You have a very complex script with lots of places that enable the alarm, so it's very hard to follow exactly what it is doing. With something that complicated, it's very hard to determine exactly what the difference is between zMUD and CMUD. You might just want to contact TomCat as he suggested to get help from someone who has done something like this in CMUD already.

If you are able to pin down a problem in CMUD that is preventing this from working, then post the problem and I can work on it. Sorry I couldn't help you more with this.
Reply with quote
NeverNor
Novice


Joined: 18 Nov 2006
Posts: 32

PostPosted: Thu Jul 26, 2007 3:24 am   
 
That is fine, I just wish I knew why I was having this issue in cMUD. I make all my zMUD scripts and I can set them up in chains to run one after another, all flawless, not sure why I am getting stuck at the gate with cMUD. I wonder if the priorities have anything to do with it? I'll try eliminating and putting things in. If I figure it out I'll be sure to post, if not I'll be stuck with zMUD a bit longer.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Jul 26, 2007 9:10 am   
 
May be worth checking back at CMUD v2.0 as well, since Zugg is working on a readable XML export so people will hopefully be able to start sharing scripts a bit more, so could see if there are any quirks with the importing from zMUD
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
NeverNor
Novice


Joined: 18 Nov 2006
Posts: 32

PostPosted: Sat Jul 28, 2007 11:46 pm   
 
Yeah, even if someone had a script that did something like this, so I could see the template (because I based all my zMUD scripts off pieces from other people's template) they could not share it with me so I could learn. Thanks, I guess I'll wait.
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