summaryrefslogtreecommitdiff
path: root/npc/boss/throne.txt
blob: d44a63c991be6532f37e519fafb5e3470ea20964 (plain) (blame)
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
// TMW2 Scripts.
// Author:
//  Jesusalva
// Description:
//  Monster King Throne

boss,45,45,0	script	#monsterthrone	NPC_HIDDEN,0,0,{
    end;

OnTouch:
    if (strcharinfo(2) == "Monster King") end;
    warp "boss", 45, 48;
    percentheal -15,0;
    dispbottom "The throne is cursed, only the Monster King may seat on it.";
    end;

// Controls the Event
OnBegin:
    .MK=monster("boss", 45, 45, "The Monster King", MonsterKing, 1, .name$+"::OnVictory");
    .@bhp=getunitdata(.MK, UDT_MAXHP);
    setunitdata(.MK, UDT_MAXHP,    .@bhp+50000+2000*.FAILS);
    setunitdata(.MK, UDT_HP,       .@bhp+50000+2000*.FAILS);

    initnpctimer;
    end;

function CheckFinalAssault {
    if (!siege_calcdiff(5)) {
        kamibroadcast("You noobs, you all deserve to die!", "Monster King");
        stopnpctimer;
        // Clean Up
        mapwarp("boss", "017-1", 120, 88);
        killmonsterall("boss");
        // Raise difficulty
        .FAILS+=1;
        // Halt execution
        end;
    }
    return;
}

OnTimer60000:
    initnpctimer;
OnTimer15000:
    // Each fail raise curse duration in 0.1s - chance of curse is 15% each 15s
    if (rand2(100) <= 15) {
        areasc2("boss", 45, 45, 25, 3000+(.FAILS*100), SC_CURSE, BL_PC | BL_HOM | BL_MER);
        //globalmes("MSG");
        unittalk(.MK, "Be cursed, you fools! I am the mighty Monster King!!");
    }
OnTimer5000:
OnTimer10000:
OnTimer20000:
OnTimer25000:
OnTimer30000:
OnTimer35000:
OnTimer40000:
OnTimer45000:
OnTimer50000:
OnTimer55000:
    CheckFinalAssault();
    end;

}