That FN Ninja
Member
Hi, I'm fairly new to KoL and very new to scripting, but I love KoL and am having fun trying to write simple scripts. I want to thank all of you for your very useful scripts and especially the developers for this great program!!
I am having a few problems with a couple of scripts I've been trying to write.
I'm running Windows XP SP2, Java 1.6.0_11, and KoLmafia v13.3.1.
I made my first farming script but it won't finish combat. Everything seems to work fine until my character loses initiative. Upon initiative loss the combat won't progress; my character doesn't do anything and the rounds just keep going up.
Here's the script:
The gCLI looks like this:

In order to break the loop I open the web browser and manually attack. In witch case I get:
And then the script continues until I lose initiative again. I'm not sure this is even a scripting problem, but I don't know what to do?
Any help would be much appreciated! Thank you.
I am having a few problems with a couple of scripts I've been trying to write.

I'm running Windows XP SP2, Java 1.6.0_11, and KoLmafia v13.3.1.
I made my first farming script but it won't finish combat. Everything seems to work fine until my character loses initiative. Upon initiative loss the combat won't progress; my character doesn't do anything and the rounds just keep going up.
Here's the script:
Code:
void main (){
While( my_adventures() > 0)
visit_url("rats.php?where=1");
}
The gCLI looks like this:
[842] Typical Tavern Quest
Encounter: drunken rat
Round 0: UB3r 31337 HaX0R wins initiative!
Round 1: UB3r 31337 HaX0R attacks! (auto-attack)
Round 1: You gain 16 Meat
Round 1: drunken rat takes 32 damage.
You gain 16 Meat
You acquire an item: rat whisker
You gain 1 Muscleboundness
You gain 2 Mysteriousness
[843] Typical Tavern Quest
Encounter: drunken rat
Round 0: UB3r 31337 HaX0R loses initiative!
[843] Typical Tavern Quest
[843] Typical Tavern Quest
[843] Typical Tavern Quest
[843] Typical Tavern Quest
[843] Typical Tavern Quest
[843] Typical Tavern Quest
[843] Typical Tavern Quest
[843] Typical Tavern Quest

In order to break the loop I open the web browser and manually attack. In witch case I get:
[843] Typical Tavern Quest
Round 19: UB3r 31337 HaX0R attacks!
[843] Typical Tavern Quest
Round 19: You gain 15 Meat
Round 19: drunken rat takes 31 damage.
You gain 15 Meat
You acquire an item: rat whisker
You gain 1 Beefiness
You gain 1 Smarm
Encounter: drunken rat
Round 0: UB3r 31337 HaX0R wins initiative!
Round 1: UB3r 31337 HaX0R attacks! (auto-attack)
Round 1: You gain 13 Meat
Round 1: drunken rat takes 30 damage.
You gain 13 Meat
You acquire an item: rat whisker
You gain 2 Beefiness
You gain 2 Enchantedness
You gain a Mysticality point!
And then the script continues until I lose initiative again. I'm not sure this is even a scripting problem, but I don't know what to do?
