Pasta Guardians

me259259

Member
How do you script the summoning of a pasta guardian?

I feel silly to ask such a simple question, normally I can figure these things out for myself. I didn't see the answer on the wiki, and looking at other CCS gave me the impression that it was a fairly complicated process. Is there an easy to summon those guys that I'm not seeing?
 

Bale

Minion
me259259, if you want to put the summoning in a CCS rather than a macro as Theraze was advising you then the command you're looking for is "summon pastamancer ghost". You can find a complete list of CCS commands HERE.

I beleive the confusion was because you said you wanted to "script" the summoning of a pasta guardian. SmartStasis / BatBrain is kinda an obsessive interest for many scripters on this forum right now (including me) because it's just so darn neat in the way it uses scripted macro commands to replace CCS.
 

me259259

Member
Unfortunately, I realize now that I misspoke/miswrote... What I meant to say was that I'm trying to summon a Pasta Guardian in a consult script, not a CCS... I forget that they aren't the same thing... D'oh!

I was hoping to avoid using macros in my consult script for now. Not because they're not awesome (because they are), but I don't have the time right now to devote learning how to macrofy with mafia. Even if it turns out to be really simple... I'm still in my ascent of becoming a real programmer, and I still have a lot of basic concepts to master before I can start dabbling in that.

Is there an easy way to summon a pasta guardian in a consult script besides using a macro?
 

me259259

Member
Wait, I thought "return" is used when stopping a function, and getting a value from that function.

Maybe I'm still causing confusion, here's the code I'm currently working with:

CCS: ConsultCombatScript.ash

PHP:
boolean mysticalFighter ()
	{
//this section plugs my mysticality into the damage formulas for the spells to determine how much damage each spell will deal
	if (have_skill($skill[ravioli Shurikens]) == True)
		ravioliShurikensDamage = ravioliDamage();
	if (have_skill($skill[cannelloni Cannon]) == True)
		cannelloniCannonDamage = cannelloniDamage();
	if (have_skill($skill[stuffed Mortar Shell]) == True)
		stuffedMortarShellDamage = stuffedDamage();
	if (have_skill($skill[weapon Of The Pastalord]) == True)
		weaponOfThePastalordDamage = pastalordDamage();
	if (have_skill($skill[fearful Fettucini]) == True)
		fearfulFettuciniDamage = fetticiniDamage();
	if (have_skill($skill[stringozzi Serpent]) == True)
		stringozziSerpentDamage = serpentDamage();
	//note to self, add sauceror logic later
		
	if (have_skill($skill[Entangling Noodles]) == True && my_mp() > 3)
		use_skill($skill[Entangling Noodles]) ;
	
	//if haven't summoned my spice ghost 10 times yet... get to it!
		//if (get_property("pastamancerGhostName") != 0)
			//if (get_property("pastamancerGhostSummons") < 10)
				// ???
	// monsterHealth = monster_hp();
	while (monsterHealth > 0)
	if (my_class() == $class[pastamancer])
		{
		if (my_maxmp() < 7 && my_mp() < 7)
			{
			use_skill($skill[spaghetti spear]) ;
			monsterHealth -= spaghettiSpearDamage;
			}
		if (monsterHealth <= ravioliShurikensDamage && have_skill($skill[ravioli shurikens]) == True)
			{
			use_skill($skill[ravioli shurikens]);
			monsterHealth -= ravioliShurikensDamage;
			}
		if (monsterHealth <= cannelloniCannonDamage && have_skill($skill[Cannelloni Cannon]) == True)
			{
			use_skill($skill[Cannelloni Cannon]);
			monsterHealth -= cannelloniCannonDamage;
			}
		if (monsterHealth <= stuffedMortarShellDamage && have_skill($skill[Stuffed Mortar Shell]) == True)
			{
			use_skill($skill[Stuffed Mortar Shell]);
			monsterHealth -= stuffedMortarShellDamage;
			}
		if (monsterHealth <= weaponOfThePastalordDamage && have_skill($skill[Weapon of the Pastalord]) == True)
			{
			if (have_skill($skill[Fearful Fettucini]) && weaponOfThePastalordDamage < fearfulFettuciniDamage)
				{
				use_skill($skill[Fearful Fettucini]);
				monsterHealth -= fearfulFettuciniDamage;
				}
			else
				{
				use_skill($skill[Weapon of the Pastalord]);
				monsterHealth -= weaponOfThePastalordDamage;
				}
			}
		if (monsterHealth <= fearfulFettuciniDamage && have_skill($skill[Fearful Fettucini]) == True)
			{
			use_skill($skill[Fearful Fettucini]);
			monsterHealth -= fearfulFettuciniDamage;
			}
		if (monsterHealth <= cannelloniCannonDamage*3 && have_skill($skill[Cannelloni Cannon]) == True)
			{
//why cannelloniCannonDamage*3, but only use skill once?  To use cannelloni cannon for mp efficiency, and not cause a weird looping error
			use_skill($skill[Cannelloni Cannon]);
			monsterHealth -= cannelloniCannonDamage;
			}
		if (monsterHealth <= ravioliShurikensDamage*3 && have_skill($skill[ravioli shuriken]) == True)
			{
			use_skill($skill[ravioli shuriken]);
			monsterHealth -= ravioliShurikensDamage;
			}	
		if (monsterHealth <= stringozziSerpentDamage*2 && have_skill($skill[Stringozzi Serpent]) == True && monster_element() == $element[none])
			{
			use_skill($skill[Stringozzi Serpent]);
			monsterHealth -= stringozziSerpentDamage;
			}
		else if (monsterHealth <= stuffedMortarShellDamage*2 && have_skill($skill[Stuffed Mortar Shell]) == True)
			{
			use_skill($skill[Stuffed Mortar Shell]);
			monsterHealth -= stuffedMortarShellDamage;
			}
		if (monsterHealth >= fearfulFettuciniDamage && have_skill($skill[fearful fettucini]) == True && weaponOfThePastalordDamage < fearfulFettuciniDamage)
			{
			use_skill($skill[fearful fettucini]);
			monsterHealth -= fearfulFettuciniDamage;
			}
		else if (monsterHealth >= weaponOfThePastalordDamage && have_skill($skill[Weapon of the Pastalord]) == True )
			{
			use_skill($skill[Weapon of the Pastalord]);
			monsterHealth -= weaponOfThePastalordDamage;
			}
		}
 

slyz

Developer
The original purpose of a consult script is to return the action you want Mafia to execute.

In your case, you need to figure out the url corresponding to a pasta ghost summon and visit_url() it.
 

Bale

Minion
All combat consult script functions are on our wiki HERE! Unfortunately there is no function to summon a pastamancer ghost. I guess there just wasn't enough interest in that, dunno? Since there is no function you can create one with a visit_url(). The command you want is this:

PHP:
visit_url("fight.php?action=summon")
 

me259259

Member
All combat consult script functions are on our wiki HERE! Unfortunately there is no function to summon a pastamancer ghost. I guess there just wasn't enough interest in that, dunno? Since there is no function you can create one with a visit_url(). The command you want is this:

PHP:
visit_url("fight.php?action=summon")

Aha! Now I don't feel nearly as stupid as before. After checking the in-combat consulting page, and the master function list... I assumed that there was a function, but I just couldn't figure out what it would be called. Never even occurred to me that there might not be a function =D.

Anyway, thank you!
 
Top