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 » zMUD General Discussion
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Jan 09, 2006 4:49 pm   

autoroller *ignore me bleh*
 
#trigger {Str: ~[(%d)~] Int: ~[(%d)~] Wis: ~[(%d)~] Dex: ~[(%d)~] Con: ~[(%d)~] Cha: ~[(%d)~]
#if (("%1" >= "18") AND ("%2" >= "18") AND ("%3" >= "18") AND ("%4" >= "18") AND ("%5" >= "18") AND ("%6" >= "18")) {#echo Optimal stats} {n}

Str: [18] Int: [8] Wis: [7] Dex: [8] Con: [18] Cha: [6]
Optimal stats

The only time it shows that it's Optimal Stats is when Str and Con are over 18 or over. Never seems to reroll even tho Int Wis Dex and Cha are under 18.
I got the " around everything so whats going on?
Tried without the " and it still said Optimal stats when Str and Con were 18 or over.
very odd. and I know it's prolly something simple.

extra output:
Str: [18] Int: [13] Wis: [15] Dex: [15] Con: [16] Cha: [6]
n
Accept? <y/n>
Str: [19] Int: [11] Wis: [11] Dex: [11] Con: [13] Cha: [7]
n
Accept? <y/n>
Str: [18] Int: [9] Wis: [7] Dex: [9] Con: [18] Cha: [5]
Optimal stats
Accept? <y/n>

EDIT
Just noticed that at times it also skips it if Str and Con are 18 or over
Str: [18] Int: [6] Wis: [9] Dex: [15] Con: [18] Cha: [5]
n
Accept? <y/n>

Edit2
decided to define vars for each stat. See if that was part of the problem:
Code:
str=%1
int=%2
wis=%3
dex=%4
con=%5
cha=%6
#if ((@str >= "18") AND (@int >= "18") AND (@wis >= "18") AND (@dex >= "18") AND (@con >= "18") AND (@cha >= "18")) {#echo Optimal stats} {
  n
  str=0
  int=0
  wis=0
  dex=0
  con=0
  cha=0
  }


Str: [18] Int: [5] Wis: [8] Dex: [9] Con: [19] Cha: [9]
Optimal stats
Accept? <y/n>

Dangit!

*mutter*
#if (@str >= 18 AND @int >= 18 AND @wis >= 18 AND @dex >= 18 AND @con >= 18 AND @cha >= 18)

had to many ()'s :(
_________________
http://www.Aardwolf.com
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Mon Jan 09, 2006 5:49 pm   
 
Since I was already working on the solution, here's my suggestion anyways.
#TRIGGER {Str: ~[&{str}~] Int: ~[&{int}~] Wis: ~[&{wis}~] Dex: ~[&{dex}~] Con: ~[&{con}~] Cha: ~[&{cha}~]} {#IF ((@str>=18) & (@int>=18) & (@wis>=18) & (@dex>=18) & (@con>=18) & (@cha>=18)) {#Echo Optimal stats} {n} }
Reply with quote
ZealousAnonymous
Wanderer


Joined: 06 Jan 2006
Posts: 70

PostPosted: Mon Jan 09, 2006 6:53 pm   
 
Why don't you try adding them all in a variable then if like @StateCalc>=108
do blah.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Mon Jan 09, 2006 8:22 pm   
 
Pseudo, your #if is the same as what I had in edit2. didnt work. no () between the stats worked. check my *mutter* edit
ZealousAnonymous, I hadn't thought of that. I'll try to remember next time :-)
_________________
http://www.Aardwolf.com
Reply with quote
Pseudo
Wanderer


Joined: 25 Oct 2005
Posts: 99

PostPosted: Mon Jan 09, 2006 8:36 pm   
 
Vitae, I am aware of your post above. I also check and test the code before I post it. If you have tested my code and found a flaw, please be specific. Thanks :) If my posted code does not work for you, I would suggest checking your configuration too. It works on the default config.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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