forked from mochja/l2.net-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Craft.l2s
412 lines (390 loc) · 15.4 KB
/
Craft.l2s
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
//-----------------------------------------------
// Created by: Magic
// Version: 1.1
// Release date: 07-08-2010
// v1.1 - added Crafted leather | Corrected crystal S get_id | added High Grade Suede recipe
//
//-----------------------------------------------
//----------------------------------------------//
// PUT 1 IN THE RECS YOU WANT TO CRAFT //
//----------------------------------------------//
DEFINE INT CBP 0
DEFINE INT VOP 1
DEFINE INT MITHRIL_ALLOY 0
DEFINE INT COKES 0
DEFINE INT SYNTETIC_COKES 0
DEFINE INT SOULSHOTS_S 1
DEFINE INT SOULSHOTS_A 0
DEFINE INT SOULSHOTS_B 0
DEFINE INT SOULSHOTS_C 0
DEFINE INT SOULSHOTS_D 0
DEFINE INT BLESSED_SS_S 0
DEFINE INT BLESSED_SS_A 0
DEFINE INT BLESSED_SS_B 0
DEFINE INT BLESSED_SS_C 0
DEFINE INT BLESSED_SS_D 0
DEFINE INT CRAFTED_LEATHER 0
DEFINE INT HIGH_GRADE_SUEDE 0
//----------- DONT EDIT FROM THIS POINT ON UNLESS YOU KNOW WHAT YOUR DOING -------//
//----------------------------------------------//
// MP EACH REC CONSUMES //
//----------------------------------------------//
DEFINE INT CBP_MP 10
DEFINE INT VOP_MP 20
DEFINE INT MITHRIL_ALLOY_MP 40
DEFINE INT COKES_MP 10
DEFINE INT SYNTETIC_COKES_MP 20
DEFINE INT SOULSHOTS_S_MP 150
DEFINE INT SOULSHOTS_A_MP 120
DEFINE INT SOULSHOTS_B_MP 100
DEFINE INT SOULSHOTS_C_MP 84
DEFINE INT SOULSHOTS_D_MP 50
DEFINE INT BLESSED_SS_S_MP 300
DEFINE INT BLESSED_SS_A_MP 240
DEFINE INT BLESSED_SS_B_MP 180
DEFINE INT BLESSED_SS_C_MP 120
DEFINE INT BLESSED_SS_D_MP 60
DEFINE INT CRAFTED_LEATHER_MP 40
DEFINE INT HIGH_GRADE_SUEDE_MP 20
//----------------------------------------------//
// MINIMUM MATS EACH REC CONSUMES //
//----------------------------------------------//
DEFINE INT CBP_ANIMALBONE_COUNT 10
DEFINE INT VOPS_CBP_COUNT 3
DEFINE INT VOPS_VARNISH_COUNT 3
DEFINE INT VOPS_SOP_COUNT 1
DEFINE INT MITHRIL_ALLOY_VOPS 1
DEFINE INT MITHRIL_ALLOY_STEELS 2
DEFINE INT MITHRIL_ALLOY_M_ORE 1
DEFINE INT COKES_CHARCOAL 3
DEFINE INT COKES_COAL 3
DEFINE INT SYN_COKES_COKES 3
DEFINE INT SYN_COKES_ORI_ORES 1
DEFINE INT SOULSHOTS_S_SOULORES 40
DEFINE INT SOULSHOTS_S_CRYSTALS 1
DEFINE INT SOULSHOTS_A_SOULORES 36
DEFINE INT SOULSHOTS_A_CRYSTALS 1
DEFINE INT SOULSHOTS_B_SOULORES 54
DEFINE INT SOULSHOTS_B_CRYSTALS 1
DEFINE INT SOULSHOTS_C_SOULORES 30
DEFINE INT SOULSHOTS_C_CRYSTALS 2
DEFINE INT SOULSHOTS_D_SOULORES 9
DEFINE INT SOULSHOTS_D_CRYSTALS 3
DEFINE INT BLESSED_SS_S_SPIRITORES 50
DEFINE INT BLESSED_SS_S_CRYSTALS 2
DEFINE INT BLESSED_SS_A_SPIRITORES 70
DEFINE INT BLESSED_SS_A_CRYSTALS 2
DEFINE INT BLESSED_SS_B_SPIRITORES 16
DEFINE INT BLESSED_SS_B_CRYSTALS 2
DEFINE INT BLESSED_SS_C_SPIRITORES 30
DEFINE INT BLESSED_SS_C_CRYSTALS 2
DEFINE INT BLESSED_SS_D_SPIRITORES 8
DEFINE INT BLESSED_SS_D_CRYSTALS 2
DEFINE INT CRAFTED_LEATHER_CORD 4
DEFINE INT CRAFTED_LEATHER_LEATHER 4
DEFINE INT CRAFTED_LEATHER_COAL 4
DEFINE INT HIGH_GRADE_SUEDE_CBP 1
DEFINE INT HIGH_GRADE_SUEDE_SUEDE 3
//----------------------------------------------//
// COUNT VARIABLES DEFINITION //
//----------------------------------------------//
DEFINE INT C_ANIMAL_BONE 0
DEFINE INT C_CBP 0
DEFINE INT C_VARNISH 0
DEFINE INT C_SOP 0
DEFINE INT C_STEEL 0
DEFINE INT C_M_ORE 0
DEFINE INT C_VOPS 0
DEFINE INT C_COAL 0
DEFINE INT C_CHARCOAL 0
DEFINE INT C_COKES 0
DEFINE INT C_ORI_ORE 0
DEFINE INT C_SOULORE 0
DEFINE INT C_SPIRITORE 0
DEFINE INT C_CRYSTAL_S 0
DEFINE INT C_CRYSTAL_A 0
DEFINE INT C_CRYSTAL_B 0
DEFINE INT C_CRYSTAL_C 0
DEFINE INT C_CRYSTAL_D 0
DEFINE INT C_LEATHER 0
DEFINE INT C_CORD 0
DEFINE INT C_SUEDE 0
//----------------------------------------------//
// ID VARIABLES DEFINITION //
//----------------------------------------------//
DEFINE INT ID_ANIMAL_BONE 0
DEFINE INT ID_CBP 0
DEFINE INT ID_VARNISH 0
DEFINE INT ID_SOP 0
DEFINE INT ID_STEEL 0
DEFINE INT ID_M_ORE 0
DEFINE INT ID_VOP 0
DEFINE INT ID_COAL 0
DEFINE INT ID_CHARCOAL 0
DEFINE INT ID_COKES 0
DEFINE INT ID_ORI_ORE 0
DEFINE INT ID_SOULORE 0
DEFINE INT ID_SPIRITORE 0
DEFINE INT ID_CRYSTAL_S 0
DEFINE INT ID_CRYSTAL_A 0
DEFINE INT ID_CRYSTAL_B 0
DEFINE INT ID_CRYSTAL_C 0
DEFINE INT ID_CRYSTAL_D 0
DEFINE INT ID_LEATHER 0
DEFINE INT ID_CORD 0
DEFINE INT ID_SUEDE 0
//----------------------------------------------//
// GET IDS BY NAME //
//----------------------------------------------//
ITEM_GET_ID ID_ANIMAL_BONE "Animal Bone"
ITEM_GET_ID ID_CBP "Coarse Bone Powder"
ITEM_GET_ID ID_VARNISH "Varnish"
ITEM_GET_ID ID_SOP "Stone of Purity"
ITEM_GET_ID ID_VOP "Varnish of Purity"
ITEM_GET_ID ID_STEEL "Steel"
ITEM_GET_ID ID_M_ORE "Mithril Ore"
ITEM_GET_ID ID_CHARCOAL "Charcoal"
ITEM_GET_ID ID_COAL "Coal"
ITEM_GET_ID ID_COKES "Cokes"
ITEM_GET_ID ID_ORI_ORE "Oriharukon Ore"
ITEM_GET_ID ID_SOULORE "Soul Ore"
ITEM_GET_ID ID_SPIRITORE "Spirit Ore"
ITEM_GET_ID ID_CRYSTAL_S "Crystal: S Grade"
ITEM_GET_ID ID_CRYSTAL_A "Crystal: A-Grade"
ITEM_GET_ID ID_CRYSTAL_B "Crystal: B-Grade"
ITEM_GET_ID ID_CRYSTAL_C "Crystal: C-Grade"
ITEM_GET_ID ID_CRYSTAL_D "Crystal: D-Grade"
ITEM_GET_ID ID_LEATHER "Leather"
ITEM_GET_ID ID_CORD "Cord"
ITEM_GET_ID ID_SUEDE "Suede"
WHILE ONE == ONE
IF CBP != 0
IF CHAR_CUR_MP > CBP_MP
ITEM_COUNT C_ANIMAL_BONE "<&ID_ANIMAL_BONE&>"
IF C_ANIMAL_BONE >= CBP_ANIMALBONE_COUNT
PRINT_TEXT "Crafting CBP!"
INJECT "B8 1F 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
IF VOP != 0
IF CHAR_CUR_MP > VOP_MP
ITEM_COUNT C_CBP "<&ID_CBP&>"
ITEM_COUNT C_VARNISH "<&ID_VARNISH&>"
ITEM_COUNT C_SOP "<&ID_SOP&>"
IF C_CBP >= VOPS_CBP_COUNT
IF C_VARNISH >= VOPS_VARNISH_COUNT
IF C_SOP >= VOPS_SOP_COUNT
PRINT_TEXT "Crafting VOPs!"
INJECT "B8 23 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
IF MITHRIL_ALLOY != 0
IF CHAR_CUR_MP > MITHRIL_ALLOY_MP
ITEM_COUNT C_M_ORE "<&ID_M_ORE&>"
ITEM_COUNT C_STEEL "<&ID_STEEL&>"
ITEM_COUNT C_VOPS "<&ID_VOP&>"
IF C_M_ORE >= MITHRIL_ALLOY_M_ORE
IF C_STEEL >= MITHRIL_ALLOY_STEELS
IF C_VOPS >= MITHRIL_ALLOY_VOPS
PRINT_TEXT "Crafting Mithril Alloy!"
INJECT "B8 26 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
IF CRAFTED_LEATHER != 0
IF CHAR_CUR_MP > CRAFTED_LEATHER_MP
ITEM_COUNT C_COAL "<&ID_COAL&>"
ITEM_COUNT C_CORD "<&ID_CORD&>"
ITEM_COUNT C_LEATHER "<&ID_LEATHER&>"
IF C_COAL >= CRAFTED_LEATHER_COAL
IF C_CORD >= CRAFTED_LEATHER_COAL
IF C_LEATHER >= CRAFTED_LEATHER_LEATHER
PRINT_TEXT "Crafting Crafted Leather!"
INJECT "B8 29 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
IF COKES != 0
IF CHAR_CUR_MP > COKES_MP
ITEM_COUNT C_COAL "<&ID_COAL&>"
ITEM_COUNT C_CHARCOAL "<&ID_CHARCOAL&>"
IF C_COAL >= COKES_COAL
IF C_CHARCOAL >= COKES_CHARCOAL
PRINT_TEXT "Crafting Cokes!"
INJECT "B8 1D 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF HIGH_GRADE_SUEDE != 0
IF CHAR_CUR_MP > HIGH_GRADE_SUEDE_MP
ITEM_COUNT C_CBP "<&ID_CBP&>"
ITEM_COUNT C_SUEDE "<&ID_SUEDE&>"
IF C_CBP >= HIGH_GRADE_SUEDE_CBP
IF C_SUEDE >= HIGH_GRADE_SUEDE_SUEDE
PRINT_TEXT "Crafting High Grade Suede!"
INJECT "B8 21 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF SYNTETIC_COKES != 0
IF CHAR_CUR_MP > SYNTETIC_COKES_MP
ITEM_COUNT C_COKES "<&ID_COKES&>"
ITEM_COUNT C_ORI_ORE "<&ID_ORI_ORE&>"
IF C_COKES >= SYN_COKES_COKES
IF C_ORI_ORE >= SYN_COKES_ORI_ORES
PRINT_TEXT "Crafting Syntetic Cokes!"
INJECT "B8 24 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF SOULSHOTS_A != 0
IF CHAR_CUR_MP > SOULSHOTS_A_MP
ITEM_COUNT C_SOULORE "<&ID_SOULORE&>"
ITEM_COUNT C_CRYSTAL_A "<&ID_CRYSTAL_A&>"
IF C_SOULORE >= SOULSHOTS_A_SOULORES
IF C_CRYSTAL_A >= SOULSHOTS_A_CRYSTALS
PRINT_TEXT "Crafting Soulshots A-Grade!"
INJECT "B8 17 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF SOULSHOTS_S != 0
IF CHAR_CUR_MP > SOULSHOTS_S_MP
ITEM_COUNT C_SOULORE "<&ID_SOULORE&>"
ITEM_COUNT C_CRYSTAL_S "<&ID_CRYSTAL_S&>"
IF C_SOULORE >= SOULSHOTS_S_SOULORES
IF C_CRYSTAL_S >= SOULSHOTS_S_CRYSTALS
PRINT_TEXT "Crafting Soulshots S-Grade!"
INJECT "B8 18 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF SOULSHOTS_B != 0
IF CHAR_CUR_MP > SOULSHOTS_B_MP
ITEM_COUNT C_SOULORE "<&ID_SOULORE&>"
ITEM_COUNT C_CRYSTAL_B "<&ID_CRYSTAL_B&>"
IF C_SOULORE >= SOULSHOTS_B_SOULORES
IF C_CRYSTAL_B >= SOULSHOTS_B_CRYSTALS
PRINT_TEXT "Crafting Soulshots B-Grade!"
INJECT "B8 16 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF SOULSHOTS_C != 0
IF CHAR_CUR_MP > SOULSHOTS_C_MP
ITEM_COUNT C_SOULORE "<&ID_SOULORE&>"
ITEM_COUNT C_CRYSTAL_C "<&ID_CRYSTAL_C&>"
IF C_SOULORE >= SOULSHOTS_C_SOULORES
IF C_CRYSTAL_C >= SOULSHOTS_C_CRYSTALS
PRINT_TEXT "Crafting Soulshots C-Grade!"
INJECT "B8 15 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF SOULSHOTS_D != 0
IF CHAR_CUR_MP > SOULSHOTS_D_MP
ITEM_COUNT C_SOULORE "<&ID_SOULORE&>"
ITEM_COUNT C_CRYSTAL_D "<&ID_CRYSTAL_D&>"
IF C_SOULORE >= SOULSHOTS_D_SOULORES
IF C_CRYSTAL_D >= SOULSHOTS_D_CRYSTALS
PRINT_TEXT "Crafting Soulshots D-Grade!"
INJECT "B8 14 00 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF BLESSED_SS_A != 0
IF CHAR_CUR_MP > BLESSED_SS_A_MP
ITEM_COUNT C_SPIRITORE "<&ID_SPIRITORE&>"
ITEM_COUNT C_CRYSTAL_A "<&ID_CRYSTAL_A&>"
IF C_SPIRITORE >= BLESSED_SS_A_SPIRITORES
IF C_CRYSTAL_A >= BLESSED_SS_A_CRYSTALS
PRINT_TEXT "Crafting Blessed-Soulshots A-Grade!"
INJECT "B8 46 01 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF BLESSED_SS_S != 0
IF CHAR_CUR_MP > BLESSED_SS_S_MP
ITEM_COUNT C_SPIRITORE "<&ID_SPIRITORE&>"
ITEM_COUNT C_CRYSTAL_S "<&ID_CRYSTAL_S&>"
IF C_SPIRITORE >= BLESSED_SS_S_SPIRITORES
IF C_CRYSTAL_S >= BLESSED_SS_S_CRYSTALS
PRINT_TEXT "Crafting Blessed-Soulshots S-Grade!"
INJECT "B8 47 01 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF BLESSED_SS_B != 0
IF CHAR_CUR_MP > BLESSED_SS_B_MP
ITEM_COUNT C_SPIRITORE "<&ID_SPIRITORE&>"
ITEM_COUNT C_CRYSTAL_B "<&ID_CRYSTAL_B&>"
IF C_SPIRITORE >= BLESSED_SS_B_SPIRITORES
IF C_CRYSTAL_B >= BLESSED_SS_B_CRYSTALS
PRINT_TEXT "Crafting Blessed-Soulshots B-Grade!"
INJECT "B8 45 01 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF BLESSED_SS_C != 0
IF CHAR_CUR_MP > BLESSED_SS_C_MP
ITEM_COUNT C_SPIRITORE "<&ID_SPIRITORE&>"
ITEM_COUNT C_CRYSTAL_C "<&ID_CRYSTAL_C&>"
IF C_SPIRITORE >= BLESSED_SS_C_SPIRITORES
IF C_CRYSTAL_C >= BLESSED_SS_C_CRYSTALS
PRINT_TEXT "Crafting Blessed-Soulshots C-Grade!"
INJECT "B8 44 01 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
IF BLESSED_SS_D != 0
IF CHAR_CUR_MP > BLESSED_SS_D_MP
ITEM_COUNT C_SPIRITORE "<&ID_SPIRITORE&>"
ITEM_COUNT C_CRYSTAL_D "<&ID_CRYSTAL_D&>"
IF C_SPIRITORE >= BLESSED_SS_D_SPIRITORES
IF C_CRYSTAL_D >= BLESSED_SS_D_CRYSTALS
PRINT_TEXT "Crafting Blessed-Soulshots D-Grade!"
INJECT "B8 43 01 00 00"
SLEEP 300
ENDIF
ENDIF
ENDIF
ENDIF
SLEEP 400
WEND
END_SCRIPT