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
psm
Novice


Joined: 19 Jan 2002
Posts: 34
Location: Austria

PostPosted: Thu Jan 31, 2002 1:52 pm   

Autoroller still - Pro wanted
 
Ok, i thought it would work, but it does not :(

maybe you Gurus can work it out?
here is what we got:

sojourn3.org:9999(Diku) Output:

dots (.) represent white space

Your basic stats:
Strength:........mighty..Power:...........average
Dexterity:.......fair....Intelligence:....mundane
Agility:.........fair....Wisdom:..........bad
Constitution:....fair....Charisma:........average


Explanation of stats:
.Bad:...........25-50...Mundane:.......51-65...Average:...66-75
.Fair:..........76-81...Good:..........82-87...Mighty:....88-93
.Heroic:........94-99...Perfect:.......100


...You may choose to reroll your character at this time. If you elect to reroll, these stats will be erased and new ones rolled. To reroll, select 'y' (or hit <return>). To keep this character, and continue character generation, select 'n'.
Do you want to reroll this char (y/n) [y]:

Now we want a script, where we can choose the stats(with an <= or >= option)we want the character to have. if the MUD rolls the wanted stats, the script should stop, wait and make some sort of sound, like a beep or playing a wav-file.
This is the script we have until now, but there is something wrong with it, who can solve the problem?

#VAR bad {25}
#VAR mundane {51}
#VAR average {66}
#VAR fair {76}
#VAR good {82}
#VAR mighty {88}
#VAR heroic {94}
#VAR perfect {100}
#VAR str {}
#VAR dex {}
#VAR int {}
#VAR agil {}
#VAR wis {}
#VAR con {}
#VAR cha {}
#VAR power {}

#TRIGGER {Strength~:%s(%w)%sPower~:%s(%w)$Dexterity~:%s(%w)%sIntelligence~:%s(%w)$Agility~:%s(%w)%sWisdom~:%s(%w)$Constitution~:%s(%w)%sCharisma~:%s(%w)} {#var str @{%1};#var power @{%2};#var dex @{%3};#var int @{%4};#var agil @{%5};#var wis @{%6};#var con @{%7};#var cha @{%8}}

#TRIGGER {Do you want to reroll this char ~(y/n~) ~[y~]~:} {#if (@str>=@average and @power>=@mundane and @dex>=@mundane and @int>=@mundane and @agil>=@mundane and @wis>=@mundane and @con>=@mundane and @cha>=@mundane) {#play Tada.wav;noop} {y}} "" {prompt}

thanks a lot in advance
psm
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jan 31, 2002 4:17 pm   
 
What exactly is this "something" that is wrong? What does the trigger do, or doesn't do, that you want differently?

I do see that in the second trigger noop is probably not what you want but #NOOP. You may delete this also, and it should still do the same. Also, the else commands of the #IF should not be y, but n.

Kjata
Reply with quote
psm
Novice


Joined: 19 Jan 2002
Posts: 34
Location: Austria

PostPosted: Thu Jan 31, 2002 4:58 pm   
 
the problem is that with the trigger it just keeps running. it just does not what it should do. i don't really know, either it just does not hit the wanted stats, or no beep sounds or other starnge things happens.

ok, i tried the command in two ways now:

1st:
#if (@str>=@good and @power>=@mundane and @dex>=@mundane and @int>=@fair and @agil>=@fair and @wis>=@mundane and @con>=@average and @cha>=@bad) {n} {y}

this is the outcome:

Rerolling this character.


Your basic stats:
Strength: good Power: fair
Dexterity: average Intelligence: mundane
Agility: fair Wisdom: mundane
Constitution: mighty Charisma: mundane


Explanation of stats:
Bad: 25-50 Mundane: 51-65 Average: 66-75
Fair: 76-81 Good: 82-87 Mighty: 88-93
Heroic: 94-99 Perfect: 100

You may choose to reroll your character at this time. If you elect
to reroll, these stats will be erased and new ones rolled. To reroll,
select 'y' (or hit <return>). To keep this character, and continue
character generation, select 'n'.
Do you want to reroll this char (y/n) [y]: n
n

and it kept on going. as you can see, the n was placed, but it keeps on rolling
then after a long time of running, it accepted the stats, but kept on giong to send some command to the mud (which is an illigal command at that point) forcing the mud to repeat the same sentence over and over again. also, it does not show the wanted stats (for example, strength is only "fair", althought "good" was what i asked for, which is higher).

now the 2nd try, with the y and n exchanged in position:
#if (@str>=@good and @power>=@mundane and @dex>=@mundane and @int>=@mundane and @agil>=@fair and @wis>=@mundane and @con>=@average and @cha>=@bad) {y} {n}

here it stops imidiatly, after the first roll, giving me that:

Accepting these stats.


Your basic stats:
Strength: mighty Power: mundane
Dexterity: average Intelligence: average
Agility: average Wisdom: mundane
Constitution: fair Charisma: bad

as you can see, agility is lower then asked for, so it does not work.

maybe someone could connect to sojourn and try it to see what i mean (maybe my english is insiufficient to describe the problem good enough).
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jan 31, 2002 6:34 pm   
 
In the first example, you appear to be double-triggering. I note that your script includes the "prompt" option, but not the "nocr" option. Change the option field from "prompt" to "nocr|prompt" and see if that clears it up.

You can also change this in the editor, by removing the checkmark from the Trigger on: Newline box.

If that doesn't clear it up, you probably have an extra trigger somewhere. (Easy to do when you have to do lots of rewrites on a complex script).

LightBulb
All scripts untested unless otherwise noted
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Jan 31, 2002 9:48 pm   
 
Main stat trigger isn't always catching
because the game pads the words to the
same length as average and I'm brain
dead to remember how to capture a defined
length item.



Strength: fair Power: bad <<
Dexterity: fair Intelligence: mundane<<
Agility: average Wisdom: mundane<<
Constitution: good Charisma: fair <<


cheap fix to the trigger is:
Strength~:%s(%w)%sPower~:%s(%*)$Dexterity~:%s(%w)%sIntelligence~:%s(%*)$Agility~:%s(%w)%sWisdom~:%s(%*)$Constitution~:%s(%w)%sCharisma~:%s(%w)

TonDiening
Uses 6.16
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Fri Feb 01, 2002 7:21 am   
 
Ahhh, good catch TonDiening. You can use the &nn to capture a certain length. So your trigger would be either what TonDiening said or this:

Strength~:%s(%w)%sPower~:%s(&7)$Dexterity~:%s(%w)%sIntelligence~:%s(&7)$Agility~:%s(%w)%sWisdom~:%s(&7)$Constitution~:%s(%w)%sCharisma~:%s(%w)

Iljhar
Reply with quote
psm
Novice


Joined: 19 Jan 2002
Posts: 34
Location: Austria

PostPosted: Fri Feb 01, 2002 8:28 am   
 
I will try it today, but i was looking for other possibilities and after searching the web a while, i found an autoroller. it is very sophisticated. i will post it, with the one, that has been worked out here in the "finished script" forum.
Reply with quote
psm
Novice


Joined: 19 Jan 2002
Posts: 34
Location: Austria

PostPosted: Fri Feb 01, 2002 11:56 am   
 
ok, i tried the suggested changes, but they did not work either, so i'll post the script i found and you can have a look. it's far more complicated, but nicely made.

the only thing i'd like to include is some sort of sound, that should be played, as soon as the trigger rolled the wanted stats.

again, i want to thank all who tried to help me on that script.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Feb 01, 2002 1:17 pm   
 
Works for me with my cheap fix.

TonDiening
Uses 6.16
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