Guest User

Untitled

a guest
Oct 20th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.27 KB | None | 0 0
  1. function get_module_name()
  2. return "on_player_dead"
  3. end
  4.  
  5. function on_player_dead( name, lost_exp, drop_item_name )
  6.  
  7. local level
  8.  
  9. level = get_value( "level" )
  10.  
  11. -- 5·¹º§ ÀÌ»óÀÌ¸é °æÇèÄ¡ Ç϶ô ó¸®
  12. if level > 5 then
  13. --##½ÃÀÛ
  14. message(sconv("@90019004", "#@lost_exp@#",tostring(lost_exp)))
  15. --##³¡ ÀüÅõºÒ´ÉÀ¸·Î ÀÎÇØ #@lost_exp@# EXP¸¦ ÀÒ¾ú½À´Ï´Ù.
  16.  
  17. else
  18. --##½ÃÀÛ
  19. message("@90019005")
  20.  
  21. end
  22.  
  23. save()
  24.  
  25.  
  26. end
  27.  
  28.  
  29.  
  30. -- revive_type °ª¿¡ µû¸¥ ºÎÈ° À¯Çü
  31. -- 0: ±×³É Çʵ忡¼­ Á׾ ÀÏ¹Ý ºÎÈ°
  32. -- 1: ´ë·Ã Àå¿¡¼­ ´ë·Ã Áß »ç¸Á¿¡ ´ëÇÑ ºÎÈ°(±âÁ¸ ´ë·Ã ½Ã½ºÅÛ)
  33. -- 2: 1:1 PVP °ü·Ã ½Å±Ô ´ë·Ã ½Ã½ºÅÛ¿¡ ÀÇÇÑ ´ë·Ã Áß »ç¸Á¿¡ ºÎÈ°
  34. -- 3: ´øÀü ½ÃÁî Áß »ç¸Á¿¡ ´ëÇÑ ºÎÈ°
  35. function revive_in_town( revive_type )
  36.  
  37.  
  38. -- ¼ö·ÃÀÚ ¼¶¿¡ ÀÖ´Â ¿ÀÅäµéÀº º»Åä·Î ³¯·Á ¹ö¸®ÀÚ
  39. local current_x = gv("x")
  40. local current_y = gv("y")
  41. local is_training_camp = false
  42. local race = get_value( "race" )
  43.  
  44. if current_x >= 161280 and current_x <= 177408 then
  45. if current_y >= 48384 and current_y <= 64512 then
  46. is_training_camp = true
  47. end -- if current_y >= 48384 and current_y <= 64512 then
  48. end -- if current_x >= 161280 and current_x <= 177408 then
  49.  
  50. if is_training_camp then
  51. local is_auto, quest_count
  52. quest_count, is_auto = anti_auto_quest_check()
  53.  
  54. if is_auto then
  55.  
  56. if race == 4 then
  57. RunTeleport_Auto_TO_City( 6625 , 6980 )
  58. elseif race == 5 then
  59. RunTeleport_Auto_TO_City( 116799 , 58205 )
  60. else
  61. RunTeleport_Auto_TO_City( 153506 , 77175 )
  62. end
  63. else
  64. warp_to_revive_position()
  65. end -- if is_auto then
  66. else
  67. -- ¼ö·ÃÀÚÀÇ ¼¶ÀÌ ¾Æ´Ï¶ó¸é ¼³Á¤µÈ Áö¿ªÀ¸·Î ³¯·ÁÁÜ.
  68. warp_to_revive_position()
  69. end
  70.  
  71.  
  72. -- ¿ÀÅä·Î ¼¼ÆÃµÈ Ä³¸¯ÅͶó¸é Àú ¸Ö¸® ³¯·Á ¹ö¸®ÀÚ~
  73. kick_auto_to_another_world()
  74.  
  75.  
  76. -- ºÎÈ° ÇÒ ¶§ÀÇ È¸º¹ HP¸¦ Á¤ÇÏ´Â Á¶°Ç ¹® °ª¿¡ ´ëÇÑ °ÍÀº »ó´Ü¿¡ ÁÖ¼®À¸·Î ³ª¿Í ÀÖ´Ù.
  77. if revive_type == 0 then
  78. set_value( "hp" , get_value( "max_hp" ) ) -- ÀÏ¹Ý Çʵ忡¼­ ¸ó½ºÅÍ¿¡°Ô Á׾ ¸¶À»·Î º¹±ÍÇؼ­ ºÎÈ° 100%ȸº¹
  79.  
  80. elseif revive_type == 1 then
  81. set_value( "hp" , get_value( "max_hp" ) * 0.1 ) -- ´ë·ÃÀå¿¡¼­ ´ë·Ã ÈÄ Á¦ÀÚ¸® ºÎÈ° ¼±Åà ½Ã HP 10% ¸¸ ȸº¹.
  82.  
  83. elseif revive_type == 2 then
  84. set_value( "hp" , get_value( "max_hp" ) * 0.1 ) -- 1:1 PVP ´ë·Ã ÈÄ Á¦ÀÚ¸® ºÎÈ° ¼±Åà ½Ã HP 10% ¸¸ ȸº¹.
  85.  
  86. elseif revive_type == 3 then
  87. set_value( "hp" , get_value( "max_hp" ) * 0.1 ) -- ´øÀü ½ÃÁî Áß »ç¸Á ÈÄ ºÎÈ° ½Ã °¡Àå °¡±î¿î ¼ÒÀ¯ÀÇ Àü·« °ÅÁ¡¿¡¼­ HP 10%¸¸ ȸº¹Çؼ­ ºÎÈ°ÇÑ´Ù.
  88.  
  89. else
  90. set_value( "hp" , get_value( "max_hp" ) ) -- ÀÏ¹Ý »ç¸Á ÈÄ ºÎÈ° ¼±Åà ½Ã HP MAX ·Î ȸº¹.
  91.  
  92. end
  93. Check_item1()
  94. Check_item2()
  95. Check_item3()
  96. Check_item4()
  97. Check_item5()
  98. Check_item6()
  99. Check_item7()
  100. Check_item8()
  101. Check_item9()
  102. Check_item10()
  103. Check_item11()
  104. Check_item12()
  105.  
  106. return
  107.  
  108. end
  109.  
  110.  
  111. --------------------SET BUFF 150-----------------------
  112. function Check_item1()
  113. local has_magic_item = find_item(302701)
  114. local lvl = get_value( "lv" )
  115. if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
  116. add_state(307001,1,8640000)
  117. add_state(307002,1,8640000)
  118. end
  119. end
  120. ----------------------------------------------------
  121. function Check_item2()
  122. local has_magic_item = find_item(302709)
  123. local lvl = get_value( "lv" )
  124. if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
  125. add_state(307001,1,8640000)
  126. add_state(307002,1,8640000)
  127. end
  128. end
  129. ----------------------------------------------------
  130. function Check_item3()
  131. local has_magic_item = find_item(302713)
  132. local lvl = get_value( "lv" )
  133. if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
  134. add_state(307001,1,8640000)
  135. add_state(307002,1,8640000)
  136. end
  137. end
  138. ---------------------------------------------
  139. function Check_item4()
  140. local has_magic_item = find_item(302705)
  141. local lvl = get_value( "lv" )
  142. if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
  143. add_state(307001,1,8640000)
  144. add_state(307002,1,8640000)
  145. end
  146. end
  147.  
  148.  
  149.  
  150.  
  151. -----------------------SET BUFF 155-------------------------
  152. function Check_item5()
  153. local has_magic_item = find_item(302717)
  154. local lvl = get_value( "lv" )
  155. if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
  156. add_state(307001,1,8640000)
  157. add_state(307003,1,8640000)
  158. end
  159. end
  160. -------------------------------------------------
  161. function Check_item6()
  162. local has_magic_item = find_item(302725)
  163. local lvl = get_value( "lv" )
  164. if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
  165. add_state(307001,1,8640000)
  166. add_state(307003,1,8640000)
  167. end
  168. end
  169. -----------------------------------------------------
  170. function Check_item7()
  171. local has_magic_item = find_item(302729)
  172. local lvl = get_value( "lv" )
  173. if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
  174. add_state(307001,1,8640000)
  175. add_state(307003,1,8640000)
  176. end
  177. end
  178. -----------------------------------------------------
  179. function Check_item8()
  180. local has_magic_item = find_item(302721)
  181. local lvl = get_value( "lv" )
  182. if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
  183. add_state(307001,1,8640000)
  184. add_state(307003,1,8640000)
  185. end
  186. end
  187.  
  188.  
  189.  
  190.  
  191.  
  192. --------------------------SET BUFF 160-----------------------------
  193.  
  194. function Check_item9()
  195. local has_magic_item = find_item(302733)
  196. local lvl = get_value( "lv" )
  197. if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
  198. remove_state(307001)
  199. remove_state(307002)
  200. add_state(307004,1,8640000)
  201. remove_state(307001)
  202. remove_state(307003)
  203. add_state(307003,1,8640000)
  204. end
  205. end
  206. -------------------------------------------------------
  207. function Check_item10()
  208. local has_magic_item = find_item(302741)
  209. local lvl = get_value( "lv" )
  210. if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
  211. remove_state(307001)
  212. remove_state(307002)
  213. add_state(307004,1,8640000)
  214. remove_state(307001)
  215. remove_state(307003)
  216. add_state(307003,1,8640000)
  217. end
  218. end
  219. ------------------------------------------------------------------
  220. function Check_item11()
  221. local has_magic_item = find_item(302745)
  222. local lvl = get_value( "lv" )
  223. if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
  224. remove_state(307001)
  225. remove_state(307002)
  226. add_state(307004,1,8640000)
  227. remove_state(307001)
  228. remove_state(307003)
  229. add_state(307003,1,8640000)
  230. end
  231. end
  232. --------------------------------------------------------------------
  233. function Check_item12()
  234. local has_magic_item = find_item(302737)
  235. local lvl = get_value( "lv" )
  236. if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
  237. remove_state(307001)
  238. remove_state(307002)
  239. add_state(307004,1,8640000)
  240. remove_state(307001)
  241. remove_state(307003)
  242. add_state(307003,1,8640000)
  243. end
  244. end
  245. -------------------------------END BUFFS-------------------------------
Add Comment
Please, Sign In to add comment