Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_module_name()
- return "on_player_dead"
- end
- function on_player_dead( name, lost_exp, drop_item_name )
- local level
- level = get_value( "level" )
- -- 5·¹º§ ÀÌ»óÀÌ¸é °æÇèÄ¡ Ç϶ô ó¸®
- if level > 5 then
- --##½ÃÀÛ
- message(sconv("@90019004", "#@lost_exp@#",tostring(lost_exp)))
- --##³¡ ÀüÅõºÒ´ÉÀ¸·Î ÀÎÇØ #@lost_exp@# EXP¸¦ ÀÒ¾ú½À´Ï´Ù.
- else
- --##½ÃÀÛ
- message("@90019005")
- end
- save()
- end
- -- revive_type °ª¿¡ µû¸¥ ºÎÈ° À¯Çü
- -- 0: ±×³É Çʵ忡¼ Á×¾î¼ ÀÏ¹Ý ºÎÈ°
- -- 1: ´ë·Ã Àå¿¡¼ ´ë·Ã Áß »ç¸Á¿¡ ´ëÇÑ ºÎÈ°(±âÁ¸ ´ë·Ã ½Ã½ºÅÛ)
- -- 2: 1:1 PVP °ü·Ã ½Å±Ô ´ë·Ã ½Ã½ºÅÛ¿¡ ÀÇÇÑ ´ë·Ã Áß »ç¸Á¿¡ ºÎÈ°
- -- 3: ´øÀü ½ÃÁî Áß »ç¸Á¿¡ ´ëÇÑ ºÎÈ°
- function revive_in_town( revive_type )
- -- ¼ö·ÃÀÚ ¼¶¿¡ ÀÖ´Â ¿ÀÅäµéÀº º»Åä·Î ³¯·Á ¹ö¸®ÀÚ
- local current_x = gv("x")
- local current_y = gv("y")
- local is_training_camp = false
- local race = get_value( "race" )
- if current_x >= 161280 and current_x <= 177408 then
- if current_y >= 48384 and current_y <= 64512 then
- is_training_camp = true
- end -- if current_y >= 48384 and current_y <= 64512 then
- end -- if current_x >= 161280 and current_x <= 177408 then
- if is_training_camp then
- local is_auto, quest_count
- quest_count, is_auto = anti_auto_quest_check()
- if is_auto then
- if race == 4 then
- RunTeleport_Auto_TO_City( 6625 , 6980 )
- elseif race == 5 then
- RunTeleport_Auto_TO_City( 116799 , 58205 )
- else
- RunTeleport_Auto_TO_City( 153506 , 77175 )
- end
- else
- warp_to_revive_position()
- end -- if is_auto then
- else
- -- ¼ö·ÃÀÚÀÇ ¼¶ÀÌ ¾Æ´Ï¶ó¸é ¼³Á¤µÈ Áö¿ªÀ¸·Î ³¯·ÁÁÜ.
- warp_to_revive_position()
- end
- -- ¿ÀÅä·Î ¼¼ÆÃµÈ Ä³¸¯ÅͶó¸é Àú ¸Ö¸® ³¯·Á ¹ö¸®ÀÚ~
- kick_auto_to_another_world()
- -- ºÎÈ° ÇÒ ¶§ÀÇ È¸º¹ HP¸¦ Á¤ÇÏ´Â Á¶°Ç ¹® °ª¿¡ ´ëÇÑ °ÍÀº »ó´Ü¿¡ ÁÖ¼®À¸·Î ³ª¿Í ÀÖ´Ù.
- if revive_type == 0 then
- set_value( "hp" , get_value( "max_hp" ) ) -- ÀÏ¹Ý Çʵ忡¼ ¸ó½ºÅÍ¿¡°Ô Á×¾î¼ ¸¶À»·Î º¹±ÍÇؼ ºÎÈ° 100%ȸº¹
- elseif revive_type == 1 then
- set_value( "hp" , get_value( "max_hp" ) * 0.1 ) -- ´ë·ÃÀå¿¡¼ ´ë·Ã ÈÄ Á¦ÀÚ¸® ºÎÈ° ¼±Åà ½Ã HP 10% ¸¸ ȸº¹.
- elseif revive_type == 2 then
- set_value( "hp" , get_value( "max_hp" ) * 0.1 ) -- 1:1 PVP ´ë·Ã ÈÄ Á¦ÀÚ¸® ºÎÈ° ¼±Åà ½Ã HP 10% ¸¸ ȸº¹.
- elseif revive_type == 3 then
- set_value( "hp" , get_value( "max_hp" ) * 0.1 ) -- ´øÀü ½ÃÁî Áß »ç¸Á ÈÄ ºÎÈ° ½Ã °¡Àå °¡±î¿î ¼ÒÀ¯ÀÇ Àü·« °ÅÁ¡¿¡¼ HP 10%¸¸ ȸº¹Çؼ ºÎÈ°ÇÑ´Ù.
- else
- set_value( "hp" , get_value( "max_hp" ) ) -- ÀÏ¹Ý »ç¸Á ÈÄ ºÎÈ° ¼±Åà ½Ã HP MAX ·Î ȸº¹.
- end
- Check_item1()
- Check_item2()
- Check_item3()
- Check_item4()
- Check_item5()
- Check_item6()
- Check_item7()
- Check_item8()
- Check_item9()
- Check_item10()
- Check_item11()
- Check_item12()
- return
- end
- --------------------SET BUFF 150-----------------------
- function Check_item1()
- local has_magic_item = find_item(302701)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
- add_state(307001,1,8640000)
- add_state(307002,1,8640000)
- end
- end
- ----------------------------------------------------
- function Check_item2()
- local has_magic_item = find_item(302709)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
- add_state(307001,1,8640000)
- add_state(307002,1,8640000)
- end
- end
- ----------------------------------------------------
- function Check_item3()
- local has_magic_item = find_item(302713)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
- add_state(307001,1,8640000)
- add_state(307002,1,8640000)
- end
- end
- ---------------------------------------------
- function Check_item4()
- local has_magic_item = find_item(302705)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 150 and lvl <= 154 then
- add_state(307001,1,8640000)
- add_state(307002,1,8640000)
- end
- end
- -----------------------SET BUFF 155-------------------------
- function Check_item5()
- local has_magic_item = find_item(302717)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
- add_state(307001,1,8640000)
- add_state(307003,1,8640000)
- end
- end
- -------------------------------------------------
- function Check_item6()
- local has_magic_item = find_item(302725)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
- add_state(307001,1,8640000)
- add_state(307003,1,8640000)
- end
- end
- -----------------------------------------------------
- function Check_item7()
- local has_magic_item = find_item(302729)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
- add_state(307001,1,8640000)
- add_state(307003,1,8640000)
- end
- end
- -----------------------------------------------------
- function Check_item8()
- local has_magic_item = find_item(302721)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 155 and lvl <= 159 then
- add_state(307001,1,8640000)
- add_state(307003,1,8640000)
- end
- end
- --------------------------SET BUFF 160-----------------------------
- function Check_item9()
- local has_magic_item = find_item(302733)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
- remove_state(307001)
- remove_state(307002)
- add_state(307004,1,8640000)
- remove_state(307001)
- remove_state(307003)
- add_state(307003,1,8640000)
- end
- end
- -------------------------------------------------------
- function Check_item10()
- local has_magic_item = find_item(302741)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
- remove_state(307001)
- remove_state(307002)
- add_state(307004,1,8640000)
- remove_state(307001)
- remove_state(307003)
- add_state(307003,1,8640000)
- end
- end
- ------------------------------------------------------------------
- function Check_item11()
- local has_magic_item = find_item(302745)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
- remove_state(307001)
- remove_state(307002)
- add_state(307004,1,8640000)
- remove_state(307001)
- remove_state(307003)
- add_state(307003,1,8640000)
- end
- end
- --------------------------------------------------------------------
- function Check_item12()
- local has_magic_item = find_item(302737)
- local lvl = get_value( "lv" )
- if has_magic_item >= 1 and lvl >= 160 and lvl <= 300 then
- remove_state(307001)
- remove_state(307002)
- add_state(307004,1,8640000)
- remove_state(307001)
- remove_state(307003)
- add_state(307003,1,8640000)
- end
- end
- -------------------------------END BUFFS-------------------------------
Add Comment
Please, Sign In to add comment