Ascend.ash: hands-off ascension script

HasteBro

Member
I was wondering, is there a way to make it logout after the "good night" message? I usually end up leaving mafia logged in for a whole day when I forget to logout XD
 

Bale

Minion
The CLI command is: logout
In ASH that would be: cli_execute("logout");

Put that at the end of the script.
 

playhavock

New member
Dumb question, but are you using FirstThingsFirst or SmartStasis? You need one or the other to handle pirate insulting.

umm. i do?
well... no i dont have those i figured everything i would require is in this package -i guess i will have to download one of them. @_@;
 

dj_d

Member
No, you don't need FTF or SS (although I highly recommend both because they're great). The script insults pirates by itself.

PH, first I need to understand what the script should be doing, and why you think it should be insulting pirates. If you're too low level, for example, or if you haven't eaten yet, it will address those issues before insulting pirates. It might "try" to adventure in the Barrr as a way to level up, for example, and either fail or succeed, but not be insulting pirates regardless.

What you showed me is that its eating, which it is supposed to do before it does anything else. Show me where it's stuck. Does it crash? If so, show me what comes before the crash. If it's not stuck, then be patient - it may be doing things in a different order than you supposed it should.
 

HasteBro

Member
The CLI command is: logout
In ASH that would be: cli_execute("logout");

Put that at the end of the script.

Putting it at the end of the script caused it to logout when the script was called. Also putting it right after the "goodnight" message didn't work at all, since I don't have almost any coding experience I really don't know if it needs something more to make that work.
 
If the script has a main function (i.e. void main) then the cli_execute("logout"); line should be the last line in the main function:

Code:
void main(){
...random code...
cli_execute("logout");
}

else just putting it at the end of the script should work.
 

dj_d

Member
Actually, the last line is an abort, so that won't work - put it right before the line that says
abort("Goodnight...
 

dj_d

Member
Have you READ my code? Clearly not, or you wouldn't be asking me a question about good coding practices.
 

Bale

Minion
I got the joke, especially since my own comment was also meant as a joke. Of course, I'm an habitual commenter, so we are definitely in opposite camps here. :)
 

dj_d

Member
I write comments! Like, "This should be recursive but I'm lazy." or, "TODO: unf* this." or "This shouldn't work, but it does. Stepping away from the keyboard."
 

zarqon

Well-known member
PLAYHAVOCK YOU NEED THE WARPLAN FILES (SUCH AS OPTIMAL.TXT) TO BE IN MAFIA'S DATA DIRECTORY AND YOU CAN SPECIFY WHICH WARPLAN TO USE BY EDITING THE OCW_WARPLAN FIELD IN YOUR VARS_MYNAME.TXT FILE, AND THERE IS MORE DOCUMENTATION ON THE OCW SCRIPT (WHICH GENERATED THAT ERROR) HERE.

I tend to only write comments if I'm sure that even I wouldn't understand the code when looking at it the following day! (Comments make the file bigger! slower downloads! less efficient!) I guess that puts me squarely opposite Bale -- and I'd say dj_d is somewhere in the middle given that spectrum.
 

cakyrespa

Member
I tend to only write comments if I'm sure that even I wouldn't understand the code when looking at it the following day! (Comments make the file bigger! slower downloads! less efficient!) I guess that puts me squarely opposite Bale -- and I'd say dj_d is somewhere in the middle given that spectrum.

I'm a heavy commentor in my own code. I think I run about 3 lines of code for every line of comments. Mainly because I never remember where I am plus I still think the world is set at 80 columns. :)
 

playhavock

New member
PLAYHAVOCK YOU NEED THE WARPLAN FILES (SUCH AS OPTIMAL.TXT) TO BE IN MAFIA'S DATA DIRECTORY AND YOU CAN SPECIFY WHICH WARPLAN TO USE BY EDITING THE OCW_WARPLAN FIELD IN YOUR VARS_MYNAME.TXT FILE, AND THERE IS MORE DOCUMENTATION ON THE OCW SCRIPT (WHICH GENERATED THAT ERROR) HERE.

I tend to only write comments if I'm sure that even I wouldn't understand the code when looking at it the following day! (Comments make the file bigger! slower downloads! less efficient!) I guess that puts me squarely opposite Bale -- and I'd say dj_d is somewhere in the middle given that spectrum.

okay copyed everything that i was ment to to the right folder.
-it seems to actualy be doing something now. but its giving me an "you cant put that outfit on" error even though its swtiching outfits anyway. O_O.

I really am in over my head, sorry. V_v;
but - looks like it works even though its having issues with outfits.

I looked at that text file... and after a few moments of not knowing what I was looking at concluded that whatever it did was just fine and ran accend thing.

--- by the way the thing never beat the bosses of alarm and spooky raven , but it did everything else... still , with all the errors its doing a much better job then i could.
 

dj_d

Member
There's a variable that controls whether or not to fight those bosses. When you start getting in to tweaking the configuration you can set it to your liking.

Remember to create an outfit called "melee" and an outfit called "pajamas" for your default outfit and your end-of-day outfit respectively. If you've done that, then don't sweat outfit error messages unless they terminate execution. They can mean something as simple as you're trying to put on something you're wearing already, which is harmless.
 

dj_d

Member
I'm a heavy commentor in my own code. I think I run about 3 lines of code for every line of comments. Mainly because I never remember where I am plus I still think the world is set at 80 columns. :)

You may notice that all of my code
breaks at 80 columns as well. I
think it drives Zarqon nuts when
he reads it.

Then again, I think just about
everything about my code drives
Zarqon nuts when he reads it.
 
Top