Automating the Leprecondo

I have a list of Leprecondo items taken from the property leprecondoDiscovered. I split the string by ',', sort it randomly and take the first four, producing a make string. I end up with a final URL, (e.g. choice.php?pwd&option=1&whichchoice=1556&r0=20&r1=5&r2=3&r3=21 ) but submitting it is the issue. Sometimes it works, sometimes it doesn't.

I've tried using the Leprecondo item first. I've tried pre-emptively setting the choice adventure 1556 to 1. I've tried visiting choice with forceoption=0, then the actual choice options. Sadly, I get three tries a day before the Leprecondo is used up, so I'm not making much progress. The problem is compounded by the terrible secret that I don't really know what I'm doing…

print("Final URL is choice.php?pwd&option=1&whichchoice=1556" + makeString);
# use(1, $item[leprecondo]);
# set_property( "choiceAdventure1556", "1");
# visit_url("choice.php?forceoption=0");
visit_url("choice.php?pwd&option=1&whichchoice=1556" + makeString);

Any help would be appreciated, but please don't spend ages on it; it's just an idle whim to randomly cycle the Leprecondo contents every now and then.

 
I am pretty sure you need to visit the 'inv_use.php' before the choice.php My script does this and seems to work:
Code:
    buffer page = visit_url("inv_use.php?whichitem="+to_int($item[Leprecondo]));
    string url = "choice.php?whichchoice=1556&option=1&pwd=";
    url += "&r0="+1;
    url += "&r1="+2;
    url += "&r2="+3;
    url += "&r3="+4;
    print(url,"olive");
    page = visit_url(url,true);
 
Thank you, Crowther and ckb. I gave it a quick try with my final rearrangement for today and it seemed to work. I'll test more thoroughly tomorrow when I get a fresh three attempts.

Many thanks!
 
I'm looking forward to not having to manually configure that thing daily. At least I've memorized the starting characters of each corner. *sigh*
 
Buffer page first, then using POST did the trick; thank you both!

The script currently on pastebin just chooses four random pieces of equipment and puts them in place. ChatGPT helped extract the descriptions from the wiki page, so there's a chance they might be completely and utterly wrong, bless its helpful little heart…
 
Back
Top