View Full Version : Pagoda Quest script
t4kato
10-20-2010, 08:04 AM
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!
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:
if ( get_campground() contains $item[ pagoda plans ] ) return true;
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
10-20-2010, 08:23 AM
Thanks slyz and Bale. I added the campground thing. That's exactly the kind of advice I was looking for. :p
If you'd like another cute trick to make your code more efficient/compact:
foreach doodad in $items[guitar pick, heavy metal sonata, heavy metal thunderrr guitarrr, Elf Farm Raffle ticket, ketchup hound]
retrieve_item(1, doodad);
t4kato
10-20-2010, 08:35 AM
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
int[int] i;
i[0] = 1;
i[1] = 2;
i[2] = 3;
is rather unwieldy...
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:
int[int] i;
i[0] = 1;
for n from 1 to 5
i[n] = i[n-1] + 1;
Winterbay
10-20-2010, 09:19 AM
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:
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
10-20-2010, 09:26 AM
This is relevant to a Dungeon Fist script. Currently, my dungeon script looks like:
string str = "31111111111111111111111111111121121111111111111111 11111111121111111111111111121112221111112111111111 1111111122211133111113";
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. :/
Powered by vBulletin® Version 4.2.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.