summaryrefslogtreecommitdiff
path: root/npc/081-2/logic.txt
blob: 9b3949ba91ee0bbf695ae54be6720513658e333f (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
// TMW Script.
// Author:
//    Jesusalva
// Notes:
//    Christmas 2021 - Northen Lights Dungeon

081-2,90,20,0	script	#0812Nexit	NPC_HIDDEN,0,0,{
    end;
OnTouch:
    if (!isChristmas21()) end;
    .@id = X21ID();

    /* We need to determine if instance exists and is needed */
    .@t = X21TYPE();
	.@mapa$="0812@"+X21ID2();
	.@mapn$="0813@"+X21ID2();
    .@inst = instance_create("Northen Lights", .@id, .@t);
    // Instance must be created
    if (.@inst >= 0) {
        // We... Could use base name, actually, but whatever
        instance_attachmap("081-2", .@inst, false, .@mapa$);
        instance_attachmap("081-3", .@inst, false, .@mapn$);
		instance_set_timeout(1800, 1800, .@inst);
		instance_init(.@inst);
    }

    warp .@mapn$, 44, 49;
    // FIXME: Cleanup if inst returns -4
    //doevent instance_npcname("Pentagram#Xmas21A", .@inst)+"::OnClean";
    end;
}