Pixel Orb Script

So, the other tiny project that deceptively appeared at first to be within my skillset is to get the pixel orb after I smash the prism if I pulled an used a 8-bit power magazine to putty ghosts for the digital key.

The logic is fairly simple, it checks retrieve_item for each of the pixel weapons, adventures for whatever you might not have. It buys (@100 meat ea) up to 2 pixel crosses for the boss battle.

Currently, I have it set up to use a custom ccs that is included (txt). I'd like to fix this to use a combat filter instead if that's possible. I tried to modify this code from the wiki that sniffs goth giants, but I kept getting a compiling error saying it was missing a return value on the same line as the closing bracket. There is also an issue with can I use a combat filter, because the boss fight isn't a location, it's a visit_url, which seems to suggest there might be away that run_combat() is involved, but alas, so far, I'm pretty stumped. So I'd really appreciate any comments or suggestions.
 

Attachments

Last edited:
Pixel crosses are 100 meat in the mall (about 10000 at that price), so you should never adventure for them. Technically retrieve_item is controlled by user settings, but that would still be a big waste of adventures. Maybe do retrieve_item, and if it fails then check that historical_price returns 100, then buy 2 of them?
 
Hmmm, I had to change my ccs to this

Code:
//../ccs/vanya.ccs

[ default ]
skill entangling noodles
item pixel cross
skill saucegeyser
item pixel cross
skill saucegeyser

Something about not having 2 crosses flying around at the same time. Mafia also hung upon entering the adventure.. it printed out

Encounter: Vanya's Creature

then i had to open the relay browser to finish. Might have been because of the bad ccs. Will try again in 4 days.
 
Couldn't you just turn this:
Code:
if (!retrieve_item( 2, $item[pixel cross])) {
if (historical_price($item[pixel cross])==100)
buy (2-item_amount($item[pixel cross]), $item[pixel cross], 100);
else
add_item_condition(2-item_amount($item[pixel cross]), $item[pixel cross]);
adventure(my_adventures(), $location[chapel]);
}
into this for a simpler buy?
Code:
if (!retrieve_item( 2, $item[pixel cross])) {
 if (buy(2-item_amount($item[pixel cross]), $item[pixel cross], 100) < 2-item_amount($item[pixel cross])) {
  add_item_condition(2-item_amount($item[pixel cross]), $item[pixel cross]);
  adventure(my_adventures(), $location[chapel]);
 }
}
Basically, if the buy doesn't return the full amount requested, THEN adventure.

Also, the current script has a bug... regardless of whether you buy or add the condition, it adventures. If you buy, it just adventures without any stopping point. Need either the change above, or brackets around the add_item_condition/adventure lines.
 
Ok, that makes sense. It did run all the way up to the battle for me last night, but I had the morningstar and the 2 crosses in Hagnk's, so retrieve_item() passed and skipped all the rest. Your way is definately better.

I really do appreciate all the help and suggestions. I often describe my scripting skills as "just enough to get me into trouble". I don't make any bones about not being super awesome like most of y'all. It takes me several attempts and usually at least one complete rewrite to get *anything* to run even remotely close to the way I envision. :)
 
Back
Top