summaryrefslogblamecommitdiff
path: root/npc/re/quests/magic_books.txt
blob: d85bfb0d347623b74b542ae1da0eb0bab02e206d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
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
599
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
1153
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
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
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
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                
//===== rAthena Script ======================================= 
//= Magic Book Seller
//===== By: ================================================== 
//= Masao
//= Credits to Muad_Dib for the translation.
//===== Current Version: ===================================== 
//= 1.0
//===== Compatible With: ===================================== 
//= rAthena
//===== Description: ========================================= 
//= An NPC which sells you different kinds of Magic Books.
//===== Additional Comments: ================================= 
//= 1.0 First Version. [Masao]
//============================================================ 

geffen_in,176,105,4	script	Magic Book Master Velof	64,{

	if (checkweight(1201,1) == 0) {
		mes "You're carrying too many items. Please make some room in your bag first.";
		close;
	}
	if ((MaxWeight - Weight) < 1000) {
		mes "You're overweight with items. Please lose some item weight first.";
		close;
	}
	if ((Upper == 2) && (Class != Job_Baby_Warlock)) {
		mes "[Magic Book Master Velof]";
		mes "What are you, a baby?";
		mes "I'm not here to babysit. Get lost!";
		close;
	}
	if ((Class != Job_Warlock) && (Class != Job_Warlock_T) && (Class != Job_Baby_Warlock)) {
		mes "[Magic Book Master Velof]";
		mes "Ha ha, are you also seeking new knowledge?";
		next;
		mes "[Magic Book Master Velof]";
		mes "I'm sorry, but my knowledge doesn't concern you.";
		close;
	}
	if (getskilllv(2230) < 1) {	// WL_RELEASE
		mes "[Magic Book Master Velof]";
		mes "Well you've met all the qualifications except one: you need the Release spell.";
		next;
		mes "[Magic Book Master Velof]";
		mes "Learn the spell first. I've got so many things to tell you.";
		close;
	}
	if ((getskilllv(2230) > 0) && (Class == Job_Warlock) || (Class == Job_Warlock_T) || (Class == Job_Baby_Warlock)) {
		mes "[Magic Book Master Velof]";
		mes "Welcome, my friend.";
		mes "Congratulations on entering a brand new world of magic.";
		next;
		mes "[Magic Book Master Velof]";
		mes "We magic practitioners are always thirsty for new knowledge and power.";
		next;
		mes "[Magic Book Master Velof]";
		mes "We endure great hardship and pain to achieve what we want. When we finally do, the sense of accomplishment defies description. That's why both you and I have chosen the way of magic.";
		next;
		mes "[Magic Book Master Velof]";
		mes "By the way, what brings you to me today?";
		next;
		switch (select("Nothing.:Do you know the Reading Spell Book?:What's the Freezing Spell?:Can I have a Magic Book?:Can I use the Reading Spell Book without the Freezing Spell?:About the Ultimate Magic Book")) {
		case 1:
			mes "[Magic Book Master Velof]";
			mes "Hah! You're silly.";
			close;
		case 2:
			mes "[Magic Book Master Velof]";
			mes "Reading Spell Book literally means 'read a spell book.' Do you know how to use Magic Books?";
			next;
			switch (select("Yes, I do.:No, I don't.")) {
			case 1:
				mes "[Magic Book Master Velof]";
				mes "Well then, you don't need an additional lecture.";
				close;
			case 2:
				mes "[Magic Book Master Velof]";
				mes "Magic Books are an advanced type of magic scroll. While spells on scrolls disappear after one use, the ones in Magic Books can be cast multiple times.";
				next;
				mes "[Magic Book Master Velof]";
				mes "Let's compare a spell on a scroll to a wire. When the wire is used to open a door or do something else, it's bent and crushed, losing its original shape. A spell from a Magic Book is more like a shape memory alloy.";
				next;
				mes "[Magic Book Master Velof]";
				mes "Huh, don't you now what shape memory alloy is? Eh, just remember this: a wire made from shape memory alloy restores its shape over time.";
				next;
				mes "[Magic Book Master Velof]";
				mes "Like the alloy, a spell on a Magic Book remains after a use, although reusing the spell has a downtime for its restoration.";
				next;
				mes "[Magic Book Master Velof]";
				mes "...Oh, I didn't mean to talk for too long. Anyways, you can use Magic Books to cast spells that you've learned. Its concept is different from normal spells.";
				next;
				select("What's the difference?");
				mes "[Magic Book Master Velof]";
				mes "Why do you have to write your existing spells in Magic Books, you asked?";
				next;
				mes "[Magic Book Master Velof]";
				mes "That's a good question. It's related to Magic Binding.";
				next;
				mes "[Magic Book Master Velof]";
				mes "You already learned Release, which allows you to hold the energy of the four different elements before the actual casting. Magic Binding is similar to Release.";
				next;
				mes "[Magic Book Master Velof]";
				mes "Since you've learned Release, you're capable of using Magic Binding as well. Well, let's talk about that later.";
				next;
				mes "[Magic Book Master Velof]";
				mes "You know how to hold an existing spell, and then cast it at a desired timing via Release.";
				next;
				mes "[Magic Book Master Velof]";
				mes "Carrying the globes of the four elements is also related to Magic Binding.";
				next;
				mes "[Magic Book Master Velof]";
				mes "As you know, the four elements are Fire, Water, Wind, and Earth. Being able to employ them freely is the essential principle of magic.";
				next;
				mes "[Magic Book Master Velof]";
				mes "We Humans use torches to keep fire, fans to blow wind, and bowls to hold water. We also use clay to make earthenware.";
				next;
				mes "[Magic Book Master Velof]";
				mes "Those activities may differ from magic, but both are the same in the sense of employing the four elements.";
				next;
				mes "[Magic Book Master Velof]";
				mes "When you use complex magic spells to summon a storm, drop lightning, or burn an area, that consumes a lot of your energy, both physically and mentally.";
				next;
				mes "[Magic Book Master Velof]";
				mes "When you fail to bind such powerful magic spells or fail to control them,";
				next;
				mes "[Magic Book Master Velof]";
				mes "you can receive irreparable damage to your mind and body.";
				next;
				mes "[Magic Book Master Velof]";
				mes "That's why we use Magic Books to reduce that burden. It helps summon pre-cast spells while you're focusing on binding their magic power.";
				next;
				mes "[Magic Book Master Velof]";
				mes "There's one downside though: Magic Books cannot be used for spells that you haven't learned.";
				next;
				mes "[Magic Book Master Velof]";
				mes "As I said earlier, spells in Magic Books tend to go back to what they are.";
				next;
				mes "[Magic Book Master Velof]";
				mes "That said, as a Circler, you cannot change or create spells in Magic Books.";
				next;
				mes "[Magic Book Master Velof]";
				mes "Even if you create one, its power will be beyond your capacity.";
				next;
				mes "[Magic Book Master Velof]";
				mes "In order to use the Reading Spell Book, you must learn the Freezing Spell to bind magic.";
				close;
			}
		case 3:
			mes "[Magic Book Master Velof]";
			mes "The Freezing Spell is used for Magic Binding. It helps you to insert a magic spell to a circle.";
			next;
			mes "[Magic Book Master Velof]";
			mes "Circles of magic work organically with each other. When you use the Freezing Spell to bind a spell, the spell won't activate until you cast the release spell.";
			next;
			mes "[Magic Book Master Velof]";
			mes "Of course, binding a spell continuously consumes your mana, but it consumes less mana than conventional magic spells.";
			next;
			mes "[Magic Book Master Velof]";
			mes "Magic Binding becomes more difficult when you use more powerful magic spells.";
			next;
			mes "[Magic Book Master Velof]";
			mes "For weak spells, you can bind two to three of them with your circle. For more powerful spells, maybe one or two is possible.";
			next;
			mes "[Magic Book Master Velof]";
			mes "That all depends on your ability to control your spells. You'll have to try and experience Magic Binding after you first learn it to really understand.";
			close;
		case 4:
			mes "[Magic Book Master Velof]";
			mes "I'm sorry, but I only have Magic Books for beginners, but they're obviously not suitable for you. Do you still want one?";
			next;
			switch (select("Sure thing.:Where can I find advanced books?")) {
			case 1:
				mes "[Magic Book Master Velof]";
				mes "Please go talk to [Lea] in the Archive. Tell her that you need one of the Magic Books that I've stored in there.";
				next;
				mes "[Magic Book Master Velof]";
				mes "For your information, she won't give it to you without anything in return. Expect her to ask you for something!";
				if (wm_book < 1) {
					set wm_book, 1;
				}
				close;
			case 2:
				mes "[Magic Book Master Velof]";
				mes "I'm sorry, but our management has recently decided to limit the availability of Magic Books for Multi Circlers. It's because their numbers are increasing more quickly than we expected.";
				next;
				mes "[Magic Book Master Velof]";
				mes "You could find one if you try hard, but I don't have any with me.";
				next;
				mes "[Magic Book Master Velof]";
				mes "If our management releases the restriction, you'll be the first one to know. Don't worry.";
				close;
			}
		case 5:
			mes "[Magic Book Master Velof]";
			mes "Nothing will happen when you try to bind magic without using Magic Binding because you have nothing to hold magic.";
			next;
			mes "[Magic Book Master Velof]";
			mes "It's like water that needs a bowl to stay in place.";
			next;
			mes "[Magic Book Master Velof]";
			mes "The problem is when you try to forcefully cast a spell that you haven't learned. It'll definately backfire on you.";
			next;
			mes "[Magic Book Master Velof]";
			mes "Of course, the damage won't be severe: you'll fall asleep or be thrown into confusion. This is all because there's a conflict between your Magic Book and the force of Magic Binding when you're trying to summon and hold a unlearned spell.";
			next;
			mes "[Magic Book Master Velof]";
			mes "Don't try it out just to see what happens for yourself! Falling asleep while casting a spell? There's nothing more humiliating than that to magic practitioners like us.";
			close;
		case 6:
			if ((BaseLevel > 139) && (getskilllv(2217) > 0) || (getskilllv(2213) > 0)) {
				if(mac_book < 1){
					mes "[Magic Book Master Velof]";
					mes "I'm sorry, but could you ask someone else? I'm kind of busy right now.";
					close;
				}
				if (mac_book == 1) {
					mes "[Magic Book Master Velof]";
					mes "Huh, are you looking for the Ultimate Magic Book? Who sent you?";
					next;
					select("Ms. Lea.");
					mes "[Magic Book Master Velof]";
					mes "I'm sorry, but there's not much information left about the Ultimate Magic Book.";
					next;
					mes "[Magic Book Master Velof]";
					mes "A few scholars in the Midgard Continent once tried to collect ancient Magic Books and reproduce that book, but...";
					next;
					select("But what?");
					mes "[Magic Book Master Velof]";
					mes "Oh yes, perhaps he might know something.";
					next;
					select("Yes, I knew this was coming!");
					mes "[Magic Book Master Velof]";
					mes "My brother is just like you. He's very interested in recreating the Ultimate Magic Book.";
					next;
					mes "[Magic Book Master Velof]";
					mes "His name is Galfos.";
					mes "He's been taking a great interest in the ancient Magic Books.";
					next;
					mes "[Magic Book Master Velof]";
					mes "I didn't support him or give him any advice for his research since I thought he'd give on it pretty quickly, but...";
					next;
					mes "[Magic Book Master Velof]";
					mes "If he's discovered anything useful, maybe it can helpful to you.";
					next;
					select("Where's Galfos now?");
					mes "[Magic Book Master Velof]";
					mes "I've heard that he's near the Expedition Camp beyond the Dimensional Rift to seek information about the ancient Magic Books.";
					next;
					mes "[Magic Book Master Velof]";
					mes "If you want to see him, you should prepare for a long journey.";
					set mac_book,2;
					close;
				}
				if (mac_book > 1) {
					mes "[Magic Book Master Velof]";
					mes "Galfos is near the Expedition Camp beyond the Dimensional Rift.";
					next;
					mes "[Magic Book Master Velof]";
					mes "If you want to see him, you should prepare for a long journey.";
					close;
				}
			}
			mes "[Magic Book Master Velof]";
			mes "Ha ha, I'm sorry, but you should focus on strengthening your body rather than creating Magic Books.";
			close;
		}
	}
	mes "[Magic Book Master Velof]";
	mes "Ha ha, are you also seeking new knowledge?";
	next;
	mes "[Magic Book Master Velof]";
	mes "I'm sorry, but my knowledge doesn't concern you.";
	close;
}

geffen_in,175,112,4	script	Lea	123,{

	if (checkweight(1201,1) == 0) {
		mes "You're carrying too many items. Please make some room in your bag first.";
		close;
	}
	if ((MaxWeight - Weight) < 1000) {
		mes "You're overweight with items. Please lose some item weight first.";
		close;
	}
	if ((wm_book > 0) && (Class == Job_Warlock) || (Class == Job_Warlock_T) || (Class == Job_Baby_Warlock)) {
		mes "[Lea]";
		mes "You can only read books here. If you'd like to borrow any books, please receive an approval from 1 manager and 1 High Mage.";
		next;
		mes "[Lea]";
		mes "How may I help you?";
		next;
		select("Master Velof asked me to bring his Magic Book.");
		mes "[Lea]";
		mes "Are you borrowing a book?";
		next;
		switch (select("Let me think.:I want the Beginner's Magic Books.:I want the Intermediate Magic Books.:I want the Superior Magic Books.:I want the Ultimate Magic Book.")) {
		case 1:
			mes "[Lea]";
			mes "No problem.";
			close;
		case 2:
			mes "[Lea]";
			mes "We're in trouble because so many people want to borrow our Magic Books.";
			next;
			mes "[Lea]";
			mes "Unfortunately, many of our lent books aren't returned on time. That's why we've decided to charge a security deposit.";
			next;
			select("A security deposit?");
			mes "[Lea]";
			mes "Yes. You may pay a minimum of 10,000 Rune-Midgarts zeny. Alternatively, you can bring 2 Old Magic Books or 50 Old Pages. Once you pay the deposit, I'll let you borrow some Magic Books.";
			next;
			switch (select("Where can I find Old Magic Books and Old Pages?:I'll pay with zeny.:I'll pay with Old Magic Books.:I'll pay with Old Pages.")) {
			case 1:
				mes "[Lea]";
				mes "I heard that you can find them from Ride Words, Death Words, Bathorys, and other monsters. I ask that you please don't strain yourself to find those items.";
				next;
				mes "[Lea]";
				mes "Your life is more important than anything else, you know?";
				close;
			case 2:
				if (Zeny > 10000) {
					mes "[Lea]";
					mes "What kind of Magic Book do you want?";
					next;
					switch (select("Let me think.:Magic Book (Fire Bolt):Magic Book (Cold Bolt):Magic Book (Lightning Bolt)")) {
					case 1:
						mes "[Lea]";
						mes "No problem.";
						close;
					case 2:
						if (countitem(6189) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (Zeny > 10000) {
							mes "[Lea]";
							mes "The book's return date is written on the lending card on the back cover of the book.";
							next;
							mes "[Lea]";
							mes "Please try not to lose or damage the book to avoid paying any extra charges.";
							set Zeny, Zeny - 10000;
							getitem 6189,1; //Magic_Book_FB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 3:
						if (countitem(6190) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (Zeny > 10000) {
							mes "[Lea]";
							mes "The book's return date is written on the lending card on the back cover of the book.";
							next;
							mes "[Lea]";
							mes "Please try not to lose or damage the book to avoid paying any extra charges.";
							set Zeny, Zeny - 10000;
							getitem 6190,1; //Magic_Book_CB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 4:
						if (countitem(6191) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (Zeny > 10000) {
							mes "[Lea]";
							mes "The book's return date is written on the lending card on the back cover of the book.";
							next;
							mes "[Lea]";
							mes "Please try not to lose or damage the book to avoid paying any extra charges.";
							set Zeny, Zeny - 10000;
							getitem 6191,1; //Magic_Book_LB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					}
				}
				mes "[Lea]";
				mes "I'm sorry, but you don't have enough funds.";
				close;
			case 3:
				if (countitem(1006) > 1) {
					mes "[Lea]";
					mes "What kind of Magic Book do you want?";
					next;
					switch (select("Let me think.:Magic Book (Fire Bolt):Magic Book (Cold Bolt):Magic Book (Lightning Bolt)")) {
					case 1:
						mes "[Lea]";
						mes "No problem.";
						close;
					case 2:
						if (countitem(6189) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(1006) > 1) {
							mes "[Lea]";
							mes "The book's return date is written on the lending card on the back cover of the book.";
							next;
							mes "[Lea]";
							mes "Please try not to lose or damage the book to avoid paying any extra charges.";
							delitem 1006,2; //Old_Magic_Book
							getitem 6189,1; //Magic_Book_FB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 3:
						if (countitem(6190) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(1006) > 1) {
							mes "[Lea]";
							mes "The book's return date is written on the lending card on the back cover of the book.";
							next;
							mes "[Lea]";
							mes "Please try not to lose or damage the book to avoid paying any extra charges.";
							delitem 1006,2; //Old_Magic_Book
							getitem 6190,1; //Magic_Book_CB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 4:
						if (countitem(6191) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(1006) > 1) {
							mes "[Lea]";
							mes "The book's return date is written on the lending card on the back cover of the book.";
							next;
							mes "[Lea]";
							mes "Please try not to lose or damage the book to avoid paying any extra charges.";
							delitem 1006,2; //Old_Magic_Book
							getitem 6191,1; //Magic_Book_LB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					}
				}
				mes "[Lea]";
				mes "I'm sorry, but you don't have enough funds.";
				close;
			case 4:
				if (countitem(1097) > 49) {
					mes "[Lea]";
					mes "What kind of Magic Book do you want?";
					next;
					switch (select("Let me think.:Magic Book (Fire Bolt):Magic Book (Cold Bolt):Magic Book (Lightning Bolt)")) {
					case 1:
						mes "[Lea]";
						mes "No problem.";
						close;
					case 2:
						if (countitem(6189) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(1097) > 49) {
							mes "[Lea]";
							mes "The book's return date is written on the lending card on the back cover of the book.";
							next;
							mes "[Lea]";
							mes "Please try not to lose or damage the book to avoid paying any extra charges.";
							delitem 1097,50; //Worn_Out_Page
							getitem 6189,1; //Magic_Book_FB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 3:
						if (countitem(6190) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(1097) > 49) {
							mes "[Lea]";
							mes "The book's return date is written on the lending card on the back cover of the book.";
							next;
							mes "[Lea]";
							mes "Please try not to lose or damage the book to avoid paying any extra charges.";
							delitem 1097,50; //Worn_Out_Page
							getitem 6190,1; //Magic_Book_CB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 4:
						if (countitem(6191) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						else if (countitem(1097) > 49) {
							mes "[Lea]";
							mes "The book's return date is written on the lending card on the back cover of the book.";
							next;
							mes "[Lea]";
							mes "Please try not to lose or damage the book to avoid paying any extra charges.";
							delitem 1097,50; //Worn_Out_Page
							getitem 6191,1; //Magic_Book_LB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					}
				}
				mes "[Lea]";
				mes "I'm sorry, but you don't have enough funds.";
				close;
			}
		case 3:
			mes "[Lea]";
			mes "Ah, so you want the Intermediate Magic Books. Please pay 50,000 Rune-Midgartian zeny, or you can bring me 2 Old Blue Boxes or 9 Eluniums to borrow the Intermediate Magic Books.";
			next;
			switch (select("Where can I find Old Blue Boxes and Eluniums?:I'll pay 50,000 zeny.:I'll pay with Old Blue Boxes.:I'll pay with Eluniums.")) {
			case 1:
				mes "[Lea]";
				mes "Old Blue Boxes are quite rare to find, but they can be obtained from monsters everywhere in the world, including Myst Cases, Megalogons, Mimics, Nightmares, Krabens, Requiems, Nine Tails, Noxiouses, and Byorgues.";
				mes "If you have sufficient funds, you may buy the boxes from street vendors.";
				next;
				mes "[Lea]";
				mes "Eluniums can be obtained from Hyeguns, Zombie Prisoners, Teddy Bears, Obsedians, and Loli Ruris. Or you can refine Rough Eluniums to Eluniums at the Forge in town, and that may be easier.";
				close;
			case 2:
				if (Zeny > 50000) {
					mes "[Lea]";
					mes "What kind of Magic Book do you want?";
					next;
					switch (select("Let me think.:Magic Book (Storm Gust):Magic Book (Lord of Vermillion):Magic Book (Meteor Storm):Magic Book (Thunderstorm):Magic Book (Jupitel Thunder):Magic Book (Water Ball):Magic Book (Heaven's Drive):Magic Book (Earth Spike)")) {
					case 1:
						mes "[Lea]";
						mes "No problem.";
						close;
					case 2:
						if (countitem(6192) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (Zeny > 50000) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 50000;
							getitem 6192,1; //Magic_Book_SG
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 3:
						if (countitem(6193) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (Zeny > 50000) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 50000;
							getitem 6193,1; //Magic_Book_LOV
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 4:
						if (countitem(6194) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						else if (Zeny > 50000) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 50000;
							getitem 6194,1; //Magic_Book_MS
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 5:
						if (countitem(6197) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (Zeny > 50000) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 50000;
							getitem 6197,1; //Magic_Book_TS
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 6:
						if (countitem(6198) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (Zeny > 50000) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 50000;
							getitem 6198,1; //Magic_Book_JT
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 7:
						if (countitem(6199) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (Zeny > 50000) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 50000;
							getitem 6199,1; //Magic_Book_WB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 8:
						if (countitem(6200) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						else if (Zeny > 50000) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 50000;
							getitem 6200,1; //Magic_Book_HD
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 9:
						if (countitem(6201) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (Zeny > 50000) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 50000;
							getitem 6201,1; //Magic_Book_ES
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					}
				}
				mes "[Lea]";
				mes "I'm sorry, but you don't have enough funds.";
				close;
			case 3:
				if (countitem(603) > 1) {
					mes "[Lea]";
					mes "What kind of Magic Book do you want?";
					next;
					switch (select("Let me think.:Magic Book (Storm Gust):Magic Book (Lord of Vermillion):Magic Book (Meteor Storm):Magic Book (Thunderstorm):Magic Book (Jupitel Thunder):Magic Book (Water Ball):Magic Book (Heaven's Drive):Magic Book (Earth Spike)")) {
					case 1:
						mes "[Lea]";
						mes "No problem.";
						close;
					case 2:
						if (countitem(6192) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(603) > 1) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 603,2; //Old_Blue_Box
							getitem 6192,1; //Magic_Book_SG
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 3:
						if (countitem(6193) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(603) > 1) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 603,2; //Old_Blue_Box
							getitem 6193,1; //Magic_Book_LOV
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 4:
						if (countitem(6194) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(603) > 1) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 603,2; //Old_Blue_Box
							getitem 6194,1; //Magic_Book_MS
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 5:
						if (countitem(6197) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(603) > 1) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 603,2; //Old_Blue_Box
							getitem 6197,1; //Magic_Book_TS
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 6:
						if (countitem(6198) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(603) > 1) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 603,2; //Old_Blue_Box
							getitem 6198,1; //Magic_Book_JT
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 7:
						if (countitem(6199) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(603) > 1) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 603,2; //Old_Blue_Box
							getitem 6199,1; //Magic_Book_WB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 8:
						if (countitem(6200) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(603) > 1) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 603,2; //Old_Blue_Box
							getitem 6200,1; //Magic_Book_HD
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 9:
						if (countitem(6201) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(603) > 1) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 603,2; //Old_Blue_Box
							getitem 6201,1; //Magic_Book_ES
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					}
				}
				mes "[Lea]";
				mes "I'm sorry, but you don't have enough funds.";
				close;
			case 4:
				if (countitem(985) > 8) {
					mes "[Lea]";
					mes "What kind of Magic Book do you want?";
					next;
					switch (select("Let me think.:Magic Book (Storm Gust):Magic Book (Lord of Vermillion):Magic Book (Meteor Storm):Magic Book (Thunderstorm):Magic Book (Jupitel Thunder):Magic Book (Water Ball):Magic Book (Heaven's Drive):Magic Book (Earth Spike)")) {
					case 1:
						mes "[Lea]";
						mes "No problem.";
						close;
					case 2:
						if (countitem(6192) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(985) > 8) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 985,9; //Elunium
							getitem 6192,1; //Magic_Book_SG
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 3:
						if (countitem(6193) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(985) > 8) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 985,9; //Elunium
							getitem 6193,1; //Magic_Book_LOV
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 4:
						if (countitem(6194) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(985) > 8) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 985,9; //Elunium
							getitem 6194,1; //Magic_Book_MS
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 5:
						if (countitem(6197) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(985) > 8) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 985,9; //Elunium
							getitem 6197,1; //Magic_Book_TS
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 6:
						if (countitem(6198) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(985) > 8) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 985,9; //Elunium
							getitem 6198,1; //Magic_Book_JT
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 7:
						if (countitem(6199) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(985) > 8) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 985,9; //Elunium
							getitem 6199,1; //Magic_Book_WB
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 8:
						if (countitem(6200) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(985) > 8) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 985,9; //Elunium
							getitem 6200,1; //Magic_Book_HD
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 9:
						if (countitem(6201) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if (countitem(985) > 8) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							delitem 985,9; //Elunium
							getitem 6201,1; //Magic_Book_ES
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					}
				}
				mes "[Lea]";
				mes "I'm sorry, but you don't have enough funds.";
				close;
			}
		case 4:
			mes "[Lea]";
			mes "Oh, do you want the Superior Magic Books? For your information, borrowing those Magic Books requires many conditions and restrictions. Are you sure that you want it?";
			next;
			select("Yes.");
			mes "[Lea]";
			mes "I see. If you're determined to borrow the Superior Magic Books, please choose one of the following tyes of payment for the security deposit.";
			next;
			mes "[Lea]";
			mes "[12 Mystery Pieces and 100,000 zeny], [7 Oridecons and 100,000 zeny], or [1 Old Violet Box and 100,000 zeny]. Now how would you like to pay your deposit?";
			switch (select("Where can I find those items?:Let me think.:I'll pay with 12 Mystery Pieces and 100,000 zeny.:I'll pay with 7 Oridecons and 100,000 zeny.:I'll pay with 1 Old Violet Box and 100,000 zeny.")) {
			next;
			case 1:
				mes "[Lea] ";
				mes "Mystery Pieces can be obtained from machine creatures in the Juperos Dungeon, and they're the fountain of knowledge from the ancient civilization. Ah, I get excited thinking about those artifacts.";
				next;
				mes "[Lea]";
				mes "Oridecons can be obtained from Executioners, Gryphons, Jokers, and Abysmal Knights, but it'll be easier to collect Rough Oridecons than Oridecons.";
				next;
				mes "[Lea]";
				mes "You can refine Rough Oridecons to Oridecons at the Forge in town.";
				next;
				mes "[Lea]";
				mes "Old Violet Boxes can be obtained from Mimics, Megaliths, Orc Lords, Stormy Knights, and Osirises.";
				next;
				mes "[Lea]";
				mes "The boxes are a subject worthy of serious study since they're used to test Schrodinger's pet cat.";
				close;
			case 2:
				mes "[Lea]";
				mes "If you're unable to collect the items for the security deposit, I can offer you an alternate payment method.";
				next;
				mes "[Lea]";
				mes "How does 200,000 Rune-Midgartian zeny sound?";
				switch (select("I'm sorry, but I can't pay that much.:Sounds good.")) {
				next;
				case 1:
					mes "[Lea]";
					mes "I see.";
					close;
				case 2:
					if (Zeny > 199999) {
						mes "[Lea]";
						mes "What kind of Magic Book do you want?";
						next;
						switch (select("Let me think.:Magic Book (Earth Strain):Magic Book (Chain Lightning):Magic Book (Crimson Rock):Magic Book (Drain Life)")) {
						case 1:
							mes "[Lea]";
							mes "No problem.";
							close;
						case 2:
							if (countitem(6202) > 0) {
								mes "[Lea]";
								mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
								next;
								mes "[Lea]";
								mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
								close;
							}
							if (Zeny > 199999) {
								mes "[Lea]";
								mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
								next;
								mes "[Lea]";
								mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
								set Zeny, Zeny - 200000;
								getitem 6202,1; //Magic_Book_ES_
								close;
							}
							mes "[Lea]";
							mes "I'm sorry, but you don't have enough funds.";
							close;
						case 3:
							if (countitem(6203) > 0) {
								mes "[Lea]";
								mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
								next;
								mes "[Lea]";
								mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
								close;
							}
							if (Zeny > 199999) {
								mes "[Lea]";
								mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
								next;
								mes "[Lea]";
								mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
								set Zeny, Zeny - 200000;
								getitem 6203,1; //Magic_Book_CL
								close;
							}
							mes "[Lea]";
							mes "I'm sorry, but you don't have enough funds.";
							close;
						case 4:
							if (countitem(6204) > 0) {
								mes "[Lea]";
								mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
								next;
								mes "[Lea]";
								mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
								close;
							}
							if (Zeny > 199999) {
								mes "[Lea]";
								mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
								next;
								mes "[Lea]";
								mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
								set Zeny, Zeny - 200000;
								getitem 6204,1; //Magic_Book_CR
								close;
							}
							mes "[Lea]";
							mes "I'm sorry, but you don't have enough funds.";
							close;
						case 5:
							if (countitem(6205) > 0) {
								mes "[Lea]";
								mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
								next;
								mes "[Lea]";
								mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
								close;
							}
							if (Zeny > 199999) {
								mes "[Lea]";
								mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
								next;
								mes "[Lea]";
								mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
								set Zeny, Zeny - 200000;
								getitem 6205,1; //Magic_Book_DL
								close;
							}
							mes "[Lea]";
							mes "I'm sorry, but you don't have enough funds.";
							close;
						}
					}
					mes "[Lea]";
					mes "I'm sorry, but you don't have enough funds.";
					close;
				}
			case 3:
				if ((Zeny > 99999) && (countitem(7094) > 11)) {
					mes "[Lea]";
					mes "What kind of Magic Book do you want?";
					next;
					switch (select("Let me think.:Magic Book (Earth Strain):Magic Book (Chain Lightning):Magic Book (Crimson Rock):Magic Book (Drain Life)")) {
					case 1:
						mes "[Lea]";
						mes "No problem.";
						close;
					case 2:
						if (countitem(6202) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(7094) > 11)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 7094,12; //Mystery_Piece
							getitem 6202,1; //Magic_Book_ES_
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 3:
						if (countitem(6203) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(7094) > 11)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 7094,12; //Mystery_Piece
							getitem 6203,1; //Magic_Book_CL
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 4:
						if (countitem(6204) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(7094) > 11)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 7094,12; //Mystery_Piece
							getitem 6204,1; //Magic_Book_CR
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 5:
						if (countitem(6205) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(7094) > 11)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 7094,12; //Mystery_Piece
							getitem 6205,1; //Magic_Book_DL
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					}
				}
				mes "[Lea]";
				mes "I'm sorry, but you don't have enough funds.";
				close;
			case 4:
				if ((Zeny > 99999) && (countitem(984) > 6)) {
					mes "[Lea]";
					mes "What kind of Magic Book do you want?";
					next;
					switch (select("Let me think.:Magic Book (Earth Strain):Magic Book (Chain Lightning):Magic Book (Crimson Rock):Magic Book (Drain Life)")) {
					case 1:
						mes "[Lea]";
						mes "No problem.";
						close;
					case 2:
						if (countitem(6202) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(984) > 6)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 984,7; //Oridecon
							getitem 6202,1; //Magic_Book_ES_
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 3:
						if (countitem(6203) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(984) > 6)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 984,7; //Oridecon
							getitem 6203,1; //Magic_Book_CL
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 4:
						if (countitem(6204) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(984) > 6)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 984,7; //Oridecon
							getitem 6204,1; //Magic_Book_CR
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 5:
						if (countitem(6205) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(984) > 6)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 984,7; //Oridecon
							getitem 6205,1; //Magic_Book_DL
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					}
				}
				mes "[Lea]";
				mes "I'm sorry, but you don't have enough funds.";
				close;
			case 5:
				if ((Zeny > 99999) && (countitem(617) > 0)) {
					mes "[Lea]";
					mes "What kind of Magic Book do you want?";
					next;
					switch (select("Let me think.:Magic Book (Earth Strain):Magic Book (Chain Lightning):Magic Book (Crimson Rock):Magic Book (Drain Life)")) {
					case 1:
						mes "[Lea]";
						mes "No problem.";
						close;
					case 2:
						if (countitem(6202) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(617) > 0)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 617,1; //Old_Violet_Box
							getitem 6202,1; //Magic_Book_ES_
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 3:
						if (countitem(6203) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(617) > 0)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 617,1; //Old_Violet_Box
							getitem 6203,1; //Magic_Book_CL
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 4:
						if (countitem(6204) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(617) > 0)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 617,1; //Old_Violet_Box
							getitem 6204,1; //Magic_Book_CR
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					case 5:
						if (countitem(6205) > 0) {
							mes "[Lea]";
							mes "You already have that Magic Book. You can't borrow a new book until you return the current one.";
							next;
							mes "[Lea]";
							mes "Don't you know how many others would want the book you already have? It's a bit selfish to want more than one, you know.";
							close;
						}
						if ((Zeny > 99999) && (countitem(617) > 0)) {
							mes "[Lea]";
							mes "Thank you for your deposit. The book's return date is written on the lending card on the back cover of the book. Please try not to lose or damage the book and avoid paying compensation.";
							next;
							mes "[Lea]";
							mes "The Intermediate and Superior Magic Books must be returned upon borrowing the Ultimate Magic Book. Remember that you're just borrowing them, so make sure you take good care of those books.";
							set Zeny, Zeny - 100000;
							delitem 617,1; //Old_Violet_Box
							getitem 6205,1; //Magic_Book_DL
							close;
						}
						mes "[Lea]";
						mes "I'm sorry, but you don't have enough funds.";
						close;
					}
				}
				mes "[Lea]";
				mes "I'm sorry, but you don't have enough funds.";
				close;
			}
		case 5:
			if ((BaseLevel > 139) && (mac_book < 1) && ((getskilllv(2217) > 0) || (getskilllv(2213) > 0))) {
				mes "[Lea]";
				mes "Did... Did you just say the Ultimate Magic Book?";
				next;
				mes "[Lea]";
				mes "Oh, my....";
				mes "I can't believe someone actually wants that book.";
				next;
				select("Please don't say that you don't have it.");
				mes "[Lea]";
				mes "Frankly, I've never even seen the Ultimate Magic Book.";
				next;
				mes "[Lea]";
				mes "You should ask Master Velof if you want to know more about that book.";
				next;
				mes "[Lea]";
				mes "I'm sorry that I can't help you more than that.";
				set mac_book,1;
				close;
			}
			if ((BaseLevel > 139) && (mac_book > 0) && ((getskilllv(2217) > 0) || (getskilllv(2213) > 0))) {
				mes "[Lea]";
				mes "You should ask Master Velof for some information about that book.";
				close;
			}
			mes "[Lea]";
			mes "How about practicing your magic spells for now?";
			next;
			mes "[Lea]";
			mes "In order to obtain the Ultimate Magic Book, you must reach Level 140 and learn Tetera Bolt and Comet.";
			next;
			mes "[Lea]";
			mes "That book can't be used by just anyone, you know?";
			close;
		}
	}
	mes "[Lea]";
	mes "Welcome to the Magic Archive. You can read and borrow books from here under certain conditions.";
	close;
}

mid_camp,255,244,4	script	Galfos	735,{

	if (checkweight(1201,1) == 0) {
		mes "You're carrying too many items. Please make some room in your bag first.";
		close;
	}
	if ((MaxWeight - Weight) < 1000) {
		mes "You're overweight with items. Please lose some item weight first.";
		close;
	}
	if (Upper == 2) {
		mes "[Galfos]";
		mes "What are you, a baby?";
		mes "I'm not here to babysit. Get lost!";
		close;
	}
	if ((Class != Job_Warlock) && (Class != Job_Warlock_T) && (Class != Job_Baby_Warlock)) {
		mes "[Galfos]";
		mes "My right arm feels hot while my left arm feels cold. I can never get used to this weird weather!";
		close;
	}
	if (getskilllv(2230) < 1) {
		mes "[Galfos]";
		mes "Ah, I'll get myself in trouble if I stay here any longer. Maybe I'm already in...";
		close;
	}
	if ((BaseLevel < 140) || (getskilllv(2217) < 1) && (getskilllv(2213) < 1)) {
		mes "[Galfos]";
		mes "I'm sorry, but I don't talk to people that aren't even ready for this.";
		close;
	}
	if (mac_book < 2) {
		mes "[Galfos]";
		mes "You look strong, but you don't seem to have any business with me.";
		close;
	}
	if (mac_book == 2) {
		mes "[Galfos]";
		mes "What brings you to me?";
		next;
		select("I heard that you've studied the Ultimate Magic Book.");
		mes "[Galfos]";
		mes "Why, are you interested too?";
		mes "I didn't know someone would actually take an interest in that book. Yes, I'm studying that magic book. How did you find that out?";
		next;
		select("You're Velof's brother, right?");
		mes "[Galfos]";
		mes "Yes, I'm Galfos, and Velof is my brother.";
		next;
		mes "[Galfos]";
		mes "Wait a minute,";
		mes "did the old man recommend me to you?";
		next;
		select("That's right.");
		mes "[Galfos]";
		mes "Wow!";
		mes "This is surprising. He never took my research very seriously. I'm glad that he finally changed his mind.";
		next;
		mes "[Galfos]";
		mes "Heh! Your timing couldn't be better: I was looking for a test object.";
		next;
		select("A test object?");
		mes "[Galfos]";
		mes "Frankly, I'm only interested in creating the Ultimate Magic Book.";
		next;
		mes "[Galfos]";
		mes "I'm not good at using magic, not to mention that I prefer fists in fighting. Nevertheless, I find Magic Books to be incredibly intriguing.";
		next;
		mes "[Galfos]";
		mes "The problem is that I can't use the Ultimate Magic Book, even if I made one. That's why I can't really test it on my own.";
		next;
		mes "[Galfos]";
		mes "That's why I've been waiting for a true magic practitioner like you that can help me test my Ultimate Magic Book.";
		next;
		select("(What is he talking about?)");
		mes "[Galfos]";
		mes "My research is almost done,";
		mes "and I need to solve one last problem to create the Magic Book.";
		next;
		mes "[Galfos]";
		mes "To make the ancient Ultimate Magic Book, I need an artifact and some spells to fuse into it.";
		next;
		mes "[Galfos]";
		mes "I've perfectly restored the spells based on the ancient documents, but I still have no information about the necessary artifact.";
		next;
		mes "[Galfos]";
		mes "Ah, but there's a silver lining!";
		next;
		select("(Now we're getting somewhere!)");
		mes "[Galfos]";
		mes "Ha ha...";
		mes "There's a great archive in El Dicastes, the Capital City of the Evil Giants, where all knowledge in this world is stored.";
		next;
		mes "[Galfos]";
		mes "Maybe that's the place to find some information about the artifact for this Ultimate Magic Book.";
		next;
		mes "[Galfos]";
		mes "You know what to do, don't you? Find information about the artifact in the El Dicastes archive, using everything in your power.";
		next;
		mes "[Galfos]";
		mes "Afterwards, create and bring me the artifact. We'll talk about creating the Magic Book afterwards.";
		set mac_book,3;
		close;
	}
	if (mac_book == 3) {
		mes "[Galfos]";
		mes "You know what to do, don't you? Find information about the artifact in the El Dicastes archive, using everything in your power.";
		next;
		mes "[Galfos]";
		mes "Afterwards, create and bring me the artifact. We'll talk about creating the Magic Book afterwards.";
		close;
	}
	if (mac_book == 4) {
		mes "[Galfos]";
		mes "Oh, did you find";
		mes "anything useful?";
		next;
		switch (select("I've discovered everything about Comet.:I've mastered the zenith of Tetra Vortex.")) {
		case 1:
			if (countitem(6195) > 0) {
				mes "[Galfos]";
				mes "Are you kidding me? You already have the book!";
				close;
			}
			if (checkquest(12218) == 2) {
				mes "[Galfos]";
				mes "Oh my, I sense incredible energy coming from you. This is great! Now we're ready to make the Ultimate Magic Book.";
				next;
				mes "[Galfos]";
				mes "There's one problem, though: I'm so broke that I don't even have enough money to buy the tools to make the book.";
				next;
				mes "[Galfos]";
				mes "I need at least ^0000aa1000,000 zeny^000000 to buy all the necessary tools. Do you have the money?";
				next;
				switch (select("Wh-what? No!:Sure.")) {
				case 1:
					mes "[Galfos]";
					mes "Aw, you don't? It's disappointing, but there's nothing I can do. Come back when you have enough money, okay?";
					close;
				case 2:
					if (Zeny > 1000000) {
						mes "[Galfos]";
						mes "Alright then, let's get started!";
						next;
						specialeffect2 EF_DISPELL;
						progressbar "ffff00",4;
						specialeffect2 EF_LORD;
						set Zeny, Zeny - 1000000;
						getitem 6195,1; //Magic_Book_CM
						mes "[Galfos]";
						mes "Man, I almost lost my control to the incredible magic energy! Here's your Magic Book.";
						next;
						mes "[Galfos]";
						mes "Thank you for making my dream come true. Feel free to come back if you need another one of these books.";
						close;
					}
					mes "[Galfos]";
					mes "Hey, what did I tell you? I can't buy the tools to make the book without money!";
					close;
				}
			}
			mes "[Galfos]";
			mes "Are you sure that you've found something? It doesn't seem like you've learned what we need...";
			close;
		case 2:
				if (countitem(6196) > 0) {
					mes "[Galfos]";
					mes "Are you kidding me? You already have the book!";
					close;
				}
				if ((checkquest(12219) == 2) && (checkquest(12220) == 2) && (checkquest(12221) == 2) && (checkquest(12222) == 2)) {
					mes "[Galfos]";
					mes "Oh my, I sense incredible energy coming from you. This is great! Now we're ready to make the Ultimate Magic Book.";
					next;
					mes "[Galfos]";
					mes "There's one problem, though: I'm so broke that I don't even have enough money to buy the tools to make the book.";
					next;
					mes "[Galfos]";
					mes "I need at least ^0000aa1000,000 zeny^000000 to buy all the necessary tools. Do you have the money?";
					next;
					switch (select("Wh-what? No!:Sure.")) {
					case 1:
						mes "[Galfos]";
						mes "Aw, you don't? It's disappointing, but there's nothing I can do. Come back when you have enough money, okay?";
						close;
					case 2:
						if (Zeny > 1000000) {
							mes "[Galfos]";
							mes "Alright then, let's get started!";
							next;
							specialeffect2 EF_DISPELL;
							progressbar "ffff00",4;
							specialeffect2 EF_LORD;
							set Zeny, Zeny - 1000000;
							getitem 6196,1; //Magic_Book_TV
							mes "[Galfos]";
							mes "Man, I almost lost my control to the incredible magic energy. Here's your Magic Book.";
							next;
							mes "[Galfos]";
							mes "Thank you for making my dream come true. Feel free to come back if you need another one of these books.";
							close;
						}
						mes "[Galfos]";
						mes "Hey, what did I tell you? I can't buy the tools to make the book without money!";
						close;
					}
				}
				mes "[Galfos]";
				mes "Are you sure that you've found something? It doesn't seem like you've learned what we need...";
				close;
		}
	}
	mes "[Galfos]";
	mes "Is there anything else you need?";
	close;
}

dic_in01,25,190,0	script	Mysterious Documents	844,{

	if (isequipped(2782) < 1) {
		mes "I better not forget to equip my ring.";
		close;
	}
	if (ep13_3_invite < 6) {
		mes "When you approach the documents, an Evil Giant that looks like the archive manager tries to call Guard Galton. You should get out of here quickly.";
		close;
	}
	if (checkquest(12165,"PLAYTIME") == 1) {
		mes "The documents are making you feel nauseous. You should come back later after your stomach settles.";
		close;
	}
	if (checkquest(12165,"PLAYTIME") == 2) {
		mes "You don't feel as nauseous anymore. It should be safe to proceed now.";
		erasequest 12165;
		close;
	}
	if ((BaseLevel < 140) || (getskilllv(2217) < 1) && (getskilllv(2213) < 1)) {
		mes "The documents in this container aren't legible. It's not use trying to read them.";
		close;
	}
	specialeffect2 EF_DISPELL;
	progressbar "ffff00",4;
	if (mac_book < 3) {
		mes "You have discovered records about magic, acceleration, and particle waves.";
		close;
	}
	if (mac_book == 3) {
		mes "You have discovered records about magic, acceleration, and particle waves. These documents must be the ones that Galfos is looking for.";
		set mac_book, 4;
		close;
	}
	if (mac_book == 4) {
		if (rand(1,10) == 1) {
			if (getskilllv(2213) > 0) {
				if (checkquest(12218) == 1) {
					mes "You already own this document.";
					close;
				}
				mes "^660066In order to create the essence of lava, you must refine 40 Burning Hearts at the hottest place on the 2nd floor of the Thor's Volcano Dungeon.^000000";
				mes "^660066You must do this by using the greatest power in that place. The Humans have used this method to study the acceleration of magic particles since ancient times.^000000";
				next;
				mes "You have discovered the ^990099Lava Essence Creation Method^000000. Please check your Quest window for more details.";
				specialeffect2 EF_STEAL;
				close2;
				setquest 12218;
				end;
			}
			mes "Nothing in this document looks useful.";
			close;
		}
		if (rand(1,10) == 2) {
			if (getskilllv(2217) > 0) {
				if (checkquest(12219) == 1) {
					mes "You already own this document.";
					close;
				}
				mes "^660066The essence of flame can be refined on stable ground on the 1st floor of the Thor's Volcano Dungeon. 10 Love Coals are necessary to refine the essence.^000000";
				mes "^660066According to Humans' information, this essence constitutes one of the four natural elements.^000000";
				next;
				mes "You have discovered the ^990099Flame Essence Creation Method^000000. Please check your Quest window for more details.";
				specialeffect2 EF_STEAL;
				close2;
				setquest 12219;
				end;
			}
			mes "Nothing in this document looks useful.";
			close;
		}
		if (rand(1,10) == 3) {
			if (getskilllv(2217) > 0) {
				if (checkquest(12220) == 1) {
					mes "You already own this document.";
					close;
				}
				mes "^660066I succeeded in refining the essence of glacier deep inside the 3rd floor of the Ice Cave. If you'd like to try, prepare 10 Ice Hearts and go to the following location.^000000";
				next;
				mes "You have discovered the ^990099Glacier Essence Creation Method^000000. Please check your Quest window for more details.";
				specialeffect2 EF_STEAL;
				close2;
				setquest 12220;
				end;
			}
			mes "Nothing in this document looks useful.";
			close;
		}
		if (rand(1,10) == 4) {
			if (getskilllv(2217) > 0) {
				if (checkquest(12221) == 1) {
					mes "You already own this document.";
					close;
				}
				mes "^660066I was able to refine the essence of fossil from old rocks on the 2nd floor of the Mine Dungeon. So far, that place is the most stable among all the testing grounds.";
				mes "If you'd like to try, prepare 10 Jubilees and go to the dungeon. Good luck.^000000";
				next;
				mes "You have discovered the ^990099Fossil Essence Creation Method^000000. Please check your Quest window for more details.";
				specialeffect2 EF_STEAL;
				close2;
				setquest 12221;
				end;
			}
			mes "Nothing in this document looks useful.";
			close;
		}
		if (rand(1,10) == 5) {
			if (getskilllv(2217) > 0) {
				if (checkquest(12222) == 1) {
					mes "You already own this document.";
					close;
				}
				mes "^660066In order to refine the essence of storm, I visited the Hermit's Checkerboard in Kunlun where the spirit of the wind resides.";
				mes "The refining process was easy, but I had a hard time finding the catalyst, Dragon Teeth.^000000";
				next;
				mes "You have discovered the ^990099Storm Essence Creation Method^000000. Please check your Quest window for more details.";
				specialeffect2 EF_STEAL;
				close2;
				setquest 12222;
				end;
			}
			mes "Nothing in this document looks useful.";
			close;
		}
		if (rand(1,10) == 10) {
			mes "You suddenly feel sick, and this nausea won't go away easily. You should try finding the documents you need later.";
			setquest 12165;
			close;
		}
		mes "Nothing here looks special.";
		close;
	}
	mes "You no longer need to search this place.";
	close;
}

thor_v02,163,104,0	script	Powerful Lava Energy#33	844,{

	if ((MaxWeight - Weight) < 1000) {
		mes "Please lighten your bag.";
		close;
	}
	if ((checkquest(12218) == 1) && (countitem(7097) > 39)) {
		specialeffect2 EF_BLIND;
		specialeffect2 EF_BEGINSPELL;
		progressbar "ffff00",4;
		delitem 7097,40; //Burning_Heart
		if (rand(1,2) == 1) {
			mes "You have used 40 Burning Hearts to create ^999900Lava Essence^000000.";
			next;
			mes "^008800The Lava Essence will last permanently, unless there's a problem.^000000";
			completequest 12218;
			specialeffect2 EF_LORD;
			close;
		}
		mes "^008888You have failed to refine the essence using 40 Burning Hearts.^000000";
		close;
	}
	if (checkquest(12218) == 2) {
		mes "You've already created Lava Essence in this area.";
		close;
	}
	mes "Someone already used this area.";
	close;
}

thor_v01,185,91,0	script	Powerful Flame Energy#33	844,{

	if ((MaxWeight - Weight) < 1000) {
		mes "Please lighten your bag.";
		close;
	}
	if ((checkquest(12219) == 1) && (countitem(7098) > 9)) {
		specialeffect2 EF_BLIND;
		specialeffect2 EF_BEGINSPELL;
		progressbar "ffff00",4;
		delitem 7098,10; //Live_Coal
		if (rand(1,3) == 1) {
			mes "You have used 10 Live Coals to create ^999900Flame Essence^000000.";
			next;
			mes "^008800The Flame Essence will last permanently, unless there's a problem.^000000";
			completequest 12219;
			specialeffect2 EF_LORD;
			close;
		}
		mes "^008888You have failed to refine the essence using 10 Live Coals.^000000";
		close;
	}
	if (checkquest(12219) == 2) {
		mes "You've already created Flame Essence in this area.";
		close;
	}
	mes "Someone already used this area.";
	close;
}

ice_dun03,137,148,0	script	Powerful Glacier Energy	844,{

	if ((MaxWeight - Weight) < 1000) {
		mes "Please lighten your bag.";
		close;
	}
	if ((checkquest(12220) == 1) && (countitem(7561) > 9)) {
		specialeffect2 EF_BLIND;
		specialeffect2 EF_BEGINSPELL;
		progressbar "ffff00",4;
		delitem 7561,10; //Ice_Heart
		if (rand(1,3) == 1) {
			mes "You have used 10 Glacial Hearts to create ^999900Glacier Essence^000000.";
			next;
			mes "^008800The Glacier Essence will last permanently, unless there's a problem.^000000";
			completequest 12220;
			specialeffect2 EF_LORD;
			close;
		}
		mes "^008888You have failed to refine the essence using 10 Glacial Hearts.^000000";
		close;
	}
	if (checkquest(12220) == 2) {
		mes "You've already created Glacier Essence in this area.";
		close;
	}
	mes "Someone already used this area.";
	close;
}

ein_dun02,181,124,0	script	Powerful Fossil Energy	844,{

	if ((MaxWeight - Weight) < 1000) {
		mes "Please lighten your bag.";
		close;
	}
	if ((checkquest(12221) == 1) && (countitem(7312) > 9)) {
		specialeffect2 EF_BLIND;
		specialeffect2 EF_BEGINSPELL;
		progressbar "ffff00",4;
		delitem 7312,10; //Jubilee
		if (rand(1,3) == 1) {
			mes "You have used 10 Jubilees to create ^999900Fossil Essence^000000.";
			next;
			mes "^008800The Fossil Essence will last permanently, unless there's a problem.^000000";
			specialeffect2 EF_LORD;
			completequest 12221;
			close;
		}
		mes "^008888You have failed to refine the essence using 10 Jubilees.^000000";
		close;
	}
	if (checkquest(12221) == 2) {
		mes "You've already created Fossil Essence in this area.";
		close;
	}
	mes "Someone already used this area.";
	close;
}

gon_dun02,252,198,0	script	Powerful Storm Energy#33	844,{

	if ((MaxWeight - Weight) < 1000) {
		mes "Please lighten your bag.";
		close;
	}
	if ((checkquest(12222) == 1) && (countitem(7266) > 9)) {
		specialeffect2 EF_BLIND;
		specialeffect2 EF_BEGINSPELL;
		progressbar "ffff00",4;
		delitem 7266,10; //Dragon_Fang
		if (rand(1,3) == 1) {
			mes "You have used 10 Dragon Teeth to create ^999900Storm Essence^000000.";
			next;
			mes "^008800The Storm Essence will last permanently, unless there's a problem.^000000";
			specialeffect2 EF_LORD;
			completequest 12222;
			close;
		}
		mes "^008888You have failed to refine the essence using 10 Dragon Teeth.^000000";
		close;
	}
	if (checkquest(12222) == 2) {
		mes "You've already created Storm Essence in this area.";
		close;
	}
	mes "Someone already used this area.";
	close;
}