KoL mafia v14.3 r8702
java 6 update 22 (build 1.6.0_22-b04)
Win XP v5.1 (Build 2600.xpsp_sp3_gdr.100427-1636: SP3)
I am attempting to write this script to farm my 10 daily ducks, puttying the rotund duck if I come across one (via ducks.ccs).
The 3 commented out lines are the beginning of making mafia fight the puttied ducks for me. DWS is my initials and I use them to mark my variable and comments in code so I always know what I wrote and what I borrowed. I have 7 scripts being used for my daily farming right now. DWSAdvToday is a variable I use to know what I have and haven't already done that day. Mostly just to keep me from rerunning a script that worked already when a later script crashes out and I start over.
Yes I recognize the potential for an infinite loop, was hoping that the error of "Nothing more to do here today." would kick it out. Lazy scripting I know, just didn't want to spend the time to write a turn counter is all. On my first attempt to run the script I had
which is what I think it really should be. The script however returned
and stopped running. Which it should have been in the repeat loop and run until it found a rotund duck, or *I assumed* until it crashed out with "Nothing more to do here today." on the 11th attempt as usual.
So I changed the 1 to a 10 without really thinking clearly and ran it, resulting in the script first backing up 64 lines in the gCLI and reformatting them to left aligned and red text on all text that was black, leaving other colors of text their proper color. Then running 9 more adventures in the farm returning proper text in the new alignment. On request 10 it returned the new format but otherwise proper "nothing more..." and then went into the expected infinite loop of request 1 of 10 "Nothing more ..." with new formatting 13 iterations before I hit ESC. Oddly on iteration 7 the text color went back to the proper colors, but the alignment has stayed right instead of left.
Then I posted this. I have no idea what could have possibly changed the text color or alignment, but in case for some really odd reason you also wrote this same really bad script and were about to run it, don't.
java 6 update 22 (build 1.6.0_22-b04)
Win XP v5.1 (Build 2600.xpsp_sp3_gdr.100427-1636: SP3)
I am attempting to write this script to farm my 10 daily ducks, puttying the rotund duck if I come across one (via ducks.ccs).
Code:
cli_execute("concert winklered");
if ((get_property( "demonSummoned" )) == false)
cli_execute("summon preternatural greed");
if ((to_float(item_amount($item [4403]))) == 1)
cli_execute("outfit meatfarming1");
else cli_execute("outfit meatfarming2");
cli_execute("familiar hobo");
if((to_float(get_property( "spookyPuttyCopiesMade" ))) == 5)
{
cli_execute("ccs polys stasis");
print ("No more Putty", "green");
adventure(10 , $location[McMillicancuddy's Farm]);
}
else
{
cli_execute("ccs ducks");
repeat {
adventure(10 , $location[McMillicancuddy's Farm]);
} until (last_monster() == to_monster("Rotund Duck"));
cli_execute("ccs polys stasis");
adventure(10 , $location[McMillicancuddy's Farm]);
## cli_execute("ccs ducks");
## while ((to_float(get_property( "spookyPuttyCopiesMade" ))) < 5 || item_amount($item[Spooky Putty monster]) > 0)
## use(1, $item[Spooky Putty monster]);
set_property( "DWSAdvToday", 5 );
}
if (item_amount($item[Spooky Putty monster]) > 0)
{
print ("You've got a putty duck to kill", "green");
cli_execute("ccs ducks");
}
## DWS cli_execute("call castlefarm.ash");
The 3 commented out lines are the beginning of making mafia fight the puttied ducks for me. DWS is my initials and I use them to mark my variable and comments in code so I always know what I wrote and what I borrowed. I have 7 scripts being used for my daily farming right now. DWSAdvToday is a variable I use to know what I have and haven't already done that day. Mostly just to keep me from rerunning a script that worked already when a later script crashes out and I start over.
Yes I recognize the potential for an infinite loop, was hoping that the error of "Nothing more to do here today." would kick it out. Lazy scripting I know, just didn't want to spend the time to write a turn counter is all. On my first attempt to run the script I had
Code:
repeat {
adventure(1 , $location[McMillicancuddy's Farm]);
} until (last_monster() == to_monster("Rotund Duck"));
which is what I think it really should be. The script however returned
Code:
Visit to Island: McMillicancuddy's Farm in progress...
[96382] McMillicancuddy's Farm
Encounter: zombie duck
Strategy: H:\Mafia\ccs\ducks.ccs [default]
Round 0: fianor wins initiative!
Round 1: fianor executes a macro!
Round 1: fianor uses the seal tooth!
Round 2: Boxcar Cheater climbs up and sits on your shoulder, and hands you some Meat. Huh, where did he find that?
You gain 68 Meat.
You lose 3 hit points
Round 2: fianor attacks!
Round 3: Boxcar Cheater eats a clove of garlic (wait, what's garlic?) and breathes a toxic cloud into its face for 68 damage.
After Battle: Boxcar Cheater sits on your fallen opponent's body, blows a smoke ring, and winks at you.
You gain 986 Meat
After Battle: Boxcar Cheater holds out the plastic pumpkin bucket, hoping for extra goodies.
You gain 8 Beefiness
You gain 27 Mysteriousness
You gain 10 Smarm
Conditions not satisfied after 1 adventure.
and stopped running. Which it should have been in the repeat loop and run until it found a rotund duck, or *I assumed* until it crashed out with "Nothing more to do here today." on the 11th attempt as usual.
So I changed the 1 to a 10 without really thinking clearly and ran it, resulting in the script first backing up 64 lines in the gCLI and reformatting them to left aligned and red text on all text that was black, leaving other colors of text their proper color. Then running 9 more adventures in the farm returning proper text in the new alignment. On request 10 it returned the new format but otherwise proper "nothing more..." and then went into the expected infinite loop of request 1 of 10 "Nothing more ..." with new formatting 13 iterations before I hit ESC. Oddly on iteration 7 the text color went back to the proper colors, but the alignment has stayed right instead of left.
Then I posted this. I have no idea what could have possibly changed the text color or alignment, but in case for some really odd reason you also wrote this same really bad script and were about to run it, don't.
Last edited: