Guest User

Untitled

a guest
Oct 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.88 KB | None | 0 0
  1. function get_module_name()
  2. return "on_player_level_up"
  3. end
  4.  
  5. function on_player_level_up()
  6.  
  7. --local tx, ty, current_x, island_number
  8. local lv = get_value( "level" )
  9.  
  10. if lv == 5 then
  11. -- °¢ 1¹ø ¼¶ÀÇ ÅÚ·¹Æ÷Æ® ÁÂÇ¥
  12. -- tx = 30315
  13. -- ty = 5480
  14.  
  15. -- ÇöÀç±Íȯ À§Ä¡¸¦ °¡Á®¿È.
  16. current_x = get_flag( "rx" )
  17.  
  18. -- ¸î ¹ø ° ¼¶ÀÎÁö È®ÀÎ.
  19. -- local i
  20. -- for i = 1, 6 do
  21. -- if current_x < ( 18816 * (i-1) + tx) and current_x + 3000 > ( (18816 * (i-1) + tx) - 10000) then
  22. -- island_number = i
  23. -- end
  24. -- end
  25. -- ±ÍȯÁö¿ªÀ» ÇöÀç Ãʺ¸ÀÚ¼¶ Ä·ÇÁÀ¸·Î ¼³Á¤
  26. set_flag( "rx", 172543 + math.random(0,100))
  27. set_flag( "ry", 51847 + math.random(0,100))
  28. end
  29.  
  30. -- ±¹°¡ ÄÚµå Àоî¿À±â
  31. -- get_local_info()ÀÇ ¹Ýȯ°ªµé
  32. --LOCAL_INFO_KOREA = 1
  33. --LOCAL_INFO_HONGKONG = 2
  34. --LOCAL_INFO_AMERICA = 4
  35. --LOCAL_INFO_GERMANY = 8
  36. --LOCAL_INFO_JAPAN = 16
  37. --LOCAL_INFO_TAIWAN = 32
  38. --LOCAL_INFO_CHINA = 64
  39. --LOCAL_INFO_FRANCE = 128
  40. --LOCAL_INFO_RUSSIA = 256
  41.  
  42.  
  43. local state_code = get_local_info()
  44.  
  45. -- 18·¹º§ ÀÌ»óÀ̳ª ¼ö·ÃÀÚÀÇ ¼¶ ³»¿¡ ÀÖ´Â °æ¿ì Á¾Á· ¸¶À»·Î ±Íȯ ÁöÁ¡ ¼³Á¤
  46. local current_x = gv("x")
  47. local current_y = gv("y")
  48. local race = get_value( "race" )
  49.  
  50. -- ¹Ì±¹ÀÌ¸é ¹«Á¶°Ç ¾Èº¸³¿ (Àü ±¹°¡ Àû¿ë ¾ÈÇÔÀ¸·Î º¯°æ 08.07.29)
  51. if state_code == 511 then
  52. -- ¾Æ¹«Áþµµ ¾ÈÇØ¿ä
  53. elseif lv >= 18 then
  54. -- ¼ö·ÃÀÚÀÇ ¼¶¿¡ ÀÖ´ÂÁö ¿©ºÎ üũ
  55. if current_x >= 161280 and current_x <= 177408 then
  56. if current_y >= 48384 and current_y <= 64512 then
  57.  
  58. -- ÇöÀç±Íȯ À§Ä¡¸¦ °¡Á®¿È.
  59. local return_x = get_flag( "rx" )
  60. local return_y = get_flag( "ry" )
  61.  
  62. -- ¼ö·ÃÀÚÀÇ ¼¶ÀÌ ±ÍȯÀÎÁö üũ
  63. if return_x == 173183 and return_y == 52299 then
  64.  
  65. -- ±ÍȯÁö¿ªÀ» ÇØ´ç Á¾Á· ¸¶À»·Î ¼³Á¤
  66.  
  67. -- µ¥¹ÙÀÏ °æ¿ì
  68. if race == 4 then
  69. set_flag( "rx", 6625 + math.random(0,100))
  70. set_flag( "ry", 6980 + math.random(0,100))
  71.  
  72. -- ¾Æ¼ö¶óÀÏ °æ¿ì
  73. elseif race == 5 then
  74. set_flag( "rx", 116799 + math.random(0,100))
  75. set_flag( "ry", 58205 + math.random(0,100))
  76.  
  77. -- °¡À̾ÆÀÏ °æ¿ì
  78. else
  79. set_flag( "rx", 153513 + math.random(0,100))
  80. set_flag( "ry", 77203 + math.random(0,100))
  81. end -- if race == 4 then
  82.  
  83. -- ¼ö·ÃÀÚÀÇ ¼¶¿¡ ÀÖ°í 18·¹º§ ÀÌ»óÀ̱⠶§¹®¿¡ ÇØ´ç Á¾Á· ¸¶À»·Î °­Á¦ ±Íȯ ¼³Á¤ µÆ´Ù´Â ¸Þ½ÃÁö ³¯¸².
  84. message( "@235")
  85.  
  86. end -- if return_x == 173183 and return_y == 52299
  87. end -- if current_y >= 48384 and current_y <= 64512 then
  88. end -- if current_x >= 161280 and current_x <= 177408 then
  89. end -- if lv >= 18 then
  90.  
  91. -- ¿ÀÅä·Î ¼¼ÆÃµÈ Ä³¸¯ÅͶó¸é Àú ¸Ö¸® ³¯·Á ¹ö¸®ÀÚ~
  92. kick_auto_to_another_world()
  93.  
  94. -- ¼ö·ÃÀÚ ¼¶¿¡ ÀÖ´Â ¿ÀÅäµéÀº º»Åä·Î ³¯·Á ¹ö¸®ÀÚ
  95. local current_x = gv("x")
  96. local current_y = gv("y")
  97. local race = get_value( "race" )
  98.  
  99. if current_x >= 161280 and current_x <= 177408 then
  100. if current_y >= 48384 and current_y <= 64512 then
  101.  
  102. local is_auto, quest_count
  103. quest_count, is_auto = anti_auto_quest_check()
  104.  
  105. if is_auto then
  106. if race == 4 then
  107. RunTeleport_Auto_TO_City( 6625 , 6980 )
  108. elseif race == 5 then
  109. RunTeleport_Auto_TO_City( 116799 , 58205 )
  110. else
  111. RunTeleport_Auto_TO_City( 153506 , 77175 )
  112. end
  113. end -- if is_auto then
  114. end -- if current_y >= 48384 and current_y <= 64512 then
  115. end -- if current_x >= 161280 and current_x <= 177408 then
  116.  
  117. save()
  118.  
  119.  
  120. -- ·¹º§¾÷ ´Þ¼º À̺¥Æ® ó¸®
  121.  
  122. -- ±¹°¡ ÄÚµå Àоî¿À±â
  123. -- get_local_info()ÀÇ ¹Ýȯ°ªµé
  124. --LOCAL_INFO_KOREA = 1
  125. --LOCAL_INFO_HONGKONG = 2
  126. --LOCAL_INFO_AMERICA = 4
  127. --LOCAL_INFO_GERMAN = 8
  128. --LOCAL_INFO_JAPAN = 16
  129. --LOCAL_INFO_TAIWAN = 32
  130. --LOCAL_INFO_CHINA = 64
  131. --LOCAL_INFO_FRANCE = 128
  132. --LOCAL_INFO_RUSSIA = 256
  133. --LOCAL_INFO_MALAYSIA = 512
  134. --LOCAL_INFO_SINGAPORE = 1024
  135. --LOCAL_INFO_VIETNAM = 2048
  136. --LOCAL_INFO_THAILAND = 4096
  137. --LOCAL_INFO_MIDEAST = 8192
  138. --LOCAL_INFO_TURKEY = 16384
  139.  
  140. Check_item1()
  141. Check_item2()
  142. Check_item3()
  143. Check_item4()
  144. Check_item5()
  145. Check_item6()
  146. Check_item7()
  147. Check_item8()
  148. Check_item9()
  149. Check_item10()
  150. Check_item11()
  151. Check_item12()
  152.  
  153. local state_code = get_local_info()
  154.  
  155. if state_code == 8 or state_code == 128 then
  156.  
  157.  
  158. local max_reached_level = gv( "max_reached_level" )
  159. local i
  160. for i = max_reached_level + 1 , lv do
  161. if i == 5 then
  162. insert_item( 3600289, 1 )
  163.  
  164. elseif i == 10 then
  165. insert_item( 3600289, 1 )
  166.  
  167. elseif i == 15 then
  168. insert_item( 3600289, 1 )
  169.  
  170. elseif i == 20 then
  171. insert_item( 3600289, 1 )
  172.  
  173. elseif i == 25 then
  174. insert_item( 3600289, 1 )
  175.  
  176. elseif i == 30 then
  177. insert_item( 3600289, 1 )
  178.  
  179. elseif i == 35 then
  180. insert_item( 3600289, 1 )
  181.  
  182. elseif i == 40 then
  183. insert_item( 3600289, 1 )
  184.  
  185. elseif i == 45 then
  186. insert_item( 3600289, 1 )
  187.  
  188. elseif i == 50 then
  189. insert_item( 3600289, 1 )
  190.  
  191. elseif i == 55 then
  192. insert_item( 3600289, 1 )
  193.  
  194. elseif i == 60 then
  195. insert_item( 3600289, 1 )
  196.  
  197. elseif i == 65 then
  198. insert_item( 3600289, 1 )
  199.  
  200. elseif i == 70 then
  201. insert_item( 3600289, 1 )
  202.  
  203. elseif i == 75 then
  204. insert_item( 3600289, 1 )
  205.  
  206. elseif i == 80 then
  207. insert_item( 3600289, 1 )
  208. insert_item( 3600289, 1 )
  209.  
  210. elseif i == 85 then
  211. insert_item( 3600289, 1 )
  212. insert_item( 3600289, 1 )
  213.  
  214. elseif i == 90 then
  215. insert_item( 3600289, 1 )
  216. insert_item( 3600289, 1 )
  217.  
  218. elseif i == 95 then
  219. insert_item( 3600289, 1 )
  220. insert_item( 3600289, 1 )
  221.  
  222. elseif i == 100 then
  223. insert_item( 3600289, 1 )
  224. insert_item( 3600289, 1 )
  225.  
  226. elseif i == 105 then
  227. insert_item( 3600289, 1 )
  228. insert_item( 3600289, 1 )
  229.  
  230. elseif i == 110 then
  231. insert_item( 3600289, 1 )
  232. insert_item( 3600289, 1 )
  233.  
  234. elseif i == 115 then
  235. insert_item( 3600289, 1 )
  236. insert_item( 3600289, 1 )
  237.  
  238. elseif i == 120 then
  239. insert_item( 3600289, 1 )
  240. insert_item( 3600289, 1 )
  241. insert_item( 3600289, 1 )
  242. insert_item( 3600289, 1 )
  243.  
  244. elseif i == 125 then
  245. insert_item( 3600289, 1 )
  246. insert_item( 3600289, 1 )
  247. insert_item( 3600289, 1 )
  248. insert_item( 3600289, 1 )
  249.  
  250. elseif i == 130 then
  251. insert_item( 3600289, 1 )
  252. insert_item( 3600289, 1 )
  253. insert_item( 3600289, 1 )
  254. insert_item( 3600289, 1 )
  255.  
  256. elseif i == 135 then
  257. insert_item( 3600289, 1 )
  258. insert_item( 3600289, 1 )
  259. insert_item( 3600289, 1 )
  260. insert_item( 3600289, 1 )
  261.  
  262. elseif i == 140 then
  263. insert_item( 3600289, 1 )
  264. insert_item( 3600289, 1 )
  265. insert_item( 3600289, 1 )
  266. insert_item( 3600289, 1 )
  267.  
  268. elseif i == 145 then
  269. insert_item( 3600289, 1 )
  270. insert_item( 3600289, 1 )
  271. insert_item( 3600289, 1 )
  272. insert_item( 3600289, 1 )
  273.  
  274. elseif i == 150 then
  275. insert_item( 3600289, 1 )
  276. insert_item( 3600289, 1 )
  277. insert_item( 3600289, 1 )
  278. insert_item( 3600289, 1 )
  279. insert_item( 3600289, 1 )
  280.  
  281. elseif i == 155 then
  282. insert_item( 3600289, 1 )
  283. insert_item( 3600289, 1 )
  284. insert_item( 3600289, 1 )
  285. insert_item( 3600289, 1 )
  286. insert_item( 3600289, 1 )
  287.  
  288. elseif i == 160 then
  289. insert_item( 3600289, 1 )
  290. insert_item( 3600289, 1 )
  291. insert_item( 3600289, 1 )
  292. insert_item( 3600289, 1 )
  293. insert_item( 3600289, 1 )
  294.  
  295. elseif i == 165 then
  296. insert_item( 3600289, 1 )
  297. insert_item( 3600289, 1 )
  298. insert_item( 3600289, 1 )
  299. insert_item( 3600289, 1 )
  300. insert_item( 3600289, 1 )
  301.  
  302. elseif i == 170 then
  303. insert_item( 3600289, 1 )
  304. insert_item( 3600289, 1 )
  305. insert_item( 3600289, 1 )
  306. insert_item( 3600289, 1 )
  307. insert_item( 3600289, 1 )
  308. end
  309. end
  310. end
  311.  
  312. -- ·¹º§¾÷ ½Ã °¡ÀÌµå ¸Þ½ÃÁö Ãâ·Â
  313. on_player_level_joblevel_guide()
  314. end
  315.  
  316. function on_player_level_joblevel_guide()
  317. --ÀÛ¾÷Áß
  318. local lv = get_value( "level" )
  319. local job_lv = get_value( "job_level" )
  320. local job_dp = get_value( "job_depth" )
  321.  
  322. if job_dp == 0 and lv >= 10 and job_lv >= 10 then
  323. cprint( "@1200" )
  324. --cprint( "@254" )
  325. cprint( "@1201" )
  326. elseif lv == 20 then
  327. cprint( "@1202" )
  328. cprint( "@1203" )
  329. elseif lv == 50 then
  330. cprint( "@1204" )
  331. cprint( "@1205" )
  332. elseif job_dp== 1 and lv >= 50 and job_lv >= 40 then
  333. cprint( "@1206" )
  334. cprint( "@1207" )
  335. cprint( "@1208" )
  336. elseif lv == 80 then
  337. cprint( "@1209" )
  338. cprint( "@1210" )
  339. elseif lv == 100 then
  340. cprint( "@1211" )
  341. cprint( "@1212" )
  342. end
  343. end
  344.  
  345. --------------------SET BUFF 150-----------------------
  346. function Check_item1()
  347. local has_magic_item = find_item(302701)
  348. local lvl = get_value( "lv" )
  349. if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
  350. add_state(307001,1,8640000)
  351. add_state(307002,1,8640000)
  352. end
  353. end
  354. ----------------------------------------------------
  355. function Check_item2()
  356. local has_magic_item = find_item(302709)
  357. local lvl = get_value( "lv" )
  358. if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
  359. add_state(307001,1,8640000)
  360. add_state(307002,1,8640000)
  361. end
  362. end
  363. ----------------------------------------------------
  364. function Check_item3()
  365. local has_magic_item = find_item(302713)
  366. local lvl = get_value( "lv" )
  367. if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
  368. add_state(307001,1,8640000)
  369. add_state(307002,1,8640000)
  370. end
  371. end
  372. ---------------------------------------------
  373. function Check_item4()
  374. local has_magic_item = find_item(302705)
  375. local lvl = get_value( "lv" )
  376. if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
  377. add_state(307001,1,8640000)
  378. add_state(307002,1,8640000)
  379. end
  380. end
  381.  
  382.  
  383.  
  384.  
  385. -----------------------SET BUFF 155-------------------------
  386. function Check_item5()
  387. local has_magic_item = find_item(302717)
  388. local lvl = get_value( "lv" )
  389. if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
  390. add_state(307001,1,8640000)
  391. add_state(307003,1,8640000)
  392. end
  393. end
  394. -------------------------------------------------
  395. function Check_item6()
  396. local has_magic_item = find_item(302725)
  397. local lvl = get_value( "lv" )
  398. if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
  399. add_state(307001,1,8640000)
  400. add_state(307003,1,8640000)
  401. end
  402. end
  403. -----------------------------------------------------
  404. function Check_item7()
  405. local has_magic_item = find_item(302729)
  406. local lvl = get_value( "lv" )
  407. if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
  408. add_state(307001,1,8640000)
  409. add_state(307003,1,8640000)
  410. end
  411. end
  412. -----------------------------------------------------
  413. function Check_item8()
  414. local has_magic_item = find_item(302721)
  415. local lvl = get_value( "lv" )
  416. if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
  417. add_state(307001,1,8640000)
  418. add_state(307003,1,8640000)
  419. end
  420. end
  421.  
  422.  
  423.  
  424.  
  425.  
  426. --------------------------SET BUFF 160-----------------------------
  427.  
  428. function Check_item9()
  429. local has_magic_item = find_item(302733)
  430. local lvl = get_value( "lv" )
  431. if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
  432. remove_state(307001)
  433. remove_state(307002)
  434. add_state(307004,1,8640000)
  435. remove_state(307001)
  436. remove_state(307003)
  437. add_state(307003,1,8640000)
  438. end
  439. end
  440. -------------------------------------------------------
  441. function Check_item10()
  442. local has_magic_item = find_item(302741)
  443. local lvl = get_value( "lv" )
  444. if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
  445. remove_state(307001)
  446. remove_state(307002)
  447. add_state(307004,1,8640000)
  448. remove_state(307001)
  449. remove_state(307003)
  450. add_state(307003,1,8640000)
  451. end
  452. end
  453. ------------------------------------------------------------------
  454. function Check_item11()
  455. local has_magic_item = find_item(302745)
  456. local lvl = get_value( "lv" )
  457. if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
  458. remove_state(307001)
  459. remove_state(307002)
  460. add_state(307004,1,8640000)
  461. remove_state(307001)
  462. remove_state(307003)
  463. add_state(307003,1,8640000)
  464. end
  465. end
  466. --------------------------------------------------------------------
  467. function Check_item12()
  468. local has_magic_item = find_item(302737)
  469. local lvl = get_value( "lv" )
  470. if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
  471. remove_state(307001)
  472. remove_state(307002)
  473. add_state(307004,1,8640000)
  474. remove_state(307001)
  475. remove_state(307003)
  476. add_state(307003,1,8640000)
  477. end
  478. end
  479. -------------------------------END BUFFS-------------------------------
Add Comment
Please, Sign In to add comment