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
bart796
Beginner


Joined: 28 Sep 2010
Posts: 13

PostPosted: Tue Oct 12, 2010 8:55 pm   

Creating an autoroller
 
Choose one of the following set:
1) Str:14 Int:11 Wis:15 Dex: 9 Con:14 Luc:11
2) Str:11 Int:14 Wis:12 Dex:10 Con: 8 Luc:11
3) Str:11 Int:14 Wis:12 Dex:14 Con: 7 Luc:14
4) Str:10 Int:15 Wis:16 Dex: 7 Con:14 Luc:14
5) Str:13 Int:10 Wis:14 Dex: 8 Con:12 Luc:14
Choose [1-5 set, Return roll again,q- quit]:

This is how my mud does rolls when creating your character. Basically all i want is a script or trigger that will keep re-rolling until all stats are above 14 or 15 max being 18 or 19 i forget which. I tried a few triggers but all failed miserably as i dont know how to code at all heh. If anyone could come up with something simple for me to input in my zmud that would be great! thanks in advance.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Tue Oct 12, 2010 9:22 pm   
 
#TR {^(%d)~) Str:([%s%d]) Int:([%s%d]) Wis:([%s%d]) Dex:([%s%d]) Con:([%s%d]) Luc:([%s%d])$} {#IF (%2>=14 AND %3>=14 AND %4>=14 AND %5>=14 AND %6>=14) {#EXEC {%1}} {#IF (%1=5) {#SENDP {%char(10)}}}}

Its ugly but it works... copy and paste that to your command line
_________________
Discord: Shalimarwildcat
Reply with quote
bart796
Beginner


Joined: 28 Sep 2010
Posts: 13

PostPosted: Tue Oct 12, 2010 9:28 pm   
 
heh sweet ill give it a whirl thanks (again actually u helped me with a trigger a week or 2 ago well and alarm which i have used so many times by the way that code is amazing)
Reply with quote
bart796
Beginner


Joined: 28 Sep 2010
Posts: 13

PostPosted: Tue Oct 12, 2010 9:33 pm   
 
hmm i copied it into the command line and hit enter..it made a trigger for that but it didnt start sending enter commands or anything or am i just supposed to hit enter over and over?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Tue Oct 12, 2010 9:38 pm   
 
Hmm i guess %char(10) only outputs a linefeed not an actual carriage return... now i need to remember how to do that.

Found it, use %char(13)
_________________
Discord: Shalimarwildcat
Reply with quote
bart796
Beginner


Joined: 28 Sep 2010
Posts: 13

PostPosted: Tue Oct 12, 2010 9:50 pm   
 
well i changed it to to that..just like this #TR {^(%d)~) Str:([%s%d]) Int:([%s%d]) Wis:([%s%d]) Dex:([%s%d]) Con:([%s%d]) Luc:([%s%d])$} {#IF (%2>=14 AND %3>=14 AND %4>=14 AND %5>=14 AND %6>=14) {#EXEC {%1}} {#IF (%1=5) {#SENDP {%char(13)}}}} copy and pasted it into zmud command line and it made a trigger but it does not seem to react to anything..i hit enter to see if i had to initiate it but it just rolled another set and waited for my input again
Reply with quote
bart796
Beginner


Joined: 28 Sep 2010
Posts: 13

PostPosted: Tue Oct 12, 2010 9:56 pm   
 
123) Str:%s%d Int:%s%d Wis:%s%d Dex:%s%d Con:%s%d Luc:%s%d <---this is what it says when i got to test out the trigger and tells me pattern does not match
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Tue Oct 12, 2010 9:59 pm   
 
I used the pattern you supplied, maybe try surrounding the mud output in code blocks will preserve your whitespace
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4692
Location: Pensacola, FL, USA

PostPosted: Tue Oct 12, 2010 10:15 pm   
 
Here, let me remove the anchors and tweak the #IF

Go ahead and delete the current trigger and try this one instead

#TRIGGER "autoRoller" {(%d)~) Str:([%s%d]) Int:([%s%d]) Wis:([%s%d]) Dex:([%s%d]) Con:([%s%d]) Luc:([%s%d])} {#IF (%2>=14 AND %3>=14 AND %4>=14 AND %5>=14 AND %6>=14) {#EXEC {%1}} {#IF (%match(%rightback(%1,1), "{0|5}")) {#SENDP {%char(13)}}}}
_________________
Discord: Shalimarwildcat
Reply with quote
bart796
Beginner


Joined: 28 Sep 2010
Posts: 13

PostPosted: Wed Oct 13, 2010 12:13 am   
 
eh its not working but its all good i sat here for 2 hours pressing enter till i found something decent lol when i input those codes in command line and hit enter it does create a trigger but then proceeds to do nothing but thanks anyway!
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