Combat Script

AltEnd

New member
Hello all. I was wondering if anyone knew of a Mafia script that could help me here. Simple idea really. I just want a script that will run away from a specific creature when encountered in an area, I just don't know how to write it. (The area in question is the Boss Bat's lair, the creature I'm wanting to run away from is the Boss Bat. Basically I want to adventure in the Lair still and don't want to kill him yet.)
Thanks for any help.
 

jasonharper

Developer
Just add the following to your CCS:
Code:
[ boss bat ]
run away

[ bodyguard bat ]
default
The second section is needed in this particular case; otherwise, the [boss bat] section would match both the Boss Bat (by monster name) and the Bodyguard Bats (by location name).
 

slyz

Developer
You can use a Custom Combat Script (CCS), like this one:

Code:
[ default ]
1: attack with weapon

[ boss bat ]
1: try to run away

Set that up in the custom combat tab, choose 'custom combat script' as your Action, and you're good to go.

If you want to do something more elaborate like deciding to run if you have ode on and bander runaways left, it's possible too but it doesn't look like what you were shooting for.

For more info: http://kolmafia.sourceforge.net/combat.html

Edit: I didn't know about the location name thing, jasonharper's advice is the one to listen to. Your CCS would look like this:


Code:
[ default ]
1: attack with weapon

[ boss bat ]
1: try to run away

[ bodyguard bat ]
default
 
Last edited:

xKiv

Active member
Actualy, you can match just on "the boss bat" ...

Code:
[ default ]
1: attack with weapon

[ the boss bat ]
1: try to run away

(location is just "boss bat's lair", without the "the")
 
Last edited:
Top