Junkyard sidequest script

iniquitous

New member
Auto completes the junkyard sidequest.
Compatible with either side.
Checks for outfit and quest completion so that it doesn't get run innapropriately.

Now supports multiple items and easy modification to use the items you'd like.

I will attempt to script the other NS13 quest areas for my own use and post here as I consider them done.

Otherwise enjoy.

Version 2 - Multiple item support (If you encounter any issues with this feature, let me know what doesn't work)
Version 3 - Fixed minor error (Added missing semi-colon)
 

Attachments

  • junkyard.ash
    3.8 KB · Views: 299
I'm looking forward to seeing this as well, since you have to stasis the gremlins, and that tedium certainly merits scripting.

I find I usually use the spectre sceptre to wait, because you get the occasional heal and you probably have completed the hidden city by this point. However, the sceptre does do a bit more damage than tt/spices/etc., so you could kill the gremlin before round 30.

Since we haven't seen the script, would it be easily customizable to change the action to using the custom combat script? Then we could set whatever action we wanted.

Cheers.
 

iniquitous

New member
Apparently I fail at life...
Will be fixed right after I post this.
For my excuse I'll say it was late and I was tired. Yeah, that's the ticket.

As far as easily customizable goes, it's not exactly easily customizable, i.e. you'd have to know some basic scripting to change it. I think it could be made a bit easier but I'll have to figure out how to accomplish that before I implement any such thing. And as far as customizable without going in and editing the script, I don't even know where to start. If you have any ideas on how this can be done feel free to share.
 
Looking at the script, I think an easy thing to do (and perhaps an important thing as well, since you may not always have a turtle totem) would be to pick three or four "stasis" items (turtle totem, spices, seal tooth, facsimile dictionary, dictionary, joy buzzer, etc.) and have the script pick one to use based on what you have in your inventory.

In other words, the logic would be be

  • [li]if I have a facsimile dictionary, throw the dictionary and exit the selection process[/li]
    [li]if I have a joy buzzer, throw the joy buzzer and exit the selection process[/li]
    [li]if I have spices, throw the spices and exit the selection process[/li]
    [li]if I have a turtle totem, throw the turtle totem and exit the selection process[/li]

etc.

You could just put them in the order you prefer, and then the only thing anyone else would have to do to customize is change the order of the list.
 

iniquitous

New member
I have a revision with support for 5 items that can be easily changed. As soon as I make sure I haven't messed anything up then I'll release the updated script here.
 

izchak

Member
I've hacked up your script, iniquitous, and produced this unholy abomination. (Actually it isnt an abomination, I'm quite happy with it).

This version attempts to slap flyers on monsters, in addition to choosing the stasis items automatically, based upon what you have. For what its worth, I default on scepter stasis as the best strategy. In my experience, monsters that have the item generally drop it fast, too fast for scepters to kill them too soon.
This is easily changable, though.
The items I try to use for gremlin stasis, in order, are: spectre, dictionary, spices, sealtooth, turtle totem.
This script *should* work for those without funkslinging, although I haven't tested it for a character without funk.
It also switches outfits about, as you only need the war outfits to talk to yossarian, and not to adventure in the subzones. The adventuring outfit I use is a custom outfit called "normal". This is easy to change.
Finally, I shieldbutt everything. When the script detects that the monster can't drop one of the required items, it calls a function called normal_attack(), which tries to shieldbutt the monster.

If you want to use this script, the things you will need to change are: (these are all located at the top of the script)

  • [li]boolean frat = true: Set this to false if you're doing this quest as a war hippy.[/li]
    [li]string advoutfit = "normal" : Change this string to the name of your saved custom outfit used for beating up gremlins.[/li]
    [li]item stasisitem : Change this to the item (s) you prefer stasising the gremlins with. I funksling two scepters at them. Its safe to leave this as-is, it will only use items you actually have.[/li]
    [li]int hp_safety = 40; : When your HP hits this threshold (in combat), it will stop stasising, and call normal_attack() in an attempt to end combat.[/li]
    [li]int hp_heal = 200; : Post combat, if your HP is at or below this threshold, it call call 'restore HP', to invoke mafias heal settings. This is used because I override mafias autoadventuring in order to stasis these gremlins properly.[/li]
    [li]int mp_restore = 30; : Post combat, if your MP is at or below this threshold, it will call 'restore mp' to restore your MP using your mafia defaults for MP restoration.[/li]
    [li]And finally, this function. This is used to terminate combats without stasising.
    [/li]
Code:
string normal_attack() {
	return use_skill($skill[shieldbutt]);
}
Now, I realize that many people dont shieldbutt everything that moves, but I do. I'm not going to attempt to rebuild FightOptimizer.ash here, so I will leave it to you to insert your own combat strategy. Its quite possible to insert some kind of noodle-spell-spell option by adding a boolean hasnoodled global and checking that. And resetting it at the right spot, of course. If you are having issues adding your combat strategy to this, PM me, or better yet, reply to this post stating your problem.

EDIT: it should work for even those without flyers now.

EDIT2: It should properly flyer every monster now, and there is now some MP restoration going on.
 

Attachments

  • junkyard.ash
    9.4 KB · Views: 142

iniquitous

New member
Something that would be nice to add to this if possible is the between combat auto-recovery ability. But since I'm not using adventuring do to the nature of the area, it doesn't trigger automatically. So what I'm asking is there some function or other way to call that particular script. I guess the other way that this could be approached would be through a better understanding of how the auto-adventuring in the areas with multiple sub-sections works to see if it's possible to find a way to do it using the adventure function. Any assistance is much appreciated.
 

izchak

Member
Well, the script already has an HP restoration system. I presume you want to restore mp as well?
Its pretty easy to add in a 'int MP_restore' alongside 'HP_heal', and have it function in a similar manner.
I'll add it later today or tomorrow, when I have some spare time.

As for using mafias adventuring system, that would be nice, but its not really feasible as we need to stasis the gremlins properly. The other alternative to this style of script would be two separate scripts, one to talk to yossarian and determine where to adventure, and a separate, custom combat script for the gremlins, which would stasis them properly. That way is considerably more cumbersome to install and use, but it would have the advantage of using mafias built-in adventuring system, along with the benefits of automatic HP/MP/Mood maintenance.
In any event, custom combat scripts are currently broken, as far as I can tell (unless a new daily build has fixed them), and this script works for me. *shrug*
 

iniquitous

New member
Actually I was wondering about the same thing you were for your script, namely if it was possible to explicitly call mafia's between adventure script which includes healing and whatnot. On a completely unrelated note, why are you quoting Eddie Izzard in your script?
 

izchak

Member
Why Izzard? Because its funny! Also, I had just watched some izzard on youtube before I wrote that part of the script.

On a completely unrelated note, I uploaded a junkyard script with HP and MP restoration. Mp restoration works just like HP restoration. Post combat, it checks the 'MP_restore' integer. If current MP is less than MP_restore, it calls 'cli_execute(restore mp)'. I set it to 30 MP, feel free to change it to whatever you want.
Apart from the MP restoration, theres no significant change between this and the first version I posted.
 

holatuwol

Developer
[quote author=iniquitous link=topic=1197.msg5715#msg5715 date=1189381051]
Actually I was wondering about the same thing you were for your script, namely if it was possible to explicitly call mafia's between adventure script which includes healing and whatnot.[/quote]

No, but you can simulate it.

PHP:
cli_execute( "mood execute" );
restore_hp( 0 );
cli_execute( "burn extra mp" );
restore_mp( 0 );

if ( my_hp() == 0 )
    abort( "Insufficient health to continue (auto-abort triggered)." );
 

hippymon

Member
Directed towards Izchak's script:
Code:
# use the magnet to grab an item. throw a flyer too, if we can
# even if we've already thrown a flyer. Who cares?
If you use the flyers more than once the monster will hit you for about 40-50 hp. For my script, I changed it to use it only once. I am just letting you know in-case you wish to change this..
 

izchak

Member
If you throw a magnet and a flyer, it ends the combat, so the 'free flyer hit' should be negated by the magnet ending combat. Right?

I seem to recall thats how it works, but I could be wrong. The last time I manually threw flyers or magnets was a long time ago :p
 

hippymon

Member
True, but what if one does not posses funkslinging? It simply continues to through the rock band flyers and the monster repeatedly hits one's life points..
 

izchak

Member
Code:
if(funk && using_flyers) { url=throw_items(flyer, magnet); flyered = true; }
else url=throw_item(magnet);

Well, if you lack funkslinging, and the monster has the item, it'll just throw the magnet.
This does introduce the possibility of the monster using the item, and you throwing a magnet without first flyering the monster, but IMHO, thats better than potentially wasting a turn (or more) waiting for the item to appear again.
 
Top