It would help if you told us what you want done, but one way would be to use Zarqon's
First Things First consult script and modify it.
FTF will manage the first round of combat for you, pickpocketing if you are safe (and able to pickpocket) and if the monster drops at least one item. I attached a modified version here that will set the 'stolen' variable to true if you got something from pickpocketing.
You then have to import the modified FTF in a consult script that will use the 'stolen' variable to decide what to do next. I attached an example, PickPocket.ash, that only attacks either way. I used the main() in Zarqon's
SmartStasis, which you might want to check out because of all the usefull things it can do.
All you need to do now is :
- get Zarqon's Zlib here :
http://kolmafia.us/showthread.php?t=2072
- get the attached files, FirstThingsFirst_with_pickpocket.ash and PickPocket.ash
- modify PickPocket.ash to tell it to do whatever you need done in each case
- put all the .ash files in Mafia's script directory
- create a CCS like this :
Code:
[ default ]
1: consult PickPocket.ash
2: attack (or whatever you need to kill the monster after getting you needed done)
and voila !
Don't forget to thank Zarqon: you can send him lots of bats! (Or bat-related items)
Edit: this is untested
Edit2: if you are not familiar with ASH consult scripts, check out the
wiki