summaryrefslogtreecommitdiff
path: root/npc/commands/kami.txt
blob: b4f23dd6bcc68e848d4d41020613f6f6f8f01ec6 (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
65
66
67
68
69
70
71
72
73
// TMW2 Script
//
// @k <message>
// Broadcast, and broadcast to #world too
//
// @servmsg <message>
// Experimental, uses servicemessage() - requires up to date server

-	script	@k	32767,{
    end;

OnCall:
    .@request$ = strcharinfo(0)+": ";
	.@request$ += implode(.@atcmd_parameters$, " ");
    channelmes("#world", .@request$);
    announce l(.@request$), bc_all|bc_npc;
    end;

OnServMsg:
    .@request$ = strcharinfo(0)+": ";
	.@request$ += implode(.@atcmd_parameters$, " ");
    // This can be slow, beware
    .@c = getunits(BL_PC, .@players, 20);
    for (.@i = 0; .@i < .@c; .@i++) {
        message(.@players[.@i], .@request$);
    }
    end;

OnInit:
    bindatcmd "k", "@k::OnCall", 80, 80, 1;
    bindatcmd "servmsg", "@k::OnServMsg", 99, 99, 1;
}

// kamibroadcast( message{, sender} )
function	script	kamibroadcast	{
    .@msg$=getarg(0);
    .@snd$=getarg(1, "");

    // Send to #world
    if (.@snd$ == "")
        channelmes("#world", .@msg$);
    else
        channelmes("#world", "[ "+.@snd$+" ] : "+.@msg$);

    // Make an announce
    if (.@snd$ == "")
        announce .@msg$, bc_all|bc_npc;
    else
        announce .@snd$+": "+.@msg$, bc_all|bc_npc;

    return;
}

// Required for GM use in 2019-04-27
-	script	@mkdbg	32767,{
    end;

OnClock1415:
    if (!$@GM_DEBUGMK20190426)
        end;
    // Game Story Change: Idle MK -> Active MK
    kamibroadcast("I can't handle it anymore! NO MORE!", "Monster King");
    sleep(2500);
    kamibroadcast("Come, my minions! Lay siege to towns! LEAVE NO OPPOSITION TO ME!", "Monster King");
    sleep(2500);
    kamibroadcast("Burn, destroy, do whatever you need, until your last breath, my lieutenants and colonels!", "Monster King");
    sleep(2500);
    kamibroadcast("##4 .:: Game Story Instructions on #world ::.");
    channelmes("#world", "##1 **GAME STORY CHANGE** - The Monster King minions will now attack cities and lay waste to them.");
    channelmes("#world", "##1 Players must defeat the lieutenants and colonels in order to prevent sieges from continuing.");
    end;
}