Advice on getting started with this script idead I have?

JohnnyRamrod

New member
All,

I'm hoping for some advice. A couple of qualifiers:

1. this isn't a script request - i want to learn, not beg for someone to write it for me
2. i have a specific thing in mind that is annoying me, and i'm sure it's 'scriptable' but have no idea if it will be difficult or not as i'm very new to this

So, onto the concept.

I am currently spending some time adventuring each day by simply using spices on monsters in the castle mainly to get free MP regen (the meat is nice too!) and then casting either brickos or candy hearts, whichever takes my fancy at the time.

I'm trying to get the most out of my 1100-1200 MP without too much cost for regen. The process I'm happy with, and I have a nice simple CCS that uses spices until around round 24 and then attacks. But I want to build some 'smarts' into what I'm doing. Typically it takes between about 2 and 10 adventures to regen the MP. I'd like to not have to sit around and watch and wait and then stop the queue when the MP has regen'd. I'd rather have a script that can cast the skill for me when i have enough MP and also stop adventuring when my next skill cast would cost more MP than i have.

The main question is: Is this possible and 'reasonably' simple or are there script limitations that would make this impossible?
The second question: If i'm going to have a crack at writing this, is someone able to point me at the types of functions I'd need to look at?

Any early direction or thoughts would be appreciated, or even pointing me to a script that has some similar functions that i might be able to learn from.

Cheers!
 

heeheehee

Developer
Staff member
1: It'd be doable, I guess. My first guess would be through either a Between-battle script or an unconditional mood trigger.

2: As always, ashref is your friend.
This wiki page should help, and to end adventuring, toss in an abort().
 

StDoodle

Minion
I have yet to try it myself, but I would recommend looking at zarqon's SmartStasis. Seriously, zarqon is a talented scripter, and by the it looks like this script will help with a decent chunk of what you're doing (and as an added bonus, it looks like it will do so in the most server-friendly way possible).

I'm not sure about the rest, but I wouldn't be at all surprised if the answers were buried in that thread somewhere.
 

JohnnyRamrod

New member
thanks to you both. i'll take a look. And StDoodle, the server-friendly point is well made. it was always something i was wondering about. while what i'm proposing is hardly ground-breaking strategy, it does have a few impacts i'd like to keep as minimal as possible from a server perspective.

thanks again, and i'll see how i go. i'm sure i'll be posting again looking for a few specific pointers when i do something wrong and it doesn't quite work as i hoped! :)
 

JohnnyRamrod

New member
ok, smart stasis definitely gets the restore job done, and does so far more elegantly than i could have.

i also think i've worked out how to check MP and cast brickos or candys as i need them.

but i'm not quite sure how to knit them together.

i notice heeheehee that you mentioned either a between battle or an unconditional mood.

for the restore i have just done the following:

while ( my_maxmp() >= mp_cost($skill[Summon BRICKOs]) )
{

if ( my_mp() < mp_cost($skill[Summon BRICKOs]) )
exit;

use_skill(1, $skill[Summon BRICKOs]);
}

i figure if i can trigger this between each fight i'm fine - it either casts brickos or doesn't can i stick that restore component in a mood that triggers between each fight and then just goes onto the next fight and calls smart stasis as usual from CCS? i have never used moods and documentation i've fouind on them seems not very helpful for a noob like me.

Any thoughts?
 

Bale

Minion
Actually, that exit is a bit out of place. It is better to skip the exit and just check to see if my_mp() >= mp_cost($skill[Summon BRICKOs])

Yes, you can put that in a mood. On the theory that a picture is worth a thousand words, here's an example of how a mood works. My usual mood even includes a script called in exactly the same way you want yours.

betweenBattleMood.png
 

JohnnyRamrod

New member
oh wow - it's as simple as a call of the script just like in CCS! that is extremely helpful, and thanks for the heads up on the exit.

problems solved, another happy kol player who has gained some life back!

thanks for the help all!
 
Here is another option. Not as elegant, but it works reasonably well for me and requires no external scripts.

1) Use my custom CCS to do the Spices Stasis thing for 25 rounds. No change here.

2) Make sure I checked "Libram of Love Song" for breakfast. I dont really want it for breakfast, but it does enable the next function.

3) Under the HP/MP Recovery tab, select Auto-Buff until X percent, where X is whatever you choose. (0% if you want all mana to be used towards Summons.).

4) Make sure you have auto-recovery enabled in your Preferences (a 1 time check). I keep this on, as I have all the boxes unchecked, all recovery off, and simply control the autobuffing by the Percentage pulldown above.

Then I autoadventure with my Mimic/Starfish/etc.

Mafia will check before every fight. If my mana is above X percent and my mana above that percent is enough to cast Summon, then it will. Otherwise it will not Summon and do that fight. This means that I minimize the overkill mana during those 25 round fights, as this only starts to become a problem when the Summon starts costing almost as much as my max MP.
 
Last edited:
Top