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


Joined: 27 Jan 2002
Posts: 2

PostPosted: Sun Jan 27, 2002 10:17 pm   

Statting a character (my first script)
 
Hello.
In my mud there is a stat rerolling option when you create a char. The format is something like this:

Str: [11/0] Int: [14] Wis: [14] Dex: [14] Con: [11] Cha: [12]
Keep these stats? (y/n)

I would like zmud to keep entering "n" until the stats are:

Str: [15/0] Int: [17] Wis: [17] Dex: [17] Con: [15] Cha: [15]

What I have so far looks like this (it doesn't work)

#ALIAS setup {#VAR setup 0;#UNTIL (@setup = 1) {n};y}

and

#TRIGGER {Str: [15/0] Int: [17] Wis: [17] Dex: [17] Con: [15] Cha: [15]} {#VAR setup 1}

This is my first script ever, so be gentle :p. Thank you in advance.
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Mon Jan 28, 2002 1:20 am   
 
Try this:

#trigger {Str: ~[(%d)/%d~] Int: ~[(%d)~] Wis: ~[(%d)~] Dex: ~[(%d)~] Con: ~[(%d)~] Cha: ~[(%d)~]$Keep these stats? ~(y/n~)} {#if (%1>=15 and %2>=17 and %3>=17 and %4>=17 and %5>=15 and %6>=15) {y} {n}}

If the line: "Keep these stats? (y/n)" is a prompt, then make sure you change this trigger so that it triggers on prompt and not on newline.

Iljhar
Reply with quote
jonnies
Newbie


Joined: 27 Jan 2002
Posts: 2

PostPosted: Tue Jan 29, 2002 10:31 pm   
 
Thanks for your quick and helpful response. I'm about to try that and I'll let you know how it goes:)

Edit:
IT WORKS!!:)
Thanks a ton!:)
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