summaryrefslogtreecommitdiff
path: root/npc/020-2/baktar.txt
blob: a7f5c367950da6c06b3f489d7b64e99f0d34945e (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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
020-2,80,61,0	script	Baktar	NPC191,{
    @npcname$ = "[Baktar]";

    @BIT_KNOWHIM = 0;

    @BIT_DESERTHAT = 1;
    @MONEY_DESERTHAT = 1500;
    @XP_DESERTHAT = 500;

    @BIT_DESERTSHIRT = 2;
    @MONEY_DESERTSHIRT = 1500;
    @XP_DESERTSHIRT = 600;

    @BIT_SERFHAT = 3;
    @MONEY_SERFHAT = 800;
    @XP_SERFHAT = 350;

    @BIT_MS_TONGUE = 4;
    @MONEY_MS_TONGUE = 800;
    @XP_MS_TONGUE = 350;

    @BIT_MS_EGG = 5;
    @MONEY_MS_EGG = 800;
    @XP_MS_EGG = 350;

    @BIT_SNAKESKIN = 6;
    @MONEY_SNAKESKIN = 800;
    @XP_SNAKESKIN = 350;

    @BIT_BUGLEG = 7;
    @MONEY_BUGLEG = 20;
    @XP_BUGLEG = 130;

    @run = ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT);
    if ((@run == 3) && (QL_KYLIAN == 13))
        goto L_Deliver;
    goto L_Start;

L_Deliver:
    menu
        "I have a delivery for you", L_Delivery;

L_Delivery:
    mes "[Baktar]";
    mes "\"Ahh my delivery from Tulimshar, how nice it is to get some comforts from back home.\"";
    QL_KYLIAN = 14;
    goto L_close;

L_Start:

    if(QL_BAKTAR & (1<<@BIT_KNOWHIM)) goto L_KnowAlready;
        mes @npcname$;
        mes "\"Hello, did you come from Tulimshar? Because you have a nice tan. \"";
    menu
        "Yes, I'm from Tulimshar", L_exotic,
        "Well, I just like sunbathing", L_close,
        "Good bye", L_close;

L_KnowAlready:
    mes @npcname$;
    mes "\"I love Tulimshar's stuff. I'm collecting souvenirs from Tulimshar to help remind me of all the great times I had there. If you give me an interesting item from the area, I'll give you a nice reward. So, you have a new item?\"";
    goto L_Startitem;

L_exotic:
    mes @npcname$;
    mes "\"I said that because I love Tulimshar's stuff...I'm collecting souvenirs from Tulimshar to help remind me of all the great times I had there. If you give me an interesting item maybe I can give you a nice reward. But I don't need a lot, I just need one of each item.\"";
    menu
        "I have some items on me maybe you'll like them ", L_Startitem,
        "Don't touch my stuff!", L_close,
        "I'll get them. Bye.", L_close;

L_Startitem:
    setarray @exotic_item$, "", "", "", "", "", "", "";
    @c = 0;
    QL_BAKTAR = QL_BAKTAR | (1<<@BIT_KNOWHIM);
    if (countitem("DesertHat") < 1 || QL_BAKTAR & (1<<@BIT_DESERTHAT) ) goto L_DesertShirt;
    @exotic_item$[@c] = "a Desert Hat ?";
    @menuid[@c] = 0;
    @c = @c + 1;
    goto L_DesertShirt;

L_DesertShirt:
    if (countitem("DesertShirt") < 1 || QL_BAKTAR & (1<<@BIT_DESERTSHIRT) ) goto L_SerfHat;
    @exotic_item$[@c] = "a Desert Shirt ?";
    @menuid[@c] = 1;
    @c = @c + 1;
    goto L_SerfHat;

L_SerfHat:
    if (countitem("SerfHat") < 1 || QL_BAKTAR & (1<<@BIT_SERFHAT) ) goto L_tongue;
    @exotic_item$[@c] = "a Serf Hat ?";
    @menuid[@c] = 2;
    @c = @c + 1;
    goto L_tongue;

L_tongue:
    if (countitem("MountainSnakeTongue") < 1 || QL_BAKTAR & (1<<@BIT_MS_TONGUE)) goto L_egg;
    @exotic_item$[@c] = "a Mountain Snake Tongue ?";
    @menuid[@c] = 3;
    @c = @c + 1;
    goto L_egg;

L_egg:
    if (countitem("MountainSnakeEgg") < 1 || QL_BAKTAR & (1<<@BIT_MS_EGG)) goto L_Skin;
    @exotic_item$[@c] = "a Mountain Snake Egg?";
    @menuid[@c] = 4;
    @c = @c + 1;
    goto L_Skin;

L_Skin:
    if (countitem("SnakeSkin") < 1 || QL_BAKTAR & (1<<@BIT_SNAKESKIN)) goto L_bugleg;
    @exotic_item$[@c] = "a Snake Skin?";
    @menuid[@c] = 5;
    @c = @c + 1;
    goto L_bugleg;

L_bugleg:
    if (countitem("BugLeg") < 1 || QL_BAKTAR & (1<<@BIT_BUGLEG)) goto L_NeverMind;
    @exotic_item$[@c] = "a Bug Leg?";
    @menuid[@c] = 6;
    @c = @c + 1;
    goto L_NeverMind;

L_NeverMind:
    @exotic_item$[@c] = "Nevermind";
    @menuid[@c] = 6;
    menu
        @exotic_item$[0], L_MenuItems,
        @exotic_item$[1], L_MenuItems,
        @exotic_item$[2], L_MenuItems,
        @exotic_item$[3], L_MenuItems,
        @exotic_item$[4], L_MenuItems,
        @exotic_item$[5], L_MenuItems,
        @exotic_item$[6], L_MenuItems;

L_MenuItems:
    @menu = @menu -1;

    if (@menuid[@menu] == 0) goto L_DesertHat_Item;
    if (@menuid[@menu] == 1) goto L_DesertShirt_Item;
    if (@menuid[@menu] == 2) goto L_SerfHat_Item;
    if (@menuid[@menu] == 3) goto L_tongue_Item;
    if (@menuid[@menu] == 4) goto L_egg_Item;
    if (@menuid[@menu] == 5) goto L_skin_Item;
    if (@menuid[@menu] == 6) goto L_BugLegItem;
    mes @npcname$;
    mes "\"Ok, goodbye then.\"";
    close;

L_DesertHat_Item:
    if(QL_BAKTAR & (1<<@BIT_DESERTHAT)) goto L_havealready;
    if (countitem("DesertHat") < 1) goto L_NoItem;
    delitem "DesertHat", 1;
    Zeny = Zeny + @MONEY_DESERTHAT;
    getexp @XP_DESERTHAT,0;
    QL_BAKTAR = QL_BAKTAR | (1<<@BIT_DESERTHAT);
    close;

L_DesertShirt_Item:
    if(QL_BAKTAR & (1<<@BIT_DESERTSHIRT)) goto L_havealready;
    if (countitem("DesertShirt") < 1) goto L_NoItem;
    delitem "DesertShirt", 1;
    Zeny = Zeny + @MONEY_DESERTSHIRT;
    getexp @XP_DESERTSHIRT,0;
    QL_BAKTAR = QL_BAKTAR | (1<<@BIT_DESERTSHIRT);
    close;

L_SerfHat_Item:
    if(QL_BAKTAR & (1<<@BIT_SERFHAT)) goto L_havealready;
    if (countitem("SerfHat") < 1) goto L_NoItem;
    delitem "SerfHat", 1;
    Zeny = Zeny + @MONEY_SERFHAT;
    getexp @XP_SERFHAT,0;
    QL_BAKTAR = QL_BAKTAR | (1<<@BIT_SERFHAT);
    close;

L_tongue_Item:
    if(QL_BAKTAR & (1<<@BIT_MS_TONGUE)) goto L_havealready;
    if (countitem("MountainSnakeTongue") < 1) goto L_NoItem;
    delitem "MountainSnakeTongue", 1;
    Zeny = Zeny + @MONEY_MS_TONGUE;
    getexp @XP_MS_TONGUE,0;
    QL_BAKTAR = QL_BAKTAR | (1<<@BIT_MS_TONGUE);
    close;

L_egg_Item:
    if(QL_BAKTAR & (1<<@BIT_MS_EGG)) goto L_havealready;
    if (countitem("MountainSnakeEgg") < 1) goto L_NoItem;
    delitem "MountainSnakeEgg", 1;
    Zeny = Zeny + @MONEY_MS_EGG;
    getexp @XP_MS_EGG,0;
    QL_BAKTAR = QL_BAKTAR | (1<<@BIT_MS_EGG);
    close;

L_skin_Item:
    if(QL_BAKTAR & (1<<@BIT_SNAKESKIN)) goto L_havealready;
    if (countitem("SnakeSkin") < 1) goto L_NoItem;
    delitem "SnakeSkin", 1;
    Zeny = Zeny + @MONEY_SNAKESKIN;
    getexp @XP_SNAKESKIN,0;
    QL_BAKTAR = QL_BAKTAR | (1<<@BIT_SNAKESKIN);
    close;

L_BugLegItem:
    if(QL_BAKTAR & (1<<@BIT_BUGLEG)) goto L_havealready;
    if (countitem("BugLeg") < 1) goto L_NoItem;
    delitem "BugLeg", 1;
    Zeny = Zeny + @MONEY_BUGLEG;
    getexp @XP_BUGLEG,0;
    QL_BAKTAR = QL_BAKTAR | (1<<@BIT_BUGLEG);
    close;

L_NoItem:
    mes @npcname$;
    mes "\"Well, if you happen to get items from Tulimshar, see me first before you sell anything.\"";
    close;

L_havealready:
    mes @npcname$;
    mes "\"I already collected what you can offer me.\"";
    close;

L_close:
    close;
}