Bug - Not A Bug Mafia refuse to use He-Boulders "Point at your opponent"-skill in combat script

Ferdawoon

Member
Mafia refuse to use He-Boulders "Point at your opponent"-skill in combat script

I'm using Mafia's Custom Combat Script, and now that I decided to use He-Boulder again this Pastamancer run I decided to macro it to use that skill early in the combats as it is still enough to, if not kill the monsters by itself, then at least nearly so.

The Macro is just as follow:
[ default ]
skill point at your opponent
attack with weapon

When I click Save it add the numbers of the rounds as well (1: skill point at your opponent. 2: attack).
Problem is, when I check the Graphical CLI, it just wont use the He-Boulder skill but go straight for the Auto-attack part. Same if I use the Load in Web Browser-button and click the Script button in combat
And yes, I am sure that I have set "Action: Custom Combat Script" and not "Action: attack with weapon" =D

If I try to remove the "Attack with Weapon" after "Point at your opponent" and do it in the webbrowser, I just get blank page after blank page. Or rather, I get the image of the monster, I have the ususal attack-buttons and Use items and skills-buttons, and the text that Mafia add such as the predicted HP of the mob, but no InGame text.

Someone in /hc said I should try "set debugMacro = True" and see what it says. This is what I get when I have Mafia run 1 Adv for me:
With Point at your opponent + Auto-attack:

Encounter: drunken rat
Round 0: Ferdawoon wins initiative!
Generated macro:
sub mafiaround
endsub#mafiaround
sub mafiamp
****abort "No MP restoratives!"
****mark mafiampexit
endsub#mafiamp
#mafiaheader
if hasskill 7082
****call mafiaround; skill 7082
endif
mark mafiafinal
call mafiaround; attack
goto mafiafinal

Round 1: Ferdawoon executes a macro!
Round 1: Ferdawoon attacks!
You lose 4 hit points
Round 2: Ferdawoon attacks!
You lose 4 hit points
Round 3: Ferdawoon attacks!
... and so on until I die.


With Point at your opponent without the Auto-attack after:

Encounter: An Interesting Choice
Encounter: spooky vampire
Strategy: D:\Bengt\ccs\default.ccs [default]
Round 0: Ferdawoon wins initiative!
Generated macro:
sub mafiaround
endsub#mafiaround
sub mafiamp
****abort "No MP restoratives!"
****mark mafiampexit
endsub#mafiamp
#mafiaheader
mark mafiafinal
if hasskill 7082
****call mafiaround; skill 7082
endif
goto mafiafinal

Round 1: Ferdawoon executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 2: Ferdawoon executes a macro!
KoLmafia thinks it is round 3 but KoL thinks it is round 1
....
Round 12: Ferdawoon executes a macro!
KoLmafia declares world peace.
KoLmafia thinks it is round 13 but KoL thinks it is round 1


I use the DownloadLatestDailyBuild script to get the latest version and it have been like this for 2 days now.
This exact same script worked fine my last Pastamancer run not that long ago.
 

Spiny

Member
Using r8466 with the ccs as you described:

Code:
[default]
1: skill point at your opponent
2: attack with weapon

I could not duplicate your bug exactly. The fight ran thru, however the skill was never actually used.

Code:
[29404] Knob Goblin Treasury
Encounter: Knob Goblin Elite Guardsman
Strategy: /home/.kolmafia/ccs/test hebo.ccs [default]
Round 0: Genevieve Alfredo wins initiative!
Generated macro:
abort hppercentbelow 5
sub mafiaround
endsub#mafiaround
sub mafiamp
****if hascombatitem 3697
********call mafiaround; use 3697
********goto mafiampexit
****endif
****if hascombatitem 465
********call mafiaround; use 465
********goto mafiampexit
****endif
****call mafiaround; use 1965
****mark mafiampexit
endsub#mafiamp
#mafiaheader
if hasskill 7082
****call mafiaround; skill 7082
endif
mark mafiafinal
call mafiaround; attack
goto mafiafinal

Round 1: Genevieve Alfredo executes a macro!
Round 1: Genevieve Alfredo attacks!
Round 2: knob goblin elite guardsman takes 1058 damage.
Round 2: Ton fixes his yellow eye against a nearby mailbox. A few seconds later, there's a mailbox-shaped pocket beyond empty space where the mailbox used in be.
Your familiar gains a pound: Ton, the 17 lb. He-Boulder
After Battle: Ton gives you an invigorating hot rock massage.
You gain 28 hit points
You gain 32 Mana Points
After Battle: Ton winks at you with his giant central eye.
You gain 149 Meat
You gain 4 Strongness
You gain 8 Enchantedness

A manual adventure in the relay browser using the skill yields:

Code:
[29410] Frat House (Stone Age)
Encounter: caveman frat boy
Round 0: Genevieve Alfredo wins initiative!
Round 1: Genevieve Alfredo casts POINT AT YOUR OPPONENT!
Round 2: Ton swings his eyestalk toward your opponent, bathing it through a ray during blue light. A huge block in ice forms arround it.
Round 2: Genevieve Alfredo attacks!
Round 3: caveman frat boy takes 894 damage.
After Battle: Ton winks at you with his giant central eye.
You gain 144 Meat
You acquire an item: stone baseball cap
You acquire an item: ovoid leather thing
You acquire an item: chunk of rock salt
You gain 15 Muscleboundness
You gain 34 Wizardliness
You gain 11 Cheek

Edit: Setting up a very basic macro in KoL itself works, but you'd want to add in other safeguards I suspect. Not sure why the skill isn't working within a CCS itself though:

Actual basic KoL macro:
Code:
skill point at your opponent
# attack until someone dies
attack
repeat

Edit edit: If I don't set the above KoL macro as an auto-attack, it doesn't work. Ie if I select it from the KoL macros, it doesn't do anything even though I can select the point at your opponent skill from the skills list. So it seems this will only work if it is set as an auto-attack.

Edit edit edit: It looks like it's been discussed:

Posted May 23rd 2010
Gemelli:
I'm calling this a bug; it looks like using the "Point at your opponent" skill on the first round of the macro causes it to choke. CDMoyer has been alerted

I don't see any follow up to that, at least not with "point at your opponent" as the search term.

Note: I tried stasising a round or two before triggering the macro and still nada. So at this point it seems a KoL macro set as your auto-attack works. If it's not your auto-attack, or if it's your mafia CCS, it doesn't work.
 
Last edited:

slyz

Developer
I'm using Mafia's Custom Combat Script.

The problem is that you aren't. Set Action in the Adventure tab to: custom combat script (illustration here).

EDIT: well, at least that was the problem in the first example you posted.

In your second example, the problem is that a CCS will repeat the last command until the end of the fight, so you need to put the 'attack' in there (or anything that you want done until the end of the fight).
 
Last edited:

Spiny

Member
The problem is that you aren't. Set Action in the Adventure tab to: custom combat script (illustration here).

EDIT: well, at least that was the problem in the first example you posted.

In your second example, the problem is that a CCS will repeat the last command until the end of the fight, so you need to put the 'attack' in there (or anything that you want done until the end of the fight).

I'm pretty sure that what Ferdawoon did was correct. He did say:

And yes, I am sure that I have set "Action: Custom Combat Script" and not "Action: attack with weapon" =D

Furthermore, my post above is quite detailed and I duplicated his situation. He is correct. Mafia disregards the Point at your opponent skill when used in a CCS such as he did initially. Furthermore, KoL's combat macro does nothing when it isn't used as an auto-attack. Again, I've clearly documented all this in my post above. The OP's second example, I'm sure, was an effort to troubleshoot the situation with the skill.
 

Ferdawoon

Member
The reason I die and you dont, when replicating the problem, is that my stats are so low that the drunken rat manage to kill me if I just auto-attack them. =S

And yes, I know Mafia will repeat the last action of the script, but I wanted to see what happened if I removed Attack in an attempt to try to brute-force it to use Point at your opponent.

the quote from Gemelli made me think, so I kinda solved it by making it:
[ default ]
attack with weapon
skill point at your opponent
attack with weapon

.. until it is fixed. I tested it and it seems to work now.
 
Top