Rinn's Quest Scripts

Theraze

Active member
Ah... Yes, the original version was the one you listed, with the visiting of lair3 and checking for lair4... but that one was going into infinite hedge-loops for me. Your second bit of code looks lovely though. I was wondering if \" would work... wasn't sure, and with a cat already driving me crazy, didn't feel like generating a new fail-point. :)
 

Theraze

Active member
Few more tweaks... these ones go in Level 8.ash to make the cold weather checks actually work properly.

First, on the cold protection, it fails due to the special characters in the regexp checking. I replaced the full text line with the following check, basically truncating it before the first period. You can search for "protect yourself" and just delete from the period to the quotation mark and that will make it actually match properly.
Code:
   if (contains_text(visit_url("questlog.php?which=1"),"The Tr4pz0r wants you to find some way to protect yourself from the cold"))

Second issue... it checks backwards near the end. Instead of looking to see if you have cold resistance and if so, continuing onwards, it checks to see if you have no cold resistance and if so, considers itself to be a success. Change the if/else string around "from any source" to the following. Only the first line changes, from == to > to make it continue if you DO have cold resistance, instead of trying to do it if you don't.
Code:
    if (elemental_resistance($element[cold]) > 0.0)
    {
     visit_url("trapper.php"); 
    }
    else
    {
     print("Failed to gain cold resistance from any source.");
    }

Main other changes I've made in my personal copies is anytime it needs to adventure to get an outfit because it can't buy or pull it, do it without asking. I know I'm going to need another swashbuckling outfit every HC run I make... I don't need to confirm it. Same goes for mining gear...
 

Theraze

Active member
Okay... here's my updated version of Unlock Temple.ash that should work with the current system. I haven't gotten to finish running it yet, but it got through the first two of the choice adventures properly. To make it less confusing for people just grabbing this, I implemented the run_choice part of Find Adventures (imported by QuestLib) directly into the top of the script. To make it 'fit' the rest of the scripts better, remove the run_choice function and replace it with importing QuestLib again.

The way it ran for me today follows:
[43] Spooky Forest
Encounter: bar
Round 0: Theraze loses initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: bar takes 5 damage.
You gain 14 Meat
You gain 1 Enchantedness
[44] Spooky Forest
Encounter: bar
Round 0: Theraze loses initiative!
You lose 1 hit point
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: bar takes 9 damage.
You gain 16 Meat
You gain 1 Strongness
[45] Spooky Forest
Encounter: wolfman
Round 0: Theraze loses initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: wolfman takes 4 damage.
You gain 11 Meat
You gain 1 Magicalness
You gain a Mysticality point!
[46] Spooky Forest
Encounter: spooky mummy
Round 0: Theraze wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: spooky mummy takes 7 damage.
You gain 11 Meat
You acquire an item: spooky shrunken head
You gain 1 Fortitude
[47] Spooky Forest
Encounter: spooky mummy
Round 0: Theraze loses initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: spooky mummy takes 5 damage.
You gain 9 Meat
You acquire an item: dried face
You gain 1 Muscleboundness
[48] Spooky Forest
Encounter: wolfman
Round 0: Theraze wins initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: Theraze attacks!
Round 3: Theraze attacks!
Round 4: wolfman takes 5 damage.
You gain 10 Meat
You gain 1 Smarm
[49] Spooky Forest
Encounter: spooky vampire
Round 0: Theraze loses initiative!
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: spooky vampire takes 5 damage.
You gain 4 Meat
You gain 1 Wizardliness
[50] Spooky Forest
Encounter: Arboreal Respite
Encounter: Consciousness of a Stream
You gain 300 Meat
You acquire an item: tree-holed coin
[51] Spooky Forest
Encounter: warwelf
Round 0: Theraze loses initiative!
You lose 1 hit point
(unable to macrofy due to action: consult SmartStasis.ash)
Round 1: Theraze executes a macro!
Round 1: Theraze attacks!
Round 2: warwelf takes 5 damage.
You gain 11 Meat
You gain 1 Strongness
[52] Spooky Forest
Encounter: Arboreal Respite
Encounter: Through Thicket and Thinnet
Encounter: O Lith, Mon
You acquire an item: Spooky Temple map
 

Attachments

  • Unlock Temple.ash
    2.5 KB · Views: 48
Last edited:
so... i'm incredibly lazy and often use the individual scripts for each level, but OH THE NOES! now i need to do level 3 for myself! its a tragedy of epic proportions >.>

any chance someone with the know-how can update it?
 

Theraze

Active member
Likely what'll happen with Level 3 is that mafia itself will get updated for it so you can just do tavern as you could before. Or someone here will get bored and automate it. Issue with automation is that you can't just click on any old square like you could before. Sometime when I'm actually on Level 3 (or if, y'know, I haven't unlocked the whole cellar) I'll need to pay attention to if anything in the room code says which squares are visited and which are unknown. If there's a good way to find contiguous cells, it should be easy enough to script. Hopefully.
 

Winterbay

Active member
The alt and title texts for the squares are "Explored space (column,row)", "Explore the Darkness (1) (column,row)" and "Darkness (column,row)". I guess you could use that information to find out where you've been, where you can go and where you can't.

ETA: The two availbale spaces when you start are (4,1) and (5,2).
 
Last edited:

Rinn

Developer
I haven't ascended in a while and don't plan to until after crimbo since I just permed every skill again so my ascension scripts aren't going to get much work done on them.
 

Theraze

Active member
If I actually manage to get my Level 2, 3, and 11 scripts fully sorted, I may post my current versions of Rinn's scripts as a pack. Few changes, mostly in that if it fails to acquire the outfits automatically, it will begin adventuring for them immediately, no additional waiting. Level 2 needs to have manual overrides for the Mosquito... should be quite easy (and updated after next rollover). Level 3 will be more work... probably use some odd version of the Mr. Alarm code that I've been enjoying with the Hidden Temple unlock to check for action type. Level 11 should be fine, just need to verify that the choiceadv is realizing it's found the Alarm in the right point now. Should be fine... basically just needed to have it run_choice after finding Mr Alarm, but I'll verify before posting.

For Level 13, I use the built-in function entryway to start it off. Once it finishes the entryway, I use Level 13 to finish things off, since it automates the rest of things quite well. Might have it check for/construct a wand if none are available, but... eh.

Edit: Actually, I think I could probably make the Tavern work quite easily if Rinn doesn't mind me tagging variables with name... If I make a Rinn_Tavern_Ascension, Rinn_Tavern_Row, and Rinn_Tavern_Column variable, Level 3 should be easily scriptable.

Edit2: Eh, nevermind that. Long as I don't care too much, I think we can hijack the actual Tavern variables, at least until automated handling works properly again. Just takes either flopping left/right for row count, or working in a % 5 system going backwards. Probably end up working in the % 5, since that's more similar to the actual KoL numbers. Only real question is whether or not to save what we've found or just to find the faucet and turn it off. Probably start with a simple solve, and move on to more features later. If it's needed. :)
 
Last edited:

Rinn

Developer
If you update/fix anything I'll update the first post with them. I dunno what files you modified so far.
 

Theraze

Active member
So far, changed files are Artist, Doc Galaktik, Level 1, Level 10, Level 11, Level 13, Level 3, Level 4, Level 5, Level 7, Level 8, Level 9, Pirate, Unlock Temple, and Untinker.

I'm planning on adding Level 2 and maybe Unlock DoD to the list. Unlock DoD has an issue currently where it doesn't get the Plus Sign before it tries to get Teleportitis. Level 2 needs to have the choice bits done, but that should be easy. May end up adding more tweaks eventually, but...
 

Theraze

Active member
Didn't... or at least, couldn't remember my old email I'd linked up. Ah well. Anyways, have an account up now with my (current) script folder in it. I'll need to update it as I work through actually verifying level 2/3 scripts.
[68] Spooky Forest
Encounter: Arboreal Respite
Encounter: The Road Less Traveled
Encounter: Tree's Last Stand
Encounter: spooky sapling
You spent 100 Meat
You acquire an item: spooky sapling
Using 1 Spooky Temple map...
Finished using 1 Spooky Temple map.
Cha-ching. On to the next...
[71] Spooky Forest
Encounter: Arboreal Respite
Encounter: Consciousness of a Stream
You acquire an item: mosquito larva

Conditions satisfied after 3 adventures.
choiceAdventure502 => 0
choiceAdventure505 => 0
You gain 500 Meat
Council of Loathing

Thanks for the larva, Adventurer. Er, actually, y'know what? You look pretty lonely. Maybe you should hatch this larva and keep the mosquito as a pet.

To do so, you'll need a Familiar-Gro [tm] Terrarium at your campsite. You can use this Meat to buy one, if you don't already have one.
You gain 500 Meat.

Also added unlocking Hidden City to Level 11 script.
 
Last edited:

bookworm3429

New member
hello, i'm currently using the pirate.ash script and something peculiar is happening, after every combat adventure the script tries to reset the MCD even though i don't have access to it. Since the reset also includes the 1 second countdown, this is slightly irritating. I tried to act smart and delete the part about resetting the MCD at QuestLib.ash but then the script wouldn't run, so I pasted back everything I cut. Some help please? Heh :)
 

Theraze

Active member
In the QuestLib, try putting
Code:
if (my_ascensions() < 1 || in_bad_moon()) return 0;
above the
Code:
return 10 + ( in_mysticality_sign().to_int() );
line in the int max_mcd() function.
 

Theraze

Active member
Okay, added the plus sign condition to Unlock DoD script. Properly unlocks now. Level 2 should have its choices done as well, though I haven't gotten to test it yet... if NS goes well tomorrow night, should get to run it on that rollover.

Rinn, if you (or anyone else) wants to get linked to my Dropbox, send me a message with the email to link it to, unless there's some other way to do it. Thanks. :)

Only scripts I've tweaked I'd suggest people avoid running without considering consequences are BBB and CC. BBB, for me, is triggering again and wanting to nom its fortune cookie while it's still waiting for it. Not sure what I've done, but I'm guessing it's some consequence of CanAdv or something similar, since it's not a common error.
 
Last edited:

Theraze

Active member
New problem with Level 4 script... Screambat acts like a sonar-in-a-biscuit. Unless mafia starts tracking how many bathole unlocks you've done so far (and I've made a new FReq for that) it'll take an extra server hit every screambat combat/sonar to check on its success...
 

Rinn

Developer
Is that really necessary? Couldn't you just assume that if 'lastEncounter' is set to screambat then a zone was opened?
 

Theraze

Active member
So, how do you detect that with multiple adventures assigned? Can't use the condition of 3 sonars, since that's not really the goal... it's the unlocking of the 3 zones. Could set it to run each adventure individually, checking inventory for sonars and screambats every adventure... but that's not nearly efficient.

Did change my copy to only request as many sonars as it still needs though, so if it doesn't finish off fully, it should just request the 1-3 that still need to unlock...
 

Rinn

Developer
Yeah you'd have to loop and do one adventure at a time, but with the quest changes you're better of switching zones once you start unlocking them so that might actually be better.
 
Top