Hey guys,
I have been playing KOL for a while now and am getting consistent 3-day-runs as I use always the same pulls and almost always the same route.
Now I want to use a more automated approach, but all ascension scripts I tried do things I do not want or understand (they change my familiars, equip wierd items, etc.).
I want more control over those things, in the exact order I figured out.
For starters I need a pulling script to manage my needed items, so I read a bit in the wiki and tried to write a function I could use later in my own ascension-script.
Would this work?
As I do not know how to use external sources like text files, yet, I wanted to write:
It should always pull 3 different items, 1 of each.
edit: I haven't been programming (C++) for a few years and am more than rusty.
I have been playing KOL for a while now and am getting consistent 3-day-runs as I use always the same pulls and almost always the same route.
Now I want to use a more automated approach, but all ascension scripts I tried do things I do not want or understand (they change my familiars, equip wierd items, etc.).
I want more control over those things, in the exact order I figured out.
For starters I need a pulling script to manage my needed items, so I read a bit in the wiki and tried to write a function I could use later in my own ascension-script.
Would this work?
Code:
boolean try_pull(string it, int pull_amount){
if(storage_amount(it) < pull_amount)
{
print("Not enough "+it+" in Storage.", "red");
if(stash_amount(it) < pull_amount)
{
print("Not enough "+it+" in Clanstash.", "red");
buy_using_storage(pull_amount, it, 75000);
take_storage(pull_amount, it);
}
else
{
print(+it+" taken from Clanstash.", "green");
take_stash(pull_amount, it);
}
}
else
{
print(+it+" taken fom Storage.", "green");
take_storage(pull_amount, it);
}
print(pulls_remaining() "left.")
return true;
As I do not know how to use external sources like text files, yet, I wanted to write:
It should always pull 3 different items, 1 of each.
Code:
void main() {
it = item1;
try_pull(it, 1);
it = item2;
try_pull(it, 1);
it = item3;
try_pull(it, 1);
etc.
return;
}
edit: I haven't been programming (C++) for a few years and am more than rusty.
Last edited: