Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 92.23 KB | None | 0 0
  1. CONFIRM_NO = 0
  2. CONFIRM_YES = 1
  3. CONFIRM_OK = 1
  4. CONFIRM_TIMEOUT = 2
  5.  
  6. MALE = 0
  7. FEMALE = 1
  8.  
  9. --quest.create = function(f) return coroutine.create(f) end
  10. --quest.process = function(co,args) return coroutine.resume(co, args) end
  11. setstate = q.setstate
  12. newstate = q.setstate
  13. --Biblioteka z plikami tekstowymi---
  14. quest_txt = "/usr/home/mt2/quest/biblioteka_txt/"
  15. --------------------------------------------------------------------------
  16. q.set_clock = function(name, value) q.set_clock_name(name) q.set_clock_value(value) end
  17. q.set_counter = function(name, value) q.set_counter_name(name) q.set_counter_value(value) end
  18. c_item_name = function(vnum) return ("[ITEM value;"..vnum.."]") end
  19. c_mob_name = function(vnum) return ("[MOB value;"..vnum.."]") end
  20.  
  21. -- d.set_folder = function (path) raw_script("[SET_PATH path;"..path.."]") end
  22. -- d.set_folder = function (path) path.show_cinematic("[SET_PATH path;"..path.."]") end
  23. -- party.run_cinematic = function (path) party.show_cinematic("[RUN_CINEMATIC value;"..path.."]") end
  24.  
  25. newline = "[ENTER]"
  26. function color256(r, g, b) return "[COLOR r;"..(r/255.0).."|g;"..(g/255.0).."|b;"..(b/255.0).."]" end
  27. function color(r,g,b) return "[COLOR r;"..r.."|g;"..g.."|b;"..b.."]" end
  28. function delay(v) return "[DELAY value;"..v.."]" end
  29. function setcolor(r,g,b) raw_script(color(r,g,b)) end
  30. function setdelay(v) raw_script(delay(v)) end
  31. function resetcolor(r,g,b) raw_script("[/COLOR]") end
  32. function resetdelay(v) raw_script("[/DELAY]") end
  33.  
  34. -- minimap? ???? ??
  35. function addmapsignal(x,y) raw_script("[ADDMAPSIGNAL x;"..x.."|y;"..y.."]") end
  36.  
  37. -- minimap ????? ?? ???
  38. function clearmapsignal() raw_script("[CLEARMAPSIGNAL]") end
  39.  
  40. -- ??????? ??? ??? ?? ??? ???.
  41. function setbgimage(src) raw_script("[BGIMAGE src;") raw_script(src) raw_script("]") end
  42.  
  43. -- ???? ???? ????.
  44. function addimage(x,y,src) raw_script("[IMAGE x;"..x.."|y;"..y) raw_script("|src;") raw_script(src) raw_script("]") end
  45.  
  46. function makequestbutton(name)
  47. raw_script("[QUESTBUTTON idx;")
  48. raw_script(""..q.getcurrentquestindex())
  49. raw_script("|name;")
  50. raw_script(name) raw_script("]")
  51. end
  52.  
  53. function make_quest_button_ex(name, icon_type, icon_name)
  54. test_chat(icon_type)
  55. test_chat(icon_name)
  56. raw_script("[QUESTBUTTON idx;")
  57. raw_script(""..q.getcurrentquestindex())
  58. raw_script("|name;")
  59. raw_script(name)
  60. raw_script("|icon_type;")
  61. raw_script(icon_type)
  62. raw_script("|icon_name;")
  63. raw_script(icon_name)
  64. raw_script("]")
  65. end
  66. MAX_LEVEL = 250 -- Max level jaki jest na serwerze
  67. function make_quest_button(name) makequestbutton(name) end
  68.  
  69. function send_letter_ex(name, icon_type, icon_name) make_quest_button_ex(name, icon_type, icon_name) set_skin(NOWINDOW) q.set_title(name) q.start() end
  70.  
  71. function send_letter(name) makequestbutton(name) set_skin(NOWINDOW) q.set_title(name) q.start() end
  72. function clear_letter() q.done() end
  73. function say_title(name) say(color256(255, 230, 186)..name..color256(196, 196, 196)) end
  74. function say_reward(name) say(color256(255, 200, 200)..name..color256(196, 196, 196)) end
  75. function say_blekit(name) say(color256(0, 255, 255)..name..color256(196, 196, 196)) end
  76. function say_akwa(name) say(color256(127, 255, 212)..name..color256(196, 196, 196)) end
  77. function say_amarant(name) say(color256(230, 28, 102)..name..color256(196, 196, 196)) end
  78. function say_ametyst(name) say(color256(153, 102, 204)..name..color256(196, 196, 196)) end
  79. function say_antracyt(name) say(color256(54, 65, 53)..name..color256(196, 196, 196)) end
  80. function say_atrament(name) say(color256(0, 49, 83)..name..color256(196, 196, 196)) end
  81. function say_banan(name) say(color256(254, 254, 51)..name..color256(196, 196, 196)) end
  82. function say_bez(name) say(color256(194, 178, 128)..name..color256(196, 196, 196)) end
  83. function say_blue(name) say(color256(0, 168, 231)..name..color256(196, 196, 196)) end
  84. function say_bordo(name) say(color256(80, 0, 0)..name..color256(196, 196, 196)) end
  85. function say_braz(name) say(color256(150, 75, 0)..name..color256(196, 196, 196)) end
  86. function say_brunatny(name) say(color256(112, 32, 31)..name..color256(196, 196, 196)) end
  87. function say_brzoskwinia(name) say(color256(255, 204, 153)..name..color256(196, 196, 196)) end
  88. function say_burak(name) say(color256(98, 0, 44)..name..color256(196, 196, 196)) end
  89. function say_cynamon(name) say(color256(157, 91, 3)..name..color256(196, 196, 196)) end
  90. function say_red(name) say(color256(222, 0, 47)..name..color256(196, 196, 196)) end
  91. function say_fiolet(name) say(color256(184, 3, 255)..name..color256(196, 196, 196)) end
  92. function say_granat(name) say(color256(0, 0, 128)..name..color256(196, 196, 196)) end
  93. function say_lawenda(name) say(color256(201, 162, 191)..name..color256(196, 196, 196)) end
  94. function say_arbuz(name) say(color256(255, 109, 102)..name..color256(196, 196, 196)) end
  95. function say_biskup(name) say(color256(194, 178, 128)..name..color256(196, 196, 196)) end
  96. function say_burgund(name) say(color256(96, 2, 1)..name..color256(196, 196, 196)) end
  97. function say_bursztyn(name) say(color256(255, 191, 0)..name..color256(196, 196, 196)) end
  98. function say_bury(name) say(color256(107, 86, 54)..name..color256(196, 196, 196)) end
  99. function say_cegla(name) say(color256(233, 107, 57)..name..color256(196, 196, 196)) end
  100. function say_chaber(name) say(color256(51, 0, 204)..name..color256(196, 196, 196)) end
  101. function say_cialo(name) say(color256(255, 229, 180)..name..color256(196, 196, 196)) end
  102. function say_cyklamen(name) say(color256(162, 0, 123)..name..color256(196, 196, 196)) end
  103. function say_cynober(name) say(color256(227, 66, 52)..name..color256(196, 196, 196)) end
  104. function say_czekolada(name) say(color256(123, 63, 0)..name..color256(196, 196, 196)) end
  105. function say_rdza(name) say(color256(128, 24, 24)..name..color256(196, 196, 196)) end
  106. function say_grafit(name) say(color256(53, 69, 79)..name..color256(196, 196, 196)) end
  107. function say_grynszpan(name) say(color256(0, 166, 147)..name..color256(196, 196, 196)) end
  108. function say_heban(name) say(color256(61, 43, 31)..name..color256(196, 196, 196)) end
  109. function say_herbata(name) say(color256(204, 93, 93)..name..color256(196, 196, 196)) end
  110. function say_kawa(name) say(color256(44, 27, 1)..name..color256(196, 196, 196)) end
  111. function say_koral(name) say(color256(255, 127, 80)..name..color256(196, 196, 196)) end
  112. function say_krew(name) say(color256(207, 41, 41)..name..color256(196, 196, 196)) end
  113. function say_lazur(name) say(color256(0, 127, 255)..name..color256(196, 196, 196)) end
  114. function say_limonka(name) say(color256(147, 246, 0)..name..color256(196, 196, 196)) end
  115. function say_malachit(name) say(color256(0, 102, 51)..name..color256(196, 196, 196)) end
  116. function say_malina(name) say(color256(235, 1, 101)..name..color256(196, 196, 196)) end
  117. function say_miedz(name) say(color256(184, 115, 51)..name..color256(196, 196, 196)) end
  118. function say_oliwka(name) say(color256(128, 128, 0)..name..color256(196, 196, 196)) end
  119. function say_orzech(name) say(color256(189, 148, 96)..name..color256(196, 196, 196)) end
  120. function say_patyna(name) say(color256(110, 190, 159)..name..color256(196, 196, 196)) end
  121. function say_pistacja(name) say(color256(159, 251, 136)..name..color256(196, 196, 196)) end
  122. function say_poziomka(name) say(color256(207, 47, 47)..name..color256(196, 196, 196)) end
  123. function say_purpura(name) say(color256(128, 0, 128)..name..color256(196, 196, 196)) end
  124. function say_rubin(name) say(color256(212, 27, 86)..name..color256(196, 196, 196)) end
  125. function say_rudy(name) say(color256(205, 87, 128)..name..color256(196, 196, 196)) end
  126. function say_trawa(name) say(color256(36, 166, 47)..name..color256(196, 196, 196)) end
  127. function say_turkus(name) say(color256(48, 213, 200)..name..color256(196, 196, 196)) end
  128. function say_wisnia(name) say(color256(128, 0, 0)..name..color256(196, 196, 196)) end
  129. function say_green(name) say(color256(0, 128, 0)..name..color256(196, 196, 196)) end
  130. function say_zloto(name) say(color256(255, 215, 0)..name..color256(196, 196, 196)) end
  131. function say_pc_name() say(pc.get_name()..":") end
  132. function say_size(width, height) say("[WINDOW_SIZE width;"..width.."|height;"..height.."]") end
  133. function setmapcenterposition(x,y)
  134. raw_script("[SETCMAPPOS x;")
  135. raw_script(x.."|y;")
  136. raw_script(y.."]")
  137. end
  138. function wykonaj(x)
  139. os.execute(x)
  140. end
  141. function say_item(name, vnum, desc)
  142. say("[INSERT_IMAGE image_type;item|idx;"..vnum.."]")
  143. end
  144. function say_item_vnum(vnum)
  145. say_item(item_name(vnum), vnum, "")
  146. end
  147.  
  148. function pc_is_novice()
  149. if pc.get_skill_group()==0 then
  150. return true
  151. else
  152. return false
  153. end
  154. end
  155. function pc_get_exp_bonus(exp, text)
  156. say_reward(text)
  157. pc.give_exp2(exp)
  158. set_quest_state("levelup", "run")
  159. end
  160. function pc_get_village_map_index(index)
  161. return village_map[pc.get_empire()][index]
  162. end
  163.  
  164. village_map = {
  165. {1, 3},
  166. {21, 23},
  167. {41, 43},
  168. }
  169.  
  170. function npc_is_same_empire()
  171. if pc.get_empire()==npc.empire then
  172. return true
  173. else
  174. return false
  175. end
  176. end
  177.  
  178. function npc_get_skill_teacher_race(pc_empire, pc_job, sub_job)
  179. if 1==sub_job then
  180. if 0==pc_job then
  181. return WARRIOR1_NPC_LIST[pc_empire]
  182. elseif 1==pc_job then
  183. return ASSASSIN1_NPC_LIST[pc_empire]
  184. elseif 2==pc_job then
  185. return SURA1_NPC_LIST[pc_empire]
  186. elseif 3==pc_job then
  187. return SHAMAN1_NPC_LIST[pc_empire]
  188. end
  189. elseif 2==sub_job then
  190. if 0==pc_job then
  191. return WARRIOR2_NPC_LIST[pc_empire]
  192. elseif 1==pc_job then
  193. return ASSASSIN2_NPC_LIST[pc_empire]
  194. elseif 2==pc_job then
  195. return SURA2_NPC_LIST[pc_empire]
  196. elseif 3==pc_job then
  197. return SHAMAN2_NPC_LIST[pc_empire]
  198. end
  199. end
  200.  
  201. return 0
  202. end
  203.  
  204.  
  205. function pc_find_square_guard_vid()
  206. if pc.get_empire()==1 then
  207. return find_npc_by_vnum(11000)
  208. elseif pc.get_empire()==2 then
  209. return find_npc_by_vnum(11002)
  210. elseif pc.get_empire()==3 then
  211. return find_npc_by_vnum(11004)
  212. end
  213. return 0
  214. end
  215.  
  216. function pc_find_skill_teacher_vid(sub_job)
  217. local vnum=npc_get_skill_teacher_race(pc.get_empire(), pc.get_job(), sub_job)
  218. return find_npc_by_vnum(vnum)
  219. end
  220.  
  221. function pc_find_square_guard_vid()
  222. local pc_empire=pc.get_empire()
  223. if pc_empire==1 then
  224. return find_npc_by_vnum(11000)
  225. elseif pc_empire==2 then
  226. return find_npc_by_vnum(11002)
  227. elseif pc_empire==3 then
  228. return find_npc_by_vnum(11004)
  229. end
  230. end
  231.  
  232. function npc_is_same_job()
  233. local pc_job=pc.get_job()
  234. local npc_vnum=npc.get_race()
  235.  
  236. -- test_chat("pc.job:"..pc.get_job())
  237. -- test_chat("npc_race:"..npc.get_race())
  238. -- test_chat("pc.skill_group:"..pc.get_skill_group())
  239. if pc_job==0 then
  240. if table_is_in(WARRIOR1_NPC_LIST, npc_vnum) then return true end
  241. if table_is_in(WARRIOR2_NPC_LIST, npc_vnum) then return true end
  242. elseif pc_job==1 then
  243. if table_is_in(ASSASSIN1_NPC_LIST, npc_vnum) then return true end
  244. if table_is_in(ASSASSIN2_NPC_LIST, npc_vnum) then return true end
  245. elseif pc_job==2 then
  246. if table_is_in(SURA1_NPC_LIST, npc_vnum) then return true end
  247. if table_is_in(SURA2_NPC_LIST, npc_vnum) then return true end
  248. elseif pc_job==3 then
  249. if table_is_in(SHAMAN1_NPC_LIST, npc_vnum) then return true end
  250. if table_is_in(SHAMAN2_NPC_LIST, npc_vnum) then return true end
  251. end
  252.  
  253. return false
  254. end
  255.  
  256. function npc_get_job()
  257. local npc_vnum=npc.get_race()
  258.  
  259. if table_is_in(WARRIOR1_NPC_LIST, npc_vnum) then return COND_WARRIOR_1 end
  260. if table_is_in(WARRIOR2_NPC_LIST, npc_vnum) then return COND_WARRIOR_2 end
  261. if table_is_in(ASSASSIN1_NPC_LIST, npc_vnum) then return COND_ASSASSIN_1 end
  262. if table_is_in(ASSASSIN2_NPC_LIST, npc_vnum) then return COND_ASSASSIN_2 end
  263. if table_is_in(SURA1_NPC_LIST, npc_vnum) then return COND_SURA_1 end
  264. if table_is_in(SURA2_NPC_LIST, npc_vnum) then return COND_SURA_2 end
  265. if table_is_in(SHAMAN1_NPC_LIST, npc_vnum) then return COND_SHAMAN_1 end
  266. if table_is_in(SHAMAN2_NPC_LIST, npc_vnum) then return COND_SHAMAN_2 end
  267. return 0
  268.  
  269. end
  270.  
  271. function time_min_to_sec(value)
  272. return 60*value
  273. end
  274.  
  275. function time_hour_to_sec(value)
  276. return 3600*value
  277. end
  278.  
  279. function next_time_set(value, test_value)
  280. local nextTime=get_time()+value
  281. if is_test_server() then
  282. nextTime=get_time()+test_value
  283. end
  284. pc.setqf("__NEXT_TIME__", nextTime)
  285. end
  286.  
  287. function next_time_is_now(value)
  288. if get_time()>=pc.getqf("__NEXT_TIME__") then
  289. return true
  290. else
  291. return false
  292. end
  293. end
  294.  
  295. function table_get_random_item(self)
  296. return self[number(1, table.getn(self))]
  297. end
  298.  
  299. function table_is_in(self, test)
  300. for i = 1, table.getn(self) do
  301. if self[i]==test then
  302. return true
  303. end
  304. end
  305. return false
  306. end
  307.  
  308.  
  309. function giveup_quest_menu(title)
  310. local s=select("????", "????")
  311. if 2==s then
  312. say(title.." ???? ???")
  313. say("?????????")
  314. local s=select("?, ?????", "????")
  315. if 1==s then
  316. say(title.."???? ??????")
  317. restart_quest()
  318. end
  319. end
  320. end
  321.  
  322. function restart_quest()
  323. set_state("start")
  324. q.done()
  325. end
  326.  
  327. function complete_quest()
  328. set_state("__COMPLETE__")
  329. q.done()
  330. end
  331.  
  332. function giveup_quest()
  333. set_state("__GIVEUP__")
  334. q.done()
  335. end
  336.  
  337. function complete_quest_state(state_name)
  338. set_state(state_name)
  339. q.done()
  340. end
  341.  
  342. function test_chat(log)
  343. if is_test_server() then
  344. chat(log)
  345. end
  346. end
  347.  
  348. function bool_to_str(is)
  349. if is then
  350. return "true"
  351. else
  352. return "false"
  353. end
  354. end
  355.  
  356. WARRIOR1_NPC_LIST = {20300, 20320, 20340, }
  357. WARRIOR2_NPC_LIST = {20301, 20321, 20341, }
  358. ASSASSIN1_NPC_LIST = {20302, 20322, 20342, }
  359. ASSASSIN2_NPC_LIST = {20303, 20323, 20343, }
  360. SURA1_NPC_LIST = {20304, 20324, 20344, }
  361. SURA2_NPC_LIST = {20305, 20325, 20345, }
  362. SHAMAN1_NPC_LIST = {20306, 20326, 20346, }
  363. SHAMAN2_NPC_LIST = {20307, 20327, 20347, }
  364.  
  365. function skill_group_dialog(e, j, g) -- e = ??, j = ??, g = ??
  366. e = 1 -- XXX ???? ???? ??? ??? ?????
  367.  
  368.  
  369. -- ?? ????? ?? ??? ??
  370. if pc.job != j then
  371. say(locale.skill_group.dialog[e][pc.job][3])
  372. elseif pc.get_skill_group() == 0 then
  373. if pc.level < 5 then
  374. say(locale.skill_group.dialog[e][j][g][1])
  375. return
  376. end
  377. say(locale.skill_group.dialog[e][j][g][2])
  378. local answer = select(locale.yes, locale.no)
  379.  
  380. if answer == 1 then
  381. --say(locale.skill_group.dialog[e][j][g][2])
  382. pc.set_skill_group(g)
  383. else
  384. --say(locale.skill_group.dialog[e][j][g][3])
  385. end
  386. --elseif pc.get_skill_group() == g then
  387. --say(locale.skill_group.dialog[e][j][g][4])
  388. --else
  389. --say(locale.skill_group.dialog[e][j][g][5])
  390. end
  391. end
  392.  
  393. function show_horse_menu()
  394. if horse.is_mine() then
  395. say(locale.horse_menu.menu)
  396.  
  397. local s = 0
  398. if horse.is_dead() then
  399. s = select(locale.horse_menu.revive, locale.horse_menu.ride, locale.horse_menu.unsummon, locale.horse_menu.show_state ,locale.horse_menu.close)
  400. else
  401. s = select(locale.horse_menu.feed, locale.horse_menu.ride, locale.horse_menu.unsummon, locale.horse_menu.show_state ,locale.horse_menu.close)
  402. end
  403.  
  404. if s==1 then
  405. if horse.is_dead() then
  406. horse.revive()
  407. else
  408. local food = horse.get_grade() + 50054 - 1
  409. if pc.countitem(food) > 0 then
  410. pc.removeitem(food, 1)
  411. horse.feed()
  412. else
  413. say(locale.need_item_prefix..item_name(food)..locale.need_item_postfix);
  414. end
  415. end
  416. elseif s==2 then
  417. horse.ride()
  418. elseif s==3 then
  419. horse.unsummon()
  420. elseif s==4 then
  421. say("Zycie: "..horse.get_health_pct().."%")
  422. say("Wytrzymalosc: "..horse.get_stamina_pct().."%")
  423. say("")
  424. elseif s==5 then
  425. -- do nothing
  426. end
  427. end
  428. end
  429.  
  430. npc_index_table = {
  431. ['race'] = npc.getrace,
  432. ['empire'] = npc.get_empire,
  433. }
  434.  
  435. pc_index_table = {
  436. ['weapon'] = pc.getweapon,
  437. ['level'] = pc.get_level,
  438. ['hp'] = pc.gethp,
  439. ['maxhp'] = pc.getmaxhp,
  440. ['sp'] = pc.getsp,
  441. ['maxsp'] = pc.getmaxsp,
  442. ['exp'] = pc.get_exp,
  443. ['nextexp'] = pc.get_next_exp,
  444. ['job'] = pc.get_job,
  445. ['money'] = pc.getmoney,
  446. ['gold'] = pc.getmoney,
  447. ['name'] = pc.getname,
  448. ['playtime'] = pc.getplaytime,
  449. ['leadership'] = pc.getleadership,
  450. ['empire'] = pc.getempire,
  451. ['skillgroup'] = pc.get_skill_group,
  452. ['x'] = pc.getx,
  453. ['y'] = pc.gety,
  454. ['local_x'] = pc.get_local_x,
  455. ['local_y'] = pc.get_local_y,
  456. }
  457.  
  458. item_index_table = {
  459. ['vnum'] = item.get_vnum,
  460. ['name'] = item.get_name,
  461. ['size'] = item.get_size,
  462. ['count'] = item.get_count,
  463. ['type'] = item.get_type,
  464. ['sub_type'] = item.get_sub_type,
  465. ['refine_vnum'] = item.get_refine_vnum,
  466. ['level'] = item.get_level,
  467. }
  468.  
  469. guild_war_bet_price_table =
  470. {
  471. 10000,
  472. 30000,
  473. 50000,
  474. 100000
  475. }
  476.  
  477. function npc_index(t,i)
  478. local npit = npc_index_table
  479. if npit[i] then
  480. return npit[i]()
  481. else
  482. return rawget(t,i)
  483. end
  484. end
  485.  
  486. function pc_index(t,i)
  487. local pit = pc_index_table
  488. if pit[i] then
  489. return pit[i]()
  490. else
  491. return rawget(t,i)
  492. end
  493. end
  494.  
  495. function item_index(t, i)
  496. local iit = item_index_table
  497. if iit[i] then
  498. return iit[i]()
  499. else
  500. return rawget(t, i)
  501. end
  502. end
  503.  
  504. setmetatable(pc,{__index=pc_index})
  505. setmetatable(npc,{__index=npc_index})
  506. setmetatable(item,{__index=item_index})
  507.  
  508. --coroutine? ??? ??? ??
  509. function select(...)
  510. return q.yield('select', arg)
  511. end
  512.  
  513. function select_table(table)
  514. return q.yield('select', table)
  515. end
  516.  
  517. -- coroutine? ??? ?? ?? ????
  518. function wait()
  519. q.yield('wait')
  520. end
  521.  
  522. function input()
  523. return q.yield('input')
  524. end
  525.  
  526. function confirm(vid, msg, timeout)
  527. return q.yield('confirm', vid, msg, timeout)
  528. end
  529.  
  530. function select_item()
  531. setskin(NOWINDOW)
  532. return q.yield('select_item')
  533. end
  534.  
  535. --?? ?? ??? ??? ??
  536. NOWINDOW = 0
  537. NORMAL = 1
  538. CINEMATIC = 2
  539. SCROLL = 3
  540.  
  541. WARRIOR = 0
  542. ASSASSIN = 1
  543. SURA = 2
  544. SHAMAN = 3
  545.  
  546. COND_WARRIOR_0 = 8
  547. COND_WARRIOR_1 = 16
  548. COND_WARRIOR_2 = 32
  549. COND_WARRIOR = 56
  550.  
  551. COND_ASSASSIN_0 = 64
  552. COND_ASSASSIN_1 = 128
  553. COND_ASSASSIN_2 = 256
  554. COND_ASSASSIN = 448
  555.  
  556. COND_SURA_0 = 512
  557. COND_SURA_1 = 1024
  558. COND_SURA_2 = 2048
  559. COND_SURA = 3584
  560.  
  561. COND_SHAMAN_0 = 4096
  562. COND_SHAMAN_1 = 8192
  563. COND_SHAMAN_2 = 16384
  564. COND_SHAMAN = 28672
  565.  
  566. PART_MAIN = 0
  567. PART_HAIR = 3
  568.  
  569. GUILD_CREATE_ITEM_VNUM = 70101
  570.  
  571. QUEST_SCROLL_TYPE_KILL_MOB = 1
  572. QUEST_SCROLL_TYPE_KILL_ANOTHER_EMPIRE = 2
  573.  
  574. apply = {
  575. ["MAX_HP"] = 1,
  576. ["MAX_SP"] = 2,
  577. ["CON"] = 3,
  578. ["INT"] = 4,
  579. ["STR"] = 5,
  580. ["DEX"] = 6,
  581. ["ATT_SPEED"] = 7,
  582. ["MOV_SPEED"] = 8,
  583. ["CAST_SPEED"] = 9,
  584. ["HP_REGEN"] = 10,
  585. ["SP_REGEN"] = 11,
  586. ["POISON_PCT"] = 12,
  587. ["STUN_PCT"] = 13,
  588. ["SLOW_PCT"] = 14,
  589. ["CRITICAL_PCT"] = 15,
  590. ["PENETRATE_PCT"] = 16,
  591. ["ATTBONUS_HUMAN"] = 17,
  592. ["ATTBONUS_ANIMAL"] = 18,
  593. ["ATTBONUS_ORC"] = 19,
  594. ["ATTBONUS_MILGYO"] = 20,
  595. ["ATTBONUS_UNDEAD"] = 21,
  596. ["ATTBONUS_DEVIL"] = 22,
  597. ["STEAL_HP"] = 23,
  598. ["STEAL_SP"] = 24,
  599. ["MANA_BURN_PCT"] = 25,
  600. ["DAMAGE_SP_RECOVER"] = 26,
  601. ["BLOCK"] = 27,
  602. ["DODGE"] = 28,
  603. ["RESIST_SWORD"] = 29,
  604. ["RESIST_TWOHAND"] = 30,
  605. ["RESIST_DAGGER"] = 31,
  606. ["RESIST_BELL"] = 32,
  607. ["RESIST_FAN"] = 33,
  608. ["RESIST_BOW"] = 34,
  609. ["RESIST_FIRE"] = 35,
  610. ["RESIST_ELEC"] = 36,
  611. ["RESIST_MAGIC"] = 37,
  612. ["RESIST_WIND"] = 38,
  613. ["REFLECT_MELEE"] = 39,
  614. ["REFLECT_CURSE"] = 40,
  615. ["POISON_REDUCE"] = 41,
  616. ["KILL_SP_RECOVER"] = 42,
  617. ["EXP_DOUBLE_BONUS"] = 43,
  618. ["GOLD_DOUBLE_BONUS"] = 44,
  619. ["ITEM_DROP_BONUS"] = 45,
  620. ["POTION_BONUS"] = 46,
  621. ["KILL_HP_RECOVER"] = 47,
  622. ["IMMUNE_STUN"] = 48,
  623. ["IMMUNE_SLOW"] = 49,
  624. ["IMMUNE_FALL"] = 50,
  625. ["SKILL"] = 51,
  626. ["BOW_DISTANCE"] = 52,
  627. ["ATT_GRADE_BONUS"] = 53,
  628. ["DEF_GRADE_BONUS"] = 54,
  629. ["MAGIC_ATT_GRADE"] = 55,
  630. ["MAGIC_DEF_GRADE"] = 56,
  631. ["CURSE_PCT"] = 57,
  632. ["MAX_STAMINA"] = 58,
  633. ["ATTBONUS_WARRIOR"] = 59,
  634. ["ATTBONUS_ASSASSIN"] = 60,
  635. ["ATTBONUS_SURA"] = 61,
  636. ["ATTBONUS_SHAMAN"] = 62,
  637. ["ATTBONUS_MONSTER"] = 63,
  638. ["ATTBONUS_UM"] = 71,
  639.  
  640. }
  641.  
  642. -- ??? ??? -_-
  643. special = {}
  644.  
  645. special.fortune_telling =
  646. {
  647. -- { prob ?? item money remove money
  648. { 1, 0, 20, 20, 0 }, -- 10
  649. { 499, 0, 10, 10, 0 }, -- 5
  650. { 2500, 0, 5, 5, 0 }, -- 1
  651. { 5000, 0, 0, 0, 0 },
  652. { 1500, 0, -5, -5, 20000 },
  653. { 499, 0, -10, -10, 20000 },
  654. { 1, 0, -20, -20, 20000 },
  655. }
  656.  
  657. special.questscroll_reward =
  658. {
  659. {1, 1500, 3000, 30027, 0, 0 },
  660. {2, 1500, 3000, 30028, 0, 0 },
  661. {3, 1000, 2000, 30034, 30018, 0 },
  662. {4, 1000, 2000, 30034, 30011, 0 },
  663. {5, 1000, 2000, 30011, 30034, 0 },
  664. {6, 1000, 2000, 27400, 0, 0 },
  665. {7, 2000, 4000, 30023, 30003, 0 },
  666. {8, 2000, 4000, 30005, 30033, 0 },
  667. {9, 2000, 8000, 30033, 30005, 0 },
  668. {10, 4000, 8000, 30021, 30033, 30045},
  669. {11, 4000, 8000, 30045, 30022, 30046},
  670. {12, 5000, 12000, 30047, 30045, 30055},
  671. {13, 5000, 12000, 30051, 30017, 30058},
  672. {14, 5000, 12000, 30051, 30007, 30041},
  673. {15, 5000, 15000, 30091, 30017, 30018},
  674. {16, 3500, 6500, 30021, 30033, 0 },
  675. {17, 4000, 9000, 30051, 30033, 0 },
  676. {18, 4500, 10000, 30056, 30057, 30058},
  677. {19, 4500, 10000, 30059, 30058, 30041},
  678. {20, 5000, 15000, 0, 0, 0 },
  679. }
  680.  
  681. special.active_skill_list = {
  682. {
  683. { 1, 2, 3, 4, 5, 6},
  684. { 16, 17, 18, 19, 20, 21},
  685. },
  686. {
  687. {31, 32, 33, 34, 35, 36},
  688. {46, 47, 48, 49, 50, 51},
  689. },
  690. {
  691. {61, 62, 63, 64, 65, 66},
  692. {76, 77, 78, 79, 80, 81},
  693. },
  694. {
  695. {91, 92, 93, 94, 95, 96},
  696. {106, 107, 108, 109, 110, 111},
  697. },
  698. }
  699.  
  700. special.skill_reset_cost = {
  701. 2000,
  702. 2000,
  703. 2000,
  704. 2000,
  705. 2000,
  706. 2000,
  707. 4000,
  708. 6000,
  709. 8000,
  710. 10000,
  711. 14000,
  712. 18000,
  713. 22000,
  714. 28000,
  715. 34000,
  716. 41000,
  717. 50000,
  718. 59000,
  719. 70000,
  720. 90000,
  721. 101000,
  722. 109000,
  723. 114000,
  724. 120000,
  725. 131000,
  726. 141000,
  727. 157000,
  728. 176000,
  729. 188000,
  730. 200000,
  731. 225000,
  732. 270000,
  733. 314000,
  734. 348000,
  735. 393000,
  736. 427000,
  737. 470000,
  738. 504000,
  739. 554000,
  740. 600000,
  741. 758000,
  742. 936000,
  743. 1103000,
  744. 1276000,
  745. 1407000,
  746. 1568000,
  747. 1704000,
  748. 1860000,
  749. 2080000,
  750. 2300000,
  751. 2700000,
  752. 3100000,
  753. 3500000,
  754. 3900000,
  755. 4300000,
  756. 4800000,
  757. 5300000,
  758. 5800000,
  759. 6400000,
  760. 7000000,
  761. 8000000,
  762. 9000000,
  763. 10000000,
  764. 11000000,
  765. 12000000,
  766. 13000000,
  767. 14000000,
  768. 15000000,
  769. 16000000,
  770. 17000000,
  771. }
  772.  
  773. special.levelup_img =
  774. {
  775. [101] = "dog.tga",
  776. [102] = "wolf.tga",
  777. [103] = "wolf.tga",
  778. [104] = "wolf.tga",
  779. [105] = "wolf.tga",
  780. [105] = "wolf.tga",
  781. [106] = "wolf.tga",
  782. [107] = "wolf.tga",
  783. [108] = "wild_boar.tga",
  784. [109] = "wild_boar.tga",
  785. [110] = "bear.tga",
  786. [111] = "bear.tga",
  787. [112] = "bear.tga",
  788. [113] = "bear.tga",
  789. [114] = "tiger.tga",
  790. [115] = "tiger.tga",
  791.  
  792. [301] = "bak_inf.tga",
  793. [302] = "bak_gung.tga",
  794. [303] = "bak_gen1.tga",
  795. [304] = "bak_gen2.tga",
  796.  
  797. [401] = "huk_inf.tga",
  798. [402] = "huk_dol.tga",
  799. [403] = "huk_gen1.tga",
  800. [404] = "huk_gen2.tga",
  801.  
  802. [501] = "o_inf.tga",
  803. [502] = "o_jol.tga",
  804. [503] = "o_gung.tga",
  805. [504] = "o_jang.tga",
  806.  
  807. [601] = "ung_inf.tga",
  808. [602] = "ung_chuk.tga",
  809. [603] = "ung_tu.tga",
  810. }
  811.  
  812. special.levelup_quest = {
  813. -- monster kill monster kill
  814. -- vnum qty. vnum qty. exp percent
  815. { 0 , 0 , 0 , 0 , 0 } , -- lev 1
  816. { 101 , 10 , 102 , 5 , 10 } , -- lev 2
  817. { 101 , 20 , 102 , 10 , 10 } , -- lev 3
  818. { 102 , 15 , 103 , 5 , 10 } , -- lev 4
  819. { 103 , 10 , 104 , 10 , 10 } , -- lev 5
  820. { 104 , 20 , 108 , 10 , 10 } , -- lev 6
  821. { 108 , 10 , 105 , 5 , 10 } , -- lev 7
  822. { 108 , 20 , 105 , 10 , 10 } , -- lev 8
  823. { 105 , 15 , 109 , 5 , 10 } , -- lev 9
  824. { 105 , 20 , 109 , 10 , 10 } , -- lev 10
  825. { 109 , 10 , 110 , 5 , 10 } , -- lev 11
  826. { 110 , 15 , 106 , 10 , 10 } , -- lev 12
  827. { 106 , 20 , 111 , 5 , 10 } , -- lev 13
  828. { 111 , 15 , 107 , 5 , 10 } , -- lev 14
  829. { 111 , 20 , 107 , 10 , 10 } , -- lev 15
  830. { 107 , 15 , 114 , 5 , 10 } , -- lev 16
  831. { 107 , 20 , 114 , 10 , 10 } , -- lev 17
  832. { 114 , 10 , 112 , 10 , 10 } , -- lev 18
  833. { 112 , 20 , 113 , 10 , 10 } , -- lev 19
  834. { 113 , 20 , 302 , 15 , 10 } , -- lev 20
  835. { 302 , 20 , 115 , 10 , "2-10" } , -- lev 21
  836. { 115 , 25 , 304 , 10 , "2-10" } , -- lev 22
  837. { 304 , 20 , 401 , 40 , "2-10" } , -- lev 23
  838. { 401 , 60 , 402 , 80 , "2-10" } , -- lev 24
  839. { 501 , 80 , 404 , 20 , "2-10" } , -- lev 25
  840. { 502 , 80 , 406 , 20 , "2-10" } , -- lev 26
  841. { 406 , 30 , 504 , 20 , "2-10" } , -- lev 27
  842. { 631 , 35 , 504 , 30 , "2-10" } , -- lev 28
  843. { 631 , 40 , 632 , 30 , "2-10" } , -- lev 29
  844. { 632 , 40 , 2102 , 30 , "2-10" } , -- lev 30
  845. { 632 , 50 , 2102 , 45 , "2-5" } , -- lev 31
  846. { 633 , 45 , 2001 , 40 , "2-5" } , -- lev 32
  847. { 701 , 35 , 2103 , 30 , "2-5" } , -- lev 33
  848. { 701 , 40 , 2103 , 40 , "2-5" } , -- lev 34
  849. { 702 , 40 , 2002 , 30 , "2-5" } , -- lev 35
  850. { 704 , 20 , 2106 , 20 , "2-5" } , -- lev 36
  851. { 733 , 30 , 2003 , 20 , "2-5" } , -- lev 37
  852. { 734 , 40 , 2004 , 20 , "2-5" } , -- lev 38
  853. { 706 , 40 , 2005 , 30 , "2-5" } , -- lev 39
  854. { 707 , 40 , 2108 , 20 , "2-5" } , -- lev 40
  855. { 901 , 40 , 5123 , 25 , "2-5" } , -- lev 41
  856. { 902 , 30 , 5123 , 30 , "2-5" } , -- lev 42
  857. { 902 , 40 , 2031 , 35 , "2-5" } , -- lev 43
  858. { 903 , 40 , 2031 , 40 , "2-5" } , -- lev 44
  859. { 731 , 50 , 2032 , 45 , "2-5" } , -- lev 45
  860. { 732 , 30 , 5124 , 30 , "2-5" } , -- lev 46
  861. { 903 , 35 , 5125 , 30 , "2-5" } , -- lev 47
  862. { 904 , 40 , 5125 , 35 , "2-5" } , -- lev 48
  863. { 733 , 40 , 2033 , 45 , "2-5" } , -- lev 49
  864. { 734 , 40 , 5126 , 20 , "2-5" } , -- lev 50
  865. { 735 , 50 , 5126 , 30 , "1-4" } , -- lev 51
  866. { 904 , 45 , 2034 , 45 , "1-4" } , -- lev 52
  867. { 904 , 50 , 2034 , 50 , "1-4" } , -- lev 53
  868. { 736 , 40 , 1001 , 30 , "1-4" } , -- lev 54
  869. { 737 , 40 , 1301 , 35 , "1-4" } , -- lev 55
  870. { 905 , 50 , 1002 , 30 , "1-4" } , -- lev 56
  871. { 905 , 60 , 1002 , 40 , "1-4" } , -- lev 57
  872. { 906 , 45 , 1303 , 40 , "1-4" } , -- lev 58
  873. { 906 , 50 , 1303 , 45 , "1-4" } , -- lev 59
  874. { 907 , 45 , 1003 , 40 , "1-4" } , -- lev 60
  875.  
  876. }
  877.  
  878. special.levelup_reward1 =
  879. {
  880. -- warrior assassin sura shaman
  881. { 0, 0, 0, 0 },
  882. { 11200, 11400, 11600, 11800 }, -- ??
  883. { 12200, 12340, 12480, 12620 }, -- ??
  884. { 13000, 13000, 13000, 13000 } -- ??
  885. }
  886.  
  887. -- levelup_reward1 ??? ???? ??? ???? ??
  888. -- ???? ???? ???? ??.
  889. special.levelup_reward3 = {
  890. -- pct item # item count
  891. { 33, 27002, 10 }, -- 25%
  892. { 67, 27005, 10 }, -- 25%
  893. --{ 75, 27101, 5 }, -- 25%
  894. { 100, 27114, 5 }, -- 25%
  895. }
  896.  
  897. special.levelup_reward_gold21 =
  898. {
  899. { 10000, 20 },
  900. { 20000, 50 },
  901. { 40000, 25 },
  902. { 80000, 3 },
  903. { 100000, 2 },
  904. }
  905. special.levelup_reward_gold31 =
  906. {
  907. { 20000, 20 },
  908. { 40000, 40 },
  909. { 60000, 25 },
  910. { 80000, 10 },
  911. { 100000, 5 },
  912. }
  913. special.levelup_reward_gold41 =
  914. {
  915. { 40000, 20 },
  916. { 60000, 40 },
  917. { 80000, 25 },
  918. { 100000, 10 },
  919. { 150000, 5 },
  920. }
  921. special.levelup_reward_gold51 =
  922. {
  923. { 60000, 20 },
  924. { 80000, 40 },
  925. { 100000, 25 },
  926. { 150000, 10 },
  927. { 200000, 5 },
  928. }
  929.  
  930. special.levelup_reward_exp21 =
  931. {
  932. { 2, 9 },
  933. { 3, 14 },
  934. { 4, 39 },
  935. { 6, 24 },
  936. { 8, 9 },
  937. { 10, 4 },
  938. }
  939.  
  940. special.levelup_reward_exp31 =
  941. {
  942. { 2, 10 },
  943. { 2.5, 15 },
  944. { 3, 40 },
  945. { 3.5, 25 },
  946. { 4, 8 },
  947. { 4.5, 5 },
  948. { 5, 2 },
  949. }
  950. special.levelup_reward_exp41 =
  951. {
  952. { 2, 10 },
  953. { 2.5, 15 },
  954. { 3, 40 },
  955. { 3.5, 25 },
  956. { 4, 8 },
  957. { 4.5, 5 },
  958. { 5, 2 },
  959. }
  960. special.levelup_reward_exp51 =
  961. {
  962. { 1, 10 },
  963. { 1.5, 15 },
  964. { 2, 40 },
  965. { 2.5, 25 },
  966. { 3, 8 },
  967. { 3.5, 5 },
  968. { 4, 2 },
  969. }
  970.  
  971. special.levelup_reward_item_21 =
  972. {
  973. -- no couple ring
  974. { { 27002, 10 }, { 27005, 10 }, { 27114, 10 } }, -- lev 21
  975. { 15080, 15100, 15120, 15140 }, -- lev 22
  976. { 16080, 16100, 16120, 16140 }, -- lev 23
  977. { 17080, 17100, 17120, 17140 }, -- lev 24
  978. { { 27002, 10 }, { 27005, 10 }, { 27114, 10 } }, -- lev 25
  979. { { 27003, 20 }, { 27006, 20 }, { 27114, 10 } }, -- over lev 25
  980.  
  981. -- with couple ring
  982. -- { { 27002, 10 }, { 27005, 10 }, { 27114, 10 }, { 70301, 1 } }, -- lev 21
  983. -- { 15080, 15100, 15120, 15140, 70301 }, -- lev 22
  984. -- { 16080, 16100, 16120, 16140, 70301 }, -- lev 23
  985. -- { 17080, 17100, 17120, 17140, 70301 }, -- lev 24
  986. -- { { 27002, 10 }, { 27005, 10 }, { 27114, 10 }, { 70301, 1 } }, -- lev 25
  987. -- { { 27003, 20 }, { 27006, 20 }, { 27114, 10 } }, -- over lev 25
  988. }
  989.  
  990. special.warp_to_pos = {
  991. -- ???
  992. {
  993. { 402100, 673900 },
  994. { 270400, 739900 },
  995. { 321300, 808000 },
  996. },
  997. --????
  998. {
  999. --A 5994 7563
  1000. --B 5978 6222
  1001. --C 7307 6898
  1002. { 599400, 756300 },
  1003. { 597800, 622200 },
  1004. { 730700, 689800 },
  1005. },
  1006. --????
  1007. {
  1008. --A 2178 6272
  1009. { 217800, 627200 },
  1010. --B 2219 5027
  1011. { 221900, 502700 },
  1012. --C 3440 5025
  1013. { 344000, 502500 },
  1014. },
  1015. --???
  1016. {
  1017. --A 4342 2906
  1018. { 434200, 290600 },
  1019. --B 3752 1749
  1020. { 375200, 174900 },
  1021. --C 4918 1736
  1022. { 491800, 173600 },
  1023. },
  1024. }
  1025.  
  1026. special.devil_tower =
  1027. {
  1028. --{ 123, 608 },
  1029. { 2048+126, 6656+384 },
  1030. { 2048+134, 6656+147 },
  1031. { 2048+369, 6656+629 },
  1032. { 2048+369, 6656+401 },
  1033. { 2048+374, 6656+167 },
  1034. { 2048+579, 6656+616 },
  1035. { 2048+578, 6656+392 },
  1036. { 2048+575, 6656+148 },
  1037. }
  1038.  
  1039. special.lvq_map = {
  1040. { -- "A1" 1
  1041. {},
  1042.  
  1043. { { 440, 565 }, { 460, 771 }, { 668, 800 },},
  1044. { { 440, 565 }, { 460, 771 }, { 668, 800 },},
  1045. { { 440, 565 }, { 460, 771 }, { 668, 800 },},
  1046. {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
  1047. {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
  1048. {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
  1049. {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
  1050. {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
  1051. {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
  1052. {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
  1053.  
  1054. {{496, 401}, {494, 951}, {542, 1079}, {748, 9741},},
  1055. {{853,557}, {845,780}, {910,956},},
  1056. {{853,557}, {845,780}, {910,956},},
  1057. {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
  1058. {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
  1059. {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
  1060. {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
  1061. {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
  1062. {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
  1063. {{340, 179}, {692, 112}, {787, 256}, {898, 296},},
  1064.  
  1065. {{224,395}, {137,894}, {206,830}, {266,1067},},
  1066. {{224,395}, {137,894}, {206,830}, {266,1067},},
  1067. {{224,395}, {137,894}, {206,830}, {266,1067},},
  1068. {{405,74}},
  1069. {{405,74}},
  1070. {{405,74}},
  1071. {{405,74}},
  1072. {{405,74}},
  1073. {{405,74}},
  1074. {{405,74}},
  1075.  
  1076. {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}},
  1077.  
  1078. {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}}, {{405,74}},
  1079. },
  1080.  
  1081.  
  1082. { -- "A2" 2
  1083. {},
  1084.  
  1085. {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }},
  1086.  
  1087. {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }},
  1088.  
  1089. {{ 640,1437 }}, {{ 640,1437 }}, {{ 640,1437 }}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}},
  1090.  
  1091. {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}}, {{640,1437}},
  1092.  
  1093. {{640,1437}},
  1094. {{640,1437}},
  1095. {{640,1437}},
  1096. {{244,1309}, {4567,1080}, {496,885}, {798,975}, {1059,1099}, {855,1351},},
  1097. {{244,1309}, {4567,1080}, {496,885}, {798,975}, {1059,1099}, {855,1351},},
  1098. {{244,1309}, {4567,1080}, {496,885}, {798,975}, {1059,1099}, {855,1351},},
  1099. {{244,1309}, {4567,1080}, {496,885}, {798,975}, {1059,1099}, {855,1351},},
  1100. {{193,772}, {390,402}, {768,600}, {1075,789}, {1338,813},},
  1101. {{193,772}, {390,402}, {768,600}, {1075,789}, {1338,813},},
  1102. },
  1103.  
  1104.  
  1105.  
  1106. { -- "A3" 3
  1107. {},
  1108.  
  1109. {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }},
  1110. {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }}, {{ 948,804 }},
  1111.  
  1112. {{ 948,804 }},
  1113. {{ 948,804 }},
  1114. {{ 948,804 }},
  1115. {{438, 895}, {725, 864}, {632, 671},},
  1116. {{438, 895}, {725, 864}, {632, 671},},
  1117. {{438, 895}, {725, 864}, {632, 671},},
  1118. {{438, 895}, {725, 864}, {632, 671},},
  1119. {{438, 895}, {725, 864}, {632, 671},},
  1120. {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
  1121. {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
  1122. {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
  1123. {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
  1124. {{847, 412}, {844, 854}, {823, 757}, {433, 407},},
  1125. {{316,168}, {497,130}, {701,157}, {858,316},},
  1126. {{316,168}, {497,130}, {701,157}, {858,316},},
  1127. {{316,168}, {497,130}, {701,157}, {858,316},},
  1128. {{316,168}, {497,130}, {701,157}, {858,316},},
  1129. {{316,168}, {497,130}, {701,157}, {858,316},},
  1130. {{316,168}, {497,130}, {701,157}, {858,316},},
  1131. {{316,168}, {497,130}, {701,157}, {858,316},},
  1132. {{200,277}, {130,646}, {211,638}, {291,851},},
  1133. {{200,277}, {130,646}, {211,638}, {291,851},},
  1134. {{200,277}, {130,646}, {211,638}, {291,851},},
  1135. {{100,150}},
  1136. {{100,150}},
  1137. {{100,150}},
  1138. {{100,150}},
  1139. {{100,150}},
  1140. {{100,150}},
  1141. },
  1142.  
  1143. {}, -- 4
  1144. {}, -- 5
  1145. {}, -- 6
  1146. {}, -- 7
  1147. {}, -- 8
  1148. {}, -- 9
  1149. {}, -- 10
  1150. {}, -- 11
  1151. {}, -- 12
  1152. {}, -- 13
  1153. {}, -- 14
  1154. {}, -- 15
  1155. {}, -- 16
  1156. {}, -- 17
  1157. {}, -- 18
  1158. {}, -- 19
  1159. {}, -- 20
  1160.  
  1161. { -- "B1" 21
  1162. {},
  1163.  
  1164. {{412,635}, {629,428}, {829,586},},
  1165. {{412,635}, {629,428}, {829,586},},
  1166. {{412,635}, {629,428}, {829,586},},
  1167. {{329,643}, {632,349}, {905,556},},
  1168. {{329,643}, {632,349}, {905,556},},
  1169. {{329,643}, {632,349}, {905,556},},
  1170. {{329,643}, {632,349}, {905,556},},
  1171. {{329,643}, {632,349}, {905,556},},
  1172. {{329,643}, {632,349}, {905,556},},
  1173. {{329,643}, {632,349}, {905,556},},
  1174.  
  1175. {{329,643}, {632,349}, {905,556},},
  1176. {{866,822}, {706,224}, {247,722},},
  1177. {{866,822}, {706,224}, {247,722},},
  1178. {{617,948}, {353,221},},
  1179. {{617,948}, {353,221},},
  1180. {{617,948}, {353,221},},
  1181. {{617,948}, {353,221},},
  1182. {{617,948}, {353,221},},
  1183. {{617,948}, {353,221},},
  1184. {{617,948}, {353,221},},
  1185.  
  1186. {{496,1089}, {890,1043},},
  1187. {{496,1089}, {890,1043},},
  1188. {{496,1089}, {890,1043},},
  1189. {{876,1127}},
  1190. {{876,1127}},
  1191. {{876,1127}},
  1192. {{876,1127}},
  1193. {{876,1127}},
  1194. {{876,1127}},
  1195. {{876,1127}},
  1196.  
  1197. {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}}, {{876,1127}},
  1198. {{876,1127}}, {{876,1127}}, {{876,1127}}, {{908,87}}, {{908,87}}, {{908,87}}, {{908,87}}, {{908,87}}, {{908,87}},
  1199. },
  1200.  
  1201. { -- "B2" 22
  1202. {},
  1203.  
  1204. {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }},
  1205. {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }},
  1206. {{ 95,819 }}, {{ 95,819 }}, {{ 95,819 }}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}},
  1207. {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}}, {{746,1438}},
  1208.  
  1209. {{746,1438}},
  1210. {{746,1438}},
  1211. {{746,1438}},
  1212. {{ 172,810}, {288,465}, {475,841}, {303,156}, {687,466},},
  1213. {{ 172,810}, {288,465}, {475,841}, {303,156}, {687,466},},
  1214. {{ 172,810}, {288,465}, {475,841}, {303,156}, {687,466},},
  1215. {{ 172,810}, {288,465}, {475,841}, {303,156}, {687,466},},
  1216. {{787,235}, {1209,382}, {1350,571}, {1240,852}, {1254,1126}, {1078,1285}, {727,1360},},
  1217. {{787,235}, {1209,382}, {1350,571}, {1240,852}, {1254,1126}, {1078,1285}, {727,1360},},
  1218. },
  1219.  
  1220.  
  1221. { -- "B3" 23
  1222. {},
  1223.  
  1224. {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }},
  1225. {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }}, {{ 106,88 }},
  1226.  
  1227. {{ 106,88 }},
  1228. {{ 106,88 }},
  1229. {{ 106,88 }},
  1230. {{230, 244}, {200, 444}, {594, 408},},
  1231. {{230, 244}, {200, 444}, {594, 408},},
  1232. {{230, 244}, {200, 444}, {594, 408},},
  1233. {{230, 244}, {200, 444}, {594, 408},},
  1234. {{230, 244}, {200, 444}, {594, 408},},
  1235. {{584,204}, {720,376}, {861,272},},
  1236. {{584,204}, {720,376}, {861,272},},
  1237. {{584,204}, {720,376}, {861,272},},
  1238. {{584,204}, {720,376}, {861,272},},
  1239. {{584,204}, {720,376}, {861,272},},
  1240. {{566,694}, {349,574}, {198,645},},
  1241. {{566,694}, {349,574}, {198,645},},
  1242. {{566,694}, {349,574}, {198,645},},
  1243. {{566,694}, {349,574}, {198,645},},
  1244. {{566,694}, {349,574}, {198,645},},
  1245. {{566,694}, {349,574}, {198,645},},
  1246. {{566,694}, {349,574}, {198,645},},
  1247. {{816,721}, {489,823},},
  1248. {{816,721}, {489,823},},
  1249. {{816,721}, {489,823},},
  1250. {{772,140}},
  1251. {{772,140}},
  1252. {{772,140}},
  1253. {{772,140}},
  1254. {{772,140}},
  1255. {{772,140}},
  1256. },
  1257.  
  1258. {}, -- 24
  1259. {}, -- 25
  1260. {}, -- 26
  1261. {}, -- 27
  1262. {}, -- 28
  1263. {}, -- 29
  1264. {}, -- 30
  1265. {}, -- 31
  1266. {}, -- 32
  1267. {}, -- 33
  1268. {}, -- 34
  1269. {}, -- 35
  1270. {}, -- 36
  1271. {}, -- 37
  1272. {}, -- 38
  1273. {}, -- 39
  1274. {}, -- 40
  1275.  
  1276. { -- "C1" 41
  1277. {},
  1278.  
  1279. {{385,446}, {169,592}, {211,692}, {632,681},},
  1280. {{385,446}, {169,592}, {211,692}, {632,681},},
  1281. {{385,446}, {169,592}, {211,692}, {632,681},},
  1282. {{385,374}, {227,815}, {664,771},},
  1283. {{385,374}, {227,815}, {664,771},},
  1284. {{385,374}, {227,815}, {664,771},},
  1285. {{385,374}, {227,815}, {664,771},},
  1286. {{385,374}, {227,815}, {664,771},},
  1287. {{385,374}, {227,815}, {664,771},},
  1288. {{385,374}, {227,815}, {664,771},},
  1289.  
  1290. {{385,374}, {227,815}, {664,771},},
  1291. {{169,362}, {368,304}, {626,409}, {187,882}, {571,858},},
  1292. {{169,362}, {368,304}, {626,409}, {187,882}, {571,858},},
  1293. {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
  1294. {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
  1295. {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
  1296. {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
  1297. {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
  1298. {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
  1299. {{178,275}, {365,242}, {644,313}, {194,950}, {559,936},},
  1300.  
  1301. {{452,160}, {536,1034}, {184,1044},},
  1302. {{452,160}, {536,1034}, {184,1044},},
  1303. {{452,160}, {536,1034}, {184,1044},},
  1304. {{137,126}},
  1305. {{137,126}},
  1306. {{137,126}},
  1307. {{137,126}},
  1308. {{137,126}},
  1309. {{137,126}},
  1310. {{137,126}},
  1311.  
  1312. {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}},
  1313. {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}}, {{137,126}},
  1314. },
  1315.  
  1316. { -- "C2" 42
  1317. {},
  1318.  
  1319. {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}},
  1320. {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}},
  1321. {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}},
  1322. {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}}, {{1409,139}},
  1323.  
  1324. {{1409,139}},
  1325. {{1409,139}},
  1326. {{1409,139}},
  1327. {{991,222}, {1201,525}, {613,232}, {970,751}, {1324,790},},
  1328. {{991,222}, {1201,525}, {613,232}, {970,751}, {1324,790},},
  1329. {{991,222}, {1201,525}, {613,232}, {970,751}, {1324,790},},
  1330. {{991,222}, {1201,525}, {613,232}, {970,751}, {1324,790},},
  1331. {{192,211}, {247,600}, {249,882}, {987,981}, {1018,1288}, {1303,1174},},
  1332. {{192,211}, {247,600}, {249,882}, {987,981}, {1018,1288}, {1303,1174},},
  1333. },
  1334.  
  1335. { -- "C3" 43
  1336. {},
  1337.  
  1338. {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}},
  1339. {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}}, {{901,151}},
  1340.  
  1341. {{901,151}},
  1342. {{901,151}},
  1343. {{901,151}},
  1344. {{421, 189}, {167, 353},},
  1345. {{421, 189}, {167, 353},},
  1346. {{421, 189}, {167, 353},},
  1347. {{421, 189}, {167, 353},},
  1348. {{421, 189}, {167, 353},},
  1349. {{679,459}, {505,709},},
  1350. {{679,459}, {505,709},},
  1351. {{679,459}, {505,709},},
  1352. {{679,459}, {505,709},},
  1353. {{679,459}, {505,709},},
  1354. {{858,638}, {234,596},},
  1355. {{858,638}, {234,596},},
  1356. {{858,638}, {234,596},},
  1357. {{858,638}, {234,596},},
  1358. {{858,638}, {234,596},},
  1359. {{858,638}, {234,596},},
  1360. {{858,638}, {234,596},},
  1361. {{635,856}, {324,855},},
  1362. {{635,856}, {324,855},},
  1363. {{635,856}, {324,855},},
  1364. {{136,899}},
  1365. {{136,899}},
  1366. {{136,899}},
  1367. {{136,899}},
  1368. {{136,899}},
  1369. {{136,899}},
  1370. },
  1371.  
  1372. {}, -- 44
  1373. {}, -- 45
  1374. {}, -- 46
  1375. {}, -- 47
  1376. {}, -- 48
  1377. {}, -- 49
  1378. {}, -- 50
  1379. {}, -- 51
  1380. {}, -- 52
  1381. {}, -- 53
  1382. {}, -- 54
  1383. {}, -- 55
  1384. {}, -- 56
  1385. {}, -- 57
  1386. {}, -- 58
  1387. {}, -- 59
  1388. {}, -- 60
  1389. }
  1390.  
  1391. function BuildSkillList(job, group)
  1392. local skill_vnum_list = {}
  1393. local skill_name_list = {}
  1394.  
  1395. if pc.get_skill_group() != 0 then
  1396. local skill_list = special.active_skill_list[job+1][group]
  1397.  
  1398. table.foreachi( skill_list,
  1399. function(i, t)
  1400. local lev = pc.get_skill_level(t)
  1401.  
  1402. if lev > 0 then
  1403. local name = locale.GM_SKILL_NAME_DICT[t]
  1404.  
  1405. if name != nil then
  1406. table.insert(skill_vnum_list, t)
  1407. table.insert(skill_name_list, name)
  1408. end
  1409. end
  1410. end
  1411. )
  1412. end
  1413.  
  1414. table.insert(skill_vnum_list, 0)
  1415. table.insert(skill_name_list, "Anuluj")
  1416.  
  1417. return { skill_vnum_list, skill_name_list }
  1418. end
  1419.  
  1420. PREMIUM_EXP = 0
  1421. PREMIUM_ITEM = 1
  1422. PREMIUM_SAFEBOX = 2
  1423. PREMIUM_AUTOLOOT = 3
  1424. PREMIUM_FISH_MIND = 4
  1425. PREMIUM_MARRIAGE_FAST = 5
  1426. PREMIUM_GOLD = 6
  1427.  
  1428. -- point type start
  1429. POINT_NONE = 0
  1430. POINT_LEVEL = 1
  1431. POINT_VOICE = 2
  1432. POINT_EXP = 3
  1433. POINT_NEXT_EXP = 4
  1434. POINT_HP = 5
  1435. POINT_MAX_HP = 6
  1436. POINT_SP = 7
  1437. POINT_MAX_SP = 8
  1438. POINT_STAMINA = 9 --????
  1439. POINT_MAX_STAMINA = 10 --?? ????
  1440.  
  1441. POINT_GOLD = 11
  1442. POINT_ST = 12 --??
  1443. POINT_HT = 13 --??
  1444. POINT_DX = 14 --???
  1445. POINT_IQ = 15 --???
  1446. POINT_DEF_GRADE = 16
  1447. POINT_ATT_SPEED = 17 --????
  1448. POINT_ATT_GRADE = 18 --??? MAX
  1449. POINT_MOV_SPEED = 19 --????
  1450. POINT_CLIENT_DEF_GRADE = 20 --????
  1451. POINT_CASTING_SPEED = 21 --???? (?????*100) / (100 + ??) = ?? ??? ??
  1452. POINT_MAGIC_ATT_GRADE = 22 --?????
  1453. POINT_MAGIC_DEF_GRADE = 23 --?????
  1454. POINT_EMPIRE_POINT = 24 --????
  1455. POINT_LEVEL_STEP = 25 --? ????? ??.. (1 2 3 ? ? ?? 4 ?? ?? ?)
  1456. POINT_STAT = 26 --??? ?? ? ?? ??
  1457. POINT_SUB_SKILL = 27 --?? ?? ???
  1458. POINT_SKILL = 28 --??? ?? ???
  1459. POINT_WEAPON_MIN = 29 --?? ?? ???
  1460. POINT_WEAPON_MAX = 30 --?? ?? ???
  1461. POINT_PLAYTIME = 31 --?????
  1462. POINT_HP_REGEN = 32 --HP ???
  1463. POINT_SP_REGEN = 33 --SP ???
  1464.  
  1465. POINT_BOW_DISTANCE = 34 --? ???? ??? (meter)
  1466.  
  1467. POINT_HP_RECOVERY = 35 --?? ?? ???
  1468. POINT_SP_RECOVERY = 36 --??? ?? ???
  1469.  
  1470. POINT_POISON_PCT = 37 --? ??
  1471. POINT_STUN_PCT = 38 --?? ??
  1472. POINT_SLOW_PCT = 39 --??? ??
  1473. POINT_CRITICAL_PCT = 40 --???? ??
  1474. POINT_PENETRATE_PCT = 41 --???? ??
  1475. POINT_CURSE_PCT = 42 --?? ??
  1476.  
  1477. POINT_ATTBONUS_HUMAN = 43 --???? ??
  1478. POINT_ATTBONUS_ANIMAL = 44 --???? ??? % ??
  1479. POINT_ATTBONUS_ORC = 45 --???? ??? % ??
  1480. POINT_ATTBONUS_MILGYO = 46 --???? ??? % ??
  1481. POINT_ATTBONUS_UNDEAD = 47 --???? ??? % ??
  1482. POINT_ATTBONUS_DEVIL = 48 --??(??)?? ??? % ??
  1483. POINT_ATTBONUS_INSECT = 49 --???
  1484. POINT_ATTBONUS_FIRE = 50 --???
  1485. POINT_ATTBONUS_ICE = 51 --???
  1486. POINT_ATTBONUS_DESERT = 52 --???
  1487. POINT_ATTBONUS_MONSTER = 53 --?? ????? ??
  1488. POINT_ATTBONUS_WARRIOR = 54 --???? ??
  1489. POINT_ATTBONUS_ASSASSIN = 55 --???? ??
  1490. POINT_ATTBONUS_SURA = 56 --???? ??
  1491. POINT_ATTBONUS_SHAMAN = 57 --???? ??
  1492.  
  1493. -- ADD_TRENT_MONSTER
  1494. POINT_ATTBONUS_TREE = 58 --???? ?? 20050729.myevan UNUSED5
  1495. -- END_OF_ADD_TRENT_MONSTER
  1496. POINT_RESIST_WARRIOR = 59 --???? ??
  1497. POINT_RESIST_ASSASSIN = 60 --???? ??
  1498. POINT_RESIST_SURA = 61 --???? ??
  1499. POINT_RESIST_SHAMAN = 62 --???? ??
  1500.  
  1501. POINT_STEAL_HP = 63 --??? ??
  1502. POINT_STEAL_SP = 64 --??? ??
  1503.  
  1504. POINT_MANA_BURN_PCT = 65 --?? ?
  1505.  
  1506. --/ ??? ??? =/
  1507.  
  1508. POINT_DAMAGE_SP_RECOVER = 66 --???? ? ??? ?? ??
  1509.  
  1510. POINT_BLOCK = 67 --???
  1511. POINT_DODGE = 68 --???
  1512.  
  1513. POINT_RESIST_SWORD = 69
  1514. POINT_RESIST_TWOHAND = 70
  1515. POINT_RESIST_DAGGER = 71
  1516. POINT_RESIST_BELL = 72
  1517. POINT_RESIST_FAN = 73
  1518. POINT_RESIST_BOW = 74 --?? ?? : ??? ??
  1519. POINT_RESIST_FIRE = 75 --?? ?? : ????? ?? ??? ??
  1520. POINT_RESIST_ELEC = 76 --?? ?? : ????? ?? ??? ??
  1521. POINT_RESIST_MAGIC = 77 --?? ?? : ????? ?? ??? ??
  1522. POINT_RESIST_WIND = 78 --?? ?? : ????? ?? ??? ??
  1523.  
  1524. POINT_REFLECT_MELEE = 79 --?? ??
  1525.  
  1526. --/ ?? ??? =/
  1527. POINT_REFLECT_CURSE = 80 --?? ??
  1528. POINT_POISON_REDUCE = 81 --???? ??
  1529.  
  1530. --/ ? ??? =/
  1531. POINT_KILL_SP_RECOVER = 82 --? ??? MP ??
  1532. POINT_EXP_DOUBLE_BONUS = 83
  1533. POINT_GOLD_DOUBLE_BONUS = 84
  1534. POINT_ITEM_DROP_BONUS = 85
  1535.  
  1536. --/ ?? ?? =/
  1537. POINT_POTION_BONUS = 86
  1538. POINT_KILL_HP_RECOVERY = 87
  1539.  
  1540. POINT_IMMUNE_STUN = 88
  1541. POINT_IMMUNE_SLOW = 89
  1542. POINT_IMMUNE_FALL = 90
  1543. --========
  1544.  
  1545. POINT_PARTY_ATTACKER_BONUS = 91
  1546. POINT_PARTY_TANKER_BONUS = 92
  1547.  
  1548. POINT_ATT_BONUS = 93
  1549. POINT_DEF_BONUS = 94
  1550.  
  1551. POINT_ATT_GRADE_BONUS = 95
  1552. POINT_DEF_GRADE_BONUS = 96
  1553. POINT_MAGIC_ATT_GRADE_BONUS = 97
  1554. POINT_MAGIC_DEF_GRADE_BONUS = 98
  1555.  
  1556. POINT_RESIST_NORMAL_DAMAGE = 99
  1557.  
  1558. POINT_HIT_HP_RECOVERY = 100
  1559. POINT_HIT_SP_RECOVERY = 101
  1560. POINT_MANASHIELD = 102 --???? ??? ?? ???? ?? ??
  1561.  
  1562. POINT_PARTY_BUFFER_BONUS = 103
  1563. POINT_PARTY_SKILL_MASTER_BONUS = 104
  1564.  
  1565. POINT_HP_RECOVER_CONTINUE = 105
  1566. POINT_SP_RECOVER_CONTINUE = 106
  1567.  
  1568. POINT_STEAL_GOLD = 107
  1569. POINT_POLYMORPH = 108 --??? ??? ??
  1570. POINT_MOUNT = 109 --???? ??? ??
  1571.  
  1572. POINT_PARTY_HASTE_BONUS = 110
  1573. POINT_PARTY_DEFENDER_BONUS = 111
  1574. POINT_STAT_RESET_COUNT = 112 --?? ?? ??? ?? ?? ?? ??? (1? 1??? ????)
  1575.  
  1576. POINT_HORSE_SKILL = 113
  1577.  
  1578. POINT_MALL_ATTBONUS = 114 --??? +x%
  1579. POINT_MALL_DEFBONUS = 115 --??? +x%
  1580. POINT_MALL_EXPBONUS = 116 --??? +x%
  1581. POINT_MALL_ITEMBONUS = 117 --??? ??? x/10?
  1582. POINT_MALL_GOLDBONUS = 118 --? ??? x/10?
  1583.  
  1584. POINT_MAX_HP_PCT = 119 --????? +x%
  1585. POINT_MAX_SP_PCT = 120 --????? +x%
  1586.  
  1587. POINT_SKILL_DAMAGE_BONUS = 121 --?? ??? *(100+x)%
  1588. POINT_NORMAL_HIT_DAMAGE_BONUS = 122 --?? ??? *(100+x)%
  1589.  
  1590. -- DEFEND_BONUS_ATTRIBUTES
  1591. POINT_SKILL_DEFEND_BONUS = 123 --?? ?? ???
  1592. POINT_NORMAL_HIT_DEFEND_BONUS = 124 --?? ?? ???
  1593. -- END_OF_DEFEND_BONUS_ATTRIBUTES
  1594.  
  1595. -- PC_BANG_ITEM_ADD
  1596. POINT_PC_BANG_EXP_BONUS = 125 --PC? ?? ??? ???
  1597. POINT_PC_BANG_DROP_BONUS = 126 --PC? ?? ??? ???
  1598. -- END_PC_BANG_ITEM_ADD
  1599. -- POINT_MAX_NUM = 128 common/length.h
  1600. -- point type start
  1601.  
  1602. --[[function query(sql)
  1603. local plik = quest_txt.."op_"..get_global_time()
  1604. os.remove(plik)
  1605. local sql = string.gsub(sql,"'",'"')
  1606. os.execute("/usr/local/bin/mysql -N -L -hlocalhost -root -kociol123 --execute='"..sql.."' >> "..plik)
  1607. local czytaj = io.open(plik)
  1608. local quer = czytaj:read()
  1609. czytaj:close()
  1610. os.remove(plik)
  1611. return quer
  1612. end]]--
  1613. function query(sql)
  1614. user = "mt2"
  1615. pw = "mt2!@#"
  1616. local var = {}
  1617. var.pre = ''
  1618. if user ~= nil then
  1619. var.pre = var.pre..' -u'..user
  1620. end
  1621. if pw ~= nil then
  1622. var.pre = var.pre..' -p'..pw
  1623. end
  1624. var.scriptfile = 'sc_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
  1625. var.outputfile = 'op_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
  1626. sql = string.gsub(sql,'"',"'")
  1627. var.str = "/usr/local/bin/mysql -N -L "..var.pre.." < "..var.scriptfile.." > "..var.outputfile
  1628. script = io.open(var.scriptfile,"a+")
  1629. script:write(sql)
  1630. script:close()
  1631. os.execute(var.str)
  1632. back = io.open(var.outputfile)
  1633. quer = back:read()
  1634. back:flush()
  1635. back:close()
  1636. os.remove(var.scriptfile)
  1637. os.remove(var.outputfile)
  1638. return quer
  1639. end
  1640. function query_select(sql)
  1641. user = "mt2"
  1642. pw = "mt2!@#"
  1643. local var = {}
  1644. var.pre = ''
  1645. var.pre = var.pre..' -u'..user
  1646. var.pre = var.pre..' -p'..pw
  1647. var.scriptfile = 'sc_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
  1648. var.outputfile = 'op_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
  1649. sql = string.gsub(sql,'"',"'")
  1650. var.str = "mysql -N -L "..var.pre.." < "..var.scriptfile.." > "..var.outputfile
  1651. script = io.open(var.scriptfile,"a+")
  1652. script:write(sql)
  1653. script:close()
  1654. os.execute(var.str)
  1655. zwroc = io.open(var.outputfile)
  1656. quer = zwroc:read()
  1657. zwroc:flush()
  1658. zwroc:close()
  1659. os.remove(var.scriptfile)
  1660. os.remove(var.outputfile)
  1661. if string.len(quer) <= 0 then
  1662. return 0
  1663. else
  1664. return quer
  1665. end
  1666. end
  1667. function mysql_query(query)
  1668. i = 1
  1669.  
  1670. math.randomseed(os.time())
  1671. random = math.random()
  1672.  
  1673. n = "/tmp/mysql_"..random..pc.get_vid()
  1674.  
  1675. os.execute (MYSQL_BIN.." \""..MYSQL_CONFIG.."\" \""..query.."\" > " .. n)
  1676.  
  1677. local ret = dofile(n)
  1678. os.remove (n)
  1679.  
  1680. return ret
  1681. end
  1682. --[[function query_update(sql)
  1683. local sql = string.gsub(sql,"'",'"')
  1684. os.execute("/usr/local/bin/mysql -N -L -hlocalhost -root -kociol123 --execute='"..sql.."'")
  1685. end
  1686. function wpis(sciezka,nazwa,text)
  1687. io.output(sciezka..nazwa)
  1688. io.write(text)
  1689. io.flush()
  1690. io.close()
  1691. end]]--
  1692. db_userw="mt2"
  1693. db_passw="mt2!@#"
  1694. db_hostw="localhost"
  1695. function mysql_sweb(query,notselect)
  1696. local tmp=number(11111111,99999999)
  1697. os.execute('mysql -h '..db_hostw..' -u '..db_userw..' -p'..db_passw..' -N -e '..string.format("%q",query)..' 2>&1 > /tmp/'..tmp)
  1698.  
  1699. if not notselect then
  1700. local res,i={},1
  1701. local f,e=io.open("/tmp/"..tmp)
  1702. if f then
  1703. local line=f:read("*l")
  1704. while line do
  1705. res[i]={}
  1706. string.gsub(line,"([^\t]+)\t*", function(s)
  1707. table.insert(res[i],s)
  1708. end)
  1709. i=i+1
  1710. line=f:read("*l")
  1711. end
  1712. f:close()
  1713. os.execute("rm /tmp/"..tmp)
  1714. end
  1715. return res
  1716. end
  1717. end
  1718.  
  1719. function mysql_notsweb(query)
  1720. return mysql_sweb(query,true)
  1721. end
  1722. function query_update(sql)
  1723. local user = "mt2"
  1724. local pw = "mt2!@#"
  1725. local var = {}
  1726. var.pre = ''
  1727. var.pre = var.pre..' -u'..user
  1728. var.pre = var.pre..' -p'..pw
  1729. local sql = string.gsub(sql,"'",'"')
  1730. local x = os.execute("mysql -N -L "..var.pre.." --execute='"..sql.."'")
  1731. if x == 1 then
  1732. return 1
  1733. else
  1734. return 0
  1735. end
  1736. end
  1737. ----SQL---
  1738. ---U?tkownik---
  1739. mysql_user = "pmt2"
  1740. mysql_pass = "pmt2"
  1741. mysql_host = "localhost"
  1742. ---------------------
  1743. --[[function query_array(sql) -- /usr/local/bin/ przed mysql je?li nie dzia?
  1744. local plik = quest_txt.."op_"..get_global_time()
  1745. os.remove(plik)
  1746. local sql = string.gsub(sql,"'",'"')
  1747. os.execute("/usr/local/bin/mysql -N -L -hlocalhost -root -kociol123 --execute='"..sql.."' >> "..plik)
  1748. local arr = {}
  1749. for rekord in io.lines(plik) do
  1750. table.insert(arr, rekord)
  1751. end
  1752. os.remove(plik)
  1753. return arr
  1754. end]]--
  1755. function query_array(sql)
  1756. user = "mt2"
  1757. pw = "mt2!@#"
  1758. local var = {}
  1759. var.pre = ''
  1760. var.pre = var.pre..' -u'..user
  1761. var.pre = var.pre..' -p'..pw
  1762. var.scriptfile = 'sc_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
  1763. var.outputfile = 'op_'..pc.get_name()..number(1,999)..number(2,999)..number(3,999)
  1764. sql = string.gsub(sql,'"',"'")
  1765. var.str = "mysql -N -L "..var.pre.." < "..var.scriptfile.." > "..var.outputfile
  1766. script = io.open(var.scriptfile,"a+")
  1767. script:write(sql)
  1768. script:close()
  1769. os.execute(var.str)
  1770. local arr = {}
  1771. for rekord in io.lines(var.outputfile) do
  1772. table.insert(arr, rekord)
  1773. end
  1774. os.remove(var.scriptfile)
  1775. os.remove(var.outputfile)
  1776. if table.getn(arr) <= 0 then
  1777. return 0
  1778. else
  1779. return arr
  1780. end
  1781. end
  1782.  
  1783. function get_input(par)
  1784. cmdchat("GetInputStart")
  1785. local ret = input(cmdchat(par))
  1786. cmdchat("GetInputStop")
  1787. return ret
  1788. end
  1789.  
  1790. function npc.name()
  1791. say_arbuz(mob_name(npc.get_race())..": ")
  1792. end
  1793.  
  1794. QuestFolder = get_locale_base_path().."/quest/"
  1795.  
  1796. PetSystem = {['Folder'] = QuestFolder.."io/pet/", ['ItemExp'] = 4000000, ['UpdateFrequency'] = 30, ['Flag'] = "active_pet", ['ExpFlag'] = "exp_blocked"}
  1797. -- Pet 1
  1798. PetSystem[1] =
  1799. {['Name'] = "Ognisty Feniks", ['Level'] = 22, ['Item'] = 53001, ['MaxLevel'] = 99, ['WindowSize'] = 395,
  1800. ['Skill']= {
  1801. {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=50,['min_level']=1,['desc']="+6000HP",['mult']=6000,['tag']=" HP"},
  1802. {['type']=apply.INT,['name']="Punkty Inteligencji",['max_points']=10,['min_level']=1,['desc']="+1 Int",['mult']=1,['tag']=" Int"},
  1803. {['type']=apply.STR,['name']="Punkty Siły",['max_points']=10,['min_level']=1,['desc']="+1 Siły",['mult']=1,['tag']=" Siły"},
  1804. {['type']=apply.DEX,['name']="Punkty Zręczności",['max_points']=10,['min_level']=1,['desc']="+1 Zrę ",['mult']=1,['tag']=" Zrę "},
  1805. {['type']=apply.ATTBONUS_MONSTER,['name']="Silny przeciwko Potworom ",['max_points']=10,['min_level']=1,['desc']="+4% silny przeciwko potworom",['mult']=4,['tag']="%"},
  1806. },
  1807. ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
  1808. 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
  1809. 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
  1810. 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
  1811. 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
  1812. 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
  1813. 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
  1814. 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
  1815. 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
  1816. 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
  1817. 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
  1818. }
  1819. }
  1820. -- Pet 2
  1821. PetSystem[2] =
  1822. {['Name'] = "Lodowy Feniks", ['Level'] = 23, ['Item'] = 53003, ['MaxLevel'] = 99, ['WindowSize'] = 395,
  1823. ['Skill']= {
  1824. {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=50,['min_level']=1,['desc']="+6000HP",['mult']=6000,['tag']=" HP"},
  1825. {['type']=apply.INT,['name']="Punkty Inteligencji",['max_points']=10,['min_level']=1,['desc']="+1 Int",['mult']=1,['tag']=" Int"},
  1826. {['type']=apply.STR,['name']="Punkty Siły",['max_points']=10,['min_level']=1,['desc']="+1 Siły",['mult']=1,['tag']=" Siły"},
  1827. {['type']=apply.DEX,['name']="Punkty Zręczności",['max_points']=10,['min_level']=1,['desc']="+1 Zrę ",['mult']=1,['tag']=" Zrę "},
  1828. {['type']=apply.ATTBONUS_MONSTER,['name']="Silny przeciwko Potworom ",['max_points']=10,['min_level']=1,['desc']="+4% silny przeciwko potworom",['mult']=4,['tag']="%"},
  1829. },
  1830. ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
  1831. 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
  1832. 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
  1833. 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
  1834. 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
  1835. 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
  1836. 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
  1837. 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
  1838. 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
  1839. 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
  1840. 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
  1841. }
  1842. }
  1843. -- Pet 3
  1844. PetSystem[3] =
  1845. {['Name'] = "Bao Bao", ['Level'] = 24, ['Item'] = 53002, ['MaxLevel'] = 99, ['WindowSize'] = 395,
  1846. ['Skill']= {
  1847. {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=50,['min_level']=1,['desc']="+6000HP",['mult']=6000,['tag']=" HP"},
  1848. {['type']=apply.INT,['name']="Punkty Inteligencji",['max_points']=10,['min_level']=1,['desc']="+1 Int",['mult']=1,['tag']=" Int"},
  1849. {['type']=apply.STR,['name']="Punkty Siły",['max_points']=10,['min_level']=1,['desc']="+1 Siły",['mult']=1,['tag']=" Siły"},
  1850. {['type']=apply.DEX,['name']="Punkty Zręczności",['max_points']=10,['min_level']=1,['desc']="+1 Zrę ",['mult']=1,['tag']=" Zrę "},
  1851. {['type']=apply.ATTBONUS_MONSTER,['name']="Silny przeciwko Potworom ",['max_points']=10,['min_level']=1,['desc']="+4% silny przeciwko potworom",['mult']=4,['tag']="%"},
  1852. },
  1853. ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
  1854. 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
  1855. 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
  1856. 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
  1857. 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
  1858. 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
  1859. 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
  1860. 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
  1861. 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
  1862. 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
  1863. 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
  1864. }
  1865. }
  1866. -- Pet 4
  1867. PetSystem[4] =
  1868. {['Name'] = "Azraeluś ", ['Level'] = 25, ['Item'] = 53005, ['MaxLevel'] = 25, ['WindowSize'] = 395,
  1869. ['Skill']= {
  1870. {['type']=apply.RESBONUS_WARRIOR,['name']="Odporność na Wojownikow",['max_points']=5,['min_level']=1,['desc']="+1% odporności na Wojownika",['mult']=1,['tag']="%"},
  1871. {['type']=apply.RESBONUS_ASSASSIN,['name']="Odporność na Ninje",['max_points']=5,['min_level']=1,['desc']="+1% odporności na Nije",['mult']=1,['tag']="%"},
  1872. {['type']=apply.RESBONUS_SURA,['name']="Odporność na Sure",['max_points']=5,['min_level']=1,['desc']="+1% odporności na Sure",['mult']=1,['tag']="%"},
  1873. {['type']=apply.RESBONUS_SHAMAN,['name']="Odporność na Szamana",['max_points']=5,['min_level']=1,['desc']="+1% odporności na Szamana",['mult']=1,['tag']="%"},
  1874. {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=5,['min_level']=1,['desc']="+1% Silny Przeciwko ludziom",['mult']=1,['tag']="%"}
  1875. },
  1876. ['ExpTable'] = {300000,600000,900000,1200000,1500000,1800000,2100000,2400000,2700000,3000000, -- Liv 1-10
  1877. 6600000,7200000,7800000,8400000,9000000,9600000,10200000,10800000,10140000,12000000, -- Liv 11-20
  1878. 12600000,13200000,13800000,14400000,15000000,15600000,16200000,16800000,17400000,18000000, -- Liv 21-30
  1879. }
  1880. }
  1881. -- Pet 5
  1882. PetSystem[5] =
  1883. {['Name'] = "Rufus", ['Level'] = 26, ['Item'] = 53008, ['MaxLevel'] = 99, ['WindowSize'] = 395,
  1884. ['Skill']= {
  1885. {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=30,['min_level']=1,['desc']="+10000HP",['mult']=10000,['tag']=" HP"},
  1886. {['type']=apply.RESBONUS_WARRIOR,['name']="Odporność na Wojownikow ",['max_points']=5,['min_level']=20,['desc']="+1% Odporności na Wojowników",['mult']=1,['tag']="%"},
  1887. {['type']=apply.ATTBONUS_WARRIOR,['name']="Silny przeciwko Wojownikom ",['max_points']=5,['min_level']=20,['desc']="+1 Silny przeciwnko Wojownikom",['mult']=1,['tag']="%"},
  1888. {['type']=apply.CAST_SPEED,['name']="Szybkość Zaklęcia",['max_points']=20,['min_level']=40,['desc']="+1% Szybkości zaklęcia",['mult']=1,['tag']="%"},
  1889. {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=15,['min_level']=60,['desc']="+1% Silny przeciwko ludziom",['mult']=1,['tag']="%"}
  1890. },
  1891. ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
  1892. 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
  1893. 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
  1894. 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
  1895. 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
  1896. 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
  1897. 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
  1898. 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
  1899. 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
  1900. 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
  1901. 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
  1902. }
  1903. }
  1904. -- Pet 6
  1905. PetSystem[6] =
  1906. {['Name'] = "Lwiątko", ['Level'] = 27, ['Item'] = 53006, ['MaxLevel'] = 99, ['WindowSize'] = 395,
  1907. ['Skill']= {
  1908. {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=30,['min_level']=1,['desc']="+10000HP",['mult']=10000,['tag']=" HP"},
  1909. {['type']=apply.RESBONUS_ASSASSIN,['name']="Odporność na Ninja ",['max_points']=5,['min_level']=20,['desc']="+Odporność na Ninja",['mult']=1,['tag']="%"},
  1910. {['type']=apply.ATTBONUS_ASSASSIN,['name']="Silny przeciwko Ninja",['max_points']=5,['min_level']=20,['desc']="+1 Silny przeciwko Ninja",['mult']=1,['tag']="%"},
  1911. {['type']=apply.CAST_SPEED,['name']="Szybkość Zaklęcia",['max_points']=20,['min_level']=40,['desc']="+1% Szybkość zaklęcia",['mult']=1,['tag']="%"},
  1912. {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=15,['min_level']=60,['desc']="+1% Silny przeciwko ludziom",['mult']=1,['tag']="%"}
  1913. },
  1914. ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
  1915. 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
  1916. 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
  1917. 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
  1918. 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
  1919. 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
  1920. 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
  1921. 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
  1922. 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
  1923. 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
  1924. 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
  1925. }
  1926. }
  1927. -- Pet 7
  1928. PetSystem[7] =
  1929. {['Name'] = "Boczuś ", ['Level'] = 28, ['Item'] = 53009, ['MaxLevel'] = 99, ['WindowSize'] = 395,
  1930. ['Skill']= {
  1931. {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=30,['min_level']=1,['desc']="+10000HP",['mult']=10000,['tag']=" HP"},
  1932. {['type']=apply.RESBONUS_SURA,['name']="Odporność na Sura",['max_points']=5,['min_level']=20,['desc']="+1% Odporność na Sura",['mult']=1,['tag']="%"},
  1933. {['type']=apply.ATTBONUS_SURA,['name']="Silny przeciwko Sura",['max_points']=5,['min_level']=20,['desc']="+1 Silny przeciwko Sura",['mult']=1,['tag']="%"},
  1934. {['type']=apply.CAST_SPEED,['name']="Szybkość Zaklęcia",['max_points']=20,['min_level']=40,['desc']="+1% Szybkość zaklęcia",['mult']=1,['tag']="%"},
  1935. {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=15,['min_level']=60,['desc']="+1% DH",['mult']=1,['tag']="%"}
  1936. },
  1937. ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
  1938. 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
  1939. 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
  1940. 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
  1941. 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
  1942. 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
  1943. 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
  1944. 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
  1945. 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
  1946. 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
  1947. 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
  1948. }
  1949. }
  1950. -- Pet 8
  1951. PetSystem[8] =
  1952. {['Name'] = "Tygrysiątko", ['Level'] = 29, ['Item'] = 53007, ['MaxLevel'] = 99, ['WindowSize'] = 395,
  1953. ['Skill']= {
  1954. {['type']=apply.MAX_HP,['name']="Punkty Witalności",['max_points']=30,['min_level']=1,['desc']="+10000HP",['mult']=10000,['tag']=" HP"},
  1955. {['type']=apply.RESBONUS_SHAMAN,['name']="Odporność na Szaman",['max_points']=15,['min_level']=20,['desc']="+1% Odporność na Szamanów",['mult']=1,['tag']="%"},
  1956. {['type']=apply.ATTBONUS_SHAMAN,['name']="Silny przeciwko Szaman",['max_points']=15,['min_level']=20,['desc']="+1 Silny przeciwko Szaman",['mult']=1,['tag']="%"},
  1957. {['type']=apply.CAST_SPEED,['name']="Szybkość Zaklęcia",['max_points']=20,['min_level']=40,['desc']="+1% Szybkość zaklęcia",['mult']=1,['tag']="%"},
  1958. {['type']=apply.ATTBONUS_HUMAN,['name']="Silny przeciwko Ludziom",['max_points']=15,['min_level']=60,['desc']="+1% Silny przeciwko Ludziom",['mult']=1,['tag']="%"}
  1959. },
  1960. ['ExpTable'] = {3000,6000,9000,12000,15000,18000,21000,24000,27000,30000, -- Liv 1-10
  1961. 66000,72000,78000,84000,90000,96000,102000,108000,101400,120000, -- Liv 11-20
  1962. 126000,132000,138000,144000,150000,156000,162000,168000,174000,180000, -- Liv 21-30
  1963. 186000,202000,208000,214000,220000,226000,232000,238000,244000,480000, -- Liv 31-40
  1964. 492000,504000,516000,528000,540000,552000,564000,576000,588000,650000, -- Liv 41-50
  1965. 153000,156000,159000,162000,165000,168000,171000,174000,177000,180000, -- Liv 51-60
  1966. 183000,186000,189000,192000,195000,198000,201000,204000,207000,210000, -- Liv 61-70
  1967. 213000,216000,219000,222000,225000,228000,231000,234000,237000,240000, -- Liv 71-80
  1968. 243000,246000,249000,252000,255000,258000,261000,264000,267000,270000, -- Liv 81-90
  1969. 273000,276000,279000,282000,285000,288000,291000,294000,297000,300000, -- Liv 91-100
  1970. 3030000,3060000,3090000,3120000,3150000,3180000,3210000,3240000,3270000,0 -- Liv 101-110
  1971. }
  1972. }
  1973.  
  1974.  
  1975. --**
  1976. --** Menu Pet
  1977. --**
  1978. function PetSystem.ShowMenu(PetIndex)
  1979. if horse.is_mine() then
  1980. local pet_menu
  1981. if pc.getqf("exp_blocked") == 0 then
  1982. pet_menu = {"Umiejętności","Blokada Doswiadczenia","Status","Odwołaj","Zamknij"}
  1983. else
  1984. pet_menu = {"Umiejętności","Odblokowanie doswiadczenia","Status'","Odwołaj","Zamknij"}
  1985. end
  1986. say_title("Towarzysz: "..PetSystem[PetIndex].Name)
  1987. local skill_points, liv, ex = PetSystem.ReadStatus(PetIndex)
  1988. say_light_yellow("Poziom: "..liv.." / "..PetSystem[PetIndex].MaxLevel.." - Punkty umiejętności: "..skill_points.."")
  1989. if not PetSystem.IsExpBlocked() then
  1990. say_light_yellow("Doświadczenie: "..ex.." / "..PetSystem[PetIndex].ExpTable[liv].." (Odblokowane)")
  1991. else
  1992. say_light_yellow("Doświadczenie: "..ex.." / "..PetSystem[PetIndex].ExpTable[liv].." (Zablokowane)")
  1993. end
  1994. local s = select_table(pet_menu)
  1995. if s == 1 then
  1996. say_title("Tutaj możesz dodać punkty umiejętności swojemu pupilowi: "..PetSystem[PetIndex].Name.."")
  1997. say_orange("Twoje punkty umiejętności: "..skill_points.."")
  1998. say("[ENTER]Co chcesz zrobić:[ENTER]")
  1999. local a = select("Dodaj umiejętność","Odejmij umiejętność","Anuluj")
  2000. if a == 3 then
  2001. return
  2002. elseif a == 1 then
  2003. say_title("Dodawanie Umiejętności")
  2004. if skill_points == 0 then
  2005. say("Aktualnie nie masz żadnych punktów do dodania.[ENTER]")
  2006. return
  2007. end
  2008. local skill_value = {}
  2009. local menu_abi = {}
  2010. skill_value = PetSystem.LoadSkill(PetIndex)
  2011. for i = 1, table.getn(PetSystem[PetIndex].Skill) do
  2012. if liv >= PetSystem[PetIndex].Skill[i].min_level then
  2013. table.insert(menu_abi, PetSystem[PetIndex].Skill[i].name..": "..skill_value[i].." punktów")
  2014. end
  2015. end
  2016. table.insert(menu_abi, "Anuluj")
  2017. if table.getn(menu_abi) == 1 then
  2018. say("Il n'est pas possible d'augmenter.[ENTER]")
  2019. return
  2020. end
  2021. say("Wybierz w co chcesz dodać punkty umiejętności:")
  2022. local s = select_table(menu_abi)
  2023. if s == table.getn(menu_abi) then
  2024. return
  2025. end
  2026. say_title(PetSystem[PetIndex].Skill[s].name)
  2027. say_orange("Aktualnie dodanych punktów: "..skill_value[s].." [ENTER]")
  2028. if skill_value[s] == PetSystem[PetIndex].Skill[s].max_points then
  2029. say("Ta umięjętność jest już ulepszona maksymalnie!.[ENTER]")
  2030. return
  2031. end
  2032. say_light_blue("Jeden punkt dodaje: "..PetSystem[PetIndex].Skill[s].desc.."")
  2033. say_light_blue("Maksymalna liczba punktów: "..PetSystem[PetIndex].Skill[s].max_points.."[ENTER]")
  2034. local a = select("Dalej", "Anuluj")
  2035. if a == 2 then
  2036. return
  2037. end
  2038. say_title(PetSystem[PetIndex].Skill[s].name)
  2039. say("Ile punktów chcesz dodać? Wpisz liczbę![ENTER]")
  2040. local points = tonumber(input())
  2041. say_title(PetSystem[PetIndex].Skill[s].name)
  2042. if points == nil or points < 1 then
  2043. say("Wprowadziłeś nieprawidłową wartość.[ENTER]")
  2044. return
  2045. elseif points > skill_points then
  2046. say("Nie posiadasz tak dużej ilości punktów.[ENTER]")
  2047. return
  2048. elseif (skill_value[s]+points) > PetSystem[PetIndex].Skill[s].max_points then
  2049. say("Po dodaniu tylu punktów poziom umiejętności")
  2050. say("byłby za wysoki!")
  2051. return
  2052. elseif string.find(points, "nan") or string.find(points, "NaN") or string.find(points, "naN") or string.find(points, "NAn") or string.find(points, "nAn") or string.find(points, "Nan") or points < 1 then
  2053. say("Wprowadziłeś nieprawidłową wartość.[ENTER]")
  2054. return
  2055. end
  2056. skill_value[s] = skill_value[s]+points
  2057. PetSystem.ChangeSkillPoints(PetIndex, -points)
  2058. PetSystem.SaveSkill(PetIndex, skill_value)
  2059. PetSystem.AddBonus(PetIndex)
  2060. say("Punkty umiejętności zostału pomyślnie dodane.[ENTER]")
  2061. ----------********** Diminuer Habilite' ***********----------
  2062. elseif a == 2 then
  2063. say_title("Odejmowanie umiejętności")
  2064. local skill_value = {}
  2065. local menu_abi = {}
  2066. skill_value = PetSystem.LoadSkill(PetIndex)
  2067. for i = 1, table.getn(PetSystem[PetIndex].Skill) do
  2068. if liv >= PetSystem[PetIndex].Skill[i].min_level then
  2069. table.insert(menu_abi, PetSystem[PetIndex].Skill[i].name..": "..skill_value[i].." punktów")
  2070. end
  2071. end
  2072. table.insert(menu_abi, "Anuluj")
  2073. if table.getn(menu_abi) == 1 then
  2074. say("Il n'est pas possible de diminuer.[ENTER]")
  2075. return
  2076. end
  2077. say("Wybierz od której umiejętności chcesz odjąć punkty:")
  2078. local s = select_table(menu_abi)
  2079. if s == table.getn(menu_abi) then
  2080. return
  2081. end
  2082. say_title(PetSystem[PetIndex].Skill[s].name)
  2083. say_orange("Punkty dodane w tę umiejętność: "..skill_value[s].."")
  2084. if skill_value[s] == 0 then
  2085. say("Aktualnie nie masz żadnych punktów dodanych w tę umiejętność.[ENTER]")
  2086. return
  2087. end
  2088. say("Co chcesz zrobić?[ENTER]")
  2089. local b = select("Odejmij 1 punkt","Odejmij wszystkie","Anuluj")
  2090. if b == 3 then
  2091. return
  2092. elseif b == 1 then
  2093. say_title(PetSystem[PetIndex].Skill[s].name)
  2094. say("Czy napewno chcesz odjąć 1 punkt")
  2095. say("od tej umiejętności?[ENTER]")
  2096. local c = select("Tak","Nie")
  2097. if c == 2 then
  2098. return
  2099. end
  2100. PetSystem.ChangeSkillPoints(PetIndex, 1)
  2101. skill_value[s] = skill_value[s]-1
  2102. PetSystem.SaveSkill(PetIndex, skill_value)
  2103. PetSystem.AddBonus(PetIndex)
  2104. say_title(PetSystem[PetIndex].Skill[s].name)
  2105. say("Punkt został odjęte pomyślnie.[ENTER]")
  2106. elseif b == 2 then
  2107. say_title(PetSystem[PetIndex].Skill[s].name)
  2108. say("Czy napewno chcesz odjać wszystkie punkty dla tej umiejętności?[ENTER]")
  2109. local c = select("Tak","Nie")
  2110. if c == 2 then
  2111. return
  2112. end
  2113. PetSystem.ChangeSkillPoints(PetIndex, skill_value[s])
  2114. skill_value[s] = 0
  2115. PetSystem.SaveSkill(PetIndex, skill_value)
  2116. PetSystem.AddBonus(PetIndex)
  2117. say_title(PetSystem[PetIndex].Skill[s].name)
  2118. say("Wszystkie punkty dla tej umiejętności zostały odjęte![ENTER]")
  2119. end
  2120. end
  2121. ----------********** Bloquer/Debloquer Experience ***********----------
  2122. elseif s == 2 then
  2123. if not PetSystem.IsExpBlocked() then
  2124. say_title("Blokada doświadczenia")
  2125. say("Dzięki blokadzie doświadczenia Twój pupil nie będzie dostawał ")
  2126. say("doświadczenia a Ty nie będziesz go tracić.[ENTER]")
  2127. local a = select("Blokuj","Anuluj")
  2128. if a == 2 then
  2129. return
  2130. end
  2131. say_title("Blokada Doświadczenia")
  2132. say("Doświadczenie zostało zablokowane.[ENTER]")
  2133. PetSystem.BlockExp()
  2134. else
  2135. say_title("Odblokuj doświadczenie")
  2136. say("Czy napewno chcesz odblokować doświadczenie dla pupila?[ENTER]")
  2137. local a = select("Tak","Nie")
  2138. if a == 2 then
  2139. return
  2140. end
  2141. say_title("Odblokuj doświadczenie")
  2142. say("Doświadczenie dla Twojego pupila zostało odblokowane.[ENTER]")
  2143. PetSystem.UnblockExp()
  2144. pc.setqf("current_exp", pc.get_exp())
  2145. end
  2146. ----------********** Statut Habilite' Pet ***********----------
  2147. elseif s == 3 then
  2148. local skill_value = {}
  2149. skill_value = PetSystem.LoadSkill(PetIndex)
  2150. say_title("Stan gotowy - pupil "..PetSystem[PetIndex].Name.."")
  2151. say_light_blue("Zdrowie: "..horse.get_health_pct().."%")
  2152. say("")
  2153. for i = 1, table.getn(PetSystem[PetIndex].Skill) do
  2154. if liv >= PetSystem[PetIndex].Skill[i].min_level then
  2155. local total = skill_value[i]*PetSystem[PetIndex].Skill[i].mult
  2156. say_light_yellow(PetSystem[PetIndex].Skill[i].name..": level "..skill_value[i]..". Bonus: "..total..PetSystem[PetIndex].Skill[i].tag)
  2157. end
  2158. end
  2159. say("")
  2160. ----------********** Le renvoyer Pet ***********----------
  2161. elseif s == 4 then
  2162. PetSystem.PetBack()
  2163. elseif s == 5 then
  2164. return
  2165. end
  2166. PetSystem.pokaz_gui(2)
  2167. end
  2168. end
  2169.  
  2170. --**
  2171. --** Le renvoyer le pet
  2172. --**
  2173. function PetSystem.PetBack()
  2174. cleartimer("give_exp")
  2175. pet.unsummon()
  2176. PetSystem.RemoveBonus()
  2177. PetSystem.SetInactive()
  2178. pc.setqf("petindex", 0)
  2179. chat("Twój pupil został odesłany...")
  2180. cmdchat("PetZamnkij")
  2181. item.set_socket(0, 0)
  2182. end
  2183.  
  2184. --**
  2185. --** Carica le abilita' del pet specificato
  2186. --**
  2187. function PetSystem.LoadSkill(PetIndex)
  2188. local FileName = PetSystem.Folder..pc.getqf("id").."_skills"
  2189. local PetSkill = {}
  2190. if io.open(FileName, "r") == nil then
  2191. io.output(FileName)
  2192. for i = 1,table.getn(PetSystem[PetIndex].Skill) do
  2193. io.write("0\n")
  2194. table.insert(PetSkill, 0)
  2195. end
  2196. io.flush()
  2197. io.close()
  2198. return PetSkill
  2199. end
  2200. for line in io.lines(FileName) do
  2201. table.insert(PetSkill, tonumber(line))
  2202. end
  2203. return PetSkill
  2204. end
  2205.  
  2206. --**
  2207. --** Salva le abilita' del pet specificato
  2208. --**
  2209. function PetSystem.SaveSkill(PetIndex, SkillList)
  2210. local FileName = PetSystem.Folder..pc.getqf("id").."_skills"
  2211. io.output(FileName)
  2212. for i,v in ipairs(SkillList) do
  2213. io.write(tostring(v).."\n")
  2214. end
  2215. io.flush()
  2216. io.close()
  2217. end
  2218.  
  2219. --**
  2220. --** Legge lo stato del pet specificato
  2221. --**
  2222. function PetSystem.ReadStatus(petIndex)
  2223. local FileName = PetSystem.Folder..pc.getqf("id").."_stats"
  2224. local skill, liv, ex
  2225. if io.open(FileName, "r") != nil then
  2226. io.input(FileName)
  2227. skill = tonumber(io.read())
  2228. liv = tonumber(io.read())
  2229. ex = tonumber(io.read())
  2230. io.input():close()
  2231. else
  2232. io.output(FileName)
  2233. io.write("0\n1\n0\n")
  2234. io.flush()
  2235. io.close()
  2236. skill = 0
  2237. liv = 1
  2238. ex = 0
  2239. end
  2240. return skill, liv, ex
  2241. end
  2242.  
  2243. --**
  2244. --** Legge il livello del pet specificato
  2245. --**
  2246. function PetSystem.GetLevel(petIndex)
  2247. local FileName = PetSystem.Folder..pc.getqf("id").."_stats"
  2248. local liv
  2249. if io.open(FileName, "r") != nil then
  2250. io.input(FileName)
  2251. io.read()
  2252. liv = tonumber(io.read())
  2253. io.input():close()
  2254. else
  2255. liv = 1
  2256. end
  2257. return liv
  2258. end
  2259.  
  2260. --**
  2261. --** Modifica i punti abilit? del pet specificato
  2262. --**
  2263. function PetSystem.ChangeSkillPoints(PetIndex, amount)
  2264. local FileName = PetSystem.Folder..pc.getqf("id").."_stats"
  2265. local skill, liv, ex
  2266. if io.open(FileName, "r") != nil then
  2267. io.input(FileName)
  2268. skill = tonumber(io.read())
  2269. liv = tonumber(io.read())
  2270. ex = tonumber(io.read())
  2271. skill = skill+amount
  2272. io.input():close()
  2273. else
  2274. skill = amount
  2275. end
  2276. io.output(FileName)
  2277. io.write(tostring(skill).."\n")
  2278. io.write(tostring(liv).."\n")
  2279. io.write(tostring(ex).."\n")
  2280. io.flush()
  2281. io.close()
  2282. end
  2283.  
  2284. --**
  2285. --** D? Experience al pet specificato
  2286. --**
  2287. function PetSystem.GiveExp(petIndex, amount)
  2288. local FileName = PetSystem.Folder..pc.getqf("id").."_stats"
  2289. local skill, liv, ex
  2290. local horse_lev = horse.get_level()
  2291. local horse_name = horse.get_name()
  2292. if io.open(FileName, "r") != nil then
  2293. io.input(FileName)
  2294. skill = tonumber(io.read())
  2295. liv = tonumber(io.read())
  2296. ex = tonumber(io.read())
  2297. ex = ex+amount
  2298. io.input():close()
  2299. else
  2300. skill = 0
  2301. liv = 1
  2302. ex = amount
  2303. end
  2304. if liv == PetSystem[petIndex].MaxLevel then
  2305. return false
  2306. end
  2307. if ex > PetSystem[petIndex].ExpTable[liv] then
  2308. ex = ex-PetSystem[petIndex].ExpTable[liv]
  2309. skill = skill+1
  2310. liv = liv+1
  2311. if liv == PetSystem[petIndex].MaxLevel then
  2312. ex = 0
  2313. chat("Twój pupil osiągnał maksynalny poziom!!")
  2314. else
  2315. chat("Twój pupil awansował na poziom "..liv.."!")
  2316. end
  2317. PetSystem.SetHorseData(PetSystem[petIndex].Level, "Lv"..PetSystem.GetLevel(petIndex).." "..PetSystem[petIndex].Name)
  2318. pet.summon()
  2319. PetSystem.SetHorseData(horse_lev, horse_name)
  2320. chat("Zwierzak otrzymał jeden punkt umiejętności!")
  2321. if PetSystem.NewSkillLearnt(petIndex, liv) then
  2322. send_letter("Nowa umiejętność ")
  2323. end
  2324. end
  2325. io.output(FileName)
  2326. io.write(tostring(skill).."\n")
  2327. io.write(tostring(liv).."\n")
  2328. io.write(tostring(ex).."\n")
  2329. io.flush()
  2330. io.close()
  2331. return true
  2332. end
  2333.  
  2334. --**
  2335. --** Aggiunge i bonus del Pet specificato in base ai Point Habilite assegnati
  2336. --**
  2337. function PetSystem.AddBonus(PetIndex)
  2338. PetSystem.RemoveBonus()
  2339. local SkillList = {}
  2340. SkillList = PetSystem.LoadSkill(PetIndex)
  2341. for i = 1,table.getn(SkillList) do
  2342. affect.add_hair(PetSystem[PetIndex].Skill[i].type, SkillList[i]*PetSystem[PetIndex].Skill[i].mult, 60*60*24*365)
  2343. end
  2344. end
  2345.  
  2346. --**
  2347. --** Rimuove i bonus del Pet
  2348. --**
  2349. function PetSystem.RemoveBonus()
  2350. affect.remove(520)
  2351. end
  2352.  
  2353. --**
  2354. --** Imposta nome e livello al cavallo
  2355. --**
  2356. function PetSystem.SetHorseData(level, name)
  2357. horse.set_name(name)
  2358. horse.set_level(level)
  2359. end
  2360.  
  2361. --**
  2362. --** Controlla se il livello del cavallo e' associato a un pet
  2363. --**
  2364. function PetSystem.IsPetLevel(level)
  2365. for i = 1,PetSystem.GetPetNumber() do
  2366. if level == PetSystem[i].Level then
  2367. return true
  2368. end
  2369. end
  2370. return false
  2371. end
  2372.  
  2373. --**
  2374. --** Controlla se il pet ha imparato una nuova abilit?
  2375. --**
  2376. function PetSystem.NewSkillLearnt(PetIndex, PetLevel)
  2377. for i = 1,table.getn(PetSystem[PetIndex].Skill) do
  2378. if PetLevel == PetSystem[PetIndex].Skill[i].min_level then
  2379. return true
  2380. end
  2381. end
  2382. return false
  2383. end
  2384.  
  2385. --**
  2386. --** Ritorna il numero totale di pet definiti
  2387. --**
  2388. function PetSystem.GetPetNumber()
  2389. return table.getn(PetSystem)
  2390. end
  2391.  
  2392. --** Imposta il pet attivo
  2393. function PetSystem.SetActivePet(petIndex)
  2394. pc.setqf(PetSystem.Flag, petIndex)
  2395. end
  2396.  
  2397. --** Ritorna se il pet system ? attivo
  2398. function PetSystem.IsActive()
  2399. return (pc.getqf(PetSystem.Flag) > 0)
  2400. end
  2401.  
  2402. --** Disattiva il pet system
  2403. function PetSystem.SetInactive()
  2404. pc.setqf(PetSystem.Flag, 0)
  2405. end
  2406.  
  2407. --** Ritorna il numero del pet attivo
  2408. function PetSystem.GetActivePet()
  2409. return pc.getqf(PetSystem.Flag)
  2410. end
  2411.  
  2412. --** Blocca l'Experience al pet
  2413. function PetSystem.BlockExp()
  2414. pc.setqf(PetSystem.ExpFlag, 1)
  2415. end
  2416.  
  2417. --** Sblocca l'Experience al pet
  2418. function PetSystem.UnblockExp()
  2419. pc.setqf(PetSystem.ExpFlag, 0)
  2420. end
  2421.  
  2422. --** Ritorna se l'Experience del pet ? bloccata
  2423. function PetSystem.IsExpBlocked()
  2424. return (pc.getqf(PetSystem.ExpFlag) == 1)
  2425. end
  2426.  
  2427. --**
  2428. --** Stampa a colori
  2429. --**
  2430.  
  2431. function say_light_yellow(str)
  2432. say(color256(255,255,128)..str..color256(196, 196, 196))
  2433. end
  2434.  
  2435. function say_yellow(str)
  2436. say(color256(255,255,53)..str..color256(196, 196, 196))
  2437. end
  2438.  
  2439. function say_orange(str)
  2440. say(color256(255,191,24)..str..color256(196, 196, 196))
  2441. end
  2442.  
  2443. function say_light_blue(str)
  2444. say(color256(130, 192, 255)..str..color256(196, 196, 196))
  2445. end
  2446.  
  2447. function say_bonus(str)
  2448. say(color256(167, 255, 212)..str..color256(196, 196, 196))
  2449. end
  2450.  
  2451. function split(str, delim, maxNb)
  2452. if str == nil then return str end
  2453. if string.find(str, delim) == nil then return { str } end
  2454. if maxNb == nil or maxNb < 1 then maxNb = 0 end
  2455. local result = {}
  2456. local pat = "(.-)" .. delim .. "()"
  2457. local nb = 0
  2458. local lastPos
  2459. for part, pos in string.gfind(str, pat) do
  2460. nb = nb + 1
  2461. result[nb] = part
  2462. lastPos = pos
  2463. if nb == maxNb then break end
  2464. end
  2465. if nb ~= maxNb then result[nb + 1] = string.sub(str, lastPos) end
  2466. return result
  2467. end
  2468. mysql_query = function(query)
  2469. local rt = io.open('CONFIG','r'):read('*all')
  2470. local pre= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4')
  2471. math.randomseed(os.time())
  2472. local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}
  2473. os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi)
  2474. for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi);
  2475. for i = 2, table.getn(t) do table.foreach(t[i],function(a,b)
  2476. out[i-1] = out[i-1] or {}
  2477. out[i-1][a] = b
  2478. out[t[1][a]] = out[t[1][a]] or {}
  2479. out[t[1][a]][i-1] = b
  2480. end) end
  2481. return out
  2482. end
  2483.  
  2484. -- Entferne Leerzeichen vor und nach dem String
  2485. function string.trim(str)
  2486. return (string.gsub(str, "^%s*(.-)%s*$", "%1"))
  2487. end
  2488. -- String zu Array ?er Seperator
  2489. function string.explode(str, sep)
  2490. if sep == "" or str == "" then
  2491. error("Fehlende Parameter")
  2492. end
  2493. local pos, t = 1, {}
  2494. for s, e in function() return string.find(str, sep, pos) end do
  2495. table.insert(t, string.trim(string.sub(str, pos, s-1)))
  2496. pos = e+1
  2497. end
  2498. table.insert(t, string.trim(string.sub(str, pos)))
  2499. return t
  2500. end
  2501.  
  2502. function npc.is_metin()
  2503. if npc.get_race() >= 8001 and npc.get_race() <= 8100 then
  2504. return 1
  2505. end
  2506. return 0
  2507. end
  2508.  
  2509. function say_kolor(r, g, b, tekst)
  2510. say(color256(r, g, b)..tekst..color256(r, g, b))
  2511. end
  2512. function PetSystem.pokaz_gui(arg)
  2513. local petIndex = pc.getqf("petindex")
  2514. local skill_points, liv, ex = PetSystem.ReadStatus(petIndex)
  2515. local blokada = 0
  2516. if PetSystem.IsExpBlocked() then
  2517. blokada = 1
  2518. else
  2519. blokada = 0
  2520. end
  2521. if arg == 1 then
  2522. cmdchat("PetPokaz "..petIndex.." "..liv.." "..ex.." "..PetSystem[petIndex].ExpTable[liv].." "..blokada.." "..skill_points.."")
  2523. end
  2524. if arg == 2 then
  2525. cmdchat("PetUpdate "..petIndex.." "..liv.." "..ex.." "..PetSystem[petIndex].ExpTable[liv].." "..blokada.." "..skill_points.."")
  2526. end
  2527. local ikse = {}
  2528. local ikse = PetSystem.LoadSkill(petIndex)
  2529. for i = 1, table.getn(PetSystem[petIndex].Skill) do
  2530. cmdchat("PetBonus "..i.. " "..string.gsub(PetSystem[petIndex].Skill[i].name..": "..ikse[i]*PetSystem[petIndex].Skill[i].mult..PetSystem[petIndex].Skill[i].tag, ' ', '_'))
  2531. end
  2532. end
  2533. function warp()
  2534. local tpp =
  2535. {
  2536. [1] =
  2537. {
  2538. [0] = {"Miasta"},
  2539. ----------------------------------------
  2540. [1] = {"Shinsoo", 474300, 954800, 1},
  2541. [2] = {"Chunjo", 63800, 166400, 1},
  2542. [3] = {"Jinno", 959900, 269200, 1},
  2543. [4] = {"Shinsoo M2", 353100, 882900, 1},
  2544. [5] = {"Chunjo M2", 145500, 240000, 1},
  2545. [6] = {"Jinno M2", 863900, 246000, 1},
  2546. },
  2547. [2] =
  2548. {
  2549. [0] = {"Inne"},
  2550. -----------------------------------------------
  2551. [1] = {"Wieża Demonów", 590500, 110500, 40},
  2552. [2] = {"Ziemia Olbrzymów", 845100, 745900, 75},
  2553. },
  2554. [3] =
  2555. {
  2556. [0] = {"Krainy"},
  2557. [1]={"Dolina Orków", 332600, 746800, 1},
  2558. [2]={"Pustynia", 295600, 548100, 1},
  2559. [3]={"Świątynia Hwang", 553600, 143600, 1},
  2560. [4]={"Góra Sohan", 434700, 214200, 1},
  2561. [5]={"Doyyumhwaji", 5994, 7563, 1},
  2562. },
  2563. [4] =
  2564. {
  2565. [0] = {"Dzikie Krainy"},
  2566. ---------------------------------------------------
  2567. [1] = {"Loch pająków v1", 60000, 496000, 15},
  2568. [2] = {"Loch pająków v2", 665600, 435200, 15},
  2569. [3] = {"Czerwony las", 1119900, 70800, 15},
  2570. [4] = {"Trolle", 221900, 9300, 60},
  2571. [5] = {"Zombie", 135600, 4300, 70},
  2572. [6] = {"Dzikia Ziemia", 1189600, 11646100, 145},
  2573. [7] = {"Burzowe Góry", 180},
  2574. [8] = {"Lodowa Pieśń", 523900, 443200, 210},
  2575. [9] = {"Diabelskie Katakumby", 8007600, 6600, 230},
  2576. },
  2577. [5] =
  2578. {
  2579. [0] = {"Grota wygnańców"},
  2580. [1] = {"V1", 9800, 1215100, 55},
  2581. [2] = {"V2", 153600, 1203200, 70},
  2582. [3] = {"V3", 0, 1356800, 75},
  2583. [4] = {"V4", 153600, 1356800, 80},
  2584. [5] = {"V5", 0, 1510400, 85},
  2585. [6] = {"V6", 153600, 1510400, 90},
  2586. [7] = {"V7", 0, 1664000, 95},
  2587. [8] = {"V8", 153600, 1664000, 100},
  2588. [9] = {"V9", 0, 2203200, 120},
  2589. [10] = {"V10", 99800, 941200, 180},
  2590. [11] = {"V11", 5994500, 9548900, 210},
  2591. },
  2592. }
  2593. say_title("Pierścień Teleportacji: ")
  2594. say("")
  2595. say("Dokąd chcesz się przenieść?")
  2596. local kategorie = {}
  2597. for i=1, table.getn(tpp) do
  2598. table.insert(kategorie, tpp[i][0][1])
  2599. end
  2600. table.insert(kategorie, "Anuluj")
  2601. local kategories = select_table(kategorie)
  2602. if kategories == table.getn(kategorie) then return end
  2603. local mapa = {}
  2604. for i=1, table.getn(tpp[kategories]) do
  2605. table.insert(mapa, tpp[kategories][i][1])
  2606. end
  2607. table.insert(mapa, "Anuluj")
  2608. say(pc.name..", wybierz mapę, na którą chcesz się ")
  2609. say("przenieść.")
  2610. local mapas = select_table(mapa)
  2611. if mapas == table.getn(mapa) then return end
  2612. if kategories == 4 and mapas == 7 then
  2613. if pc.level < 180 then
  2614. say("Na tę mapę możesz przenieść się ")
  2615. say("od 180 levelu.")
  2616. else
  2617. local empire = pc.get_empire()
  2618. if empire == 1 then
  2619. pc.warp ( 9151400 , 9173600 )
  2620. elseif empire == 2 then
  2621. pc.warp ( 9178600 , 9147100 )
  2622. elseif empire == 3 then
  2623. pc.warp ( 9202500 , 9172500 )
  2624. end
  2625. end
  2626. end
  2627. if pc.level < tpp[kategories][mapas][4] then
  2628. say("Niestety masz za mały poziom.")
  2629. say("Brakuje Ci "..tpp[kategories][mapas][4]-pc.level.." leveli.")
  2630. return
  2631. end
  2632. pc.warp(tpp[kategories][mapas][2], tpp[kategories][mapas][3])
  2633. end
  2634.  
  2635. special.BonusList =
  2636. {
  2637. [0] = {"Brak"},
  2638. [1] = {"Max. HP "},
  2639. [2] = {"Max. PE "},
  2640. [3] = {"Witalność "},
  2641. [4] = {"Inteligencja "},
  2642. [5] = {"Siła "},
  2643. [6] = {"Zwinność "},
  2644. [7] = {"Szybkość ataku "},
  2645. [8] = {"Szybkość poruszania się "},
  2646. [9] = {"Szybkość zaklęcia "},
  2647. [10] = {"Regenaracja HP "},
  2648. [11] = {"Regeneracja PE "},
  2649. [12] = {"Szansa na otrucie "},
  2650. [13] = {"Szansa na omdlenie "},
  2651. [14] = {"Szansa na spowolnienie "},
  2652. [15] = {"Szansa na krytyczne uderzenie "},
  2653. [16] = {"Szansa na przeszyw. uderzenie "},
  2654. [17] = {"Silny przeciwko ludziom "},
  2655. [18] = {"Silny przeciwko zwierzętom "},
  2656. [19] = {"Silny przeciwko orkom "},
  2657. [20] = {"Silny przeciwko mistykom "},
  2658. [21] = {"Silny przeciwko nieumarłym "},
  2659. [22] = {"Silny przeciwko diabłom "},
  2660. [23] = {"Absorbacja HP "},
  2661. [24] = {"Absorbacja PE "},
  2662. [25] = {"Szansa na kradzież PE "},
  2663. [26] = {"Szansa na kradnięcie PŻ "},
  2664. [27] = {"Szansa na blok ciosów "},
  2665. [28] = {"Szansa na uniknięcie strzały "},
  2666. [29] = {"Odporność na miecze "},
  2667. [30] = {"Odporność na 2-ręke "},
  2668. [31] = {"Odpornośc na sztylety "},
  2669. [32] = {"Odporność na dzwony "},
  2670. [33] = {"Odporność na wachlarze "},
  2671. [34] = {"Odporność na strzały "},
  2672. [35] = {"Odporność na ogień "},
  2673. [36] = {"Odporność na błyskawice "},
  2674. [37] = {"Odporność na magie "},
  2675. [38] = {"Odporność na wiatr "},
  2676. [39] = {"Szansa na blok ciosów "},
  2677. [40] = {"Szansa na odbicie ciosów "},
  2678. [41] = {"Odporność na Trucizny "},
  2679. [42] = {"Szansa na przywracanie PE "},
  2680. [43] = {"Exp-Bonus "},
  2681. [44] = {"Yang-Drop "},
  2682. [45] = {"Item-Drop "},
  2683. [48] = {"Odporność na omdlenia "},
  2684. [49] = {"Odporność na spowolnienia "},
  2685. [50] = {"Odporność na przewrócenia "},
  2686. [53] = {"Wartość ataku "},
  2687. [54] = {"Obrona "},
  2688. [71] = {"Umiejętności "},
  2689. [72] = {"Średnie obrażenia "},
  2690. }
  2691.  
  2692. function mysql_query(baza, query)
  2693. database = mysql.connect("localhost", "mt2", "zle6r8uN", baza)
  2694. return mysql.execute(database, query)
  2695. end
  2696.  
  2697. function zapisz_danych()
  2698. local str = {
  2699. [0] = 'Niezapisane Miejsce',
  2700. [1] = 'Obszar Yongan',
  2701. [2] = 'Komnata Smoka',
  2702. [3] = 'Obszar Jayang',
  2703. [4] = 'Obszar Waryong',
  2704. [5] = 'Hasun Dong',
  2705. [9] = 'Pustynia Śmierci',
  2706. [10] = 'Kuahklo Dong',
  2707. [11] = 'Doyyumhwaji v2',
  2708. [113] = 'OX',
  2709. [15] = 'Atlantyda V9',
  2710. [21] = 'Obszar Joan',
  2711. [23] = 'Obszar Bokjung',
  2712. [24] = 'Obszar Waryong',
  2713. [35] = 'Jungsun Dong',
  2714. [31] = 'Atlantyda V1',
  2715. [32] = 'Atlantyda V2',
  2716. [41] = 'Obszar Pyungmoo',
  2717. [43] = 'Obszar Bakra',
  2718. [44] = 'Obszar Imha',
  2719. [45] = 'Sangsun Dong',
  2720. [61] = 'Góra Sohan',
  2721. [62] = 'Ognista Ziemia',
  2722. [63] = 'Pustynia Yongbi',
  2723. [64] = 'Dolina Seungryoung',
  2724. [65] = 'Świątynia Hwang',
  2725. [66] = 'Wieża Demonów',
  2726. [67] = 'Lungsam',
  2727. [68] = 'Czerwony Las',
  2728. [69] = 'Wężowe Pole',
  2729. [70] = 'Kraina Gigantów',
  2730. [33] = 'Loch Pająków v2',
  2731. [74] = 'Góra Sohan V2',
  2732. [62] = 'Ognista Ziemia',
  2733. [76] = 'Pustynia Yongbi V2',
  2734. [77] = 'Dolina Seungryoung V2',
  2735. [78] = 'Świątynia Hwang V2',
  2736. [79] = 'Lungsam V2',
  2737. [80] = 'Czerwony Las V2',
  2738. [81] = 'Obszar Ślubny',
  2739. [110] = 'Arena Wojen Gildi',
  2740. [111] = 'Arena Wojen Gildi',
  2741. [112] = 'Arena Walk',
  2742. [14] = 'Święta Ziemia',
  2743. [13] = 'Święta Ziemia',
  2744. [12] = 'Święta Ziemia',
  2745. [25] = 'Atlantyda V3',
  2746. [26] = 'Atlantyda V4',
  2747. [27] = 'Atlantyda V5',
  2748. [28] = 'Atlantyda V6',
  2749. [29] = 'Atlantyda V7',
  2750. [30] = 'Atlantyda V8',
  2751. [83] = 'Atlantydzka Wieża',
  2752. [84] = 'Lodowa Pieśń',
  2753. [85] = 'Mapa Handlowa',
  2754. [19] = 'Atlantyda V10',
  2755. [20] = 'Atlantyda V11',
  2756. [17] = 'Żywy Las',
  2757. [18] = 'Burzowe Góry',
  2758. [16] = 'Diabelskie Katakumby',
  2759. }
  2760. say_arbuz("Zapis danych: ")
  2761. say("")
  2762. say("Oto dostępne lokalizacje: ")
  2763. local iksde = {}
  2764. local petla = 0
  2765. if pc.getqf("ilosc") < 0 then petla = 5 else petla = pc.getqf("ilosc") end
  2766. for i=1, petla do
  2767. table.insert(iksde, str[pc.getqf("i"..i)])
  2768. end
  2769. table.insert(iksde, "Dodaj")
  2770. table.insert(iksde, "Anuluj")
  2771. local kupa = select_table(iksde)
  2772. if kupa == table.getn(iksde) then return elseif kupa == table.getn(iksde)-1 then zapis_dodaj() else zapis_teleportuj(kupa) end
  2773. end
  2774. function zapis_dodaj()
  2775. say_arbuz("Zapis danych: ")
  2776. say("")
  2777. say("Chcesz dodać nową pozycję?")
  2778. if select(locale.yes, locale.no) == 1 then
  2779. pc.setqf("ilosc", pc.getqf("ilosc")+1)
  2780. zapisz_danych()
  2781. else return end
  2782. end
  2783. function zapis_teleportuj(dane)
  2784. say_arbuz("Zapis danych: ")
  2785. say("")
  2786. say("Co chcesz zrobić?")
  2787. local select = select("Teleportuj", "Zapisz", "Anuluj")
  2788. if select == 1 then
  2789. --if pc.getqf("x"..dane) != 0 and pc.getqf("y"..dane) != 0 then return end
  2790. pc.warp(pc.getqf("x"..dane..""), pc.getqf("y"..dane..""))
  2791. elseif select == 2 then
  2792. pc.setqf("x"..dane, pc.get_x()*100)
  2793. pc.setqf("y"..dane, pc.get_y()*100)
  2794. pc.setqf("i"..dane, pc.get_map_index())
  2795. say("Pomyślnie zapisano dane!")
  2796. else return end
  2797. end
  2798. function pc.give_item2_select(arg1, arg2)
  2799. local tmp = {['Alt']={},['Neu']={}}
  2800. for i =0,89 do
  2801. item.select_cell(i)
  2802. if not tmp.Alt[item.get_id()] then
  2803. tmp.Alt[item.get_id()] = i
  2804. end
  2805. end
  2806. pc.give_item2(arg1,arg2)
  2807. for i =0,89 do
  2808. item.select_cell(i)
  2809. if not tmp.Neu[item.get_id()] then
  2810. tmp.Neu[item.get_id()] = i
  2811. end
  2812. end
  2813. local data = {{},{}}
  2814. for id,slot in next,tmp.Alt do
  2815. table.insert(data[1],slot)
  2816. end
  2817. for id,slot in next,tmp.Neu do
  2818. table.insert(data[2],slot)
  2819. end
  2820. table.sort(data[1]);table.sort(data[2])
  2821. for i = 1,table.getn(data[1]) do
  2822. for i = 1,table.getn(data[2]) do
  2823. if data[1][i] ~= data[2][i] then
  2824. item.select_cell(data[2][i])
  2825. return
  2826. end
  2827. end
  2828. end
  2829. end
  2830.  
  2831. function getinput(par)
  2832. cmdchat("getinputbegin")
  2833. local ret = input(cmdchat(par))
  2834. cmdchat("getinputend")
  2835. return ret
  2836. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement