Register forum user name Search FAQ

Gammon Forum

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 ➜ Stat Roller for those that are code-stupid

Stat Roller for those that are code-stupid

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2  3 

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #30 on Thu 31 Jul 2003 12:56 AM (UTC)
Message
For the first problem, you could put back the original trigger I did - that will match on lines which *do* have a newline, which would apply in this case. Just check it matches the right thing (eg. the space on the end).

For the second problem, disable the *timer* which is what is responding to the message from the MUD.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Kazimir   (6 posts)  Bio
Date Reply #31 on Mon 21 Aug 2006 10:32 PM (UTC)

Amended on Tue 22 Aug 2006 02:33 AM (UTC) by Kazimir

Message
I don't know how to use triggers all that well with MUSHClient or anything else for that matter though, my stats show up in this format:

Attributes:
Str Int Wis Dex Con Cha Lck
16 17 16 17 16 14 16.

Please Select: (A)ccept, (R)eroll, or (H)elp stats

Those are the stats I am wanting to get if that helps at all.

There are 3 spaces between the different numbers up there as well.
Top

Posted by Shichiroji   USA  (22 posts)  Bio
Date Reply #32 on Mon 22 Aug 2011 05:29 PM (UTC)

Amended on Mon 22 Aug 2011 05:35 PM (UTC) by Shichiroji

Message
I'm having kind of the same problem, coding moron here as well, been trying these different forms of code here, just changing some of the strings to fit my mud. here is the stat rolling lines;

Rolling...
Strength: * Intelligence: * Wisdom: * Dexterity: * Constitution: *

Do these reflect your training (Y/N)?


As for the coding itself, I've changed very little, but still going to paste it here for extra help.

<triggers>
<trigger
custom_colour="2"
enabled="y"
match="*[Strength: * Intelligence: * Wisdom: * Dexterity: * Constitution: *]"
send_to="12"
sequence="90"
>
<send>
SetVariable "str", "%2"
SetVariable "int", "%3"
SetVariable "wis", "%4"
SetVariable "dex", "%5"
SetVariable "con", "%6"
</send>
</trigger>
<trigger
custom_colour="3"
enabled="y"
match="Do these reflect your training (Y/N)?"
send_to="12"
sequence="100"
>
<send>dim total

total = CInt (GetVariable ("str")) _
+ CInt (GetVariable ("int")) _
+ CInt (GetVariable ("wis")) _
+ CInt (GetVariable ("dex")) _
+ CInt (GetVariable ("con"))

if total &gt;= CInt (GetVariable ("total_wanted")) then
Send "Y"
Note "** Accepted total stats of " &amp; total
else
Send "N"
Note "Rejected total stats of " &amp; total
end if

</send>
</trigger>
</triggers>

<aliases>
<alias
match="stats *"
enabled="y"
variable="total_wanted"
send_to="9"
sequence="100"
>
<send>%1</send>
</alias>
</aliases>


hope that helps, if need be, the mud I'm trying to connect to is darkmist, connection info is;

darkmists.net 2222


I also tried the timer code and it didn't work either, but its closer to what I'm wanting, I'd love to see the total of the stats and what not so I know what I could get if by chance something happens and I put in to high of a number.

Thanks for the help in advance.
Top

Posted by Shichiroji   USA  (22 posts)  Bio
Date Reply #33 on Mon 22 Aug 2011 08:49 PM (UTC)
Message
I was looking through the forum some more and ran across this trigger, it looks like it should work, but I'm getting an error. I know there is a lot of info on the forums, and I am looking, just trying different things and seeing if I can find one that works, but I'm not having much luck.

<triggers>
<trigger
custom_colour="2"
enabled="y"
match="Strength: * Intelligence: * Wisdom: * Dexterity: * Constitution: *"
send_to="12"
sequence="100"
>
<send>if (%1 + %2 + %3 + %4 + %5) &gt; 95 then
Send "Y"
else
Send "N"
end if</send>
</trigger>
</triggers>


error I'm getting is;

Compile error
World: Darkmist
Immediate execution
[string "Trigger: "]:5: unexpected symbol near '<eof>'
Top

Posted by Shichiroji   USA  (22 posts)  Bio
Date Reply #34 on Mon 22 Aug 2011 09:16 PM (UTC)
Message
Ok, got something going so far, was able to use the mushclient trigger system to get it working, this is the code I have so far, any help fixing it to show me a total for the stats would be great, going to continue to look through the forums too.

<triggers>
<trigger
enabled="y"
match="Strength: * Intelligence: * Wisdom: * Dexterity: * Constitution: *"
send_to="12"
sequence="100"
>
<send>if (%1 + %2 + %3 + %4 + %5) &gt; 95 then
Send "Y"
else
Send "N"
end</send>
</trigger>
</triggers>
Top

Posted by Shichiroji   USA  (22 posts)  Bio
Date Reply #35 on Tue 23 Aug 2011 08:11 PM (UTC)
Message
Ok, still working on it, haven't been able to get it, but still looking as well. Anybody have any suggestions to help?
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #36 on Tue 23 Aug 2011 10:04 PM (UTC)
Message
You already know the total because you are comparing it, right? So just print it:


print ("Total was:", %1 + %2 + %3 + %4 + %5)


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shichiroji   USA  (22 posts)  Bio
Date Reply #37 on Wed 24 Aug 2011 09:57 PM (UTC)
Message
Thanks Nick, for some reason I just couldn't get it to work right. I think I was forgetting the comma.

Thanks again
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.


102,037 views.

This is page 3, subject is 3 pages long:  [Previous page]  1  2  3 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.