[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Auto Roller Help?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Auto Roller Help?

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Aenarion3   (5 posts)  [Biography] bio
Date Thu 22 Jul 2004 07:56 AM (UTC)  quote  ]
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.

[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #1 on Thu 22 Jul 2004 08:46 AM (UTC)  quote  ]
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.
[Go to top] top

Posted by Aenarion3   (5 posts)  [Biography] bio
Date Reply #2 on Fri 23 Jul 2004 07:36 AM (UTC)  quote  ]
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) &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.
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #3 on Fri 23 Jul 2004 08:02 AM (UTC)  quote  ]
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.
[Go to top] top

Posted by Aenarion3   (5 posts)  [Biography] bio
Date Reply #4 on Fri 23 Jul 2004 08:52 PM (UTC)  quote  ]
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) &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.
[Go to top] top

Posted by Meerclar   USA  (585 posts)  [Biography] bio
Date Reply #5 on Fri 23 Jul 2004 09:37 PM (UTC)  quote  ]

Amended on Fri 23 Jul 2004 09:39 PM (UTC) by Meerclar

Message
<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.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #6 on Fri 23 Jul 2004 09:50 PM (UTC)  quote  ]

Amended on Fri 23 Jul 2004 10:10 PM (UTC) by Flannel

Message
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.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Nick Gammon   Australia  (19,468 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Fri 23 Jul 2004 10:33 PM (UTC)  quote  ]
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) &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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Aenarion3   (5 posts)  [Biography] bio
Date Reply #8 on Sat 24 Jul 2004 03:44 AM (UTC)  quote  ]
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!

[Go to top] 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.


3,374 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]