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
IlikeCheese
Newbie


Joined: 25 Dec 2010
Posts: 4

PostPosted: Sat Dec 25, 2010 4:35 am   

Simple Auto Statroller
 
Hey everyone. I've been trying to adjust some of the autoroller triggers I've seen on here to meet my needs, but with no luck on doing it successfully. :(

The output looks like this:
Your stats are: [Str 3, Int 8, Wis 6, Dex 14, Con 13.]:
To keep these stats type 'keep'. Anything else rerolls.

The trigger I was toying with was:

Trigger pattern: {Str:%s(%d)%sInt:%s(%d)%sWis:%s(%d)%sDex:%s(%d)%sCon:%s(%d)%s}
result: #IF ((%1 = 18) AND (%2 = 18) AND (%3 = 18) AND (%4 = 18) AND (%5 = 18)) {keep}

I'd like to be able to roll until I get 18 on all stats and when all stats=18 then enter the command keep. Sadly, this is probably the most complex trigger I've ever tried to make. If anyone is up to it, I'd love to see this thing working. :D AND, I'd appreciate it so much. :)

Edit: Merry Christmas and happy holidays!
Reply with quote
IlikeCheese
Newbie


Joined: 25 Dec 2010
Posts: 4

PostPosted: Sat Dec 25, 2010 5:19 am   
 
I also tried this:

Trigger: Your stats are: [Str %1, Int %2, Wis %3, Dex %4, Con %5.]:
result: #IF ((%1 = 18) AND (%2 = 18) AND (%3 = 18) AND (%4 = 18) AND (%5 = 18)) {keep}

I changed = to < for testing purposed. It's highly likely that those values will be under 18. However when I did this even when the values where under 18 nothing happened. :(
Reply with quote
IlikeCheese
Newbie


Joined: 25 Dec 2010
Posts: 4

PostPosted: Sat Dec 25, 2010 5:43 am   
 
I'm an idiot for using %# in my pattern. i'm going to read up on pattern matching and see if i can come up with something.
Reply with quote
IlikeCheese
Newbie


Joined: 25 Dec 2010
Posts: 4

PostPosted: Sat Dec 25, 2010 5:59 am   
 
Well after a little bit of reading I got this thing working!!! :)
I ended up changing the pattern because I don't think Cmud likes all those brackets and stuff in there...I'm no coding genius but I think CMUD interrupts them as something other than just part of the pattern string.
End result looks like this:

Trigger: Str (%d), Int (%d), Wis (%d), Dex (%d), Con (%d)
result : #IF ((%1 = 18) AND (%2 = 18) AND (%3 = 18) AND (%4 = 18) AND (%5 = 18)) {keep} {look}

Works like a charm and is running now. Going to be some time I think before I get those stats hehe.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Sat Dec 25, 2010 12:34 pm   
 
if you are going to use [ or ] in patterns you need to quote them like ~[ or ~] since they are used to match a range of characters as explained in the pattern matching help file. Hopefully Santa will bring you the 18's. :)

Merry Christmas everyone.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
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