summaryrefslogblamecommitdiff
path: root/npc/quests/Lvl4_weapon_quest.txt
blob: 50af31bb3bea9440f8d4cf37f237579490a33efc (plain) (tree)
1
2
3
4
5
6
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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618




                                                               
       










                                                                                     
                                                                                  
                                                                        
































                                                                          
                                            





























































                                                                              
                                     

































































































































































































































































































































































































































































































                                                                                                                               
                                                     








































































































































































































































































































































































































































































































































































                                                                                                                                  
                                             

















































































































































































































































































































































































                                                                                                                                       
                                                    














































































































































































































                                                                                               
                                                     

























































































































































































































































































                                                                               
                                             





















































































































































































































































































































































































































                                                                                         
                                                     














































































































































































































































































































































































































                                                                                                     
                                             



















































































































































































































































































































































































































                                                                                           
                                                     






































































































































































































































































































































































































                                                                                              
//===== eAthena Script ======================================= 
//= Grade A and Grade S weapon quests
//===== By: ================================================== 
//= Vicious_Pucca, Reddozen & MasterOfMuppets
//===== Current Version: ===================================== 
//= 1.4
//===== Compatible With: ===================================== 
//= eAthena SVN 3422+(Requires jA Script System)
//===== Description: ========================================= 
//= Grade A and Grade S weapon quests
//===== Additional Comments: ================================= 
//= 1.0 First Version, Credits goes to Vicious_Pucca for converting [MasterOfMuppets]
//=     the quest from aegis format to eA format. Also thanks to 
//=	reddozen for fixing bugs.
//= 1.1 Many fixes to spelling, grammar, and sentence order. [Silent]
//= 1.2 A small fix, thanks to vicious_pucca [MasterOfMuppets]
//= 1.21 Fixing MoM's typos (Citrin -> Citrine) [erKURITA]
//= 1.3 Redirected error message for "LV_16" to "LV_16_NOGEM" (Gepard) [L0ne_W0lf]
//= 1.4 Fixed bad NPC header data to comply with rev. 11603. [L0ne_W0lf]
//============================================================ 

//---------------------------------------------------------------
// Initialize the basic materials for easier reading/conversion 
//---------------------------------------------------------------

-	script	lv4_weapon_init	-1,{
OnInit:
	set $@LV4_Citrine, 7295; // 7295,Citrine
	set $@LV4_Turquoise, 7294; // 7294,Turquoise
	set $@LV4_Agate, 7291; // 7291,Agate
	
	set $@LV4_Muscovite, 7292; // 7292,Muscovite
	set $@LV4_Biotite, 7297; // 7297,Biotite
	set $@LV4_Pyroxene, 7296; // 7296,Pyroxene
	
	set $@LV4_Phlogopite, 7290; // 7290,Phlogopite
	set $@LV4_Olivine, 7289; // 7289,Peridot
	set $@LV4_Rose_Quartz, 7293; // 7293,Rose_Quartz	
	
	set $@LV4_Gold, 969; // 969,Gold
	set $@LV4_Steel, 999; // 999,Steel
	set $@LV4_Emperium, 714; // 714,Emperium
	set $@LV4_Hammer_Of_Blacksmith, 1005; // 1005,Hammer_of_Blacksmith
	set $@LV4_Emperium_Anvil, 989; // 989,Emperium_Anvil
	set $@LV4_Illusion_Flower, 710; // 710,Illusion_Flower
	end;		
}

//---------------------------------------------------------------
// Bazo, creates Immaterial Sword, Quadrille and Slash
//---------------------------------------------------------------

umbala,117,285,3	script	Bazo	85,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- Currently you are overweight. -";
	mes "- Please lighten your weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon == 1) goto LV4_1;
	if(lv4_weapon == 2) goto LV4_2;
	if(lv4_weapon == 3) goto LV4_2;
	if(lv4_weapon == 4) goto LV4_2;
	if(lv4_weapon == 5) goto LV4_5;
	if(lv4_weapon == 6) goto LV4_5;
	if(lv4_weapon == 7) goto LV4_5;
	if(lv4_weapon > 7) goto LV4_7;	
	end; // shouldn't be here

	
LV4_0:
	mes "[Bazo]";
	mes "Hello, you are from outside, huh?";
	mes "I can tell by your appearance.";
	mes "Pleased to meet you. My name is Bazo Heburiech.";
	mes "I am also from outside.";
	next;
	mes "[Bazo]";
	mes "We must have been meant to meet each other.";
	mes "If you don't mind, let me explain about this place for a while.";
	mes "Umbala is adjacent to Nifflheim, the city of the dead.";
	mes "Even at a first sight, I knew that";
	mes "there is something about this village.";
	next;
	mes "[Bazo]";
	mes "Due to that geographical trait,";
	mes "this village was filled with evil power";
	mes "that was influenced by the city of the dead.";
	next;
	mes "[Bazo]";
	mes "The local people have learned";
	mes "to manipulate the evil power for";
	mes "producing specialties.";
	next;
	mes "[Bazo]";
	mes "While staying here, I also have learned";
	mes "some recipes. If you bring me materials,";
	mes "I am willing to show you my skills.";
	mes "How does that sound?";
	next;
	
	switch( select( "Sounds good.", "No, thanks." ) ) {
		case 1:
			if(BaseLevel >= 70) goto L4_0_1;
			
			mes "[Bazo]";
			mes "Err...I don't think that you are powerful";
			mes "enough to handle my products.";
			mes "They are charged with evil power.";
			next;
			mes "[Bazo]";
			mes "That means if their owners are not powerful";
			mes "and not experienced enough,";
			mes "they will drive the owners insane.";
			mes "And I cannot do that to my friend.";
			next;
			mes "[Bazo]";
			mes "Therefore, I want you to go back and level up first.";
			mes "I will gladly expect you to come back when you are ready.";
			break;
L4_0_1:
			mes "[Bazo]";
			mes "Excellent! Let me tell you";
			mes "the materials I need. I hope you will write them down.";
			mes "There is not that many though.";
			next;
			mes "[Bazo]";
			mes "I need 10 Gold, 50 Steel and 10 Emperium";
			mes "as basic materials...";
			mes "and you can enchant the product with a certain trait.";
			mes "For that, I need some rare ores...";
			next;
			mes "[Bazo]";
			mes "Please bring me 30 of either Citrine, Turquoise or Agate.";
			mes "Each one of them possess their own attribute";
			mes "and following by the ore you have brought,";
			mes "my product will possess a special trait.";
			next;
			mes "[Bazo]";
			mes "I wish you good luck...";
			mes "I will wait for you!";
			
			set lv4_weapon, 1;
			break;
		case 2:
			mes "[Bazo]";
			mes "Oh, okay. That is fine with me.";
			mes "By the way, don't you want to know how evil the city of the dead will be?";
			mes "I do since that city influences so much of this village";
			mes "with it's mysterious power, you know.";
			break;			
	}	
	close;
	


//--------------------------------------------------
//Gold, Steel, Emp Check + Choosing the gem
//--------------------------------------------------
LV4_1:
	if(countitem($@LV4_Gold) < 10) goto LV4_1_FAIL;
	if(countitem($@LV4_Steel) < 50) goto LV4_1_FAIL;
	if(countitem($@LV4_Emperium) < 10) goto LV4_1_FAIL;

	mes "[Bazo]";
	mes "Oh...you have brought all the basic materials.";
	mes "Now let me check what kind of rare ores";
	mes "you have brought...";
	next;
	
	if (countitem($@LV4_Citrine) >= 30 && countitem($@LV4_Turquoise) >= 30 && countitem($@LV4_Agate) >= 30) goto LV4_1_CTA;
	if (countitem($@LV4_Citrine) >= 30 && countitem($@LV4_Turquoise) >= 30) goto LV4_1_CT;
	if (countitem($@LV4_Citrine) >= 30 && countitem($@LV4_Agate) >= 30) goto LV4_1_CA;
	if (countitem($@LV4_Turquoise) >= 30 && countitem($@LV4_Agate) >= 30) goto LV4_1_TA;
	if (countitem($@LV4_Citrine) >= 30) goto LV4_1_C;
	if (countitem($@LV4_Turquoise) >= 30) goto LV4_1_T;
	if (countitem($@LV4_Agate) >= 30) goto LV4_1_A;
	goto LV4_1_NOGEM;
	end;


LV4_1_CTA:	
	mes "[Bazo]";
	mes "Hahaha, I asked you to bring one kind not all of them.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Citrine", "Turquoise", "Agate" ) ) {
		case 1:
			mes "[Bazo]";
			mes "Citrine...okay. Before we start,";
			set @gem, $@LV4_Citrine;
			set @gemstring$,"Citrine";
			break;
		case 2:
			mes "[Bazo]";
			mes "Turquoise...okay. Before we start,";
			set @gem, $@LV4_Turquoise;
			set @gemstring$,"Turquoise";
			break;
		case 3:
			mes "[Bazo]";
			mes "Agate....okay. Before we start,";
			set @gem, $@LV4_Agate;
			set @gemstring$,"Agate";
			break;
	}
	
	goto LV4_1_PICK;
	end; // shouldn't be here
	
	
LV4_1_CT:
	mes "[Bazo]";
	mes "Hahaha, I asked you to bring one kind not two.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Citrine", "Turquoise" ) ) {
		case 1:
			mes "[Bazo]";
			mes "Citrine...okay. Before we start,";
			set @gem, $@LV4_Citrine;
			set @gemstring$,"Citrine";
			break;
		case 2:
			mes "[Bazo]";
			mes "Turquoise...okay. Before we start,";
			set @gem, $@LV4_Turquoise;
			set @gemstring$,"Turquoise";
			break;
	}
	
	goto LV4_1_PICK;
	end; // shouldn't be here
	

LV4_1_CA:	
	mes "[Bazo]";
	mes "Hahaha, I asked you to bring one kind not two.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Citrine", "Agate" ) ) {
		case 1:
			mes "[Bazo]";
			mes "Citrine...okay. Before we start,";
			set @gem, $@LV4_Citrine;
			set @gemstring$,"Citrine";
			break;
		case 2:
			mes "[Bazo]";
			mes "Agate....okay. Before we start,";
			set @gem, $@LV4_Agate;
			set @gemstring$,"Agate";
			break;
	}
	
	goto LV4_1_PICK;
	end; // shouldn't be here
	
	
LV4_1_TA:	
	mes "[Bazo]";
	mes "Hahaha, I asked you to bring one kind not two.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Turquoise", "Agate" ) ) {
			case 1:
				mes "[Bazo]";
				mes "Turquoise...okay. Before we start,";
				set @gem, $@LV4_Turquoise;
				set @gemstring$,"Turquoise";
				break;
			case 2:
				mes "[Bazo]";
				mes "Agate....okay. Before we start,";
				set @gem, $@LV4_Agate;
				set @gemstring$,"Agate";
				break;
	}
	
	goto LV4_1_PICK;
	end; // shouldn't be here
	
	
LV4_1_C:
	mes "[Bazo]";
	mes "Citrine...okay. Before we start,";
	set @gem, $@LV4_Citrine;
	set @gemstring$,"Citrine";
	goto LV4_1_PICK;
	end; // shouldn't be here
		
		
LV4_1_T:
	mes "[Bazo]";
	mes "Turquoise...okay. Before we start,";
	set @gem, $@LV4_Turquoise;
	set @gemstring$,"Turquoise";
	goto LV4_1_PICK;
	end; // shouldn't be here
	
	
LV4_1_A:
	mes "[Bazo]";
	mes "Agate....okay. Before we start,";
	set @gem, $@LV4_Agate;
	set @gemstring$,"Agate";
	goto LV4_1_PICK;
	end; // shouldn't be here
	
	
LV4_1_PICK:
	mes "we must do one thing first.";
	mes "That is, testing your luck.";
	mes "As you already know,";
	mes "I cannot guarantee you that we will succeed";
	mes "to make one right away.";
	next;
	mes "[Bazo]";
	mes "If we can raise your luck before we start,";
	mes "we will be able to succeed.";
	next;
	mes "[Bazo]";
	mes "Now you must be wondering what we";
	mes "will do in order to increase your luck.";
	mes "It is simple, we will play a mind-reading game.";
	mes "I am going to think of one monster among 4 of my favorite ones,";
	mes "you will guess what the monster is.";
	next;
	mes "[Bazo]";
	mes "You must answer correctly at least";
	mes "1 out of 5 times. It shouldn't be that difficult.";
	mes "And if you fail to answer, we must do something else";
	mes "to drive away your bad luck.";
	next;
	mes "[Bazo]";
	mes "I will take 10 of the special ore you chose.";
	mes "Well, I understand that it does not sound tempting";
	mes "but let's think of it this way.";
	mes "It is much better than wasting 30 ore";
	mes "by failing to create the item, isn't it?";
	next;
	mes "[Bazo]";
	mes "Okay, now I need some time to prepare...";
	mes "Talk to you later!";
	
	if(countitem($@LV4_Gold) < 10) goto LV4_HACK;
	if(countitem($@LV4_Steel) < 50) goto LV4_HACK;
	if(countitem($@LV4_Emperium) < 10) goto LV4_HACK;
	delitem $@LV4_Gold, 10;
	delitem $@LV4_Steel, 50;
	delitem $@LV4_Emperium, 10;
	if(@gem == $@LV4_Citrine) set lv4_weapon, 2;
	if(@gem == $@LV4_Turquoise) set lv4_weapon, 3;
	if(@gem == $@LV4_Agate) set lv4_weapon, 4;	
	close;


LV4_1_NOGEM:
	mes "[Bazo]";
	mes "I seem to recall that I asked you to bring";
	mes "30 of a special ore, Citrine, Turquoise, or Agate...";
	mes "And I don't see any of them.";
	mes "You must have forgot them. Please go get them too.";
	close;


LV4_1_FAIL:
	mes "[Bazo]";
	mes "Please bring me 10 Gold, 50 Steel and 10 Emperium";
	mes "as basic materials...";
	mes "and you can enchant the product with a certain trait.";
	mes "For that, I need some rare ores...";
	next;
	mes "[Bazo]";
	mes "Please bring me 30 of either Citrine, Turquoise or Agate.";
	mes "Each one of them possess their own attribute";
	mes "and using the ore you have brought,";
	mes "my product will possess a special trait.";
	next;
	mes "[Bazo]";
	mes "I wish you good luck...";
	mes "I will wait for you!";
	close;



//--------------------------------------------------
//Guessing Game
//--------------------------------------------------
LV4_2:
	if(lv4_weapon == 2) set @gem, $@LV4_Citrine;
	if(lv4_weapon == 3) set @gem, $@LV4_Turquoise;
	if(lv4_weapon == 4) set @gem, $@LV4_Agate;
	if(countitem(@gem) < 30) goto LV4_2_NOGEM; 
	
	mes "[Bazo]";
	mes "Ok, you seem to be ready.";
	mes "Let's get started.";
	mes "My favorite monsters are Poring,";
	mes "Hode, Obeaune, and Minorous.";
	next;

	set @dap, 0;
	set @correct[0],1;
	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		mes "[Bazo]";
		
		if(@i == 1) mes "Here's the 1st question. Guess what monster";
		if(@i != 1) mes "Alright. Now guess what monster";
		
		mes "I have in my mind at this moment.";
		next;

		set @mons, rand(1, 4);		

		switch( select( "Poring", "Hode", "Obeaune", "Minorous" ) ) {
				case 1:
					set @correct[@i], 1;
					if(@mons == 1) set @dap, @dap + 1;
					break;

				case 2:
					set @correct[@i], 2;
					if(@mons == 2) set @dap, @dap + 1;
					break;

				case 3:
					set @correct[@i], 3;
					if(@mons == 3) set @dap, @dap + 1;
					break;

				case 4:
					set @correct[@i], 4;
					if(@mons == 4) set @dap, @dap + 1;
					break;
		}
	}

	mes "[Bazo]";
	mes "Okay, let me give you answers for the questions.";
	mes "I was thinking of the monsters in the order of";
	next;
	mes "[Bazo]";

	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		if(@correct[@i] == 1) mes "Poring";
		if(@correct[@i] == 2) mes "Hode";
		if(@correct[@i] == 3) mes "Obeaune";
		if(@correct[@i] == 4) mes "Minorous";
	}

	if(@dap < 1) goto LV4_2_FAIL;
	
	next;
	mes "[Bazo]";
	mes "You answered " + @dap + " times!";
	mes "I must say you're amazing!";
	mes "As I promised, I will make an Umbala specialty for you.";
	mes "Please give me some time to prepare.";
	mes "Talk to you later.";
	
	if(countitem(@gem) < 30) goto LV4_HACK;
	delitem @gem, 30;
	set lv4_weapon, lv4_weapon + 3;
	close;
	
	
LV4_2_FAIL:
	if(countitem(@gem) < 10) goto LV4_HACK;
	delitem @gem, 10;
	
	next;
	mes "[Bazo]";
	mes "Errr... I don't think you are good at reading";
	mes "other people's minds. Or you had bad luck, I guess.";
	mes "We cannot do that again unless";
	mes "we drive away the bad luck.";
	mes "Give me 10 " + @gemstring$ + ", that will do the job.";
	next;
	mes "[Bazo]";
	mes "Well...if you want to do this mind-reading game again,";
	mes "please come back with the materials.";
	mes "I will wait here for you.";
	close;


LV4_2_NOGEM:
	mes "[Bazo]";
	mes "Errr...something doesn't feel right. We lack something...";
	mes "Will you check the materials that you have brought?";
	close;
	
	
	
//--------------------------------------------------
//Weapon Creation
//--------------------------------------------------
LV4_5:
	mes "[Bazo]";
	mes "Great... now, let's do it!";
	mes "Wish me luck...ah, I forgot to tell you this.";
	mes "I cannot tell you what kind of product it will be. It is so random.";
	mes "Let's wish that a good thing will come out, okay?";
	next;
	mes "- You feel unknown power start gathering in -";
	mes "- the materials. It seems the materials are -";
	mes "- absorbing all the evil power in the air. -";
	next;
	mes "- Then, the materials start merging into one -";
	mes "- even though Bazo didn't touch them at all. -";
	next;
	mes "[Bazo]";
	mes "Can you feel that? The materials are gathering";
	mes "power at their own will.";
	mes "They are out of my hand now. Let's wait and hope.";
	next;
	mes "- After a while, the air becomes calm -";
	mes "- and you check the result. -";
	next;
	mes "[Bazo]";
	mes "Ooooooh! It is done!";
	mes "We have succeeded! Ah, it's amazing!";
	mes "Did I tell you that it is really rare to succeed right away?";
	mes "Yes, God must have listened to our prayers.";
	mes "Oh, it is a weapon! It will be very useful to you.";
	mes "Let's take a closer look...";
	next;

	mes "[Bazo]";

	switch( lv4_weapon ) {
		case 5:
			mes "Immaterial Sword!";
			getitem 1141, 1; // 1141,Immaterial_Sword
			break;
		case 6:
			mes "it is Slash!";
			getitem 1526, 1; // 1526,Slash
			break;
		case 7:
			mes "it is Quadrille!";
			getitem 1527, 1; // 1527,Quadrille
			break;
	}

	set lv4_weapon, 0;
	mes "This sword was born to be yours!";
	mes "Congratulations and hopefully it will have a good use for you.";
	next;

	mes "[Bazo]";
	mes "I feel so gratified. If you wish to have";
	mes "another one, please feel free to visit me anytime.";
	mes "Have a good travel!";
	close;



//--------------------------------------------------
//Other Quests
//--------------------------------------------------
LV4_7:
	mes "[Bazo]";
	mes "Hmm...I feel something strange from you.";
	mes "I regret to say that there is nothing I can do for you.";
	mes "I hope you have a safe travel.";
	close;
	
	
	
//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Bazo]";
	mes "Hmm. There seems to be a bit of problem.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
	close;
}

//---------------------------------------------------------------
// Hibilaithan, creates Mailbreaker, Swordbreaker and Slaughter
//---------------------------------------------------------------

umbala,163,257,3	script	Hibilaithan	785,{
	if(event_umbala < 3) goto LumWord;
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- Currently you are overweight. -";
	mes "- Please lighten your weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon == 8) goto LV4_8;
	if(lv4_weapon == 9) goto LV4_9;
	if(lv4_weapon == 10) goto LV4_9;
	if(lv4_weapon == 11) goto LV4_9;
	if(lv4_weapon == 12) goto LV4_12;
	if(lv4_weapon == 13) goto LV4_12;
	if(lv4_weapon == 14) goto LV4_12;
	if(lv4_weapon < 8) goto LV4_7;
	if(lv4_weapon > 14) goto LV4_7;	
	end; // shouldn't be here
	

LumWord:
		mes "[Hibilaithan]";
		mes "Umba! Umbaba...umum! Baumba!";
		mes "Umumumbababaumumbabaumba!";
		mes "Umbaumbaumbaumbaumhah!";
		mes "Umumumumumbababababab!";
	close;

	
LV4_0:
	mes "[Hibilaithan]";
	mes "Haha, yeah, I knew this day would come.";
	mes "Finally people recognize my value";
	mes "as the best artisan in Umbala!";
	next;
	mes "[Hibilaithan]";
	mes "Okay, let's talk straight.";
	mes "I, Hibilaithan shall craft something nice";
	mes "if you bring me materials!";
	mes "Hahahahahaha!";
	next;
	mes "[Hibilaithan]";
	mes "Eh? What? You didn't come to see me?";
	mes "Stop joking around...Don't play me for a fool!";
	mes "People are too shy to tell the truth nowadays!";
	mes "Let's be honest and tell me if you want it or not.";
	next;
	
	switch( select( "...okay.", "...sorry, I don't need it!" ) ) {
		case 1:
			if(BaseLevel >= 70) goto L4_0_1;
			
			mes "[Hibilaithan]";
			mes "...what a shame! I regret to tell you this,";
			mes "but your spirit is too weak";
			mes "to handle the power of my stuff!";
			mes "This is not good, not good at all!";
			mes "Go and train yourself first.";
			mes "When you become strong, you may come back!";
			break;
L4_0_1:
			mes "[Hibilaithan]";
			mes "Great! I like your attitute! Great, great!";
			mes "I am going to tell you what I need.";
			mes "It is not much, so do not forget.";
			next;
			mes "[Hibilaithan]";
			mes "Bring me 10 Gold, 50 Steel and 10 Emperium";
			mes "... as basic materials.";
			mes "And I need some rare ores to endow power...";
			next;
			mes "[Hibilaithan]";
			mes "Bring me 30 of one ore among Muscovite, Biotite or Pyroxene.";
			mes "Remember you are going to bring 30 of one ore.";
			mes "I cannot pick one among those because I am";
			mes "not sure what will come out. Heh.";
			next;
			mes "[Hibilaithan]";
			mes "Okay, wish you good luck!";
			mes "Meanwhile I am going to chill here.";
			
			set lv4_weapon, 8;
			break;
		case 2:
			mes "[Hibilaithan]";
			mes "Bah~ what are you afraid of?";
			mes "I am just trying to do you a favor, you know?";
			mes "Alright, it is your call.";
			mes "But if you change your mind,";
			mes "feel free to come back.";
			break;			
	}	
	close;
	


//--------------------------------------------------
//Gold, Steel, Emp Check + Choosing the gem
//--------------------------------------------------
LV4_8:
	if(countitem($@LV4_Gold) < 10) goto LV4_8_FAIL;
	if(countitem($@LV4_Steel) < 50) goto LV4_8_FAIL;
	if(countitem($@LV4_Emperium) < 10) goto LV4_8_FAIL;

	mes "[Hibilaithan]";
	mes "Oh...you have brought all the basic materials.";
	mes "Now let me check what kind of rare ores";
	mes "you have brought...";
	next;
	
	if (countitem($@LV4_Muscovite) >= 30 && countitem($@LV4_Biotite) >= 30 && countitem($@LV4_Pyroxene) >= 30) goto LV4_8_MBP;
	if (countitem($@LV4_Muscovite) >= 30 && countitem($@LV4_Biotite) >= 30) goto LV4_8_MB;
	if (countitem($@LV4_Muscovite) >= 30 && countitem($@LV4_Pyroxene) >= 30) goto LV4_8_MP;
	if (countitem($@LV4_Biotite) >= 30 && countitem($@LV4_Pyroxene) >= 30) goto LV4_8_BP;
	if (countitem($@LV4_Muscovite) >= 30) goto LV4_8_M;
	if (countitem($@LV4_Biotite) >= 30) goto LV4_8_B;
	if (countitem($@LV4_Pyroxene) >= 30) goto LV4_8_P;
	goto LV4_8_NOGEM;
	end;


LV4_8_MBP:	
	mes "[Hibilaithan]";
	mes "Gosh, did you brought all three kinds?";
	mes "Hahaha, it's fine.";
	mes "But we cannot use all of them this time.";
	mes "Pick one that you want to use.";
	next;
			
	switch( select( "Muscovite", "Biotite", "Pyroxene" ) ) {
		case 1:
			mes "[Hibilaithan]";
			mes "Muscovite...okay. Before we start,";
			set @gem, $@LV4_Muscovite;
			set @gemstring$,"Muscovite";
			break;
		case 2:
			mes "[Hibilaithan]";
			mes "Biotite...okay. Before we start,";
			set @gem, $@LV4_Biotite;
			set @gemstring$,"Biotite";
			break;
		case 3:
			mes "[Hibilaithan]";
			mes "Pyroxene....okay. Before we start,";
			set @gem, $@LV4_Pyroxene;
			set @gemstring$,"Pyroxene";
			break;
	}
	
	goto LV4_8_PICK;
	end; // shouldn't be here
	
	
LV4_8_MB:
	mes "[Hibilaithan]";
	mes "Hahaha, I asked you to bring one kind not two.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Muscovite", "Biotite" ) ) {
		case 1:
			mes "[Hibilaithan]";
			mes "Muscovite...okay. Before we start,";
			set @gem, $@LV4_Muscovite;
			set @gemstring$,"Muscovite";
			break;
		case 2:
			mes "[Hibilaithan]";
			mes "Biotite...okay. Before we start,";
			set @gem, $@LV4_Biotite;
			set @gemstring$,"Biotite";
			break;
	}
	
	goto LV4_8_PICK;
	end; // shouldn't be here
	

LV4_8_MP:	
	mes "[Hibilaithan]";
	mes "Hahaha, I asked you to bring one kind not two.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Muscovite", "Pyroxene" ) ) {
		case 1:
			mes "[Hibilaithan]";
			mes "Muscovite...okay. Before we start,";
			set @gem, $@LV4_Muscovite;
			set @gemstring$,"Muscovite";
			break;
		case 2:
			mes "[Hibilaithan]";
			mes "Pyroxene....okay. Before we start,";
			set @gem, $@LV4_Pyroxene;
			set @gemstring$,"Pyroxene";
			break;
	}
	
	goto LV4_8_PICK;
	end; // shouldn't be here
	
	
LV4_8_BP:	
	mes "[Hibilaithan]";
	mes "Hahaha, I asked you to bring one kind not two.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Biotite", "Pyroxene" ) ) {
			case 1:
				mes "[Hibilaithan]";
				mes "Biotite...okay. Before we start,";
				set @gem, $@LV4_Biotite;
				set @gemstring$,"Biotite";
				break;
			case 2:
				mes "[Hibilaithan]";
				mes "Pyroxene....okay. Before we start,";
				set @gem, $@LV4_Pyroxene;
				set @gemstring$,"Pyroxene";
				break;
	}
	
	goto LV4_8_PICK;
	end; // shouldn't be here
	
	
LV4_8_M:
	mes "[Hibilaithan]";
	mes "Muscovite...okay. Before we start,";
	set @gem, $@LV4_Muscovite;
	set @gemstring$,"Muscovite";
	goto LV4_8_PICK;
	end; // shouldn't be here
		
		
LV4_8_B:
	mes "[Hibilaithan]";
	mes "Biotite...okay. Before we start,";
	set @gem, $@LV4_Biotite;
	set @gemstring$,"Biotite";
	goto LV4_8_PICK;
	end; // shouldn't be here
	
	
LV4_8_P:
	mes "[Hibilaithan]";
	mes "Pyroxene....okay. Before we start,";
	set @gem, $@LV4_Pyroxene;
	set @gemstring$,"Pyroxene";
	goto LV4_8_PICK;
	end; // shouldn't be here
	
	
LV4_8_PICK:
	mes "we must do one thing first.";
	mes "That is, to test your luck.";
	mes "As you already know,";
	mes "I cannot guarantee you that we will succeed";
	mes "to make one right away.";
	next;
	mes "[Hibilaithan]";
	mes "If we can raise your luck before we start,";
	mes "we will be able to succeed.";
	next;
	mes "[Hibilaithan]";
	mes "Now you must be wondering what we";
	mes "will do in order to increase your luck.";
	mes "It is simple, we will play a mind-reading game.";
	mes "I am going to think of one monster among 4 of my favorites,";
	mes "you will guess what that monster is.";
	next;
	mes "[Hibilaithan]";
	mes "You must answer correctly at least";
	mes "1 out of 5 times. It should not be that difficult.";
	mes "And if you fail to answer, we must do something else";
	mes "to drive away your bad luck.";
	next;
	mes "[Hibilaithan]";
	mes "I will take 10 of the special ore you have chose.";
	mes "Well, I understand that it does not sound tempting";
	mes "but let's think of it this way.";
	mes "It is much better than wasting 30 ore";
	mes "by failing to create the item, isn't it?";
	next;
	mes "[Hibilaithan]";
	mes "Okay, now I need some time to prepare...";
	mes "Talk to you later!";
	
	if(countitem($@LV4_Gold) < 10) goto LV4_HACK;
	if(countitem($@LV4_Steel) < 50) goto LV4_HACK;
	if(countitem($@LV4_Emperium) < 10) goto LV4_HACK;
	delitem $@LV4_Gold, 10;
	delitem $@LV4_Steel, 50;
	delitem $@LV4_Emperium, 10;
	if(@gem == $@LV4_Muscovite) set lv4_weapon, 9;
	if(@gem == $@LV4_Biotite) set lv4_weapon, 10;
	if(@gem == $@LV4_Pyroxene) set lv4_weapon, 11;	
	close;


LV4_8_NOGEM:
	mes "[Hibilaithan]";
	mes "I seem to recall that I asked you to bring";
	mes "30 of a special ore among Muscovite, Biotite or Pyroxene...";
	mes "And I don't see any of them.";
	mes "You must have forgot that. Please go get them too.";
	close;


LV4_8_FAIL:
	mes "[Hibilaithan]";
	mes "Please bring me 10 Gold, 50 Steel and 10 Emperium";
	mes "as basic materials...";
	mes "and you can enchant the product with a certain trait.";
	mes "For that, I need some rare ores...";
	next;
	mes "[Hibilaithan]";
	mes "Please bring me 30 of an ore among Citrine, Biotite or Pyroxene.";
	mes "Each one of them possess their own attributes";
	mes "and by using the ore you have brought,";
	mes "my product will possess a special trait.";
	next;
	mes "[Hibilaithan]";
	mes "I wish you good luck...";
	mes "I will wait for you!";
	close;



//--------------------------------------------------
//Guessing Game
//--------------------------------------------------
LV4_9:
	if(lv4_weapon == 9) set @gem, $@LV4_Muscovite;
	if(lv4_weapon == 10) set @gem, $@LV4_Biotite;
	if(lv4_weapon == 11) set @gem, $@LV4_Pyroxene;
	if(countitem(@gem) < 30) goto LV4_9_NOGEM; 
	
	mes "[Hibilaithan]";
	mes "Okay, let's get started!";
	mes "It is simple. There are";
	mes "4 monsters that I like. I am going to think";
	mes "of a monster among the 4, you will guess what it is.";
	mes "We will play this game 5 times and you must";
	mes "answer correctly at least 1 out of 5 times. Doesn't that sound easy?";
	next;
	mes "[Hibilaithan]";
	mes "This is a very good game for";
	mes "increasing your luck!";
	mes "Okay, you better be ready now.";
	next;
	
	set @dap, 0;
	set @correct[0],1;
	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		mes "[Hibilaithan]";
		
		if(@i == 1) mes "I like Zealotus, Alice,";
		if(@i == 1) mes "Munak, and Isis among all monsters.";
		
		mes "Now, guess which one";
		mes "I am thinking of at this moment.";		
		next;

		set @mons, rand(1, 4);		

		switch( select( "Zhertilsh", "Alice", "Munak", "Isis" ) ) {
				case 1:
					set @correct[@i], 1;
					if(@mons == 1) set @dap, @dap + 1;
					break;

				case 2:
					set @correct[@i], 2;
					if(@mons == 2) set @dap, @dap + 1;
					break;

				case 3:
					set @correct[@i], 3;
					if(@mons == 3) set @dap, @dap + 1;
					break;

				case 4:
					set @correct[@i], 4;
					if(@mons == 4) set @dap, @dap + 1;
					break;
		}
	}

	mes "[Hibilaithan]";
	mes "Okay, that's all! Now let me";
	mes "check the answers. I was thinking";
	mes "monsters in the order of...";
	next;
	mes "[Hibilaithan]";

	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		if(@correct[@i] == 1) mes "Zhertilsh";
		if(@correct[@i] == 2) mes "Alice";
		if(@correct[@i] == 3) mes "Munak";
		if(@correct[@i] == 4) mes "Isis";
	}

	if(@dap < 1) goto LV4_9_FAIL;
	
	next;
	mes "[Hibilaithan]";
	mes "Wow, are you a mind reader or what?";
	mes "You answered " + @dap + " times correctly! Whoa...";
	mes "I guess you are already a lucky one,";
	mes "therefore we don't have any reason";
	mes "to prolong the work now!";
	mes "I need some time to prepare, talk to you later!";
	
	if(countitem(@gem) < 30) goto LV4_HACK;
	delitem @gem, 30;
	set lv4_weapon, lv4_weapon + 3;
	close;
	
	
LV4_9_FAIL:
	if(countitem(@gem) < 10) goto LV4_HACK;
	delitem @gem, 10;
	
	next;
	mes "[Hibilaithan]";
	mes "This is not good, not good at all!";
	mes "You didn't even have a correct answer.";
	mes "We cannot start the work with this kind of result.";
	mes "Okay...we must drive away your bad luck first.";
	mes "10 " + @gemstring$ + " will do it!";
	next;
	mes "[Hibilaithan]";
	mes "Now, we need to play the game again.";
	mes "If you don't anymore ore, go get some.";
	mes "I am not going anywhere";
	mes "so you don't need to be in hurry.";
	mes "Take your time!";
	close;


LV4_9_NOGEM:
	mes "[Hibilaithan]";
	mes "Hum. You might lack of";
	mes "materials? Check them again.";
	mes "See. I knew it.";
	close;
	
	
	
//--------------------------------------------------
//Weapon Creation
//--------------------------------------------------
LV4_12:
	mes "[Hibilaithan]";
	mes "Ah, I can tell you are ready. Alright...";
	mes "I will try to make an awsome item for you.";
	mes "...and you are not going to look over my shoulder!";
	mes "I don't want to share my secret recipe with anyone!";
	next;
	mes "- Hibilaithan picks up all the materials -";
	mes "- and turns his back at you. -";
	mes "- You see him busying himself with something. -";
	mes "- Although the way he is doing it -";
	mes "- looks very primitive and crude, -";
	mes "- you feel that some strange energy has gathered around him. -";
	next;
	mes "[Hibilaithan]";
	mes "Umm~ umm~ umm~";
	mes "Aww~aww~ aww~";
	mes "Phew~ phew~ phew~";
	mes "Woo~ woo~ woo~";
	mes "Ho~ ho~ ho~";
	next;
	mes "[Hibilaithan]";
	mes " ";
	mes " ";
	mes "Haha, there it is! Phew, that was really hard...";
	mes "You're anxious, aren't you? Ok, let's see...";
	next;
	
	mes "[Hibilaithan]";
	mes "It's a big success! Hahaha, sure, I made it...";
	mes "Therefore, it should be a big success.";
	mes "Oh, you got a weapon here...let's see,";
	
	switch( lv4_weapon ) {
		case 12:
			mes "it is a Mailbreaker!";
			getitem 1225, 1; // 1225,Mail_Breaker
			break;
		case 13:
			mes "it is a Swordbreaker!";
			getitem 1224, 1; // 1224,Sword_Breaker
			break;
		case 14:
			mes "it is a Slaughter!";
			getitem 1367, 1; // 1367,Slaughter
			break;
	}

	set lv4_weapon, 0;
	mes "This was made competely because I am that skillful,";
	mes "you got to be thankful for that!";
	next;
	
	mes "[Hibilaithan]";
	mes "Whenever you want to have a nice thing,";
	mes "come back to me anytime!";
	mes "I am a very generous genius, you know?";
	mes "Always be thankful for the weapon that I made for you, okay?";
	mes "See you!";
	close;



//--------------------------------------------------
//Other Quests
//--------------------------------------------------
LV4_7:
	mes "[Hibilaithan]";
	mes "Hmm...I feel something strange from you.";
	mes "I regret to say that there is nothing I can do for you.";
	mes "I hope you have a safe travel.";
	close;
	
	
	
//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Hibilaithan]";
	mes "Hmm. There seems to be a bit of problem.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
	close;
}

//--------------------------------------------------
// Tabezthan, creates Talefing, Sabbath and Caesar's Sword
//--------------------------------------------------

um_in,156,77,5	script	Tabezthan	788,{
	if(event_umbala < 3) goto LumWord;
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- You are currently overweight. -";
	mes "- Please lose some weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon == 15) goto LV4_15;
	if(lv4_weapon == 16) goto LV4_16;
	if(lv4_weapon == 17) goto LV4_16;
	if(lv4_weapon == 18) goto LV4_16;
	if(lv4_weapon == 19) goto LV4_19;
	if(lv4_weapon == 20) goto LV4_19;
	if(lv4_weapon == 21) goto LV4_19;
	if(lv4_weapon < 15) goto LV4_14;
	if(lv4_weapon > 21) goto LV4_14;	
	end; // shouldn't be here
	

LumWord:
		mes "[Tabezthan]";
		mes "Umba! Umbaba...umum! Baumba!";
		mes "Umumumbababaumumbabaumba!";
		mes "Umbaumbaumbaumbaumhah!";
		mes "Umumumumumbababababab!";
	close;

	
LV4_0:
	mes "[Tabezthan]";
	mes "Hmm...I feel something different about you...";
	mes "You are a stranger...aren't you?";
	next;
	mes "[Tabezthan]";
	mes "Let me introduce myself.";
	mes "I am Tabezthan,";
	mes "the storage of the knowledge and the genius of Umbala...";
	mes "Hahahaha.";
	next;
	mes "[Tabezthan]";
	mes "I have two diciples. One is Hibilaithan the fool";
	mes "and the other one is Bazo who is intelligent";
	mes "and is from outside the same as you.";
	next;
	mes "[Tabezthan]";
	mes "Of course both of them are talented and skillful";
	mes "but I am worried about Hibilaithan, for he";
	mes "makes many stupid mistakes and is shameless";
	mes "for what he has done.";
	next;
	mes "[Tabezthan]";
	mes "I have tought them how to manipulate";
	mes "the mysterious energy existing in Umbala";
	mes "for creating things with it..";
	mes "I heard that there is a similar skill called Alchemy";
	mes "in the outside world. Although I am not sure if I remember it correctly.";
	next;
	mes "[Tabezthan]";
	mes "Anyways, would you like to see my skill?";
	mes "If so, bring me materials I need,";
	mes "I am more than willing to present my skill for you.";
	next;
	
	switch( select( "Yes, please.", "No, thank you." ) ) {
		case 1:
			if(BaseLevel >= 70) goto L4_0_1;
			
			mes "[Tabezthan]";
			mes "Sebelumnya saya harus menekankan ini";
			mes "Barang spesial ini akan menjadi berbahaya jika kamu sendiri masih lemah";
			mes "Kamu harus lebih berpengalaman lagi anak muda";
			mes "Naikan level kamu terlebih dahulu";
			mes "jika kamu sudah merasa kuat kembalilah kesini kembali";
			mes "Sampai jumpa ~~";
			break;
L4_0_1:
			mes "[Tabezthan]";
			mes "One with curiousity...he is called the young adventurer...";
			mes "Fine. Then let me inform you of";
			mes "the matetrials I need. Please memorize them";
			mes "or write them down.";
			mes "It is not much however.";
			next;
			mes "[Tabezthan]";
			mes "I need 10 Gold, 50 Steel and 10 Emperium";
			mes "as basic materials...";
			mes "and you can enchant the product with a certain trait.";
			mes "For that, I need some rare ores...";
			next;
			mes "[Tabezthan]";
			mes "Please bring me 30 of an ore among Phlogopite, Peridot or Rose Quartz.";
			mes "Each one of them possess their own attribute";
			mes "and by using the ore you have brought,";
			mes "my product will possess a special trait.";
			next;
			mes "[Tabezthan]";
			mes "However, please be aware that";
			mes "I cannot guarantee what will come out as a result.";
			mes "There are too many factors in the world of alchemy";
			mes "where my knowledge is limited.";
			mes "So you must be willing to accept the result as it is";
			mes "even if it does not satisfy your expectations.";
			next;
			mes "[Tabezthan]";
			mes "That means that you should place trust in luck.";
			mes "Let's talk about it later...please go prepare the materials first.";
			mes "Come back when you are ready.";
			mes "I will wait here.";
			
			set lv4_weapon, 15;
			break;
		case 2:
			mes "[Tabezthan]";
			mes "Oh...I see. I was not forcing you anyhow.";
			mes "However, it is a little bit dissappointing to hear that.";
			mes "I was going to display my ability at full length.";
			mes "When you change your mind, please come back.";
			break;			
	}	
	close;
	


//--------------------------------------------------
//Gold, Steel, Emp Check + Choosing the gem
//--------------------------------------------------
LV4_15:
	if(countitem($@LV4_Gold) < 10) goto LV4_15_FAIL;
	if(countitem($@LV4_Steel) < 50) goto LV4_15_FAIL;
	if(countitem($@LV4_Emperium) < 10) goto LV4_15_FAIL;

	mes "[Tabezthan]";
	mes "Ah~ you came back ealier than I thought.";
	mes "Let's see...you have all the basic materials...and";
	mes "we need one more thing, remember?";
	mes "Did you bring it as well?";
	next;
	
	if (countitem($@LV4_Phlogopite) >= 30 && countitem($@LV4_Olivine) >= 30 && countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_POR;
	if (countitem($@LV4_Phlogopite) >= 30 && countitem($@LV4_Olivine) >= 30) goto LV4_15_PO;
	if (countitem($@LV4_Phlogopite) >= 30 && countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_PR;
	if (countitem($@LV4_Olivine) >= 30 && countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_OR;
	if (countitem($@LV4_Phlogopite) >= 30) goto LV4_15_P;
	if (countitem($@LV4_Olivine) >= 30) goto LV4_15_O;
	if (countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_R;
	goto LV4_15_NOGEM;
	end;


LV4_15_POR:	
	mes "[Tabezthan]";
	mes "You made a great effort to bring all of them.";
	mes "However, you can only use one kind at a time.";
	mes "Please choose what you want to use this time.";
	next;
			
	switch( select( "Phlogopite", "Peridot", "Rose Quartz" ) ) {
		case 1:
			mes "[Tabezthan]";
			mes "Phlogopite...okay. Before we start,";
			set @gem, $@LV4_Phlogopite;
			set @gemstring$,"Phlogopite";
			break;
		case 2:
			mes "[Tabezthan]";
			mes "Peridot...okay. Before we start,";
			set @gem, $@LV4_Olivine;
			set @gemstring$,"Peridot";
			break;
		case 3:
			mes "[Tabezthan]";
			mes "Rose Quartz....okay. Before we start,";
			set @gem, $@LV4_Rose_Quartz;
			set @gemstring$,"Rose Quartz";
			break;
	}
	
	goto LV4_15_PICK;
	end; // shouldn't be here
	
	
LV4_15_PO:
	mes "[Tabezthan]";
	mes "Hahaha, I asked you to bring one kind not two.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Phlogopite", "Peridot" ) ) {
		case 1:
			mes "[Tabezthan]";
			mes "Phlogopite...okay. Before we start,";
			set @gem, $@LV4_Phlogopite;
			set @gemstring$,"Phlogopite";
			break;
		case 2:
			mes "[Tabezthan]";
			mes "Peridot...okay. Before we start,";
			set @gem, $@LV4_Olivine;
			set @gemstring$,"Peridot";
			break;
	}
	
	goto LV4_15_PICK;
	end; // shouldn't be here
	

LV4_15_PR:	
	mes "[Tabezthan]";
	mes "Hahaha, I asked you to bring one kind not two.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Phlogopite", "Rose Quartz" ) ) {
		case 1:
			mes "[Tabezthan]";
			mes "Phlogopite...okay. Before we start,";
			set @gem, $@LV4_Phlogopite;
			set @gemstring$,"Phlogopite";
			break;
		case 2:
			mes "[Tabezthan]";
			mes "Rose Quartz....okay. Before we start,";
			set @gem, $@LV4_Rose_Quartz;
			set @gemstring$,"Rose Quartz";
			break;
	}
	
	goto LV4_15_PICK;
	end; // shouldn't be here
	
	
LV4_15_OR:	
	mes "[Tabezthan]";
	mes "Hahaha, I asked you to bring one kind not two.";
	mes "You can only use one kind of ore.";
	mes "Which one would you like to use?";
	next;
	
	switch( select( "Peridot", "Rose Quartz" ) ) {
			case 1:
				mes "[Tabezthan]";
				mes "Peridot...okay. Before we start,";
				set @gem, $@LV4_Olivine;
				set @gemstring$,"Peridot";
				break;
			case 2:
				mes "[Tabezthan]";
				mes "Rose Quartz....okay. Before we start,";
				set @gem, $@LV4_Rose_Quartz;
				set @gemstring$,"Rose Quartz";
				break;
	}
	
	goto LV4_15_PICK;
	end; // shouldn't be here
	
	
LV4_15_P:
	mes "[Tabezthan]";
	mes "Phlogopite...okay. Before we start,";
	set @gem, $@LV4_Phlogopite;
	set @gemstring$,"Phlogopite";
	goto LV4_15_PICK;
	end; // shouldn't be here
		
		
LV4_15_O:
	mes "[Tabezthan]";
	mes "Peridot...okay. Before we start,";
	set @gem, $@LV4_Olivine;
	set @gemstring$,"Peridot";
	goto LV4_15_PICK;
	end; // shouldn't be here
	
	
LV4_15_R:
	mes "[Tabezthan]";
	mes "Rose Quartz....okay. Before we start,";
	set @gem, $@LV4_Rose_Quartz;
	set @gemstring$,"Rose Quartz";
	goto LV4_15_PICK;
	end; // shouldn't be here
	
	
LV4_15_PICK:
	mes "we must do one thing first.";
	mes "That is, to test your luck.";
	mes "As you already know,";
	mes "I cannot guarantee you that we will succeed";
	mes "in makeing one right away.";
	next;
	mes "[Tabezthan]";
	mes "If we can raise your luck before we start,";
	mes "we will be able to succeed.";
	next;
	mes "[Tabezthan]";
	mes "Now you must be wondering what we";
	mes "will do in order to increase your luck.";
	mes "It is simple, we will play a mind-reading game.";
	mes "I am going to think of one monster among 4 of my favorites,";
	mes "you will guess what the monster is.";
	next;
	mes "[Tabezthan]";
	mes "You must answer correctly at least";
	mes "1 out of 5 times. It should not be that difficult.";
	mes "And if you fail to answer correctly, we must do something else";
	mes "to drive away your bad luck.";
	next;
	mes "[Tabezthan]";
	mes "I will take 10 of the special ore you chose.";
	mes "Well, I understand that it does not sound tempting";
	mes "but let's think of it this way.";
	mes "It is much better than wasting 30 ore";
	mes "by failing to create the item, isn't it?";
	next;
	mes "[Tabezthan]";
	mes "Okay, now I need some time to prepare...";
	mes "Talk to you later!";
	
	if(countitem($@LV4_Gold) < 10) goto LV4_HACK;
	if(countitem($@LV4_Steel) < 50) goto LV4_HACK;
	if(countitem($@LV4_Emperium) < 10) goto LV4_HACK;
	delitem $@LV4_Gold, 10;
	delitem $@LV4_Steel, 50;
	delitem $@LV4_Emperium, 10;
	if(@gem == $@LV4_Phlogopite) set lv4_weapon, 16;
	if(@gem == $@LV4_Olivine) set lv4_weapon, 17;
	if(@gem == $@LV4_Rose_Quartz) set lv4_weapon, 18; 
	close;


LV4_15_NOGEM:
	mes "[Tabezthan]";
	mes "Hmmm...I cannot find any rare ores in";
	mes "the materials that you have brought...";
	mes "Please bring me 30 of an ore among Phlogopite, Peridot";
	mes "or Rose Quartz.";
	close;


LV4_15_FAIL:
	mes "[Tabezthan]";
	mes "I need 10 Gold, 50 Steel and 10 Emperium";
	mes "as basic materials...";
	mes "and you can enchant the product with a certain trait.";
	mes "For that, I need some rare ores...";
	next;
	mes "[Tabezthan]";
	mes "Please bring me 30 of an ore among Phlogopite, Peridot or Rose Quartz.";
	mes "Each one of them possess their own attribute";
	mes "and by using the ore you have brought,";
	mes "my product will possess a special trait.";
	close;



//--------------------------------------------------
//Guessing Game
//--------------------------------------------------
LV4_16:
	if(lv4_weapon == 16) set @gem, $@LV4_Phlogopite;
	if(lv4_weapon == 17) set @gem, $@LV4_Olivine;
	if(lv4_weapon == 18) set @gem, $@LV4_Rose_Quartz;
	if(countitem(@gem) < 30) goto LV4_16_NOGEM; 
	
	mes "[Tabezthan]";
	mes "Okay, let's get started!";
	mes "It is simple. There are";
	mes "4 monsters that I like. I am going to think";
	mes "of a monster among the 4, you will guess what it is.";
	mes "We will play this game 5 times and you must";
	mes "answer correctly at least 1 out of 5 times. Doesn't it sound easy?";
	next;
	mes "[Hibilaithan]";
	mes "This is a very good game for";
	mes "increasing your luck!";
	mes "Okay, better be ready now.";
	next;
	
	set @dap, 0;
	set @correct[0],1;
	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		mes "[Tabezthan]";
		
		if(@i == 1) mes "I like Baphomet, Dark Lord,";
		if(@i == 1) mes "Bloody Knight, and Stormy Knight among all monsters.";
		
		mes "Now, guess which one";		
		mes "I am thinking at this moment.";
		next;

		set @mons, rand(1, 4);		

		switch( select( "Baphomet", "Dark Lord", "Bloody Knight", "Stormy Knight" ) ) {
				case 1:
					set @correct[@i], 1;
					if(@mons == 1) set @dap, @dap + 1;
					break;

				case 2:
					set @correct[@i], 2;
					if(@mons == 2) set @dap, @dap + 1;
					break;

				case 3:
					set @correct[@i], 3;
					if(@mons == 3) set @dap, @dap + 1;
					break;

				case 4:
					set @correct[@i], 4;
					if(@mons == 4) set @dap, @dap + 1;
					break;
		}
	}

	mes "[Tabezthan]";
	mes "Okay, that's all! Now let me check";
	mes "the answers. I was thinking";
	mes "of the monsters in the order of...";
	next;
	mes "[Tabezthan]";

	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		if(@correct[@i] == 1) mes "Baphomet";
		if(@correct[@i] == 2) mes "Dark Lord";
		if(@correct[@i] == 3) mes "Bloody Knight";
		if(@correct[@i] == 4) mes "Stormy Knight";
	}

	if(@dap < 1) goto LV4_16_FAIL;
	
	next;
	mes "[Tabezthan]";
	mes "You have answered " + @dap + " times correctly.";
	mes "It seems that your luck is at its highest.";
	mes "I need some time to prepare, talk to you later.";
	
	if(countitem(@gem) < 30) goto LV4_HACK;
	delitem @gem, 30;
	set lv4_weapon, lv4_weapon + 3;
	close;
	
	
LV4_16_FAIL:
	if(countitem(@gem) < 10) goto LV4_HACK;
	delitem @gem, 10;
	
	next;
	mes "[Tabezthan]";
	mes "Unfortunately you have failed...";
	mes "When you have bad luck, you'd better";
	mes "not expect a good result.";
	mes "Okay, we must drive away your bad luck.";
	mes "10 " + @gemstring$ + " will do it.";
	next;
	mes "[Tabezthan]";
	mes "Do not be so dissappointed.";
	mes "It is still better than wasting 30 of them";
	mes "for trying to make a thing when you know";
	mes "you would not make it. ";
	next;
	mes "[Tabezthan]";
	mes "If you need something to prepare,";
	mes "please do. I will wait for you here.";
	close;


LV4_16_NOGEM:
	mes "[Tabezthan]";
	mes "Umm...it seems you are lacking " + @gemstring$;
	mes "Please count them and";
	mes "if you don't have enough,";
	mes "you can go gather more first.";
	close;
	
	
	
//--------------------------------------------------
//Weapon Creation
//--------------------------------------------------
LV4_19:
	mes "[Tabezthan]";
	mes "Great, I am also ready.";
	mes "Shall we start now? Give me a minute.";
	mes "I need to arrange these materials in a magic circle.";
	next;
	mes "- He arranges materials in a strange circle -";
	mes "- and starts chanting in a strange language. -";
	mes "- As he does that, suddenly the air surrounding him -";
	mes "- seems to change and you feel something powerful-";
	mes "- gathering around him and the materials. -";
	next;
	mes "[Tabezthan]";
	mes "Please understand that the power is not from me.";
	mes "I just used my ability to gather the power into these materials.";
	mes "The power has come from the city of the dead.";
	next;
	mes "[Tabezthan]";
	mes "The result is in God's hands.";
	mes "Let's pray for a good result together.";
	mes "Hmmmmm!";
	next;
	mes "- After a while...you find the materials -";
	mes "- are gathering and combining into one new thing. -";
	mes "- Does that mean that you have succeeded or failed?! -";
	next;
	mes "[Tabezthan]";
	mes "?!...God must bless you!";
	mes "I cannot believe that I created such a rare weapon!";
	mes "Yes, my late father told me the name of this weapon.";
	
	switch( lv4_weapon ) {
		case 19:
			mes "That is Caesar's Sword.";
			getitem 1134, 1; // 1134,Caesar's_Sword
			break;
		case 20:
			mes "That is Talefing.";
			getitem 1139, 1; // 1139,Talefing_
			break;
		case 21:
			mes "That is Sabbath.";
			getitem 1365, 1; // 1365,Sabbath
			break;
	}

	set lv4_weapon, 0;
	mes "[Tabezthan]";
	mes "Now, since I made this with materials";
	mes "that you have brought, this is yours now.";
	mes "I only helped you to make it,";
	mes "and I am glad to give this to you.";
	next;
	mes "[Tabezthan]";
	mes "Well, feel free to come back";
	mes "if you want to make a thing again...hahaha.";
	mes "The weapon was made to be yours.";
	close;



//--------------------------------------------------
//Other Quests
//--------------------------------------------------
LV4_14:
	mes "[Tabezthan]";
	mes "Umm...you don't have a business with me, do you?";
	mes "Please do not think of me as an old fool.";
	mes "When a man gets older, he can see through other people's minds.";
	mes "Go ahead and do what you have been doing.";
	mes "Do not let me intrrupt you any longer.";
	close;
	
	
	
//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Tabezthan]";
	mes "Hmm. There seems to be a bit of problem.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
	close;
}

//--------------------------------------------------
// Bill Thayer, Gives hints for S grade weapons quests
//--------------------------------------------------

aldebaran,178,239,3	script	Bill Thayer	712,{
	// Explain Materials
	if(lv4_weapon == 26) goto LV4_26;
	if(lv4_weapon == 27) goto LV4_27;
	if(lv4_weapon == 28) goto LV4_28;
	
	if(lv4_weapon == 35) goto LV4_35;
	if(lv4_weapon == 36) goto LV4_36;
	if(lv4_weapon == 37) goto LV4_37;

	if(lv4_weapon == 44) goto LV4_44;
	if(lv4_weapon == 45) goto LV4_45;
	if(lv4_weapon == 46) goto LV4_46;
	
	if(lv4_weapon == 53) goto LV4_53;
	if(lv4_weapon == 54) goto LV4_54;
	if(lv4_weapon == 55) goto LV4_55;
	
	// Guide
	if(lv4_weapon == 22) goto LV4_22;
	if(lv4_weapon == 23) goto LV4_23;
		
	if(lv4_weapon == 31) goto LV4_31;
	if(lv4_weapon == 32) goto LV4_32;
	
	if(lv4_weapon == 40) goto LV4_40;
	if(lv4_weapon == 41) goto LV4_41;
	
	if(lv4_weapon == 49) goto LV4_49;
	if(lv4_weapon == 50) goto LV4_50;
	
	mes "[Bill Thayer]";
	mes "...I cannot do anything now.";
	mes "In the past, I used to be a well-known weaponsmith";
	mes "but now I am just a lonely old man who lost all of his sons.";
	mes "Please leave me alone.";
	close;

LV4_27:
LV4_28:
LV4_36:
LV4_37:
LV4_45:
LV4_46:
LV4_54:
LV4_55:
	if(lv4_weapon == 27)
{
			set @LV4_Gem1Name$, "Peridot";
			set @LV4_Gem2Name$, "Turquoise";
			set @LV4_Gem3Name$, "Agate";
}
	if(lv4_weapon == 28)
{
			set @LV4_Gem1Name$, "Phlogopite";
			set @LV4_Gem2Name$, "Pyroxene";
			set @LV4_Gem3Name$, "Rose Quartz";
}
	if(lv4_weapon == 36)
{
			set @LV4_Gem1Name$, "Muscovite";
			set @LV4_Gem2Name$, "Rose Quartz";
			set @LV4_Gem3Name$, "Peridot";
}
	if(lv4_weapon == 37)
{
			set @LV4_Gem1Name$, "Biotite";
			set @LV4_Gem2Name$, "Agate";
			set @LV4_Gem3Name$, "Citrine";
}
	if(lv4_weapon == 45)
{
			set @LV4_Gem1Name$, "Turquoise";
			set @LV4_Gem2Name$, "Biotite";
			set @LV4_Gem3Name$, "Rose Quartz";
}
	if(lv4_weapon == 46)
{
			set @LV4_Gem1Name$, "Citrine";
			set @LV4_Gem2Name$, "Pyroxene";
			set @LV4_Gem3Name$, "Phlogopite";
}
	if(lv4_weapon == 54)
{
			set @LV4_Gem1Name$, "Muscovite";
			set @LV4_Gem2Name$, "Agate";
			set @LV4_Gem3Name$, "Citrine";
}
	if(lv4_weapon == 55)
{
			set @LV4_Gem1Name$, "Pyroxene";
			set @LV4_Gem2Name$, "Turquoise";
			set @LV4_Gem3Name$, "Phlogopite";
}

	mes "[Bill Thayer]";
	mes "Hmm...it seems that you need 30 of";
	mes @LV4_Gem1Name$ + ", " + @LV4_Gem2Name$ + ", and " + @LV4_Gem3Name$;
	mes "I am sure that those are the materials...";
	mes "but I cannot guarantee anything about the result...";
	next;
	mes "[Bill Thayer]";
	mes "My sons passed away before we finished this research...";
	mes "Hahaha...let's not talk about it.";
	mes "I told you what you need anyway.";
	close;


LV4_26:
LV4_35:
LV4_44:
LV4_53:
	mes "[Bill Thayer]";
	if(lv4_weapon == 26) mes "What, Kayron's research?";
	if(lv4_weapon == 35) mes "What, Reyghema's research?";
	if(lv4_weapon == 44) mes "What? Hein's research?";
	if(lv4_weapon == 53) mes "What? Waltboughst's research?";	
	mes "How do you know him?";
	mes "Were you a friend of him when he was still alive?";
	mes "Ah....there must an act of providence.";
	next;
	
	set lv4_weapon, lv4_weapon + rand(1, 2);
	
	switch( lv4_weapon ) {
		case 27:
			set @LV4_Gem1Name$, "Peridot";
			set LV4_Gem1, $@LV4_Olivine;
			set @LV4_Gem2Name$, "Turquoise";
			set LV4_Gem2, $@LV4_Turquoise;
			set @LV4_Gem3Name$, "Agate";
			set LV4_Gem3, $@LV4_Agate;
			break;
		case 28:
			set @LV4_Gem1Name$, "Phlogopite";
			set LV4_Gem1, $@LV4_Phlogopite;
			set @LV4_Gem2Name$, "Pyroxene";
			set LV4_Gem2, $@LV4_Pyroxene;
			set @LV4_Gem3Name$, "Rose Quartz";
			set LV4_Gem3, $@LV4_Rose_Quartz;
			break;
		case 36:
			set @LV4_Gem1Name$, "Muscovite";
			set LV4_Gem1, $@LV4_Muscovite;
			set @LV4_Gem2Name$, "Rose Quartz";
			set LV4_Gem2, $@LV4_Rose_Quartz ;
			set @LV4_Gem3Name$, "Peridot";
			set LV4_Gem3, $@LV4_Olivine;
			break;
		case 37:
			set @LV4_Gem1Name$, "Biotite";
			set LV4_Gem1, $@LV4_Biotite;
			set @LV4_Gem2Name$, "Agate";
			set LV4_Gem2, $@LV4_Agate;
			set @LV4_Gem3Name$, "Citrine";
			set LV4_Gem3, $@LV4_Citrine;
			break;
		case 45:
			set @LV4_Gem1Name$, "Turquoise";
			set LV4_Gem1, $@LV4_Turquoise;
			set @LV4_Gem2Name$, "Biotite";
			set LV4_Gem2, $@LV4_Biotite;
			set @LV4_Gem3Name$, "Rose Quartz";
			set LV4_Gem3, $@LV4_Rose_Quartz;
			break;
		case 46:
			set @LV4_Gem1Name$, "Citrine";
			set LV4_Gem1, $@LV4_Citrine;
			set @LV4_Gem2Name$, "Pyroxene";
			set LV4_Gem2, $@LV4_Pyroxene;
			set @LV4_Gem3Name$, "Phlogopite";
			set LV4_Gem3, $@LV4_Phlogopite;
			break;
		case 54:
			set @LV4_Gem1Name$, "Muscovite";
			set LV4_Gem1, $@LV4_Muscovite;
			set @LV4_Gem2Name$, "Agate";
			set LV4_Gem2, $@LV4_Agate;
			set @LV4_Gem3Name$, "Citrine";
			set LV4_Gem3, $@LV4_Citrine;
			break;
		case 55:
			set @LV4_Gem1Name$, "Pyroxene";
			set LV4_Gem1, $@LV4_Pyroxene;
			set @LV4_Gem2Name$, "Turquoise";
			set LV4_Gem2, $@LV4_Turquoise;
			set @LV4_Gem3Name$, "Phlogopite";
			set LV4_Gem3, $@LV4_Phlogopite;
			break;
	}
	
	mes "[Bill Thayer]";
	mes "Hmm...it seems that you need 30 of";
	mes @LV4_Gem1Name$ + ", " + @LV4_Gem2Name$ + ", and " + @LV4_Gem3Name$;
	mes "I am sure that those are the materials...";
	mes "but I cannot guarantee anything about the result...";
	next;
	mes "[Bill Thayer]";
	mes "My sons passed away before we finished this research...";
	mes "Hahaha...let's not talk about it.";
	mes "I told you what you need anyway.";
	close;	


LV4_22:
LV4_23:
	mes "[Bill Thayer]";
	mes "Oh well, I told you already";
	mes "that there is nothing I can do for you...";
	mes "since my sons are all gone...why are";
	mes "you wasting my breath? ^4D4DFFYou are helpless.^000000";
	set lv4_weapon, 23;
	next;
	mes "[Bill Thayer]";
	mes "...you just made me";
	mes "miss my sons again...";
	mes "Please leave me alone.";
	close;
	

LV4_31:
LV4_32:
	mes "[Bill Thayer]";
	mes "All of my sons broke my heart by dying young...";
	mes "...youth...what is youth?";
	mes "^4D4DFFThat means that you never regret anything!^000000";
	set lv4_weapon, 32;
	next;
	mes "[Bill Thayer]";
	mes "That was what I used to tell to my sons.";
	mes "Please remember that,";
	mes "never regret anything that you have done.";
	mes "However, in order to do that, you must";
	mes "do everything right...that's all I can tell you for now.";
	close;
	
		
LV4_40:
LV4_41:
	mes "[Bill Thayer]";
	mes "...no matter how much you are willing to pay me,";
	mes "I am not going to forge any weapons.";
	mes "Even when I was actively forging weapons,";
	mes "I didn't accept money from my clients.";
	mes "You know why?";
	next;
	mes "[Bill Thayer]";
	mes "It brings me bad luck ^4D4DFFto^000000";
	mes "^4D4DFFforge a good weapon.^000000";
	mes "Therefore I didn't receive money from them.";
	set lv4_weapon, 41;
	next;
	mes "[Bill Thayer]";
	mes "Well, I am not going to do so";
	mes "even if you offer me something else other than money";
	mes "...unless all of my sons come back";
	mes "alive....";
	close;


LV4_49:
LV4_50:
		mes "[Bill Thayer]";
		mes "...do you not have anything to do?";
		mes "I hope you stop bothering me";
		mes "and trying your best for your work.";
		mes "Ah...trying best does not always";
		mes "result in a success though.";
		next;
		mes "[Bill Thayer]";
		mes "However, ^4D4DFFall the successful men^000000";
		mes "^4D4DFFin the history tried their best!^000000";
		mes "I hope you will remember that.";
		mes "I used to tell this to my sons when they were alive.";
		mes "Hahaha...";
		set lv4_weapon, 50;
		close;
}

//--------------------------------------------------
// Kayron, creates Longinus' Spear, Guillotine, Great Axe and Brionac
//--------------------------------------------------

niflheim,240,193,3	script	Kayron	794,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- You are currently overweight. -";
	mes "- Please lose some weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
	mes "[Kayron]";
	mes "Bah, I cannot believe";
	mes "that such a weak man like you even came here.";
	mes "You have an invisible sign on your forehead";
	mes "that indicates you are a weakling. Be strong first.";
	close;
	

LV4_LEVEL_PASS:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon < 22) goto LV4_21;
	if(lv4_weapon == 22) goto LV4_22;
	if(lv4_weapon == 23) goto LV4_23;
	if(lv4_weapon == 24) goto LV4_24;
	if(lv4_weapon == 25) goto LV4_25;
	if(lv4_weapon == 26) goto LV4_26;
	if(lv4_weapon == 27) goto LV4_27;
	if(lv4_weapon == 28) goto LV4_28;
	if(lv4_weapon == 29) goto LV4_29;
	if(lv4_weapon == 30) goto LV4_30;
	if(lv4_weapon > 30) goto LV4_31;
	end; // shouldn't be here


LV4_0:
LV4_22:
	mes "[Kayron]";
	mes "I used to be called Kayron when I was alive.";
	mes "But now I am nothing but";
	mes "a ghost wandering this place.";
	mes "I am worthless...I cannot do anything";
	mes "without a body...";
	next;
	
	if(lv4_weapon == 0) goto LV4_0_ASK;
	
	mes "[Kayron]";
	mes "Ah...I cannot remember what I was going to say...";
	mes "Waaahhh.....I cannot remember....";
	mes "My memory is gone...!";
	close;
	
LV4_0_ASK:
	switch( select( "Show interest.", "Ignore him." ) ) {
		case 1:
			mes "[Kayron]";
			mes "Ah...I cannot remember what I was going to say...";
			mes "Waaahhh.....I cannot remember....";
			mes "My memory is gone...!";
			set lv4_weapon, 22;
			close;
			break;
		case 2:
			mes "- Because you decided to ignore him, -";
			mes "- you are no longer able to hear him. -";
			close;
			break;
	}
	end;
	

LV4_21:
LV4_31:
	mes "[Kayron]";
	mes "I feel something different about you.";
	mes "Did you come here with a purpose?";
	mes "I am envious of you...";
	close;


LV4_23:
	mes "[Kayron]";
	mes "I used to be called Kayron when I was alive.";
	mes "But now I am nothing but";
	mes "a ghost wandering this place.";
	mes "I am worthless...I cannot do anything";
	mes "without a body...";
	next;
	set @dap1$, "You are helpless.";
	input @answer1$;
	if(@answer1$ == @dap1$) goto LV4_23_CORRECT;
	mes "[Kayron]";
	mes "...? What did you just say?";
	mes "I am sorry but I don't think I understood you.";
	close;

LV4_23_CORRECT:
	mes "[Kayron]";
	mes "Yes, You are helpless...?! Eh?";
	mes "That was my father's favorite saying!";
	mes "Whoa?! Ah...";
	mes "Yes...I forgot that I am dead already.";
	mes "Why did you make me recall something from my past?";
	mes "It is no use now...";
	next;
	mes "[Kayron]";
	mes "But I want to do something in return...";
	mes "since you made me find a piece of my mind.";
	mes "I used to be a weaponsmith in the past,";
	mes "therefore I am going to forge a nice weapon for you.";
	next;
	mes "[Kayron]";
	mes "But you have to gather the materials for me.";
	mes "As you see, I do not have a body";
	mes "that would allow me to touch other objects...";
	mes "So you got to help me with that.";
	next;
	mes "[Kayron]";
	mes "Luckily this place is filled with mysterious energy,";
	mes "that makes my work easier!";
	mes "Heh, even if I fail to forge one,";
	mes "I don't have to worry about dying.";
	mes "Because I am dead already! Muhahahaha!";
	next;
	mes "[Kayron]";
	mes "I will talk to you in a while.";
	mes "I am trying to think of the receipe...";
	set lv4_weapon, 24;
	close;
	
	
LV4_25:
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_25_BASE_MAT;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_25_BASE_MAT;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_25_BASE_MAT;
	if(countitem($@LV4_Gold) < 20) goto LV4_25_BASE_MAT;
	
	mes "[Kayron]";
	mes "Oh...you brought everything I need!";
	mes "You are a reliable person unlike your appearance.";
	mes "But here is the thing...";
	mes "There are some more materials I need...";
	mes "But I cannot think of any of them...my memory";
	mes "is unclear...arrrrph...";
	next;
	mes "[Kayron]";
	mes "I need to think about that a little longer.";
	mes "I know that I really need those materials...awwww....";
	mes "Do you have any idea to bring my memory back?";
	mes "At the same time, rest assured that the materials";
	mes "you brought will be used for my creation. So let me keep them for you.";
	
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
	if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
	delitem $@LV4_Hammer_Of_Blacksmith, 2;
	delitem $@LV4_Emperium_Anvil, 1;
	delitem $@LV4_Illusion_Flower, 1;
	delitem $@LV4_Gold, 20;
	set lv4_weapon, 26;
	close;

LV4_24:
LV4_25_BASE_MAT:
	switch( lv4_weapon ) {
		case 24:
			mes "[Kayron]";
			mes "Oh, you came back at a right time.";
			mes "I just finished my thoughts. Let me tell you one thing.";
			mes "I cannot guarantee you which weapon will come out of this.";
			mes "Also you must be willing to take a risk as well...";
			mes "I guess that the result will be affected by the power";
			mes "of Nifflheim at the time I make.";
			next;
			mes "[Kayron]";
			mes "Let me give you the list of materials";
			mes "I need. They are quite a lot,";
			mes "so write them down if you need.";
			break;
		case 25:
			mes "[Kayron]";
			mes "I will tell you the list of materials I need again.";
			mes "I think I need a lot of materials...so";
			mes "write them down if you need.";
			break;
		}
		next;
		mes "[Kayron]";
		mes "I need 2 Hammer of Blacksmith,";
		mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
		next;
		mes "[Kayron]";
		mes "Bring these to me first. I am kind of worried";
		mes "that I forgot something...but I will try to remember";
		mes "while waiting for you to bring these items.";
		next;
		mes "[Kayron]";
		mes "Have a safe travel.";
		set lv4_weapon, 25;
		close;
		

LV4_27:
LV4_28:
	if(countitem(LV4_Gem1) < 30) goto LV4_27_NOGEM;
	if(countitem(LV4_Gem2) < 30) goto LV4_27_NOGEM;
	if(countitem(LV4_Gem3) < 30) goto LV4_27_NOGEM;
	mes "[Kayron]";
	mes "...Um? The items that you brought to me seem";
	mes "to be good materials for my creation...";
	mes "Give them to me, I shall try first!";
	next;
	mes "[Kayron]";
	mes "Oh...I was right! How did you";
	mes "know these are materials I need?";
	mes "Great, give me a moment!";
	next;
	mes "[Kayron]";
	mes "...wait, I must test your luck first.";
	mes "Since I am not sure about the result,";
	mes "we should place trust in luck for the result of my creation.";
	mes "You must have good luck...";
	next;
	mes "[Kayron]";
	mes "We are going to play 'Rock, Paper, Scissors'.";
	mes "You must win at least 2 out of 3 times.";
	mes "If you fail, you must throw away a large amount";
	mes "of one of the 3 kinds of ore that you have brought.";
	mes "It is for driving away your bad luck.";
	next;
	mes "[Kayron]";
	mes "I will give you a piece of paper.";
	mes "You will write down one among 'Rock, Paper, or Scissors'.";
	mes "I will do the same at the same time.";
	mes "We will compare each other's paper after.";
	next;
	
	set @shobu, 0;
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@i == 2) mes "[Kayron]";
		if(@i == 2) mes "Let's play the second one!";
		if(@i == 3) mes "[Kayron]";
		if(@i == 3) mes "This will be the last one!";
		if(@i == 3) mes "Let's compare after this.";
		set @npchand[@i], rand(1, 3);
		switch( select( "Scissors", "Rock", "Paper" ) ) {
			case 1:
				set @myhand[@i], 1;
				if(@npchand[@i] == 3) set @shobu, @shobu + 1;
				break;
			case 2:
				set @myhand[@i], 2;
				if(@npchand[@i] == 1) set @shobu, @shobu + 1;
				break;
			case 3:
				set @myhand[@i], 3;
				if(@npchand[@i] == 2) set @shobu, @shobu + 1;
				break;
		}
	}
		
	if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem3) < 30) goto LV4_HACK;

	if(@shobu > 1) goto LV4_27_WIN;

	switch ( rand(1 ,3) ) {
		case 1:
			delitem LV4_Gem1, 30;
			break;
		case 2:
			delitem LV4_Gem2, 30;
			break;
		case 3:
			delitem LV4_Gem3, 30;
			break;
	}
	goto LV4_27_RESULT;
		
LV4_27_WIN:
	delitem LV4_Gem1, 30;
	delitem LV4_Gem2, 30;
	delitem LV4_Gem3, 30;
	set lv4_weapon, lv4_weapon + 2;
	goto LV4_27_RESULT;
	
LV4_27_RESULT:
	mes "[Kayron]";
	mes "Okay...I played in the order of...";
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@npchand[@i] == 1) mes "Scissors";
		if(@npchand[@i] == 2) mes "Rock";
		if(@npchand[@i] == 3) mes "Paper";
	}

	next;
	mes "[Kayron]";
	mes "You did in the order of...";

	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@myhand[@i] == 1) mes "Scissors";
		if(@myhand[@i] == 2) mes "Rock";
		if(@myhand[@i] == 3) mes "Paper";
	}

	next;

	if(@shobu > 1) goto LV4_27_SAY_WIN;
	
	mes "[Kayron]";
	mes "Well well well...you lost the game.";
	mes "Ah~ you were close though...";
	mes "We must drive away bad luck.";
	next;
	mes "[Kayron]";
	mes "Okay, I will wait here,";
	mes "go bring me the materials again...";
	close;
			
LV4_27_SAY_WIN:
	mes "[Kayron]";
	mes "Let's see...";
	mes "You won total " + @shobu + " times.";
	mes "Ah~ you must be really good at game!";
	mes "Yes, your luck is at its highest!";
	next;
	mes "[Kayron]";
	mes "I am going to keep my promise.";
	mes "But I need some time to prepare.";
	mes "Give me the materials now and I will talk to you later.";
	close;

LV4_26:
LV4_27_NOGEM:
	mes "[Kayron]";
	mes "Arph...it has not gotten into my memory yet.";
	mes "Awww....this is a problem.";
	mes "I used to often discuss the materials";
	mes "with my family...now I cannot remember what they are...";
	close;


LV4_29:
LV4_30:
	mes "[Kayron]";
	mes "Hahaha...you came back at the right time.";
	mes "The result? Do you want to know about the result?...";
	mes "Haha...okay...let's see...";
	next;
	mes "[Kayron]";
	mes "...YES! It's a success!";
	mes "I created the weapon that got me killed last time!";
	mes "Look at this...haha! I died while making this!";
	mes "... The name of the weapon is...";
	
	
	switch( rand(1, 2) ) {
		case 1:
			if(lv4_weapon == 29) mes "Great Axe! Weee~ I made it!";
			if(lv4_weapon == 29) getitem 1364 ,1; // 1364,Great_Axe
			if(lv4_weapon == 30) mes "Longinus's Spear! Weee~ I made it!";
			if(lv4_weapon == 30) getitem 1469, 1; // 1469,Longinus's_Spear
			break;
		case 2:
			if(lv4_weapon == 29) mes "Guillotine! Weee~ I made it!";
			if(lv4_weapon == 29) getitem 1369, 1; // 1369,Guillotine
			if(lv4_weapon == 30) mes "Brionac! Weee~ I made it!";
			if(lv4_weapon == 30) getitem 1470, 1; // 1470,Brionac
	}
	
	set lv4_weapon, 0;
	next;
	mes "[Kayron]";
	mes "I finally succeeded in the research...";
	mes "I want to show this result to my father...";
	mes "He will be really happy for this.";
	next;
	mes "[Kayron]";
	mes "Ah~ I feel my memories are fading again...";
	mes "If you see me next time...";
	mes "please let me remember the memories again...";
	mes "Thank you...";
	close;
	


//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Kayron]";
	mes "Hmm. There seems to be a bit of problem.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
	close;
}

//--------------------------------------------------
// Reyghema, creates Berserk, Tjungkulleti, Rudra's Bow and Brocca(Skewer)
//--------------------------------------------------

niflheim,99,268,5	script	Reyghema	794,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- You are currently overweight. -";
	mes "- Please lose some weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
	mes "[Reyghema]";
	mes "Um? Do you have any business with me?";
	mes "Sorry but I don't. I'm also not";
	mes "speaking to a weak person like you.";
	mes "Have a safe travel~";
	close;
	

LV4_LEVEL_PASS:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon < 31) goto LV4_30;
	if(lv4_weapon == 31) goto LV4_31;
	if(lv4_weapon == 32) goto LV4_32;
	if(lv4_weapon == 33) goto LV4_33;
	if(lv4_weapon == 34) goto LV4_34;
	if(lv4_weapon == 35) goto LV4_35;
	if(lv4_weapon == 36) goto LV4_36;
	if(lv4_weapon == 37) goto LV4_37;
	if(lv4_weapon == 38) goto LV4_38;
	if(lv4_weapon == 39) goto LV4_39;
	if(lv4_weapon > 39) goto LV4_40;
	end; // shouldn't be here


LV4_0:
LV4_31:
	mes "[Reyghema]";
	mes "Darn it...I didn't want to die!";
	mes "Well...there is no living thing that wants to die but...";
	mes "Especially me, I was too young to die!";
	mes "Youth! ...Ah...I just remember the word.";
	mes "Speaking of which...I think I usually said something related to that...";
	next;
	
	if(lv4_weapon == 0) goto LV4_0_ASK;
	
	mes "[Reyghema]";
	mes "Ah...I cannot remember what I was going to say...";
	mes "Waaahhh.....I cannot remember....";
	mes "My memory is gone...!";
	close;
	
LV4_0_ASK:
	switch( select( "Show interest.", "Igonore him." ) ) {
		case 1:
			mes "[Reyghema]";
			mes "Ah...I cannot remember what I was going to say...";
			mes "Waaahhh.....I cannot remember....";
			mes "My memory is gone...!";
			set lv4_weapon, 31;
			close;
			break;
		case 2:
			mes "- Because you decided to ignore him, -";
			mes "- you are no longer able to hear him. -";
			close;
			break;
	}
	end;
	

LV4_30:
LV4_40:
	mes "[Reyghema]";
	mes "I feel something different about you.";
	mes "Did you come here with a purpose?";
	mes "I am envious of you...";
	close;


LV4_32:
	mes "[Reyghema]";
	mes "I used to be called Reyghema when I was alive.";
	mes "But now I am nothing but";
	mes "a ghost wandering this place.";
	mes "I am worthless...I cannot do anything";
	mes "without a body...";
	next;
	set @dap2$, "That means that you never regret anything!";
	input @answer2$;
	if(@answer2$ == @dap2$) goto LV4_32_CORRECT;
	mes "[Reyghema]";
	mes "What? Do you want to play a game with me or what?";
	mes "Unfortunately I have something to do...";
	mes "wait...what was I going to do?";
	close;

LV4_32_CORRECT:
	mes "[Reyghema]";
	mes "...";
	next;
	mes "[Reyghema]";
	mes "...";
	mes "......";
	next;
	mes "[Reyghema]";
	mes "...";
	mes "......";
	mes ".........";
	next;
	mes "[Reyghema]";
	mes "That's right! I am Bill Thayer the Weaponsmith's";
	mes "second son! And I must forge a weapon";
	mes "in order to not regret my youth!";
	mes "Even if I am dead, I cannot give it up!";
	next;
	mes "[Reyghema]";
	mes "Hey you, thank you for letting me have my memory back!";
	mes "You need to do me another favor!";
	mes "Bring me some items, I need to forge a weapon.";
	mes "Once I make one, I will give it to you in return for your favor.";
	next;
	mes "[Reyghema]";
	mes "Reyghema, breathe deeply first...phew~.";
	mes "Give me a second!";
	set lv4_weapon, 33;
	close;
	
	
LV4_34:
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_34_BASE_MAT;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_34_BASE_MAT;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_34_BASE_MAT;
	if(countitem($@LV4_Gold) < 20) goto LV4_34_BASE_MAT;
	
	mes "[Reyghema]";
	mes "Oh...you brought everything I need!";
	mes "You are a reliable person unlike you appear.";
	mes "But here is the thing...";
	mes "There are some more materials I need...";
	mes "But I cannot think of any of them...my memory";
	mes "is unclear...arrrrph...";
	next;
	mes "[Reyghema]";
	mes "I need to think about that a little longer.";
	mes "I know that I really need those materials...awwww....";
	mes "Do you have any idea to bring my memory back?";
	mes "At the same time, rest assured that the materials";
	mes "you brought will be used for my creation. So let me keep them for you.";
	
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
	if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
	delitem $@LV4_Hammer_Of_Blacksmith, 2;
	delitem $@LV4_Emperium_Anvil, 1;
	delitem $@LV4_Illusion_Flower, 1;
	delitem $@LV4_Gold, 20;
	set lv4_weapon, 35;
	close;

LV4_33:
LV4_34_BASE_MAT:
	switch( lv4_weapon ) {
		case 33:
			mes "[Reyghema]";
			mes "Okay. You don't need any other explaination, do you?";
			mes "I will tell you what I need";
			mes "so please do not forget those materials.";
			break;
		case 34:
			mes "[Reyghema]";
			mes "I will tell you the list of materials I need again.";
			mes "I think I need a lot of materials...so";
			mes "write them down if you need.";
			break;
		}
		next;
		mes "[Reyghema]";
		mes "I need 2 Hammer of Blacksmith,";
		mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
		mes "...wait...are they all...or do I need more?!";
		if(lv4_weapon == 33) next;
		if(lv4_weapon == 33) mes "[Reyghema]";
		if(lv4_weapon == 33) mes "Ah...I think need something more...it's very important...";
		if(lv4_weapon == 33) mes "But I cannot remember what more I need....!";
		if(lv4_weapon == 33) mes "Bah...this is so frustrating.";
		set lv4_weapon, 34;
		close;
		

LV4_36:
LV4_37:
	if(countitem(LV4_Gem1) < 30) goto LV4_36_NOGEM;
	if(countitem(LV4_Gem2) < 30) goto LV4_36_NOGEM;
	if(countitem(LV4_Gem3) < 30) goto LV4_36_NOGEM;
	mes "[Reyghema]";
	mes "...Um? The items that you brought to me seem";
	mes "to be good materials for my creation...";
	mes "Give them to me, I shall try first!";
	next;
	mes "[Reyghema]";
	mes "Oh...I was right! How did you";
	mes "know these are materials I need?";
	mes "Great, give me a moment!";
	next;
	mes "[Reyghema]";
	mes "...wait, I must test your luck first.";
	mes "Since I am not sure about the result,";
	mes "we should place trust in luck for the result of my creation.";
	mes "You must have good luck...";
	next;
	mes "[Reyghema]";
	mes "We are going to play 'Rock, Paper, Scissors'.";
	mes "You must win at least 2 out of 3 times.";
	mes "If you fail, you must leave a large amount";
	mes "of one material you have brought.";
	mes "It is for driving away your bad luck.";
	next;
	mes "[Reyghema]";
	mes "I will give you a piece of paper.";
	mes "You will write down one among 'Rock, Paper, or Scissors'.";
	mes "I will do the same at the same time.";
	mes "We will then compare each other's paper.";
	next;
	
	set @shobu, 0;
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@i == 2) mes "[Reyghema]";
		if(@i == 2) mes "Let's play the second one!";
		if(@i == 3) mes "[Reyghema]";
		if(@i == 3) mes "This will be the last one!";
		if(@i == 3) mes "Let's compare after this.";
		set @npchand[@i], rand(1, 3);
		switch( select( "Scissors", "Rock", "Paper" ) ) {
			case 1:
				set @myhand[@i], 1;
				if(@npchand[@i] == 3) set @shobu, @shobu + 1;
				break;
			case 2:
				set @myhand[@i], 2;
				if(@npchand[@i] == 1) set @shobu, @shobu + 1;
				break;
			case 3:
				set @myhand[@i], 3;
				if(@npchand[@i] == 2) set @shobu, @shobu + 1;
				break;
		}
	}
		
	if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem3) < 30) goto LV4_HACK;

	if(@shobu > 1) goto LV4_36_WIN;

	switch ( rand(1 ,3) ) {
		case 1:
			delitem LV4_Gem1, 30;
			break;
		case 2:
			delitem LV4_Gem2, 30;
			break;
		case 3:
			delitem LV4_Gem3, 30;
			break;
	}
	goto LV4_36_RESULT;
		
LV4_36_WIN:
	delitem LV4_Gem1, 30;
	delitem LV4_Gem2, 30;
	delitem LV4_Gem3, 30;
	set lv4_weapon, lv4_weapon + 2;
	goto LV4_36_RESULT;
	
LV4_36_RESULT:
	mes "[Reyghema]";
	mes "Okay...I played in the order of...";
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@npchand[@i] == 1) mes "Scissors";
		if(@npchand[@i] == 2) mes "Rock";
		if(@npchand[@i] == 3) mes "Paper";
	}

	next;
	mes "[Reyghema]";
	mes "You did in the order of...";

	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@myhand[@i] == 1) mes "Scissors";
		if(@myhand[@i] == 2) mes "Rock";
		if(@myhand[@i] == 3) mes "Paper";
	}

	next;

	if(@shobu > 1) goto LV4_36_SAY_WIN;
	
	mes "[Reyghema]";
	mes "Well well well...you lost the game.";
	mes "Ah~ you were close though...";
	mes "We must drive away bad luck.";
	next;
	mes "[Reyghema]";
	mes "Okay, I will wait here,";
	mes "go bring me the materials again...";
	close;
			
LV4_36_SAY_WIN:
	mes "[Reyghema]";
	mes "Let's see...";
	mes "You won total " + @shobu + " times.";
	mes "Ah~ you must be really good at game!";
	mes "Yes, your luck is at its highest!";
	next;
	mes "[Reyghema]";
	mes "I am going to keep my promise.";
	mes "But I need some time to prepare.";
	mes "Give me the materials now and I will talk to you later.";
	close;

LV4_35:
LV4_36_NOGEM:
		mes "[Reyghema]";
		mes "Not yet! I have not remembered it yet! Awwww...";
		mes "This is killing me...";
		mes "Oh, wait...I died already...";
		mes "God damn it!";
	close;


LV4_38:
LV4_39:
	mes "[Reyghema]";
	mes "..................";
	next;
	mes "[Reyghema]";
	mes "...YES! It's a success!";
	mes "I created the weapon that got me killed last time!";
	mes "Look at this...haha! I died while making this!";
	mes "... The name of the weapon is...";
	
	switch( rand(1, 2) ) {
		case 1:
			if(lv4_weapon == 38) mes "Berserk! Weee~ Weee~ I made it!";
			if(lv4_weapon == 38) getitem 1814 ,1; // 1814,Berserk
			if(lv4_weapon == 39) mes "Tjungkuletti! Weee~ I made it!";
			if(lv4_weapon == 39) getitem 1416, 1; // 1416,Tjungkuletti
			break;
		case 2:
			if(lv4_weapon == 38) mes "Rudra's Bow! Weee~ I made it!";
			if(lv4_weapon == 38) getitem 1720, 1; // 1720,Bow_of_Rudra
			if(lv4_weapon == 39) mes "Brocca!";
			if(lv4_weapon == 39) getitem 1415, 1; // 1415,Skewer
	}
	
	set lv4_weapon, 0;
	next;
	mes "[Reyghema]";
	mes "...*sigh*.";
	next;
	mes "[Reyghema]";
	mes "Happiness lasts too short...";
	mes "As I am a dead man, I think I am not allowed";
	mes "to keep the memory of past....";
	mes "My memory is fading again...";
	next;
	mes "[Reyghema]";
	mes "But thank you for letting me achieve";
	mes "my long-cherished desire.";
	mes "If we meet again, please let me";
	mes "retrieve my memory of past again.";
	mes "So I can try forging another weapon.";
	next;
	mes "[Reyghema]";
	mes "Farewell, adventurer.";
	close;
	
	

//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Reyghema]";
	mes "Hmm. There seems to be a bit of problem.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
	close;
}

//--------------------------------------------------
// Hein, creates Excalibur, Schweisersabel, Dragon Slayer and Edge
//--------------------------------------------------

niflheim,187,280,3	script	Hein	795,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- You are currently overweight. -";
	mes "- Please lose some weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
	mes "[Hein]";
	mes "You should care about other people";
	mes "more than yourself...";
	mes "You are quite weak for an adventurer.";
	close;
	

LV4_LEVEL_PASS:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon < 40) goto LV4_39;
	if(lv4_weapon == 40) goto LV4_40;
	if(lv4_weapon == 41) goto LV4_41;
	if(lv4_weapon == 42) goto LV4_42;
	if(lv4_weapon == 43) goto LV4_43;
	if(lv4_weapon == 44) goto LV4_44;
	if(lv4_weapon == 45) goto LV4_45;
	if(lv4_weapon == 46) goto LV4_46;
	if(lv4_weapon == 47) goto LV4_47;
	if(lv4_weapon == 48) goto LV4_48;
	if(lv4_weapon > 48) goto LV4_49;
	end; // shouldn't be here


LV4_0:
LV4_40:
	mes "[Hein]";
	mes "Ah...are you going to ask me something?";
	mes "However, I am not accepting money";
	mes "from my client. Because.";
	mes "It brings me bad luck to...";
	mes "...whaat? What did I just say?";
	mes "Awww....I am confused.";
	next;
	
	if(lv4_weapon == 0) goto LV4_0_ASK;
	
	mes "[Hein]";
	mes "Why did I speak of money?";
	mes "I am a dead man and dead people";
	mes "do not need money...arf!";
	mes "My head is hurting...I guess that";
	mes "a dead man can have a headache!";
	close;
	
LV4_0_ASK:
	switch( select( "Show interest.", "Igonore him." ) ) {
		case 1:
			mes "[Hein]";
			mes "Why did I speak of money?";
			mes "I am a dead man and dead people";
			mes "do not need money...arf!";
			mes "My head is hurting...I guess that";
			mes "a dead man can have a headache!";
			set lv4_weapon, 40;
			close;
			break;
		case 2:
			mes "- Because you decided to ignore him, -";
			mes "- you are no longer able to hear him. -";
			close;
			break;
	}
	end;
	

LV4_39:
LV4_49:
	mes "[Hein]";
	mes "I feel something different from you.";
	mes "Did you come here with a purpose?";
	mes "I am envious of you...";
	close;


LV4_41:
	mes "[Hein]";
	mes "Ah...are you going to ask me something?";
	mes "However, I am not accepting money";
	mes "from my client. Because.";
	mes "It brings me bad luck to...";
	next;
	set @dap3$, "to forge a good weapon.";
	input @answer3$;
	if(@answer3$ == @dap3$) goto LV4_41_CORRECT;
	mes "[Hein]";
	mes "...? What are you talking about?";
	mes "What was I going to say?";
	mes "Arf....my head is hurting...!";
	close;

LV4_41_CORRECT:
	mes "[Hein]";
	mes "That's right! It's bad luck!";
	mes "Creating weapons is betting! And I am...I am?";
	mes "Oh right...I forgot that. Yes, I am dead.";
	mes "Ahahahahaha.";
	set lv4_weapon, 42;
	next;
	mes "[Hein]";
	mes "Well, I must be a lucky dead man";
	mes "for remembering my past!";
	mes "Hahahahaha!";
	next;
	mes "[Hein]";
	mes "Perhaps God wants me to";
	mes "continue my research...?";
	mes "wait, let me ask you a favor.";
	next;
	mes "[Hein]";
	mes "Can you bring me some materials";
	mes "that I need for my research?";
	mes "If I succeed in the research,";
	mes "I will give you the result in return.";
	next;
	mes "[Hein]";
	mes "You can take your time to think of my offer.";
	mes "Please talk to me later.";	
	close;
	
	
LV4_43:
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_43_BASE_MAT;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_43_BASE_MAT;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_43_BASE_MAT;
	if(countitem($@LV4_Gold) < 20) goto LV4_43_BASE_MAT;
	
	mes "[Hein]";
	mes "Oh, you have brought the materials I asked.";
	mes "Here's the thing. I cannot remember what I need other than those...";
	mes "Aww....I need some more time to think of them...";
	next;
	mes "[Hein]";
	mes "Please try to search what I need...if you can.";
	mes "Of course, it will not be an easy job for you";
	mes "to do so...but I know you have a body to move with your will...";
	mes "It is still better than being a ghost like me...";
	next;
	mes "[Hein]";
	mes "Please give me all the materials you have brought.";
	mes "I will keep them for you.";
	
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
	if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
	delitem $@LV4_Hammer_Of_Blacksmith, 2;
	delitem $@LV4_Emperium_Anvil, 1;
	delitem $@LV4_Illusion_Flower, 1;
	delitem $@LV4_Gold, 20;
	set lv4_weapon, 44;
	close;

LV4_42:
LV4_43_BASE_MAT:
	switch( lv4_weapon ) {
		case 42:
			mes "[Hein]";
			mes "I will take you speaking to me again";
			mes "as the approval of my request.";
			mes "Thank you so much.";
			next;
			mes "[Hein]";
			mes "I need 2 Hammer of Blacksmith,";
			mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
			mes "Most likely they are the ones I need.";
			next;
			mes "[Hein]";
			mes "And I do need 3 more things...";
			mes "but I have a hard time remembering what they are.";
			mes "That means that my memory of the past is not";
			mes "absolutely back.";
			next;
			mes "[Hein]";
			mes "*sigh*...I am so sorry to ask of you this...";
			mes "but please search for what those 3 things are.";
			mes "In the meantime, I will try to remember them.";
			mes "Thank you.";
			set lv4_weapon, 43;
			break;
		case 43:
			mes "[Hein]";
			mes "I need 2 Hammer of Blacksmith,";
			mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
			mes "Most likely they are the ones I need.";
			break;
		}
		close;
		

LV4_45:
LV4_46:
	if(countitem(LV4_Gem1) < 30) goto LV4_45_NOGEM;
	if(countitem(LV4_Gem2) < 30) goto LV4_45_NOGEM;
	if(countitem(LV4_Gem3) < 30) goto LV4_45_NOGEM;
	mes "[Hein]";
	mes "...Um? The items that you brought to me seem";
	mes "to be good materials for my creation...";
	mes "Give them to me, I shall try first!";
	next;
	mes "[Hein]";
	mes "Oh...I was right! How did you";
	mes "know these are materials I need?";
	mes "Great, give me a moment!";
	next;
	mes "[Hein]";
	mes "...Wait, I must test your luck first.";
	mes "Since I am not sure about the result,";
	mes "we should trust to luck for the result of my creation.";
	mes "You must have good luck...";
	next;
	mes "[Hein]";
	mes "We are going to play 'Rock, Paper, Scissors'.";
	mes "You must win at least 2 out of 3 times.";
	mes "If you fail, you must leave a large amount";
	mes "of one material you have brought.";
	mes "It is for driving away your bad luck.";
	next;
	mes "[Hein]";
	mes "I will give you a piece of paper.";
	mes "You will write down one among 'Rock, Paper, or Scissors'.";
	mes "I will do the same at the same time.";
	mes "We will then compare each other's paper at the end.";
	next;
	
	set @shobu, 0;
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@i == 2) mes "[Hein]";
		if(@i == 2) mes "Let's play the second one!";
		if(@i == 3) mes "[Hein]";
		if(@i == 3) mes "This will be the last one!";
		if(@i == 3) mes "Let's compare after this.";
		set @npchand[@i], rand(1, 3);
		switch( select( "Scissors", "Rock", "Paper" ) ) {
			case 1:
				set @myhand[@i], 1;
				if(@npchand[@i] == 3) set @shobu, @shobu + 1;
				break;
			case 2:
				set @myhand[@i], 2;
				if(@npchand[@i] == 1) set @shobu, @shobu + 1;
				break;
			case 3:
				set @myhand[@i], 3;
				if(@npchand[@i] == 2) set @shobu, @shobu + 1;
				break;
		}
	}
		
	if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem3) < 30) goto LV4_HACK;

	if(@shobu > 1) goto LV4_45_WIN;

	switch ( rand(1 ,3) ) {
		case 1:
			delitem LV4_Gem1, 30;
			break;
		case 2:
			delitem LV4_Gem2, 30;
			break;
		case 3:
			delitem LV4_Gem3, 30;
			break;
	}
	goto LV4_45_RESULT;
		
LV4_45_WIN:
	delitem LV4_Gem1, 30;
	delitem LV4_Gem2, 30;
	delitem LV4_Gem3, 30;
	set lv4_weapon, lv4_weapon + 2;
	goto LV4_45_RESULT;
	
LV4_45_RESULT:
	mes "[Hein]";
	mes "Okay...I played in the order of...";
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@npchand[@i] == 1) mes "Scissors";
		if(@npchand[@i] == 2) mes "Rock";
		if(@npchand[@i] == 3) mes "Paper";
	}

	next;
	mes "[Hein]";
	mes "You did in the order of...";

	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@myhand[@i] == 1) mes "Scissors";
		if(@myhand[@i] == 2) mes "Rock";
		if(@myhand[@i] == 3) mes "Paper";
	}

	next;

	if(@shobu > 1) goto LV4_45_SAY_WIN;
	
	mes "[Hein]";
	mes "Well well well...you lost the game.";
	mes "Ah~ you were close though...";
	mes "We must drive away bad luck.";
	next;
	mes "[Hein]";
	mes "Okay, I will wait here,";
	mes "go bring me the materials again...";
	close;
			
LV4_45_SAY_WIN:
	mes "[Hein]";
	mes "Let's see...";
	mes "You won total " + @shobu + " times.";
	mes "Ah~ you must be really good at game!";
	mes "Yes, your luck is at its highest!";
	next;
	mes "[Hein]";
	mes "I am going to keep my promise.";
	mes "But I need some time to prepare.";
	mes "Give me the materials now and I will talk to you later.";
	close;

LV4_44:
LV4_45_NOGEM:
		mes "[Hein]";
		mes "I am sorry but please give me more time to remember the materials...";
		mes "I had really good memory when I was alive...";
		mes "So I could even recite them right after I woke up...";
	close;


LV4_47:
LV4_48:
	mes "[Hein]";
	mes "Oh, yes. I just finished the work.";
	mes "Do you want to know the result? Okay...";
	mes "Breathe deeply...before we check.";
	mes "The result is...";
	next;
	mes "[Hein]";
	mes "a Big Success! This is great!";
	mes "I have not labored in vain!";
	mes "Let's see the weapon...it is...";
	
	switch( rand(1, 2) ) {
		case 1:
			if(lv4_weapon == 47) mes "Edge.";
			if(lv4_weapon == 47) getitem 1132 ,1; // 1132,Edge
			if(lv4_weapon == 48) mes "Dragon Slayer.";
			if(lv4_weapon == 48) getitem 1166, 1; // 1166,Dragon_Slayer
			break;
		case 2:
			if(lv4_weapon == 47) mes "Excalibur.";
			if(lv4_weapon == 47) getitem 1137, 1; // 1137,Excalibur
			if(lv4_weapon == 48) mes "Schweizersabel.";
			if(lv4_weapon == 48) getitem 1167, 1; // 1167,Schweizersabel
	}

	set lv4_weapon, 0;	
	next;
	mes "[Hein]";
	mes "Well...this is it.";
	mes "I feel my memory is fading again...";
	mes "Hahaha...being dead is not good.";
	next;
	mes "[Hein]";
	mes "Thank you for your help. And if you have";
	mes "a chance to visit Nifflheim again,";
	mes "please come back and retrieve my memory once more...";
	next;
	mes "[Hein]";
	mes "Aaahhhh! I don't think I will";
	mes "remember you next time...";
	mes "Take care, adventurer...father, I made it...";
	close;
	
	

//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Hein]";
	mes "Hmm. There seems to be a bit of problem.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
	close;
}

//--------------------------------------------------
// Waltboughst, creates Byeollungum, Exorciser(excercise), Combat Knife and Grand Cross
//--------------------------------------------------

niflheim,331,72,3	script	Waltboughst	795,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- You are currently overweight. -";
	mes "- Please lose some weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
	mes "[Waltboughst]";
	mes "...Hah!";
	close;
	

LV4_LEVEL_PASS:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon < 49) goto LV4_48;
	if(lv4_weapon == 49) goto LV4_49;
	if(lv4_weapon == 50) goto LV4_50;
	if(lv4_weapon == 51) goto LV4_51;
	if(lv4_weapon == 52) goto LV4_52;
	if(lv4_weapon == 53) goto LV4_53;
	if(lv4_weapon == 54) goto LV4_54;
	if(lv4_weapon == 55) goto LV4_55;
	if(lv4_weapon == 56) goto LV4_56;
	if(lv4_weapon == 57) goto LV4_57;
	if(lv4_weapon > 57) goto LV4_58;
	end; // shouldn't be here


LV4_0:
LV4_49:
	mes "[Waltboughst]";
	mes "Ah~ it is so frustrating to be a dead man.";
	mes "Because I cannot do anything without a body.";
	mes "You know what my father used to say?";
	mes "Trying best does not always";
	mes "result in a success.";
	mes "However...errr?";
	next;
	
	if(lv4_weapon == 0) goto LV4_0_ASK;
	
	mes "[Waltboughst]";
	mes "...What was my father's";
	mes "quote? Why am I stuck in";
	mes "here after death? Hey, you";
	mes "Do you know anything about";
	mes "Waltboughst when he was";
	mes "alive?";
	close;
	
LV4_0_ASK:
	switch( select( "Show interest.", "Igonore him." ) ) {
		case 1:
			mes "[Waltboughst]";
			mes "...what did he say afterwards?";
			mes "Speaking of which, why am I";
			mes "so anxious to do something?";
			mes "I am a dead man, and a dead man is not supposed to do anything!";
			mes "Hey, do you know anything about me when I was alive?";
			set lv4_weapon, 49;
			close;
			break;
		case 2:
			mes "- Because you decided to ignore him, -";
			mes "- you are no longer able to hear him. -";
			close;
			break;
	}
	end;
	

LV4_48:
LV4_58:
	mes "[Waltboughst]";
	mes "I feel something different about you.";
	mes "Did you come here with a purpose?";
	mes "I am envious of you...";
	close;


LV4_50:
	mes "[Waltboughst]";
	mes "Ah~ it is so frustrating to be a dead man.";
	mes "Because I cannot do anything without a body.";
	mes "You know what my father used to say?";
	mes "Trying best does not always";
	mes "result in a success.";
	mes "However...";
	next;
	set @dap4$, "All the successful men in the history tried their best!";
	input @answer4$;
	if(@answer4$ == @dap4$) goto LV4_50_CORRECT;
	mes "[Waltboughst]";
	mes "...What? What did you just say?";
	mes "Hmmm.";
	close;

LV4_50_CORRECT:
	mes "[Waltboughst]";
	mes "Yes! That was it!";
	mes "Since I am dead, I cannot even try!";
	mes "Eh...?! Ah!";
	mes "I see, I see now.";
	mes "I must have been killed by some kind of accident!";
	set lv4_weapon, 51;
	next;
	mes "[Waltboughst]";
	mes "Okay, I am not going to end this way.";
	mes "Hey, you were meant to meet me!";
	mes "You got to do me a favor, now!";
	next;
	mes "[Waltboughst]";
	mes "I will give you the result of my research";
	mes "in return! All I want is to compete my research,";
	mes "not the result.";
	next;
	mes "[Waltboughst]";
	mes "Well, give me some time to remember";
	mes "what I need for my research.";
	mes "I will talk to you later.";
	close;
	
	
LV4_52:
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_52_BASE_MAT;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_52_BASE_MAT;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_52_BASE_MAT;
	if(countitem($@LV4_Gold) < 20) goto LV4_52_BASE_MAT;
	
	mes "[Waltboughst]";
	mes "Oh...you brought everything I need!";
	mes "You were quick this time...I am still having";
	mes "a hard time remembering what I need other than those.";
	mes "This is not good, this is not good at all.";
	next;
	mes "[Waltboughst]";
	mes "Anyways, I will keep those materials for you.";
	mes "And give me some more times to";
	mes "remember what I need...arph!";
	
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
	if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
	delitem $@LV4_Hammer_Of_Blacksmith, 2;
	delitem $@LV4_Emperium_Anvil, 1;
	delitem $@LV4_Illusion_Flower, 1;
	delitem $@LV4_Gold, 20;
	set lv4_weapon, 53;
	close;

LV4_51:
LV4_52_BASE_MAT:
	switch( lv4_weapon ) {
		case 51:
			mes "[Waltboughst]";
			mes "Umm, you came back so early.";
			mes "I just remembered the materials.";
			next;
			mes "[Waltboughst]";
			mes "I need 2 Hammer of Blacksmith,";
			mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
			next;
			mes "[Waltboughst]";
			mes "I do need some other items...but I need some time";
			mes "to remember those. Oh well,";
			mes "we have enough time, so let me think of them.";
			set lv4_weapon, 52;
			break;
		case 52:
			mes "[Waltboughst]";
			mes "I need 2 Hammer of Blacksmith,";
			mes "1 Emperium Anvil, 1 Illusion Flower and 20 Gold...";
			mes "Most likey they will be the ones I need...";
			break;
		}
		close;
		

LV4_54:
LV4_55:
	if(countitem(LV4_Gem1) < 30) goto LV4_54_NOGEM;
	if(countitem(LV4_Gem2) < 30) goto LV4_54_NOGEM;
	if(countitem(LV4_Gem3) < 30) goto LV4_54_NOGEM;
	mes "[Waltboughst]";
	mes "...Um? The items that you brought to me seem";
	mes "to be good materials for my creation...";
	mes "Give them to me, I shall try first!";
	next;
	mes "[Waltboughst]";
	mes "Oh...I was right! How did you";
	mes "know these are materials I need?";
	mes "Great, give me a moment!";
	next;
	mes "[Waltboughst]";
	mes "...wait, I must test your luck first.";
	mes "Since I am not sure about the result,";
	mes "we should trust to luck for the result of my creation.";
	mes "You must have good luck...";
	next;
	mes "[Waltboughst]";
	mes "We are going to play 'Rock, Paper, Scissors'.";
	mes "You must win at least 2 out of 3 times.";
	mes "If you fail, you must leave a large amount";
	mes "of one material you have brought.";
	mes "It is for driving away your bad luck.";
	next;
	mes "[Waltboughst]";
	mes "I will give you a piece of paper.";
	mes "You will write down one among 'Rock, Paper, or Scissors'.";
	mes "I will do the same at the same time.";
	mes "We will then compare each other's paper at the end.";
	next;
	
	set @shobu, 0;
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@i == 2) mes "[Waltboughst]";
		if(@i == 2) mes "Let's play the second one!";
		if(@i == 3) mes "[Waltboughst]";
		if(@i == 3) mes "This will be the last one!";
		if(@i == 3) mes "Let's compare after this.";
		set @npchand[@i], rand(1, 3);
		switch( select( "Scissors", "Rock", "Paper" ) ) {
			case 1:
				set @myhand[@i], 1;
				if(@npchand[@i] == 3) set @shobu, @shobu + 1;
				break;
			case 2:
				set @myhand[@i], 2;
				if(@npchand[@i] == 1) set @shobu, @shobu + 1;
				break;
			case 3:
				set @myhand[@i], 3;
				if(@npchand[@i] == 2) set @shobu, @shobu + 1;
				break;
		}
	}
		
	if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem3) < 30) goto LV4_HACK;

	if(@shobu > 1) goto LV4_54_WIN;

	switch ( rand(1 ,3) ) {
		case 1:
			delitem LV4_Gem1, 30;
			break;
		case 2:
			delitem LV4_Gem2, 30;
			break;
		case 3:
			delitem LV4_Gem3, 30;
			break;
	}
	goto LV4_54_RESULT;
		
LV4_54_WIN:
	delitem LV4_Gem1, 30;
	delitem LV4_Gem2, 30;
	delitem LV4_Gem3, 30;
	set lv4_weapon, lv4_weapon + 2;
	goto LV4_54_RESULT;
	
LV4_54_RESULT:
	mes "[Waltboughst]";
	mes "Okay...I played in the order of...";
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@npchand[@i] == 1) mes "Scissors";
		if(@npchand[@i] == 2) mes "Rock";
		if(@npchand[@i] == 3) mes "Paper";
	}

	next;
	mes "[Waltboughst]";
	mes "You did in the order of...";

	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@myhand[@i] == 1) mes "Scissors";
		if(@myhand[@i] == 2) mes "Rock";
		if(@myhand[@i] == 3) mes "Paper";
	}

	next;

	if(@shobu > 1) goto LV4_54_SAY_WIN;
	
	mes "[Waltboughst]";
	mes "Well well well...you lost the game.";
	mes "Ah~ you were close though...";
	mes "We must drive away bad luck.";
	next;
	mes "[Waltboughst]";
	mes "Okay, I will wait here,";
	mes "go bring me the materials again...";
	close;
			
LV4_54_SAY_WIN:
	mes "[Waltboughst]";
	mes "Let's see...";
	mes "You won total " + @shobu + " times.";
	mes "Ah~ you must be really good at game!";
	mes "Yes, your luck is at its highest!";
	next;
	mes "[Waltboughst]";
	mes "I am going to keep my promise.";
	mes "But I need some time to prepare.";
	mes "Give me the materials now and I will talk to you later.";
	close;

LV4_53:
LV4_54_NOGEM:
	mes "[Waltboughst]";
	mes "Arph...I haven't remembered them yet.";
	mes "Awww....this is a problem.";
	mes "I must think of them as soon as possible...";
	close;


LV4_56:
LV4_57:
	mes "[Waltboughst]";
	mes "Hehe, I made something with the materials";
	mes "in this short time! Wanna see?";
	mes "Aren't you wondering about the result?";
	mes "Hmmm....let's see...";
	next;
	mes "[Waltboughst]";
	mes "Waltboughst never fails!";
	mes "Besides you had good luck,";
	mes "so it resulted in a perfect success!";
	mes "You got a nice weapon here, it is...";
	
	switch( rand(1, 2) ) {
		case 1:
			if(lv4_weapon == 56) mes "Byeollungum!";
			if(lv4_weapon == 56) getitem 1140 ,1; // 1140,Byeollungum
			if(lv4_weapon == 57) mes "Exorciser!";
			if(lv4_weapon == 57) getitem 1233, 1; // 1233,Exercise
			break;
		case 2:
			if(lv4_weapon == 56) mes "Combat Knife!";
			if(lv4_weapon == 56) getitem 1228, 1; // 1228,Combat_Knife
			if(lv4_weapon == 57) mes "Grand Cross!!";
			if(lv4_weapon == 57) getitem 1528, 1; // 1528,Grand_Cross
	}
	
	set lv4_weapon, 0;
	next;
	mes "[Waltboughst]";
	mes "I am genius! Hahahaha!";
	mes "I made it when my brothers could not!";
	mes "Muhahahahahaha!";
	mes "Eh...err? Arrr...phhh?";
	next;
	mes "[Waltboughst]";
	mes "Damn...I must try too hard.";
	mes "My memory is fading again...";
	mes "Oh well, somehow I proved";
	mes "that I am a genius even after I died.";
	next;
	mes "[Waltboughst]";
	mes "If you want me to display my genius again,";
	mes "come retrieve my memory again.";
	mes "And thank you!";
	next;
	mes "[Waltboughst]";
	mes "Ah...my memory's dying again...";
	mes "Farewell~ I don't think I will remember you";
	mes "but I hope you will remember me as Waltboughst";
	mes "the genius in the age!";
	close;
	
	

//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Waltboughst]";
	mes "Hmm. There seems to be a bit of problem.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "] tried to hack LV4 quest.";
	close;
}