summaryrefslogtreecommitdiff
path: root/npc/003-0/mainquest.txt
blob: be32fc93508300c00fa30d7139724f4802659a73 (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
74
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Main Quest

003-0,49,35,0	script	#MQ25Trigger	NPC_HIDDEN,3,0,{
    end;

OnTouch:
    .@m$=getmap();
    .@n$=instance_npcname(.name$);
    if (is_night())
        doevent instance_npcname(.name$)+"::OnBegin";
    else
        addtimer 1000, instance_npcname(.name$)+"::OnCheck";
    end;

// Checks if you are in designated ambush zone. If not, keep hidden
OnCheck:
    .@m$=getmap();
    .@n$=instance_npcname(.name$);
    if (!isin(.@m$, 44, 24, 54, 34))
        end;
    // goto OnBegin;

// Begin
OnBegin:
    .@m$=getmap();
    .@n$=instance_npcname(.name$);
    dispbottom col(l("SCRIPT ERROR (%s/%s)", .@m$, .@n$), 1);
    end;

OnInit:
    disablenpc .name$;
    end;

OnInstanceInit:
    if (is_night()) {
        .@n$=instance_npcname("Professor#003-0");
        enablenpc .@n$;
    }
    end;
}

003-0,49,24,4	script	Professor#003-0	NPC_PLAYER,{
    npctalkonce l("I wonder if it'll take too long for the ship to arrive...");
    end;

OnTouchNPC:
    npctalk ("SCRIPT ERROR (OnTouch Game Over)");
    end;

OnInit:
    .@ini=true;
OnInstanceInit:
    if (.@ini)
        .@npcId = getnpcid(.name$);
    else
        .@npcId = getnpcid(instance_npcname(.name$));

    setunitdata(.@npcId, UDT_HEADTOP, GraduationCap);
    setunitdata(.@npcId, UDT_HEADMIDDLE, GraduationRobe); // TODO: Bathrobe
    setunitdata(.@npcId, UDT_HEADBOTTOM, Slippers); // Hey hey!
    setunitdata(.@npcId, UDT_WEAPON, CottonGloves);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 4);

    .sex=G_MALE;
    .distance=5;
    disablenpc .name$;
    end;
}