You type roll with your minimum stat requirements. For example if you want four 100s, for a blackguard, they have minimum wisdom 50, and int 40, you'd type:
roll 40 50 100 100 100 100
This will give some false positives, it only check if you're 12 or more away from target, bonuses to stats add up to 12.
Lilithelle
Code: Select all
#alias roll {
#T+ Roller
#var num %concat( %-1, " 0 0 0 0 0 0 0 0")
#var num %subregex( @num, "\s+", "|")
#var temp ""
#forall @num {#var temp %additem( %rightback( %concat( "00", %i), 3), @temp)}
#var temp %rightback( %sort( @temp), 31)
}
#CLASS {Roller} {disable}
#TRIGGER {^Strength:%s(%d)%sPower:%s(%d)} {
#var num %additem( %rightback( %concat( "00", %1), 3), @num)
#var num %additem( %rightback( %concat( "00", %2), 3), @num)
}
#TRIGGER {^You may choose to reroll your character at this time.} {
#var num %sort( @num)
#var output 0
#loop 8 {#add output %max( %eval( %concat( %item( @temp, %i), "-", %item( @num, %i))), 0)}
#say @output short of target.
#if (@output > 12) {yes} {
#t- Roller
#alarm -180 {pow cha}
#temp {^Accepting these stats.} {#untrigger -180}
}
}
#TRIGGER {^Your basic stats:} {#var num ""}
#TRIGGER {^Dexterity:%s(%d)%sIntelligence:%s(%d)} {
#var num %additem( %rightback( %concat( "00", %1), 3), @num)
#var num %additem( %rightback( %concat( "00", %2), 3), @num)
}
#TRIGGER {^Agility:%s(%d)%sWisdom:%s(%d)} {
#var num %additem( %rightback( %concat( "00", %1), 3), @num)
#var num %additem( %rightback( %concat( "00", %2), 3), @num)
}
#TRIGGER {^Constitution:%s(%d)%sCharisma:%s(%d)} {
#var num %additem( %rightback( %concat( "00", %1), 3), @num)
#var num %additem( %rightback( %concat( "00", %2), 3), @num)
}
#CLASS 0