Ejemplo n.º 1
0
global func FxIntCyclopsAITimer(object cyclops, proplist fx, int time)
{
	if (!fx.cyclops)
	{
		fx.cyclops = cyclops;
		fx.weapon = cyclops->FindContents(Club);
	}
	if (!fx.eye) fx.eye = FindObject(Find_ID(CyclopsEye));

	fx.time = time;
	
	// do not idle
	var effect = GetEffect("IntWalk", fx.cyclops);
	if (effect) effect.idle_time = 0;
	
	fx.eye->SetPosition(fx.cyclops->GetX() -4 + fx.cyclops->GetDir() * 8, fx.cyclops->GetY() - 19);

	// Find an enemy
	if (fx.target) if (!fx.target->GetAlive() || (!fx.ranged && ObjectDistance(fx.target) >= fx.max_aggro_distance)) fx.target = nil;
	if (!fx.target)
	{
		if (!(fx.target = CyclopsFindTarget(fx))) return CyclopsExecuteIdle(fx);
	}

	// Attack it!
	return CyclopsExecuteMelee(fx, time);
}
Ejemplo n.º 2
0
func Dlg_Newton_3(object clonk)
{
	if (clonk->FindContents(Axe))
	{
		MessageBox("$Newton5$", clonk, clonk); // nope. where r trees?
		SetDialogueProgress(5);
	}
	else
	{
		MessageBox("$Newton3$", clonk, clonk); // nope. where is axe?
	}
	return true;
}
Ejemplo n.º 3
0
public func Dlg_Iolo(object player)
{
	var has_dialogue_arrow = player.dialogue_iolo_arrow
	                     && !player.dialogue_iolo_has_arrow;
	                     
	var has_dialogue_elevator = GetActiveSequence()
		                     && GetActiveSequence().seq_name == "Iolo_Elevator";
		                     
	var has_dialogue_iolo = player.dialogue_guardsman_elevator // same as in Iolo's father dialogue
	                    && !player.dialogue_iolo_arrow;  // talked to guardsman about the elevator

	
	                     
	if (has_dialogue_arrow)
	{
		var arrows = player->FindContents(BombArrow);
		DlgText("$DlgIoloA01$");
		if (arrows)
		{
			DlgText("$DlgIoloA02$", player);
			DlgText("$DlgIoloA03$");
			if (DlgEvent())
			{
				arrows->RemoveObject();
				player.dialogue_iolo_has_arrow = true;
				StartSequence("Iolo_Elevator", 0, this, player);
			}
		}
		else
		{
			DlgText("$DlgIoloA04$", player);
		}
	}
	else if (has_dialogue_elevator)
	{
		DlgText("$DlgIoloB01$");
		DlgText("$DlgIoloB02$", player);
		if (DlgEvent())
		{
			StopSequence();
		}
	}
	else if (has_dialogue_iolo)
	{
		var in_sequence = GetActiveSequence()
		               && GetActiveSequence().seq_name == "Iolo_Comes";
		if (!in_sequence)
		{
			DlgText("$DlgIoloC01$");
			// from father dialoge
			DlgText("$DlgIoloFatherA10$", player);
			DlgText("$DlgIoloFatherA11$", player);
			DlgText("$DlgIoloFatherA12$", player);
			DlgText("$DlgIoloFatherA13$");
			// end of father dialoge
			DlgText("$DlgIoloC02$");
			if (DlgEvent())
			{
				StartSequence("Iolo_Comes", 0, this, player, true);
			}
		}
		else
		{
			DlgText("$DlgIoloC03$");
			if (DlgEvent())
			{
				player.dialogue_iolo_arrow = true;
				StopSequence();
			}
		}
	}
	else
	{
		DlgText("$DlgIoloD01$");
		DlgText("$DlgIoloD02$", player);
		DlgText("$DlgIoloD03$");
	}
}