View Full Version : Daily adventure script
asturia
04-04-2006, 08:49 AM
I've wrote a script that does different things:
Eat my daily food
adventure
create items and sell them to the mall
perform the needed buffs
performs sleep ritual
this happens for my 3 characters.
for 1 character (asturia) a lot more things happens:
same as above
use the new knob laboratory buffs
print out how much meat I made
sells stuff at the bounty hunter
use red/blue/green snowcone during adventuring
I only tested parts of the script so it is functional about 90%
Presto Ragu
04-06-2006, 04:37 AM
I looked over your script, finally.
I have commented in it on a few things that didn't seem right to me. I did not actually change anything. Just made my comments.
After you alter it as much as you will, I recommend putting it back up again so others can look it over. Someone else might notice things I didn't.
asturia
05-12-2006, 06:32 AM
it took a while but I changed a lot in my script.
take a look and make good use of it.
Presto Ragu
05-12-2006, 07:09 AM
I have looked it over and two things stand out at me:
1) In the function "breakfast()" you have a loop that reads
while (my_mp() < 70)
{
use (1, $item[phonics down]);
}
If you ever plan on ascending, you might want to put in an additional check there to make sure you do not sit and use up all of your phonics downs. Something like
if( my_maxmp() > 69)
{
while (my_mp() < 70)
{
use (1, $item[phonics down]);
}
<<everything else>>
}
Now, if you are sure you will never have less that 70 maxMP, no need to change anything.
And,
2) In the function "trader()" you have this code block
if ( bounty_hunter_wants( $item[hippopotamus skin]))
{
Bounty = $item[hippopotamus skin];
trap = true;
}
if ( trap)
{
trade_trapper( Bounty);
trade_bounty_hunter( Bounty);
}
It makes me wonder why you even have two checks? You could remove the variable trap, and the check for it by doing the following:
if ( bounty_hunter_wants( $item[hippopotamus skin]))
{
Bounty = $item[hippopotamus skin];
trade_trapper( Bounty);
trade_bounty_hunter( Bounty);
}
You could even remove the Bounty variable if you chose.
Or, of course, I could be dense and miss something that is obvious....
But that is my suggestions.
The rest of it looks sound. And as long as it works for you, that is the important thing. :D
efilnikufecin
05-13-2006, 08:38 AM
I noticed an attempt to block over drinking with the if command
if (my_inebriety() < 12)
{
* * * * * * * * buy (3, $item[grog]);
buy (3, $item[lime]);
buy (2, $item[shot of tomato schnapps]);
use (2, $item[shot of tomato schnapps]);
}
while (my_inebriety() < 14)
{
use (1, $item[grogtini]);
create (1, $item[grogtini]);
}
scenario:
the script completes the use (2, $item[shot of tomato schnapps]); command then when it tries to use 1 grogtini it crashes for some reason. You attempt to re-run the script, it will drink 2 more shots of tomato schnapps bringing you to 4 drunkness. Next it will drink a grogtini bringing you to 10, then since that is less than 14, it will drink another bringing you to 16 (I assume 16 is falling down drunk for that character. There are many ways to fix this problem. 1 easy way is to drink the TPS drinks first, with a tigther leash on inebriety.
if(my_inebriety() < 9)
{
* * * * * * * * buy ((14 - my_inebriety()) / 6, $item[grog]);
buy ((14 - my_inebriety()) / 6, $item[lime]);
* * * * * * * * }
while(my_inebriety() < 9)
{
create (1, $item[grogtini]);
use (1, $item[grogtini]);
}
Will:
calculate how many grogs and limes to buy based on inebriety
create and use the grogtinis 1 at a time to attain >= 9 inebriety (normally 12)
adding:
if (my_inebriety() < 14)
{
buy (14 - my_inebriety(), $item[shot of tomato schnapps]);
use (14 - my_inebriety(), $item[shot of tomato schnapps]);
* * * * * * * * }
will finish your drinking off.
Drinking 1 drunkness drinks first would require me to put a little more thought into it, but most people don't care which order they drink in.
Hmm, My icy peak script buys and uses 1 item at a time. I think I need to do a little revamp. Thanks for making me think* :P
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.