Stat reroll script

Posted by Boen310 on Wed 18 Jul 2018 04:09 PM — 8 posts, 32,188 views.

#0
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.
USA Global Moderator #1
Quote:
With looking for a desired outcome of excellent in a given stat.

Which one?
Australia Forum Administrator #2
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
#3
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>
Amended on Tue 24 Jul 2018 04:43 AM by Nick Gammon
USA Global Moderator #4
Quote:
match="^ Strength \[(...........)\] Dexterity \[(...........)\] Constitution \[(..........)\] Agility\[(............)\]$"


That doesn't look anything like what you said in your first post.
Amended on Wed 25 Jul 2018 02:00 AM by Fiendish
Australia Forum Administrator #5
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.
#6
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".
USA Global Moderator #7
Ok, but your trigger pattern has no relation to the text you want to match on.