View Full Version : Combat Script
AltEnd
01-17-2010, 12:09 AM
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
01-17-2010, 12:29 AM
Just add the following to your CCS:
[ 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).
You can use a Custom Combat Script (CCS), like this one:
[ 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:
[ default ]
1: attack with weapon
[ boss bat ]
1: try to run away
[ bodyguard bat ]
default
Actualy, you can match just on "the boss bat" ...
[ default ]
1: attack with weapon
[ the boss bat ]
1: try to run away
(location is just "boss bat's lair", without the "the")
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.