1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
// A fireman which puts out the fires around the village.
#appendto Dialogue
public func Dlg_Fireman_Init(object clonk)
{
clonk->Message("$DlgFiremanOutOfWay$");
AddEffect("IntFireman", clonk, 100, 5, this);
return true;
}
public func Dlg_Fireman_1(object clonk)
{
MessageBox("$DlgFiremanLastFire$", clonk, dlg_target);
return true;
}
public func Dlg_Fireman_2(object clonk)
{
MessageBox("$DlgFiremanGoodJob$", clonk, clonk);
return true;
}
public func Dlg_Fireman_3(object clonk)
{
MessageBox("$DlgFiremanEvilGuys$", clonk, dlg_target);
return true;
}
public func Dlg_Fireman_4(object clonk)
{
MessageBox("$DlgFiremanFurryFriend$", clonk, clonk);
return true;
}
public func Dlg_Fireman_5(object clonk)
{
MessageBox("$DlgFiremanFlagpole$", clonk, dlg_target);
StopDialogue();
SetDialogueProgress(5);
return true;
}
public func Dlg_Fireman_Closed(object clonk)
{
GameCall("OnHasTalkedToFireman", clonk);
return true;
}
public func FxIntFiremanStart(object target, proplist effect, bool temp)
{
if (temp)
return FX_OK;
effect.kill_time = nil;
return FX_OK;
}
public func FxIntFiremanTimer(object target, proplist effect, int time)
{
if (time == 20)
target->SetCommand("MoveTo", nil, 300, 364);
if (effect.kill_time == nil && !target->GetCommand() && time > 50)
{
target->SetDir(DIR_Right);
target->Contents(0)->ControlUse(target, 10, -12);
effect.kill_time = time + 20;
}
if (effect.kill_time != nil && time > effect.kill_time)
{
RemoveAll(Find_ID(Flame), Find_AtRect(AbsX(300), AbsY(300), 140, 100));
return FX_Execute_Kill;
}
return FX_OK;
}
|