summaryrefslogtreecommitdiff
path: root/npc/003-9/scripted.txt
blob: 752775c9390ae5a36b1de3c24aea20cb722556c4 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// TMW2 scripts.
// Author:
//    Jesusalva
// Description:
//    Scripted functions (Lua)

003-9,58,121,0	script	#TInnClockPassage	NPC_NO_SPRITE,{
    dispbottom l("If I only could find another way in...");
    close;

OnInit:
    .sex = G_OTHER;
    .distance = 3;
    end;
}

003-9,0,0,0	script	#TulimInnStory	NPC_HIDDEN,{
    end;

OnEvent1:
	.@mapn$="tinn@"+getcharid(0);
    @tinn_assa=monster(.@mapn$, 47, 56, "???", Assassin, 1);
    @tinn_boss=monster(.@mapn$, 48, 56, "???", HoodedAssassin, 1);
    unitwalk(@tinn_boss, 40, 47);
    addtimer 400, .name$+"::OnEvent2";
    end;

OnEvent2:
	.@mapn$="tinn@"+getcharid(0);
    setunitdata(@tinn_boss, UDT_SPEED, 190); // So they walk at same pace
    setunitdata(@tinn_assa, UDT_SPEED, 190); // So they walk at same pace
    unitwalk(@tinn_assa, 40, 48);
    addtimer 1860, .name$+"::OnEvent3"; // Roughly 9/11 tiles time
    end;

OnEvent3:
	.@mapn$="tinn@"+getcharid(0);
    //unitwarp(@tinn_boss, .@mapn$, 40, 47);
    sc_start(SC_STUN, 17240, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, @tinn_boss);
    unittalk(@tinn_boss, l("*hurry up, your moron!*"));
    addtimer 440, .name$+"::OnEvent4"; // Roughly 2/11 tiles time
    end;

OnEvent4:
	.@mapn$="tinn@"+getcharid(0);
    //unitwarp(@tinn_assa, .@mapn$, 40, 48);
    sc_start(SC_STUN, 22000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, @tinn_assa);
    unittalk(@tinn_assa, l("*sorry, boss!*"));
    //atcommand("@refresh"); // Can't use @commands at block 255
    addtimer 2000, .name$+"::OnEvent5";
    end;

OnEvent5:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_boss, l("*is everything ready?*"));
    addtimer 2000, .name$+"::OnEvent6";
    end;

OnEvent6:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_assa, l("*Yes, boss!*"));
    addtimer 1500, .name$+"::OnEvent7";
    end;

OnEvent7:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_boss, l("*Don't shout, you moron!*"));
    addtimer 2000, .name$+"::OnEvent8";
    end;

OnEvent8:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_assa, l("*Yes, boss!*"));
    addtimer 2000, .name$+"::OnEvent9";
    end;

OnEvent9:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_boss, l("*I'll give you two energy balls.*"));
    addtimer 1000, .name$+"::OnEvent10";
    end;

OnEvent10:
	.@mapn$="tinn@"+getcharid(0);
    @tinn_ball=monster(.@mapn$, 41, 47, l("Energy Ball"), EnergyBall, 1);
    @tinn_ba11=monster(.@mapn$, 41, 48, l("Energy Ball"), EnergyBall, 1);
    sc_start(SC_STUN, 11500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, @tinn_ball);
    sc_start(SC_STUN, 11500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, @tinn_ba11);
    setunitdata(@tinn_ball, UDT_SPEED, 200); // So they walk at same pace
    setunitdata(@tinn_ba11, UDT_SPEED, 200); // So they walk at same pace
    addtimer 2000, .name$+"::OnEvent11";
    end;

OnEvent11:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_boss, l("*Don't fail me. If you do, ensure you're well past dead before.*"));
    addtimer 2800, .name$+"::OnEvent12";
    end;

OnEvent12:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_assa, l("*Yes, boss!*"));
    addtimer 1500, .name$+"::OnEvent13";
    end;

OnEvent13:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_boss, l("*I'll take my leave, then.*"));
    unitwalk(@tinn_boss, 47, 56);
    addtimer 2200, .name$+"::OnEvent14";
    end;

OnEvent14:
	.@mapn$="tinn@"+getcharid(0);
    unitwarp(@tinn_boss, "boss", 22, 22);
    unitkill(@tinn_boss);
    addtimer 200, .name$+"::OnEvent15";
    end;

OnEvent15:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_assa, l("*hehehe...*"));
    addtimer 800, .name$+"::OnEvent16";
    end;

OnEvent16:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_assa, l("*The Professor will never know what got him...*"));
    addtimer 2000, .name$+"::OnEvent17";
    end;

OnEvent17:
	.@mapn$="tinn@"+getcharid(0);
    unittalk(@tinn_assa, l("*hehehe...*"));
    unitwalk(@tinn_assa, 47, 56);
    addtimer 200, .name$+"::OnEvent18";
    end;

OnEvent18:
    unitwalk(@tinn_ball, 47, 56);
    unitwalk(@tinn_ba11, 48, 56);
    addtimer 2000, .name$+"::OnEvent19";
    end;

OnEvent19:
	.@mapn$="tinn@"+getcharid(0);
    unitwarp(@tinn_assa, "boss", 22, 22);
    unitwarp(@tinn_ball, "boss", 22, 22);
    unitwarp(@tinn_ba11, "boss", 22, 22);
    unitkill(@tinn_assa);
    unitkill(@tinn_ball);
    unitkill(@tinn_ba11);
    addtimer 200, .name$+"::OnEvent20";
    end;

OnEvent20:
    dispbottom l("*are they gone...?*");
    addtimer 1000, .name$+"::OnEvent21";
    end;

OnEvent21:
    setpcblock(255, false);
    dispbottom l("I better report this to Lua!");
    LUA_ASKED_TO_SLEEP=false;
    end;
}