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 ➜ Lua ➜ Stat reroll script

Stat reroll script

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


Posted by Boen310   (17 posts)  Bio
Date Wed 18 Jul 2018 04:09 PM (UTC)
Message
Hello, Looking for some help with a stat reroll script - Stats appear like this

Your basic stats:
Strength: good Power: good
Dexterity: very good Intelligence: very good
Agility: excellent Wisdom: very good
Constitution: very good Charisma: very good

Luck: good Unused: good

With looking for a desired outcome of excellent in a given stat.
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #1 on Sat 21 Jul 2018 10:45 PM (UTC)
Message
Quote:
With looking for a desired outcome of excellent in a given stat.

Which one?

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 22 Jul 2018 03:22 AM (UTC)
Message
I suggest searching this forum for the words "stat roller" - there have been quite a few posts about it.

http://gammon.com.au/forum/bbsearch.php?searchfor=stat+roller&bbsection_id=1&bbtopic_id=0&action=search

- Nick Gammon

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

Posted by Boen310   (17 posts)  Bio
Date Reply #3 on Mon 23 Jul 2018 12:45 PM (UTC)

Amended on Tue 24 Jul 2018 04:43 AM (UTC) by Nick Gammon

Message
This is the reroll that I came up with - it just spams through the lines and never stops and I have seen the values entered matched a few times-



<triggers>
  <trigger
   ignore_case="y"
   lines_to_match="2"
   keep_evaluating="y"
   match="^  Strength  \[(...........)\]  Dexterity \[(...........)\]  Constitution \[(..........)\]  Agility\[(............)\]$"
   multi_line="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>require "wait"

Strength  = Trim("%1")
Dexterity = Trim("%2")
Constitition = Trim("%3")
Agility = Trim("%4")

YStrength = "No"
YDexterity = "No"
YConstitution = "No"
YAgility = "No"

if Strength  == "excellent" 

then
   YStrength = "Yes"
end

if Dexterity == "excellent" 
then
   YDexterity = "Yes"
end

if Constitution == "excellent" 
then
   YConstitution = "Yes"
end

if Agility == "excellent" 
then
   YAgility = "Yes"
end

if YStrength == "Yes" and 
   YDexterity == "Yes" and 
   YConstitution == "Yes" and 
   YAgility == "Yes"
then 
    Send ("n")
else
    print ("** Stats rejected **  ", YStrength, "   ",  YDexterity, "  ", YConstitution, "  ", YAgility)
    DoAfter(0.25,"y")
end
</send>
  </trigger>
</triggers>
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #4 on Wed 25 Jul 2018 01:57 AM (UTC)

Amended on Wed 25 Jul 2018 02:00 AM (UTC) by Fiendish

Message
Quote:
match="^ Strength \[(...........)\] Dexterity \[(...........)\] Constitution \[(..........)\] Agility\[(............)\]$"


That doesn't look anything like what you said in your first post.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Wed 25 Jul 2018 04:49 AM (UTC)
Message
As I mentioned in other threads about stat rollers, trying to get Excellent on every stat is likely to take years, and possibly get you booted from the server by the admins when they spot one player spending days connected but doing nothing but roll stats.

If you must write a stat roller, I would be looking for good or very good at the most.

- Nick Gammon

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

Posted by Boen310   (17 posts)  Bio
Date Reply #6 on Wed 25 Jul 2018 09:05 AM (UTC)
Message
In this mud excellent isn't hard to get but getting 4 is hard to get. You can get it manually rolling just takes some time to get this outcome. Anything with good or very good is considered "bad".
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #7 on Thu 26 Jul 2018 10:59 PM (UTC)
Message
Ok, but your trigger pattern has no relation to the text you want to match on.

https://github.com/fiendish/aardwolfclientpackage
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.


22,014 views.

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.