First Things First -- a multipurpose pre-combat consult script

Status
Not open for further replies.
Make that

Code:
   if (should_putty || last_monster() == $monster[goth giant] ||

and it should work.
 
3.9 Updates!

  • Fixed the pirate issue. A simple monster_attack() < 100 check was all that was needed, since pirates in zones that unlock after the Barrr all have attacks of 100 or higher.
  • Smarter pickpocket calculations. Will not attempt to pickpocket non-pickpocketable items, nor items with a 100% drop rate. Yay fewer wasted rounds!
  • Added the first round of Major Yellow Ray support for He-Boulders. You can specify monsters that you would like to use your yellow ray on in ftf_yellow, and if you have a He-Boulder equipped and the eye is yellow, FTF will Point at Your Opponent. This setting works exactly like ftf_olfact and ftf_grin -- it contains a comma-delimited, case-insensitive list of canonical monster names. Note that the support for this is not quite complete; SS will not yet stasis until the eye turns yellow. That's coming later.
 
  • Fixed the pirate issue. A simple monster_attack() < 100 check was all that was needed, since pirates in zones that unlock after the Barrr all have attacks of 100 or higher.

From the wiki, "The return value includes monster level modifications." So it will fail if someone has lots of +ML on. Maybe monster_attack() - monster_level_adjustment() would be right.
 
So, apparently, FTF (or smartstasis?) now has infinite recursion imbued somewhere.
I normally begin my aftercore day with a routine that eats a number of black puddings, and it worked until yesterday. Today I upgraded FTF, SS and zlib (same version of mafia as yesterday), and suddenly it stops after "Monster value: ###", with an exception that essentially repeats
Code:
 at net.sourceforge.kolmafia.textui.parsetree.Expression.execute(Expression.java:111)
        at net.sourceforge.kolmafia.textui.parsetree.Conditional.execute(Conditional.java:78)
        at net.sourceforge.kolmafia.textui.parsetree.If.execute(If.java:67)
        at net.sourceforge.kolmafia.textui.parsetree.BasicScope.execute(BasicScope.java:451)
        at net.sourceforge.kolmafia.textui.parsetree.UserDefinedFunction.execute(UserDefinedFunction.java:127)
        at net.sourceforge.kolmafia.textui.parsetree.FunctionCall.execute(FunctionCall.java:166)
        at net.sourceforge.kolmafia.textui.parsetree.Operator.applyTo(Operator.java:303)
forever (until StackOverflowError).

Unfortunately,
1) I didn't think of increasing verbosity until after
2) I am not restarting mafia *again* today
3) any further attempts to automate combats (by use of the "script" relay button) simply hang (it doesn't even get as far as the "monster value")
(that's is after initiating ccs from relay script; when I used "eat 4 black pudding", mafia hung on all (most?) CLI commands too - even after "declaring world peace", it thought it still had the first "eat 4 black pudding" queued, so everything newer got queued too; is there any workaround for that, except for restarting mafia?)
 
I had the same problem. Unfortunately work was too busy to figure out a bug report ... I'll find/post the relevant debug.log (although I think it's the same) a bit later on tonight if needed.
 
Everything has been working fine for me. I'll test with black puddings after rollover and see if I can duplicate this problem.

From the wiki, "The return value includes monster level modifications."

As the person who added that sentence to the Wiki, I am aware of that. :) I gave a simplified explanation here, but it already accounts for that.
 
I'm also unable to duplicate the bug:

Eating 1 black pudding...

[4298] Black Pudding
Encounter: black pudding
Strategy: C:\Program Files\KoL mafia\ccs\default.ccs [default]
Round 0: zarqon loses initiative!
Monster value: 850
Meat/round from Hobo Monkey: 75

Profit per round: 75
Running away would cost you 1350.0 meat.
Getting beaten up would cost you 1450.0 meat.
Monster resistances: 0
Player resistances: 0 (0.6) (0.45) (0.66) (0.45) (0.45)
This familiar does not attack.
Factoring in Scarysauce: (6) damage, retal
You will fumble 0.023% of the time, doing about 8.75 damage (0.2 DPR).
Monster: Black Pudding (ATT 61.0, DEF 11.0, HP 51.0)
Will hit 6.0% of the time, dealing 3.99 damage (0.24 DPR).
You have a 97.73% chance of hitting for 195.16 (5) (10) damage (51 actual).
Round 1: zarqon uses the facsimile dictionary!
Round 2: zarqon uses the facsimile dictionary!
You gain 54 Meat.
1 MP costs 3.2786884 meat.
Action Damage Other
1. Attack with weapon (0 μ) 190.72 (4.89) (9.77) Actual: 51 (0 MPD) HP: -0.2
2. Throw Zombo's empty eye (0 μ) (176) Actual: 51 (0 MPD) Delevel: 40 (-0.16 DPR)
3. Throw Miniborg Destroy-O-Bot (0 μ) 12.5 (12.5) Actual: 25 (0 MPD) Delevel: 4 (-0.02 DPR)
4. Throw spectre scepter (0 μ) 2.13 (2.13) Actual: 4.25 (0 MPD) Delevel: 0.5 (-0 DPR) 25% stun chance HP: 1.5
5. Cast Ravioli Shurikens (13.11 μ) 5.13 (5.13) (5.13) (5.13) (5.13) (5.13) Actual: 30.75 (0.43 MPD)
6. Throw seal tooth (0 μ) 1 (0 MPD)
7. Throw turtle totem (0 μ) 1 (0 MPD)
Round 3: zarqon attacks!
Round 4: black pudding takes 167 damage.
Round 4: black pudding takes 72 damage.
You acquire an item: black pudding
You acquire an item: black pudding
You gain 5 Strengthliness
You gain 6 Enchantedness
You gain 4 Roguishness
Finished eating 1 black pudding.

[/tease]

Yes, I'm using a not-yet-functional BatMan, but it imports and calls FTF and SS so the test was just as valid as running SS.
 
Last edited:
This BatMan looks shiny!

Now that the teasing has started, I guess we can start bugging you with questions: what is the "Actual: 51" mean?
And "Meat/round from Hobo Monkey: 75" is actually the total amount of extra meat you will get from the monkey during the whole fight, right?
 
Actual is the average damage the action would actually deal to the monster, which accounts for monster resistances and is capped at monster_stat("hp").

SS assumes that hobo monkeys always grant 75 meat per round -- until FTF detects that they steal meat, and then that number is changed to 0. This will also affect BatMan's combat decisions as well, since it is part of the base round event until FTF's action filter clears it.

Also, I'm proposing μ (mu) as the currency symbol for Loathing. :)
 
When i try to use this i get

Function 'rnum( float )' undefined (FirstThingsFirst.ash, line 76)

and then it closes how do i fix it?
 
@Bale: Yeah! I looked through the common character sets for a special M, and that was the closest thing I found. Better than $, at least.
 
I understand that it is pronounced mi in modern Greek, but it was pronounced mu in ancient Greek. Make of that what you will.
 
I understand that it is pronounced mi in modern Greek, but it was pronounced mu in ancient Greek. Make of that what you will.

Wiki says it was written μῦ and pronounced [myː], with [y:] being like the german ü or french û or long [y], where [y] is "Like , but with the lips rounded as for " ( is like the ou from you, if it was short). That's very similar, probably even indistinguishable for some speakers of English.
There may be misinterpretation due to
- the english people insisting on writing things in a way that is not especially correlated to the way they are pronounced on a letters to phonemes basis
- the Romans; they are why we sometimes write ph and other times f (just because - reportedly - some of them thought they heard [ph] (two distinct phonemes) when listening to a Greek saying something with a ϕ in it)
 
Status
Not open for further replies.
Back
Top