|
jonnies Newbie
Joined: 27 Jan 2002 Posts: 2
|
Posted: 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. |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: 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 |
|
|
|
jonnies Newbie
Joined: 27 Jan 2002 Posts: 2
|
Posted: 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!:) |
|
|
|
|
|