Auto Roller Help?

Posted by Aenarion3 on Thu 22 Jul 2004 07:56 AM — 9 posts, 40,022 views.

#0
Hello all,

I'd like to make a script that will roll stats equal to, or higher than 92.

The game roll screen looks like this.

Strength: 12 Intelligence: 12 Wisdom: 17 Dexterity: 12 Constitution: 18
Do these reflect your training (Y/N)?

Basically I'm looking for a script that will add all the different numbers up and if that total value is >92, input n. If the total value is =<92 then stop the script.

Any help would be appreciated, as I find scripting or using complex triggers to be beyond my technical capacity with Mushclient at this point.

Thanks.

USA #1
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1936

Scroll all the way down to Nicks Last post.

You'll need to change the match text to look like yours, and change the %1+%2+%3 etc to only up to %5. And then it should be 72 instead of thirty.

Also, When sending "N", insstead of
Send "N"
make it
DoAfter 1, "N"
That way you'll have 1 second between rolls (makes it easier on the server, and fewer problems with lag).
#2
Thanks for the help, Flannel. Although it seems the solution you suggested didn't work. I don't know if I'm doing something wrong or what.

The trigger I created was this;

match= "Strength: * Intelligence: * Wisdom: * Dexterity: * Constitution: *"

send= if (%1 + %2 + %3 + %4 + %5) &gt; 92 then
Send "Y"
else
DoAfter1, "N"
end if

It doesn't send anything to the server.

Any help would be appreciated, thank you.
USA #3
You need a space between DoAfter and 1.

Also, Change the color of the text (edit the trigger in the edit dialog) to something that you can check. Its always a good idea to make sure youre indeed matching with new/experimental/etc triggers. Since nothing else will work if your trigger is wrong, and they have the tendancy to not work because of unseen spaces, or whatnot.
#4
The problem I'm encountering right now (I think) is that the client is recognizing the trigger line and is sending all of these commands;

if (%1 + %2 + %3 + %4 + %5) &gt; 92 then
Send "Y"
else
DoAfter 1, "N"
end if

It's showing all of this in my output screen and of course the mud is receiving this big formula instead of simply "Y" or "N".

How do I get mushclient to read and perform the commands in addition to outputting Y or N. Right now, I think I have it set so that mushclient is just outputting everything I type into the send box, which isn't right.

Sorry if I sound fragmented, but this is my best interpretation of the situation and my technical knowledge is not very extensive.

again, thanks for the help.
USA #5
<send>if (%1 + %2 + %3 + %4 + %5) &gt; 92 then
Send "Y"
else
DoAfter 1, "N"
end if</send>

If what you are using doesn't match this, it should.

Quote:
send= if (%1 + %2 + %3 + %4 + %5) &gt; 92 then
would seem to be your problem in this case if you posted accurate info on your trigger. If that wasnt the exact trigger, paste us the exact trigger (all of it plz) and we can probly fix it up easily enough.
Amended on Fri 23 Jul 2004 09:39 PM by Meerclar
USA #6
Oh, if youre just pasting that here... then that &gt; should be >
depending on how you entered it into the trigger, it might, or mightnt have been converted.
Amended on Fri 23 Jul 2004 10:10 PM by Flannel
Australia Forum Administrator #7
Quote:

The problem I'm encountering right now (I think) is that the client is recognizing the trigger line and is sending all of these commands;

if (%1 + %2 + %3 + %4 + %5) &gt; 92 then
Send "Y"


You need to set the trigger to "send to script", it sounds like it is just "send to world" which is why all that stuff is going directly to it.
#8
Ah! Finally got it to work.

The script suggestion prooved to be the difference, thank you Mr.Gammon.

Thanks also Flannel, you helped me iron out alot of problems and gave me a good overall idea of how the trigger should work.

thank you.

cheers all!