Noob Needs help!

freebase

New member
Hey there I'm in the middle of trying to teach myself to code but having 2 problems I need to overcome.

First off I keep getting "This turtle rocks" TT non-com and it won't accept the turtle and move on it just continues to to spam the non-com.
Secondly my script is not updating my mood as I go how would I ensure that it checks if my mood is fully completed??


If anyone replies, much appreciated! Thanks in advance
 

Bale

Minion
If you are using adventure() in an ash script or adv* in a CLI, then it should solve both those problems. If you are not, then please tell me what you are actually doing.

For the first problem, it could fail if choiceAdventure941 is not properly set. The default value is 1, but it could have gotten set miss-set somehow, please test it by copy/pasting the following line into the CLI (capitalization counts, so please copy/paste);
get choiceAdventure941

For the second problem, I'd really need to know more about your script to figure out how it would fail to update your mood. I suspect some sort of mood misconfiguration. Does it update your mood during manual or automatic adventuring when you don't use a script?
 

freebase

New member
Choice 941=1

Yes my mood always updates otherwise, only during this script use does it not.

I've sent you a PM.
 

Bale

Minion
Got your script and I see why you aren't using the adventure function.

Since you are using visit_url() instead of adventure(), mafia will not do any of the incredibly convenient stuff you are used to enjoying during regular adventuring. To get around that problem you need to be able to recognize a non-combat and manually activate your mood and other stuff. Another script which has the exact same problems and solved them admirably is guyy's TrickTreat. You could learn a few things from it. Here's the most relevant points in short:

After each adventure, you need to do all the stuff that mafia normally does after an adventure. You didn't mention that your script also isn't healing, but I suspect it is not. A function like this would work:


Code:
void post_combat_junk()
{
	string aas = get_property("afterAdventureScript");
	string bbs = get_property("betweenBattleScript");
	if (aas != "")
		cli_execute("call "+aas);
	cli_execute("mood execute");
	cli_execute("burn extra");
	if (bbs != "")
		cli_execute("call "+bbs);
	restore_hp(0);
	restore_mp(0);
}

That leaves us with the problem of recognizing your noncombat adventures. Looking at your script I'm sure you have the skill to implement a page.contains_text() and then a visit_url() to solve the problem. I'll answer more specific questions if I am unclear.
 
Top