Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Auto Roller Help?
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Aenarion3
(5 posts) Bio
|
Date
| Thu 22 Jul 2004 07:56 AM (UTC) |
Message
| 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.
| Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Thu 22 Jul 2004 08:46 AM (UTC) |
Message
| 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). |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Aenarion3
(5 posts) Bio
|
Date
| Reply #2 on Fri 23 Jul 2004 07:36 AM (UTC) |
Message
| 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) > 92 then
Send "Y"
else
DoAfter1, "N"
end if
It doesn't send anything to the server.
Any help would be appreciated, thank you. | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #3 on Fri 23 Jul 2004 08:02 AM (UTC) |
Message
| 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. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Aenarion3
(5 posts) Bio
|
Date
| Reply #4 on Fri 23 Jul 2004 08:52 PM (UTC) |
Message
| 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) > 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. | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #5 on Fri 23 Jul 2004 09:37 PM (UTC) Amended on Fri 23 Jul 2004 09:39 PM (UTC) by Meerclar
|
Message
| <send>if (%1 + %2 + %3 + %4 + %5) > 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) > 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. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #6 on Fri 23 Jul 2004 09:50 PM (UTC) Amended on Fri 23 Jul 2004 10:10 PM (UTC) by Flannel
|
Message
| Oh, if youre just pasting that here... then that > should be >
depending on how you entered it into the trigger, it might, or mightnt have been converted. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #7 on Fri 23 Jul 2004 10:33 PM (UTC) |
Message
|
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) > 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Aenarion3
(5 posts) Bio
|
Date
| Reply #8 on Sat 24 Jul 2004 03:44 AM (UTC) |
Message
| 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!
| Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
30,090 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top