Pagoda Quest script

t4kato

New member
This is the first script I will have posted. I looked around for a Pagoda script and didn't see a functional one, so I just made one myself.

It's very simple and checks/collects the items necessary for finishing the Pagoda Quest and then completes the quest. It does not try to adventure for the items, so if you do not have access to the mall/stash, you'll have to collect them yourself. You must get Hey Deze map yourself as well. It only acquires a clover if you're not in Bad Moon.

(So it's mostly just good for the instant you hit aftercore. You probably wouldn't want to build a Pagoda on a serious Hardcore run anyways. :))

Any coding fixes/tips would be greatly appreciated. I'm still unfamiliar with KoLmafia's and .ash's capabilities.

EDIT: Thanks slyz and Bale!
 

Attachments

  • pagoda.ash
    1.3 KB · Views: 216
Last edited:

slyz

Developer
Nice, I'll try it after my next run.

You might want to add a check in case someone who already has a pagoda uses it:
PHP:
if ( get_campground() contains $item[ pagoda plans ] ) return true;
 

Bale

Minion
It's certainly more robust than my pagoda alias: "pagoda => acquire 1 ten-leaf clover; acquire 1 Elf Farm Raffle ticket; use 1 Elf Farm Raffle ticket; use 1 Hey Deze map; use 1 ketchup hound" :D

Nice first script.
 

t4kato

New member
Thanks slyz and Bale. I added the campground thing. That's exactly the kind of advice I was looking for. :p
 
Last edited:

Bale

Minion
If you'd like another cute trick to make your code more efficient/compact:

Code:
foreach doodad in $items[guitar pick, heavy metal sonata, heavy metal thunderrr guitarrr, Elf Farm Raffle ticket, ketchup hound]
   retrieve_item(1, doodad);
 

t4kato

New member
Oh is that how you make "arrays"? I was looking everywhere for some way to make a simple array and fill it with things. How would you just make an array of ints and fill it right away with a bunch of numbers? As

Code:
int[int] i;
i[0] = 1;
i[1] = 2;
i[2] = 3;

is rather unwieldy...
 

slyz

Developer
In Bale's example, I think it should be called a list. Concerning arrays, I think you can't fill an array with a simple command (unless you are copying another array). So you either have to explicitly define each entry, or do things like:
Code:
int[int] i;
i[0] = 1;
for n from 1 to 5
   i[n] = i[n-1] + 1;
 

Winterbay

New member
In Bale's example, I think it should be called a list. Concerning arrays, I think you can't fill an array with a simple command (unless you are copying another array). So you either have to explicitly define each entry, or do things like:
Code:
int[int] i;
i[0] = 1;
for n from 1 to 5
   i[n] = i[n-1] + 1;

Which in the case of 3 entries saves almost nothing but the bigger you make your array the more useful it gets.
 

t4kato

New member
This is relevant to a Dungeon Fist script. Currently, my dungeon script looks like:
Code:
string str = "31111111111111111111111111111121121111111111111111111111111211111111111111111211122211111121111111111111111122211133111113";
for ind from 0 to length(str)-1 { select(substring(str,ind,ind+1)); }
I can't find any other way that wouldn't take a ridiculous amount of space...haha. :/
 
Top