summaryrefslogtreecommitdiff
path: root/npc/002-2/doors.txt
blob: 0263d87c2e71587f9f4b632ffefa52416b9e34a7 (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
75
76
77
78
79
// TMW2 Script
// Authors:
//  Jesusalva
// 
// Evol scripts.
// Authors:
//    Ablu
//    Alastrim
//    Reid
// 
// Description:
//    Doors NPCs.

002-2,48,29,0	script	DoorUpwards	NPC_HIDDEN,0,0,{

OnTouch:
    if (mobcount("002-2","all") > 0) goto L_Warn;

    goto L_Warp;

L_Warn:
    .@q = getq(ShipQuests_Peter);
    if (.@q == 5) goto L_Warp;

    mesn "Narrator";
    mesc l("There are still some rattos left! Do you want to abort the quest?");
    next;

    menu
        l("Yes."), L_Warp,
        l("No."), -;

    warp "002-2", 48, 28;
    closeclientdialog;
    close;

L_Warp:
    if (LOCATION$ == "") 
        warp "002-1", 72, 36;
    else
        warp "002-1@"+LOCATION$, 72, 36;
    closeclientdialog;
    close;
}

002-2,24,31,0	script	LeftDoor	NPC_HIDDEN,0,0,{

OnTouch:
    dispbottom l("I can't go there now.");
    end;
    mesn "Narrator";
    mesc l("It seems that you need a key to open this door.");
    next;
    mesc l("What do you want to do?");
    next;

    menu
        rif(countitem(718) > 0, l("Use the key.")), L_Warp,
        l("Break the door."), L_Break,
        l("Go away."), -;

    closeclientdialog;
    close;

L_Break:

    mes "";
    mesn "Narrator";
    mesc l("You hear a loud scream. It must be the creaking of the wooden door...");

    close;

L_Warp:
    mes "";
    mesn "Narrator";
    mesc l("Wait, it seems someone is blocking the door from the other side!");

    close;
}