I'm not sure whether this is a bug or something I did wrong, so I'm posting here first for advice.
My clan keeps a rampaging adding machine in our deluxe fax machine. Several years ago I wrote a script to collect the appropriate scrolls, receive a fax, fight the adding machine, and ultimately get a facsimile dictionary to pull during the next softcore ascension. This worked fine for a long time, but somewhere between versions 17.5 and 17.6 it started generating errors and failing, interrupting my ascension script. I've tried different approaches, with the same result: it uses the first scroll (or two if funkslinging) successfully and then complains it doesn't have the last scroll it just used. Here are some snippets of code, CCS, and output from some different variations:
code:
set_auto_attack(0);
use(1,$item[photocopied monster]);
run_combat();
CCS:
[ adding machine ]
item 30669 scroll,33398 scroll
item 64067 scroll,668 scroll
attack with weapon
Autoattack is disabled.
Using 1 photocopied monster
[1041] photocopied monster
Encounter: rampaging adding machine
Round 0: Zitim wins initiative!
Round 1: Zitim uses the 30669 scroll and uses the 33398 scroll!
You acquire an item: 64067 scroll
You don't have enough 33398 scroll
You're on your own, partner.
Click here to continue in the relay browser.
code:
set_auto_attack(0);
use(1,$item[photocopied monster]);
run_combat();
CCS:
[ adding machine ]
item 30669 scroll
item 33398 scroll
item 64067 scroll
item 668 scroll
attack with weapon
Autoattack is disabled.
Using 1 photocopied monster...
[1093] photocopied monster
Encounter: rampaging adding machine
Round 0: Zitim wins initiative!
Round 1: Zitim uses the 30669 scroll!
You don't have enough 30669 scroll
You're on your own, partner.
Click here to continue in the relay browser.
code:
set_auto_attack(0);
use(1,$item[photocopied monster]);
if (item_amount($item[30669 scroll]) > 0 && item_amount($item[33398 scroll]) > 0)
throw_items($item[30669 scroll],$item[33398 scroll]);
if (item_amount($item[668 scroll]) == 0 && item_amount($item[334 scroll]) >= 2)
throw_items($item[334 scroll],$item[334 scroll]);
if (item_amount($item[64067 scroll]) > 0 && item_amount($item[668 scroll]) > 0)
throw_items($item[64067 scroll],$item[668 scroll]);
run_combat();
Autoattack is disabled.
Using 1 photocopied monster...
[1087] photocopied monster
Encounter: rampaging adding machine
Round 0: Zitim wins initiative!
Round 1: Zitim uses the 30669 scroll and uses the 33398 scroll!
You acquire an item: 64067 scroll
You don't have enough 33398 scroll
You're on your own, partner.
Click here to continue in the relay browser.
I read recently that when you trigger a monster from something like a fax, you don't need to use run_combat(), but I tried removing it and got the same result. I only posted the most relevant code in the interest of space, but I can post more if it's of interest. I've looked back at this code and CCS plenty of times, and I can't see what's wrong with it. I'm running Windows 7, and this has been happening with both Oracle Java and now Eclipse Adoptium 17.0.1+12. Any ideas?
My clan keeps a rampaging adding machine in our deluxe fax machine. Several years ago I wrote a script to collect the appropriate scrolls, receive a fax, fight the adding machine, and ultimately get a facsimile dictionary to pull during the next softcore ascension. This worked fine for a long time, but somewhere between versions 17.5 and 17.6 it started generating errors and failing, interrupting my ascension script. I've tried different approaches, with the same result: it uses the first scroll (or two if funkslinging) successfully and then complains it doesn't have the last scroll it just used. Here are some snippets of code, CCS, and output from some different variations:
code:
set_auto_attack(0);
use(1,$item[photocopied monster]);
run_combat();
CCS:
[ adding machine ]
item 30669 scroll,33398 scroll
item 64067 scroll,668 scroll
attack with weapon
Autoattack is disabled.
Using 1 photocopied monster
[1041] photocopied monster
Encounter: rampaging adding machine
Round 0: Zitim wins initiative!
Round 1: Zitim uses the 30669 scroll and uses the 33398 scroll!
You acquire an item: 64067 scroll
You don't have enough 33398 scroll
You're on your own, partner.
Click here to continue in the relay browser.
code:
set_auto_attack(0);
use(1,$item[photocopied monster]);
run_combat();
CCS:
[ adding machine ]
item 30669 scroll
item 33398 scroll
item 64067 scroll
item 668 scroll
attack with weapon
Autoattack is disabled.
Using 1 photocopied monster...
[1093] photocopied monster
Encounter: rampaging adding machine
Round 0: Zitim wins initiative!
Round 1: Zitim uses the 30669 scroll!
You don't have enough 30669 scroll
You're on your own, partner.
Click here to continue in the relay browser.
code:
set_auto_attack(0);
use(1,$item[photocopied monster]);
if (item_amount($item[30669 scroll]) > 0 && item_amount($item[33398 scroll]) > 0)
throw_items($item[30669 scroll],$item[33398 scroll]);
if (item_amount($item[668 scroll]) == 0 && item_amount($item[334 scroll]) >= 2)
throw_items($item[334 scroll],$item[334 scroll]);
if (item_amount($item[64067 scroll]) > 0 && item_amount($item[668 scroll]) > 0)
throw_items($item[64067 scroll],$item[668 scroll]);
run_combat();
Autoattack is disabled.
Using 1 photocopied monster...
[1087] photocopied monster
Encounter: rampaging adding machine
Round 0: Zitim wins initiative!
Round 1: Zitim uses the 30669 scroll and uses the 33398 scroll!
You acquire an item: 64067 scroll
You don't have enough 33398 scroll
You're on your own, partner.
Click here to continue in the relay browser.
I read recently that when you trigger a monster from something like a fax, you don't need to use run_combat(), but I tried removing it and got the same result. I only posted the most relevant code in the interest of space, but I can post more if it's of interest. I've looked back at this code and CCS plenty of times, and I can't see what's wrong with it. I'm running Windows 7, and this has been happening with both Oracle Java and now Eclipse Adoptium 17.0.1+12. Any ideas?