AlvitrValkyrie
Member
I've looked at bounty.ash for some inspiration, and have come across this following bit of code. I'm supposing its at least in part responsible for the little popup box that asks you what you want to do. Still very confused. Could someone give me a pointer to a resource or just a pointer in general? Ultimately what I want to do is set up a script that will call other scripts based on what you input into the little box. While not particularly useful, I think it'll be cool and a good learning experience.
Code:
void main(string param) {
if (count(bounty) == 0) vprint("Bounty hunt already completed today.",-3);
else if (initiallucre != item_amount($item[filthy lucre])) vprint("You just turned in your bounty.",-3);
else switch (param) {
case "list": return;
case "cancel":
case "abort": if (count(bounty) == 1 && cancel_bounty()) vprint("Bounty hunt canceled.",2); return;
case "hard":
case "best": accept_best_bounty(false); return;
case "smallest":
case "small": accept_best_bounty(true); return;
case "go":
case "*": if (hunt_bounty()) vprint("Bounty hunt successful.",3);
else vprint("Bounty hunt failed.",-2); return;
default: print_html("<b>Usage:</b><p>bounty.ash {go|*}<br>bounty.ash list<br>bounty.ash {best|small|hard}<br>bounty.ash {abort|cancel}");