-- Lua ½ºÅ©¸³Æ® ¾Ïȣȭ function get_module_name() return "NPC_CreatureSetup" end -- "ÀÌ°Ç ºüÁ® Àִµ¥ À̰͵µ DB·Î ³Ö¾î¾ß ÇÑ´Ù" ¶ó°í »ý°¢µÇ½Ã´Â -- ºÎºÐµé¿¡ ´ëÇØ¼­´Â ¿¬¶ô ÁÖ¼¼¿è. --============================================================ -- <<<<<< µ¥¹Ù Ãø NPC >>>>>> --============================================================ function NPC_CreatureSetup_Deva_init() cprint( "!Å×ÀÌ¸Ó ¾È´Ù¸®¿¤ °¡µ¿" ) set_npc_name( "@90100100" ) end function NPC_CreatureSetup_Deva_contact() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90100101" ) dlg_text( "@90100102" ) -- ±¹°¡ ÄÚµå Àоî¿È local state_code = get_local_info() -- ¾ò¾î¿Â ±¹°¡ Äڵ尡 Çѱ¹(1)À̶ó¸é if state_code == 1 or state_code == 2 then -- Å©¸®Ã³ ÁøÈ­¿¡ °üÇÑ ¼³¸í. dlg_menu( "@90010065", 'NPC_Description_Of_Evolution()' ) -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) -- Å©¸®Ã³ °¢ÀÎġȯ dlg_menu( "@90010146", 'Creature_name_change_Menu()' ) else -- Å©¸®Ã³ ÁøÈ­¿¡ °üÇÑ ¼³¸í. dlg_menu( "@90010065", 'NPC_Description_Of_Evolution()' ) -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) dlg_menu( '<#FF0000>'.."ÊØæíÑ ÇáãÑÇÝÞ", "Anmra_Super_Evolve()" ) -- Anmra Edit dlg_menu( '<#FF0000>'.."ÎÝÖ ãÓÊæì ÇáãÑÇÝÞ", "Hlp_Fix()" ) -- Anmra Edit -- Å©¸®Ã³ ½ºÅ³ ÃʱâÈ­ -- dlg_menu( "@90100124", 'reset_Creature_skill()' ) end -- ?????? ??????? ????? --dlg_menu("@90800054", "open_market( 'Custom_Shop_Empry_CC' )") local qstart_text = get_value( "level" ) local quest_progress1 = get_quest_progress(2008) local quest_progress100 = get_quest_progress(2000) -- ¹Ì·¡¸¦ ¿¹¾ðÇÏ´Â ¼Ò³à if qstart_text == 50 or qstart_text > 50 and quest_progress100 == 0 then dlg_menu( "@90999617", "quest_rumor11()" ) end -- ±¤½Åµµ ¾Ï»ìÀÚ if quest_progress1 == 255 then dlg_menu( "@90999842", "quest_witcharmy1()" ) end dlg_menu( "@90010001", '' ) dlg_show() end -- ¼¼ºÎ´ëÈ­ ¾È´Ù¶ó¿¤ function quest_rumor11() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90100101" ) dlg_text( "@90999618" ) -- ¼¼ºÎ´ëÈ­ 1-1, ¹Ì·¡¸¦ ³»´Ùº¸´Â ¼Ò³à dlg_menu( "@90999621", "quest_rumor_a_8()" ) dlg_menu( "@90010002", '' ) dlg_show() end -- ¼¼ºÎ´ëÈ­ function quest_rumor_a_8() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90100101" ) dlg_text( "@90999622" ) -- ¼¼ºÎ´ëÈ­ 1-2, ¼Ò³à¿¡ °üÇÑ ½Å»óÁ¤º¸ dlg_menu( "@90999625", "quest_rumor_b_8()" ) dlg_menu( "@90010002", '' ) dlg_show() end -- ¼¼ºÎ´ëÈ­ function quest_rumor_b_8() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90100101" ) dlg_text( "@90999626" ) -- ¼¼ºÎ´ëÈ­ 1-3, ¼Ò³à¿¡ °üÇÑ Á¤º¸ dlg_menu( "@90999627", "quest_rumor_c_8()" ) dlg_menu( "@90010002", '' ) dlg_show() end -- ¼¼ºÎ´ëÈ­ ·¹»þ¿¡ °üÇÑ Á¤º¸¸¦ ÁØ´Ù. function quest_rumor_c_8() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90100101" ) -- ¼¼ºÎ´ëÈ­ 1-4, ¼Ò³à¿¡ °üÇÑ À§Ä¡Á¤º¸ dlg_text( "@90999629" ) dlg_menu( "@90010002", '' ) dlg_show() end --=========================================================== -- Å©¸®Ã³ °ü¸® ¸Þ´º ´ëÈ­ »óÀÚ - µ¥¹Ù --=========================================================== function Creature_Management_Deva() dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90100108" ) local i, handle, lv, text, command, temp_txt -- 0¹ø¿¡¼­ 5¹ø ½½·Ô±îÁö ÈȾ¸é¼­ ¸Þ´º¿¡ Ãß°¡ for i = 0, 5 do -- ÇÚµé ÃʱâÈ­ handle = 0 -- ÀåÂøÇÑ ¼Òȯ¼ö ÇÚµé ¾ò¾î¿È handle = get_creature_handle( i ) -- ¸¸¾à ÀåÂøµÇ¾î ÀÖ´Ù¸é if handle ~= 0 and handle ~= nil then -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- ÇØ´ç ¼Òȯ¼öÀÇ À̸§, LvÀ» ÅØ½ºÆ®·Î ±¸¼º text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) --##³¡ #@creature_name@# Lv #@creature_level@# -- ¼Òȯ¼ö À̸§À» ¸Þ´º¿¡ Ãß°¡ command = 'Creature_Care_Deva( ' .. handle .. ' )' dlg_menu( text, command ) end end dlg_menu( "@90010002", '' ) dlg_show() end --ºÐÈ­µÈ °ü¸®¸Þ´º function Creature_Care_Deva( handle ) local lv, text, text2, HP, MaxHP, MP, MaxMP, SP, MaxSP local Stemp_H, Stemp_M, Stemp_S local cost_R, cost_A, cost_H, cost_M, cost_S, cost_T dlg_title( "@90100101" ) -- Å©¸®Ã³ »óÅÂ
Å©¸®Ã³À̸§ LvXX lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- »óÅ ¾ò¾î ¿À±â HP, MP, SP HP = get_creature_value( handle, "hp" ) MaxHP = get_creature_value( handle, "max_hp" ) MP = get_creature_value( handle, "mp" ) MaxMP = get_creature_value( handle, "max_mp" ) --##½ÃÀÛ -- »óÅ ǥ½ÃÇϱâ Stemp_H = math.floor( HP / MaxHP * 100 ) Stemp_M = math.floor( MP / MaxMP * 100 ) -- HP °¡ 0 ÀÌ¸é »ç¸ÁÀ¸·Î Ç¥½Ã ¾Æ´Ï¸é %·Î ÇöÀç»óÅ ǥ½Ã if HP == 0 then text2 = sconv("@90010019" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##
HP #@creature_HP@#/#@creature_MaxHP@# »ç¸Á
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % elseif HP ~= 0 then text2 = sconv("@90010018" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@percent_HP@#", tostring(Stemp_H),"#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##³¡
HP #@creature_HP@#/#@creature_MaxHP@# #@percent_HP@# %
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % end -- ÅØ½ºÆ® â ±¸¼º -> ¼±ÅÃÇÑ Å©¸®Ã³
À̸§ LV HP MP SP dlg_text_without_quest_menu( text2 ) -- Ä¡·áºñ °è»ê (100 - ÇöÀç%) * ±Ý¾×»ó¼ö * (·¹º§ + ·¹º§º¸Á¤) / ±â¿ï±â * Ä¡·áÁ¾¸ñ»ó¼ö -- ÇöÀç% °¡ 0 ÀÏ °æ¿ì nilÀ̶ó°í ¿¡·¯³². ±×·¡¼­ Ã¼Å©ÇØ¼­ nilÀÏ °æ¿ì º»·¡ ÀǵµÇÑ °ªÀÎ -- 100À¸·Î ±×³É ¼ö½Ä¿¡ ¹Ú¾Æ ³ÖÀ½. if Stemp_H == nil then cost_H = math.floor( 100 * 1 * (lv + 4) / 10 * 1 ) else cost_H = math.floor( (100 - Stemp_H) * 1 * (lv + 4) / 10 * 1 ) end if Stemp_M == nil then cost_M = math.floor( 100 * 1 * (lv + 4) / 10 * 3 ) else cost_M = math.floor( (100 - Stemp_M) * 1 * (lv + 4) / 10 * 3 ) end cost_A = cost_H + cost_M -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°ÝÀº HP30% ³ôÀÌ´Â °ªÀ» Æ÷ÇÔÇØ¾ßÇÔ) cost_R = math.floor( (100) * 1 * (lv + 4) / 10 * 3 ) -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°Ý) cost_T = cost_R + math.floor( (30) * 1 * (lv + 4) / 10 * 1 ) --##½ÃÀÛ -- HP °¡ 0 À̸é 30% ºÎȰ°ú ¿ÏÀü ºÎȰ ¸Þ´º if HP == 0 then text = sconv("@90010023", "#@cost@#", tostring(cost_T) ) --## ºÎȰ (HP30%ȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_RecoverEx_HP_Deva(' .. handle .. ',' .. cost_T .. ',' .. 30 .. ')' ) text = sconv("@90010033", "#@cost@#", tostring(cost_R + cost_A) ) --## ºÎȰ (HP, MP ¿ÏÀüȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Deva(' .. handle .. ',' .. ( cost_R + cost_A ) .. ')' ) -- HP °¡ 0 ÀÌ ¾Æ´Ï¸é ¿ÏÀüÄ¡ ¾ÊÀº °Íµé Á¾·ùº°·Î Ã¼Å©ÇØ¼­ ¸Þ´º·Î ¶ç¿ò elseif HP ~= 0 then if HP < MaxHP or MP < MaxMP then text = sconv("@90010024", "#@cost@#", tostring( cost_A ) ) --##¸ðµÎ ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Deva(' .. handle .. ',' .. cost_A .. ')' ) end if HP > 0 and HP < MaxHP then text = sconv("@90010025", "#@cost@#", tostring( cost_H ) ) --## HP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_HP_Deva(' .. handle .. ',' .. cost_H .. ')' ) end if MP >= 0 and MP < MaxMP then text = sconv("@90010026", "#@cost@#", tostring( cost_M ) ) --##³¡ MP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_MP_Deva(' .. handle .. ',' .. cost_M .. ')' ) end end dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010001", '' ) dlg_show() end -- Á¤ÇØÁø ºñÀ² ¸¸Å­¸¸ HP¸¦ Ä¡·áÇÏ´Â ÇÔ¼ö ( ÇÚµé, °¡°Ý, Ä¡·áÇÒºñÀ²) function Creature_Care_RecoverEx_HP_Deva( handle, cost, ratio ) local Max_HP, Target_HP, temp, HP Max_HP = get_creature_value( handle, "max_hp" ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â Target_HP = math.floor(Max_HP * ratio / 100) set_creature_value( handle, "hp", Target_HP ) message( "@90010031" ) end function Creature_Care_Recover_HP_Deva( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) message( "@90010031" ) end function Creature_Care_Recover_MP_Deva( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) message( "@90010031" ) end function Creature_Care_Recover_SP_Deva( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ --sp°ü·ÃÁÖ¼®Ã³¸® set_value( "gold", gold - cost ) -- Ä¡·á½ÃÄÑ ÁÖ±â --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end function Creature_Care_Recover_ALL_Deva( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Deva()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end --=========================================================== -- Å©¸®Ã³ Ä«µå ¹Þ±â Æã¼Ç --=========================================================== function CreatureCard_Give_Deva() -- Ä«µå ¹Þ¾Ò´ÂÁö Ç÷¡±× ¹Þ¾Æ¿À±â (¹Þ¾ÒÀ¸¸é 1, ¾Æ´Ï¸é NULL) local q_flag = get_flag( "q1" ) -- Á÷¾÷ & ·¹º§ & Ç÷¡±× üũ -- 20·¦ÀÌ ³ÑÀº ¼Òȯ»ç°è¿­ÀÌ ¾Æ´Ï¸é KIN if get_value( "level" ) < 20 or get_value ( "job" ) ~= 204 then -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90100105" ) dlg_menu( "@90010016", '' ) dlg_show() -- 20·¦ ³ÑÀº ¼Òȯ»ç¶óµµ Çѹø ¹Þ¾ÒÀ¸¸é KIN elseif get_value( "level" ) >= 20 and get_value ( "job" ) == 204 and q_flag == 1 then -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90100106" ) dlg_menu( "@90010016", '' ) dlg_show() -- Çѹøµµ ¾È¹ÞÀº 20·¦ ¼Òȯ»ç elseif get_value( "level" ) >= 20 and get_value ( "job" ) == 204 and q_flag ~= 1 then -- ¾ÆÀÌÅÛ ¹Ð¾î³Ö±â(ÇȽÃÄ«µå 540005~ 540008) insert_item( 540005 + math.random(0,3), 1 ) -- Ç÷¡±× ¼¼ÆÃ set_flag( "q1", "1") -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90100101" ) dlg_text_without_quest_menu( "@90100107" ) dlg_menu( "@90010016", '' ) dlg_show() end end --============================================================ -- <<<<<< ¾Æ¼ö¶ó Ãø NPC >>>>>> --============================================================ function NPC_CreatureSetup_Asura_init() cprint( "!Å×ÀÌ¸Ó ½´¹Ù³ªÃ÷ °¡µ¿" ) set_npc_name( "@90200100" ) end function NPC_CreatureSetup_Asura_contact() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90200101" ) dlg_text( "@90200102" ) -- ±¹°¡ ÄÚµå Àоî¿È local state_code = get_local_info() -- ¾ò¾î¿Â ±¹°¡ Äڵ尡 Çѱ¹(1)À̶ó¸é if state_code == 1 or state_code == 2 then -- Å©¸®Ã³ ÁøÈ­¿¡ °üÇÑ ¼³¸í. dlg_menu( "@90010065", 'NPC_Description_Of_Evolution()' ) -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) -- Å©¸®Ã³ °¢ÀÎġȯ dlg_menu( "@90010146", 'Creature_name_change_Menu()' ) else -- Å©¸®Ã³ ÁøÈ­¿¡ °üÇÑ ¼³¸í. dlg_menu( "@90010065", 'NPC_Description_Of_Evolution()' ) -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) dlg_menu( '<#FF0000>'.."ÊØæíÑ ÇáãÑÇÝÞ", "Anmra_Super_Evolve()" ) -- Anmra Edit dlg_menu( '<#FF0000>'.."ÎÝÖ ãÓÊæì ÇáãÑÇÝÞ", "Hlp_Fix()" ) -- Anmra Edit -- Å©¸®Ã³ ½ºÅ³ ÃʱâÈ­ -- dlg_menu( "@90100124", 'reset_Creature_skill()' ) end -- ?????? ??????? ????? --dlg_menu("@90800054", "open_market( 'Custom_Shop_Empry_CC' )") dlg_menu( "@90010001", '' ) dlg_show() end --=========================================================== -- Å©¸®Ã³ °ü¸® ¸Þ´º ´ëÈ­ »óÀÚ - ¾Æ¼ö¶ó --=========================================================== function Creature_Management_Asura() dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90200108" ) local i, handle, lv, text, command, temp_txt -- 0¹ø¿¡¼­ 5¹ø ½½·Ô±îÁö ÈȾ¸é¼­ ¸Þ´º¿¡ Ãß°¡ for i = 0, 5 do -- ÇÚµé ÃʱâÈ­ handle = 0 -- ÀåÂøÇÑ ¼Òȯ¼ö ÇÚµé ¾ò¾î¿È handle = get_creature_handle( i ) -- ¸¸¾à ÀåÂøµÇ¾î ÀÖ´Ù¸é if handle ~= 0 and handle ~= nil then -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- ÇØ´ç ¼Òȯ¼öÀÇ À̸§, LvÀ» ÅØ½ºÆ®·Î ±¸¼º text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) --##³¡ #@creature_name@# Lv #@creature_level@# -- ¼Òȯ¼ö À̸§À» ¸Þ´º¿¡ Ãß°¡ command = 'Creature_Care_Asura( ' .. handle .. ' )' dlg_menu( text, command ) end end dlg_menu( "@90010002", '' ) dlg_show() end --ºÐÈ­µÈ °ü¸®¸Þ´º function Creature_Care_Asura( handle ) local lv, text, text2, HP, MaxHP, MP, MaxMP, SP, MaxSP local Stemp_H, Stemp_M, Stemp_S local cost_R, cost_A, cost_H, cost_M, cost_S, cost_T dlg_title( "@90200101" ) -- Å©¸®Ã³ »óÅÂ
Å©¸®Ã³À̸§ LvXX lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- »óÅ ¾ò¾î ¿À±â HP, MP, SP HP = get_creature_value( handle, "hp" ) MaxHP = get_creature_value( handle, "max_hp" ) MP = get_creature_value( handle, "mp" ) MaxMP = get_creature_value( handle, "max_mp" ) --##½ÃÀÛ -- »óÅ ǥ½ÃÇϱâ Stemp_H = math.floor( HP / MaxHP * 100 ) Stemp_M = math.floor( MP / MaxMP * 100 ) -- HP °¡ 0 ÀÌ¸é »ç¸ÁÀ¸·Î Ç¥½Ã ¾Æ´Ï¸é %·Î ÇöÀç»óÅ ǥ½Ã if HP == 0 then text2 = sconv("@90010019" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##
HP #@creature_HP@#/#@creature_MaxHP@# »ç¸Á
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % elseif HP ~= 0 then text2 = sconv("@90010018" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@percent_HP@#", tostring(Stemp_H),"#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##³¡
HP #@creature_HP@#/#@creature_MaxHP@# #@percent_HP@# %
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % end -- ÅØ½ºÆ® â ±¸¼º -> ¼±ÅÃÇÑ Å©¸®Ã³
À̸§ LV HP MP SP dlg_text_without_quest_menu( text2 ) -- Ä¡·áºñ °è»ê (100 - ÇöÀç%) * ±Ý¾×»ó¼ö * (·¹º§ + ·¹º§º¸Á¤) / ±â¿ï±â * Ä¡·áÁ¾¸ñ»ó¼ö -- ÇöÀç% °¡ 0 ÀÏ °æ¿ì nilÀ̶ó°í ¿¡·¯³². ±×·¡¼­ Ã¼Å©ÇØ¼­ nilÀÏ °æ¿ì º»·¡ ÀǵµÇÑ °ªÀÎ -- 100À¸·Î ±×³É ¼ö½Ä¿¡ ¹Ú¾Æ ³ÖÀ½. if Stemp_H == nil then cost_H = math.floor( 100 * 1 * (lv + 4) / 10 * 1 ) else cost_H = math.floor( (100 - Stemp_H) * 1 * (lv + 4) / 10 * 1 ) end if Stemp_M == nil then cost_M = math.floor( 100 * 1 * (lv + 4) / 10 * 3 ) else cost_M = math.floor( (100 - Stemp_M) * 1 * (lv + 4) / 10 * 3 ) end cost_A = cost_H + cost_M -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°ÝÀº HP30% ³ôÀÌ´Â °ªÀ» Æ÷ÇÔÇØ¾ßÇÔ) cost_R = math.floor( (100) * 1 * (lv + 4) / 10 * 3 ) -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°Ý) cost_T = cost_R + math.floor( (30) * 1 * (lv + 4) / 10 * 1 ) --##½ÃÀÛ -- HP °¡ 0 À̸é 30% ºÎȰ°ú ¿ÏÀü ºÎȰ ¸Þ´º if HP == 0 then text = sconv("@90010023", "#@cost@#", tostring(cost_T) ) --## ºÎȰ (HP30%ȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_RecoverEx_HP_Asura(' .. handle .. ',' .. cost_T .. ',' .. 30 .. ')' ) text = sconv("@90010033", "#@cost@#", tostring(cost_R + cost_A) ) --## ºÎȰ (HP30%ȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Asura(' .. handle .. ',' .. ( cost_R + cost_A ) .. ')' ) -- HP °¡ 0 ÀÌ ¾Æ´Ï¸é ¿ÏÀüÄ¡ ¾ÊÀº °Íµé Á¾·ùº°·Î Ã¼Å©ÇØ¼­ ¸Þ´º·Î ¶ç¿ò elseif HP ~= 0 then if HP < MaxHP or MP < MaxMP then text = sconv("@90010024", "#@cost@#", tostring( cost_A ) ) --##¸ðµÎ ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Asura(' .. handle .. ',' .. cost_A .. ')' ) end if HP > 0 and HP < MaxHP then text = sconv("@90010025", "#@cost@#", tostring( cost_H ) ) --## HP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_HP_Asura(' .. handle .. ',' .. cost_H .. ')' ) end if MP >= 0 and MP < MaxMP then text = sconv("@90010026", "#@cost@#", tostring( cost_M ) ) --##³¡ MP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_MP_Asura(' .. handle .. ',' .. cost_M .. ')' ) end end dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010001", '' ) dlg_show() end -- Á¤ÇØÁø ºñÀ² ¸¸Å­¸¸ HP¸¦ Ä¡·áÇÏ´Â ÇÔ¼ö ( ÇÚµé, °¡°Ý, Ä¡·áÇÒºñÀ²) function Creature_Care_RecoverEx_HP_Asura( handle, cost, ratio ) local Max_HP, Target_HP Max_HP = get_creature_value( handle, "max_hp" ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â Target_HP = math.floor(Max_HP * ratio / 100) set_creature_value( handle, "hp", Target_HP ) message( "@90010031" ) end function Creature_Care_Recover_HP_Asura( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) message( "@90010031" ) end function Creature_Care_Recover_MP_Asura( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) message( "@90010031" ) end function Creature_Care_Recover_SP_Asura( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ --sp°ü·ÃÁÖ¼®Ã³¸® set_value( "gold", gold - cost ) -- Ä¡·á½ÃÄÑ ÁÖ±â --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end function Creature_Care_Recover_ALL_Asura( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Asura()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end --============================================================ -- Å©¸®Ã³ Ä«µå ¹Þ±â Æã¼Ç --============================================================ function CreatureCard_Give_Asura() -- Ä«µå ¹Þ¾Ò´ÂÁö Ç÷¡±× ¹Þ¾Æ¿À±â (¹Þ¾ÒÀ¸¸é 1, ¾Æ´Ï¸é NULL) local q_flag = get_flag( "q1" ) -- Á÷¾÷ & ·¹º§ & Ç÷¡±× üũ -- 20·¦ÀÌ ³ÑÀº ¼Òȯ»ç°è¿­ÀÌ ¾Æ´Ï¸é KIN if get_value( "level" ) < 20 or get_value ( "job" ) ~= 304 then -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90200105" ) dlg_menu( "@90010016", '' ) dlg_show() -- 20·¦ ³ÑÀº ¼Òȯ»ç¶óµµ Çѹø ¹Þ¾ÒÀ¸¸é KIN elseif get_value( "level" ) >= 20 and get_value ( "job" ) == 304 and q_flag == 1 then -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90200106" ) dlg_menu( "@90010016", '' ) dlg_show() -- Çѹøµµ ¾È¹ÞÀº 20·¦ ¼Òȯ»ç elseif get_value( "level" ) >= 20 and get_value ( "job" ) == 304 and q_flag ~= 1 then -- ¾ÆÀÌÅÛ ¹Ð¾î³Ö±â(ÇȽÃÄ«µå 540005~ 540008) insert_item( 540005 + math.random(0,3), 1 ) -- Ç÷¡±× ¼¼ÆÃ set_flag( "q1", "1") -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90200101" ) dlg_text_without_quest_menu( "@90200107" ) dlg_menu( "@90010016", '' ) dlg_show() end end --============================================================ -- <<<<<< °¡ÀÌ¾Æ Ãø NPC >>>>>> --============================================================ function NPC_CreatureSetup_Gaia_init() cprint( "!°¡ÀÌ¾Æ ¼Òȯ¼ö °¡µ¿" ) set_npc_name( "@90400100" ) end function NPC_CreatureSetup_Gaia_contact() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90400101" ) dlg_text( "@90400102" ) -- ±¹°¡ ÄÚµå Àоî¿È local state_code = get_local_info() -- ¾ò¾î¿Â ±¹°¡ Äڵ尡 Çѱ¹(1)À̶ó¸é if state_code == 1 or state_code == 2 then -- Å©¸®Ã³ ÁøÈ­¿¡ °üÇÑ ¼³¸í. dlg_menu( "@90010065", 'NPC_Description_Of_Evolution()' ) -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) -- Å©¸®Ã³ °¢ÀÎġȯ dlg_menu( "@90010146", 'Creature_name_change_Menu()' ) else -- Å©¸®Ã³ ÁøÈ­¿¡ °üÇÑ ¼³¸í. dlg_menu( "@90010065", 'NPC_Description_Of_Evolution()' ) -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) dlg_menu( '<#FF0000>'.."ÊØæíÑ ÇáãÑÇÝÞ", "Anmra_Super_Evolve()" ) -- Anmra Edit dlg_menu( '<#FF0000>'.."ÎÝÖ ãÓÊæì ÇáãÑÇÝÞ", "Hlp_Fix()" ) -- Anmra Edit -- Å©¸®Ã³ ½ºÅ³ ÃʱâÈ­ -- dlg_menu( "@90100124", 'reset_Creature_skill()' ) end -- ?????? ??????? ????? --dlg_menu("@90800054", "open_market( 'Custom_Shop_Empry_CC' )") dlg_menu( "@90010001", '' ) dlg_show() end --=========================================================== -- Å©¸®Ã³ °ü¸® ¸Þ´º ´ëÈ­ »óÀÚ - °¡ÀÌ¾Æ --=========================================================== function Creature_Management_Gaia() dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90400108" ) local i, handle, lv, text, command, temp_txt -- 0¹ø¿¡¼­ 5¹ø ½½·Ô±îÁö ÈȾ¸é¼­ ¸Þ´º¿¡ Ãß°¡ for i = 0, 5 do -- ÇÚµé ÃʱâÈ­ handle = 0 -- ÀåÂøÇÑ ¼Òȯ¼ö ÇÚµé ¾ò¾î¿È handle = get_creature_handle( i ) -- ¸¸¾à ÀåÂøµÇ¾î ÀÖ´Ù¸é if handle ~= 0 and handle ~= nil then -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- ÇØ´ç ¼Òȯ¼öÀÇ À̸§, LvÀ» ÅØ½ºÆ®·Î ±¸¼º text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) --##³¡ #@creature_name@# Lv #@creature_level@# -- ¼Òȯ¼ö À̸§À» ¸Þ´º¿¡ Ãß°¡ command = 'Creature_Care_Gaia( ' .. handle .. ' )' dlg_menu( text, command ) end end dlg_menu( "@90010002", '' ) dlg_show() end --ºÐÈ­µÈ °ü¸®¸Þ´º function Creature_Care_Gaia( handle ) local lv, text, text2, HP, MaxHP, MP, MaxMP, SP, MaxSP local Stemp_H, Stemp_M, Stemp_S local cost_R, cost_A, cost_H, cost_M, cost_S, cost_T dlg_title( "@90400101" ) -- Å©¸®Ã³ »óÅÂ
Å©¸®Ã³À̸§ LvXX lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- »óÅ ¾ò¾î ¿À±â HP, MP, SP HP = get_creature_value( handle, "hp" ) MaxHP = get_creature_value( handle, "max_hp" ) MP = get_creature_value( handle, "mp" ) MaxMP = get_creature_value( handle, "max_mp" ) --##½ÃÀÛ -- »óÅ ǥ½ÃÇϱâ Stemp_H = math.floor( HP / MaxHP * 100 ) Stemp_M = math.floor( MP / MaxMP * 100 ) -- HP °¡ 0 ÀÌ¸é »ç¸ÁÀ¸·Î Ç¥½Ã ¾Æ´Ï¸é %·Î ÇöÀç»óÅ ǥ½Ã if HP == 0 then text2 = sconv("@90010019" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##
HP #@creature_HP@#/#@creature_MaxHP@# »ç¸Á
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % elseif HP ~= 0 then text2 = sconv("@90010018" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@percent_HP@#", tostring(Stemp_H),"#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##³¡
HP #@creature_HP@#/#@creature_MaxHP@# #@percent_HP@# %
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % end -- ÅØ½ºÆ® â ±¸¼º -> ¼±ÅÃÇÑ Å©¸®Ã³
À̸§ LV HP MP SP dlg_text_without_quest_menu( text2 ) -- Ä¡·áºñ °è»ê (100 - ÇöÀç%) * ±Ý¾×»ó¼ö * (·¹º§ + ·¹º§º¸Á¤) / ±â¿ï±â * Ä¡·áÁ¾¸ñ»ó¼ö -- ÇöÀç% °¡ 0 ÀÏ °æ¿ì nilÀ̶ó°í ¿¡·¯³². ±×·¡¼­ Ã¼Å©ÇØ¼­ nilÀÏ °æ¿ì º»·¡ ÀǵµÇÑ °ªÀÎ -- 100À¸·Î ±×³É ¼ö½Ä¿¡ ¹Ú¾Æ ³ÖÀ½. if Stemp_H == nil then cost_H = math.floor( 100 * 1 * (lv + 4) / 10 * 1 ) else cost_H = math.floor( (100 - Stemp_H) * 1 * (lv + 4) / 10 * 1 ) end if Stemp_M == nil then cost_M = math.floor( 100 * 1 * (lv + 4) / 10 * 3 ) else cost_M = math.floor( (100 - Stemp_M) * 1 * (lv + 4) / 10 * 3 ) end cost_A = cost_H + cost_M -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°ÝÀº HP30% ³ôÀÌ´Â °ªÀ» Æ÷ÇÔÇØ¾ßÇÔ) cost_R = math.floor( (100) * 1 * (lv + 4) / 10 * 3 ) -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°Ý) cost_T = cost_R + math.floor( (30) * 1 * (lv + 4) / 10 * 1 ) --##½ÃÀÛ -- HP °¡ 0 À̸é 30% ºÎȰ°ú ¿ÏÀü ºÎȰ ¸Þ´º if HP == 0 then text = sconv("@90010023", "#@cost@#", tostring(cost_T) ) --## ºÎȰ (HP30%ȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_RecoverEx_HP_Gaia(' .. handle .. ',' .. cost_T .. ',' .. 30 .. ')' ) text = sconv("@90010033", "#@cost@#", tostring(cost_R + cost_A) ) --## ºÎȰ (HP30%ȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Gaia(' .. handle .. ',' .. ( cost_R + cost_A ) .. ')' ) -- HP °¡ 0 ÀÌ ¾Æ´Ï¸é ¿ÏÀüÄ¡ ¾ÊÀº °Íµé Á¾·ùº°·Î Ã¼Å©ÇØ¼­ ¸Þ´º·Î ¶ç¿ò elseif HP ~= 0 then if HP < MaxHP or MP < MaxMP then text = sconv("@90010024", "#@cost@#", tostring( cost_A ) ) --##¸ðµÎ ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Gaia(' .. handle .. ',' .. cost_A .. ')' ) end if HP > 0 and HP < MaxHP then text = sconv("@90010025", "#@cost@#", tostring( cost_H ) ) --## HP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_HP_Gaia(' .. handle .. ',' .. cost_H .. ')' ) end if MP >= 0 and MP < MaxMP then text = sconv("@90010026", "#@cost@#", tostring( cost_M ) ) --##³¡ MP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_MP_Gaia(' .. handle .. ',' .. cost_M .. ')' ) end end dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010001", '' ) dlg_show() end -- Á¤ÇØÁø ºñÀ² ¸¸Å­¸¸ HP¸¦ Ä¡·áÇÏ´Â ÇÔ¼ö ( ÇÚµé, °¡°Ý, Ä¡·áÇÒºñÀ²) function Creature_Care_RecoverEx_HP_Gaia( handle, cost, ratio ) local Max_HP, Target_HP, temp, HP Max_HP = get_creature_value( handle, "max_hp" ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â Target_HP = math.floor(Max_HP * ratio / 100) set_creature_value( handle, "hp", Target_HP ) message( "@90010031" ) end function Creature_Care_Recover_HP_Gaia( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) message( "@90010031" ) end function Creature_Care_Recover_MP_Gaia( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) message( "@90010031" ) end function Creature_Care_Recover_SP_Gaia( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ --sp°ü·ÃÁÖ¼®Ã³¸® set_value( "gold", gold - cost ) -- Ä¡·á½ÃÄÑ ÁÖ±â --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end function Creature_Care_Recover_ALL_Gaia( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Gaia()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end --=========================================================== -- Å©¸®Ã³ Ä«µå ¹Þ±â Æã¼Ç --=========================================================== function CreatureCard_Give_Gaia() -- Ä«µå ¹Þ¾Ò´ÂÁö Ç÷¡±× ¹Þ¾Æ¿À±â (¹Þ¾ÒÀ¸¸é 1, ¾Æ´Ï¸é NULL) local q_flag = get_flag( "q1" ) -- Á÷¾÷ & ·¹º§ & Ç÷¡±× üũ -- 20·¦ÀÌ ³ÑÀº ¼Òȯ»ç°è¿­ÀÌ ¾Æ´Ï¸é KIN if get_value( "level" ) < 20 or get_value ( "job" ) ~= 204 then -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90400105" ) dlg_menu( "@90010016", '' ) dlg_show() -- 20·¦ ³ÑÀº ¼Òȯ»ç¶óµµ Çѹø ¹Þ¾ÒÀ¸¸é KIN elseif get_value( "level" ) >= 20 and get_value ( "job" ) == 204 and q_flag == 1 then -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90400106" ) dlg_menu( "@90010016", '' ) dlg_show() -- Çѹøµµ ¾È¹ÞÀº 20·¦ ¼Òȯ»ç elseif get_value( "level" ) >= 20 and get_value ( "job" ) == 204 and q_flag ~= 1 then -- ¾ÆÀÌÅÛ ¹Ð¾î³Ö±â(ÇȽÃÄ«µå 540005~ 540008) insert_item( 540005 + math.random(0,3), 1 ) -- Ç÷¡±× ¼¼ÆÃ set_flag( "q1", "1") -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90400101" ) dlg_text_without_quest_menu( "@90400107" ) dlg_menu( "@90010016", '' ) dlg_show() end end --============================================================ -- <<<<<< µµ½Ã À¯Àû Ãø NPC >>>>>> --============================================================ function NPC_CreatureSetup_Ancient_relic_contact() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90702901" ) dlg_text( "@90702902" ) -- ±¹°¡ ÄÚµå Àоî¿È local state_code = get_local_info() -- ¾ò¾î¿Â ±¹°¡ Äڵ尡 Çѱ¹(1)À̶ó¸é if state_code == 1 or state_code == 2 then -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) -- Å©¸®Ã³ °¢ÀÎġȯ dlg_menu( "@90010146", 'Creature_name_change_Menu()' ) else -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) dlg_menu( '<#FF0000>'.."ÊØæíÑ ÇáãÑÇÝÞ", "Anmra_Super_Evolve()" ) -- Anmra Edit dlg_menu( '<#FF0000>'.."ÎÝÖ ãÓÊæì ÇáãÑÇÝÞ", "Hlp_Fix()" ) -- Anmra Edit -- Å©¸®Ã³ ½ºÅ³ ÃʱâÈ­ -- dlg_menu( "@90100124", 'reset_Creature_skill()' ) end -- ?????? ??????? ????? --dlg_menu("@90800054", "open_market( 'Custom_Shop_Empry_CC' )") dlg_menu( "@90010001", '' ) dlg_show() end --============================================================ -- <<<<<< ·Ðµµ Ãø NPC >>>>>> --============================================================ function NPC_CreatureSetup_Rondoh_contact() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90600101" ) dlg_text( "@90600102" ) -- ±¹°¡ ÄÚµå Àоî¿È local state_code = get_local_info() -- ¾ò¾î¿Â ±¹°¡ Äڵ尡 Çѱ¹(1)À̶ó¸é -- Äù½ºÆ® »óÅ üũ get_quest_progress(ID) -- ¹Ýȯ°ª -1 : ¾Æ¹«°Íµµ ¾Æ´Ô / 0 : ¼ö¶ô°¡ / 1 : ¼öÇàÁß / 2 : Á¾·á°¡´É / 255 : À̹ÌÁ¾·á if get_quest_progress(3262) == 1 then dlg_text_without_quest_menu( "@90600102" ) dlg_menu( "@80003262", "Quest_Link_3262()" ) if state_code == 1 or state_code == 2 then -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) -- Å©¸®Ã³ °¢ÀÎġȯ dlg_menu( "@90010146", 'Creature_name_change_Menu()' ) else -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) -- Å©¸®Ã³ ½ºÅ³ ÃʱâÈ­ -- dlg_menu( "@90100124", 'reset_Creature_skill()' ) end elseif state_code == 1 or state_code == 2 then -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) -- Å©¸®Ã³ °¢ÀÎġȯ dlg_menu( "@90010146", 'Creature_name_change_Menu()' ) else -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) dlg_menu( '<#FF0000>'.."ÊØæíÑ ÇáãÑÇÝÞ", "Anmra_Super_Evolve()" ) -- Anmra Edit dlg_menu( '<#FF0000>'.."ÎÝÖ ãÓÊæì ÇáãÑÇÝÞ", "Hlp_Fix()" ) -- Anmra Edit -- Å©¸®Ã³ ½ºÅ³ ÃʱâÈ­ -- dlg_menu( "@90100124", 'reset_Creature_skill()' ) end -- ?????? ??????? ????? --dlg_menu("@90800054", "open_market( 'Custom_Shop_Empry_CC' )") dlg_menu( "@90010001", '' ) dlg_show() end function Quest_Link_3262() if find_item( 1000113 ) == 0 then dlg_title("@90600101") dlg_text_without_quest_menu( "@91000976" ) dlg_menu("@90010002", '') dlg_show() insert_item( 1000113, 1 ) else dlg_title("@90600102") dlg_menu( "@90010002", '' ) dlg_show() end end --=========================================================== -- Å©¸®Ã³ °ü¸® ¸Þ´º ´ëÈ­ »óÀÚ - ·Ðµµ --=========================================================== function Creature_Management_Rondoh() dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90600108" ) local i, handle, lv, text, command, temp_txt -- 0¹ø¿¡¼­ 5¹ø ½½·Ô±îÁö ÈȾ¸é¼­ ¸Þ´º¿¡ Ãß°¡ for i = 0, 5 do -- ÇÚµé ÃʱâÈ­ handle = 0 -- ÀåÂøÇÑ ¼Òȯ¼ö ÇÚµé ¾ò¾î¿È handle = get_creature_handle( i ) -- ¸¸¾à ÀåÂøµÇ¾î ÀÖ´Ù¸é if handle ~= 0 and handle ~= nil then -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- ÇØ´ç ¼Òȯ¼öÀÇ À̸§, LvÀ» ÅØ½ºÆ®·Î ±¸¼º text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) --##³¡ #@creature_name@# Lv #@creature_level@# -- ¼Òȯ¼ö À̸§À» ¸Þ´º¿¡ Ãß°¡ command = 'Creature_Care_Rondoh( ' .. handle .. ' )' dlg_menu( text, command ) end end dlg_menu( "@90010002", '' ) dlg_show() end --ºÐÈ­µÈ °ü¸®¸Þ´º function Creature_Care_Rondoh( handle ) local lv, text, text2, HP, MaxHP, MP, MaxMP, SP, MaxSP local Stemp_H, Stemp_M, Stemp_S local cost_R, cost_A, cost_H, cost_M, cost_S, cost_T dlg_title( "@90600101" ) -- Å©¸®Ã³ »óÅÂ
Å©¸®Ã³À̸§ LvXX lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- »óÅ ¾ò¾î ¿À±â HP, MP, SP HP = get_creature_value( handle, "hp" ) MaxHP = get_creature_value( handle, "max_hp" ) MP = get_creature_value( handle, "mp" ) MaxMP = get_creature_value( handle, "max_mp" ) --##½ÃÀÛ -- »óÅ ǥ½ÃÇϱâ Stemp_H = math.floor( HP / MaxHP * 100 ) Stemp_M = math.floor( MP / MaxMP * 100 ) -- HP °¡ 0 ÀÌ¸é »ç¸ÁÀ¸·Î Ç¥½Ã ¾Æ´Ï¸é %·Î ÇöÀç»óÅ ǥ½Ã if HP == 0 then text2 = sconv("@90010019" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##
HP #@creature_HP@#/#@creature_MaxHP@# »ç¸Á
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % elseif HP ~= 0 then text2 = sconv("@90010018" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@percent_HP@#", tostring(Stemp_H),"#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##³¡
HP #@creature_HP@#/#@creature_MaxHP@# #@percent_HP@# %
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % end -- ÅØ½ºÆ® â ±¸¼º -> ¼±ÅÃÇÑ Å©¸®Ã³
À̸§ LV HP MP SP dlg_text_without_quest_menu( text2 ) -- Ä¡·áºñ °è»ê (100 - ÇöÀç%) * ±Ý¾×»ó¼ö * (·¹º§ + ·¹º§º¸Á¤) / ±â¿ï±â * Ä¡·áÁ¾¸ñ»ó¼ö -- ÇöÀç% °¡ 0 ÀÏ °æ¿ì nilÀ̶ó°í ¿¡·¯³². ±×·¡¼­ Ã¼Å©ÇØ¼­ nilÀÏ °æ¿ì º»·¡ ÀǵµÇÑ °ªÀÎ -- 100À¸·Î ±×³É ¼ö½Ä¿¡ ¹Ú¾Æ ³ÖÀ½. if Stemp_H == nil then cost_H = math.floor( 100 * 1 * (lv + 4) / 10 * 1 ) else cost_H = math.floor( (100 - Stemp_H) * 1 * (lv + 4) / 10 * 1 ) end if Stemp_M == nil then cost_M = math.floor( 100 * 1 * (lv + 4) / 10 * 3 ) else cost_M = math.floor( (100 - Stemp_M) * 1 * (lv + 4) / 10 * 3 ) end cost_A = cost_H + cost_M -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°ÝÀº HP30% ³ôÀÌ´Â °ªÀ» Æ÷ÇÔÇØ¾ßÇÔ) cost_R = math.floor( (100) * 1 * (lv + 4) / 10 * 3 ) -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°Ý) cost_T = cost_R + math.floor( (30) * 1 * (lv + 4) / 10 * 1 ) --##½ÃÀÛ -- HP °¡ 0 À̸é 30% ºÎȰ°ú ¿ÏÀü ºÎȰ ¸Þ´º if HP == 0 then text = sconv("@90010023", "#@cost@#", tostring(cost_T) ) --## ºÎȰ (HP30%ȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_RecoverEx_HP_Rondoh(' .. handle .. ',' .. cost_T .. ',' .. 30 .. ')' ) text = sconv("@90010033", "#@cost@#", tostring(cost_R + cost_A) ) --## ºÎȰ (HP30%ȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Rondoh(' .. handle .. ',' .. ( cost_R + cost_A ) .. ')' ) -- HP °¡ 0 ÀÌ ¾Æ´Ï¸é ¿ÏÀüÄ¡ ¾ÊÀº °Íµé Á¾·ùº°·Î Ã¼Å©ÇØ¼­ ¸Þ´º·Î ¶ç¿ò elseif HP ~= 0 then if HP < MaxHP or MP < MaxMP then text = sconv("@90010024", "#@cost@#", tostring( cost_A ) ) --##¸ðµÎ ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Rondoh(' .. handle .. ',' .. cost_A .. ')' ) end if HP > 0 and HP < MaxHP then text = sconv("@90010025", "#@cost@#", tostring( cost_H ) ) --## HP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_HP_Rondoh(' .. handle .. ',' .. cost_H .. ')' ) end if MP >= 0 and MP < MaxMP then text = sconv("@90010026", "#@cost@#", tostring( cost_M ) ) --##³¡ MP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_MP_Rondoh(' .. handle .. ',' .. cost_M .. ')' ) end end dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010001", '' ) dlg_show() end -- Á¤ÇØÁø ºñÀ² ¸¸Å­¸¸ HP¸¦ Ä¡·áÇÏ´Â ÇÔ¼ö ( ÇÚµé, °¡°Ý, Ä¡·áÇÒºñÀ²) function Creature_Care_RecoverEx_HP_Rondoh( handle, cost, ratio ) local Max_HP, Target_HP, temp, HP Max_HP = get_creature_value( handle, "max_hp" ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â Target_HP = math.floor(Max_HP * ratio / 100) set_creature_value( handle, "hp", Target_HP ) message( "@90010031" ) end function Creature_Care_Recover_HP_Rondoh( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) message( "@90010031" ) end function Creature_Care_Recover_MP_Rondoh( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) message( "@90010031" ) end function Creature_Care_Recover_SP_Rondoh( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ --sp°ü·ÃÁÖ¼®Ã³¸® set_value( "gold", gold - cost ) -- Ä¡·á½ÃÄÑ ÁÖ±â --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end function Creature_Care_Recover_ALL_Rondoh( handle, cost ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90600101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Rondoh()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end --============================================================ -- <<<<<< ½ÃÅ©·çÆ® Ãø NPC >>>>>> --============================================================ function NPC_CreatureSetup_Secroute_contact() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title( "@90700101" ) if is_premium() then dlg_text_without_quest_menu( "@90700102" ) -- ±¹°¡ ÄÚµå Àоî¿È local state_code = get_local_info() -- ¾ò¾î¿Â ±¹°¡ Äڵ尡 Çѱ¹(1)À̶ó¸é if state_code == 1 or state_code == 2 then -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) -- Å©¸®Ã³ °¢ÀÎġȯ dlg_menu( "@90010146", 'Creature_name_change_Menu()' ) else -- Å©¸®Ã³ ÁøÈ­ ¸Þ´º dlg_menu( "@90010064", 'NPC_Creature_Evolution_Menu()' ) -- Å©¸®Ã³ °ü¸® ¸Þ´º Ãâ·Â dlg_menu( "@90010032", 'Creature_Management_Deva()' ) dlg_menu( '<#FF0000>'.."ÊØæíÑ ÇáãÑÇÝÞ", "Anmra_Super_Evolve()" ) -- Anmra Edit dlg_menu( '<#FF0000>'.."ÎÝÖ ãÓÊæì ÇáãÑÇÝÞ", "Hlp_Fix()" ) -- Anmra Edit -- Å©¸®Ã³ ½ºÅ³ ÃʱâÈ­. ´ëÃæ ±â´É Ãß°¡ÇسõÀº °ÍÀ̹ǷΠÃßÈÄ ÅØ½ºÆ®ID È®ÀÎ -- dlg_menu( "@90100124", 'reset_Creature_skill()' ) end else dlg_text_without_quest_menu( "@90700118" ) end -- ?????? ??????? ????? --dlg_menu("@90800054", "open_market( 'Custom_Shop_Empry_CC' )") dlg_menu( "@90010001", '' ) dlg_show() end --=========================================================== -- Å©¸®Ã³ °ü¸® ¸Þ´º ´ëÈ­ »óÀÚ - ½ÃÅ©·çÆ® --=========================================================== function Creature_Management_Secroute() if is_premium() == false then return false end dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90700108" ) local i, handle, lv, text, command, temp_txt -- 0¹ø¿¡¼­ 5¹ø ½½·Ô±îÁö ÈȾ¸é¼­ ¸Þ´º¿¡ Ãß°¡ for i = 0, 5 do -- ÇÚµé ÃʱâÈ­ handle = 0 -- ÀåÂøÇÑ ¼Òȯ¼ö ÇÚµé ¾ò¾î¿È handle = get_creature_handle( i ) -- ¸¸¾à ÀåÂøµÇ¾î ÀÖ´Ù¸é if handle ~= 0 and handle ~= nil then -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- ÇØ´ç ¼Òȯ¼öÀÇ À̸§, LvÀ» ÅØ½ºÆ®·Î ±¸¼º text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) --##³¡ #@creature_name@# Lv #@creature_level@# -- ¼Òȯ¼ö À̸§À» ¸Þ´º¿¡ Ãß°¡ command = 'Creature_Care_Secroute( ' .. handle .. ' )' dlg_menu( text, command ) end end dlg_menu( "@90010002", '' ) dlg_show() end --ºÐÈ­µÈ °ü¸®¸Þ´º function Creature_Care_Secroute( handle ) local lv, text, text2, HP, MaxHP, MP, MaxMP, SP, MaxSP local Stemp_H, Stemp_M, Stemp_S local cost_R, cost_A, cost_H, cost_M, cost_S, cost_T -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if is_premium() == false then return false end dlg_title( "@90700101" ) -- Å©¸®Ã³ »óÅÂ
Å©¸®Ã³À̸§ LvXX lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- »óÅ ¾ò¾î ¿À±â HP, MP, SP HP = get_creature_value( handle, "hp" ) MaxHP = get_creature_value( handle, "max_hp" ) MP = get_creature_value( handle, "mp" ) MaxMP = get_creature_value( handle, "max_mp" ) --##½ÃÀÛ -- »óÅ ǥ½ÃÇϱâ Stemp_H = math.floor( HP / MaxHP * 100 ) Stemp_M = math.floor( MP / MaxMP * 100 ) -- HP °¡ 0 ÀÌ¸é »ç¸ÁÀ¸·Î Ç¥½Ã ¾Æ´Ï¸é %·Î ÇöÀç»óÅ ǥ½Ã if HP == 0 then text2 = sconv("@90010019" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##
HP #@creature_HP@#/#@creature_MaxHP@# »ç¸Á
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % elseif HP ~= 0 then text2 = sconv("@90010018" ,"#@creature_name@#",get_creature_value( handle, "name" ) ,"#@creature_level@#",tostring(lv), "#@creature_HP@#",tostring(HP),"#@creature_MaxHP@#",tostring(MaxHP), "#@percent_HP@#", tostring(Stemp_H),"#@creature_MP@#",tostring(MP),"#@creature_MaxMP@#",tostring(MaxMP), "#@percent_MP@#",tostring(Stemp_M) ) --##³¡
HP #@creature_HP@#/#@creature_MaxHP@# #@percent_HP@# %
MP#@creature_MP@# / #@creature_MaxMP@# #@percent_MP@# % end -- ÅØ½ºÆ® â ±¸¼º -> ¼±ÅÃÇÑ Å©¸®Ã³
À̸§ LV HP MP SP dlg_text_without_quest_menu( text2 ) -- Ä¡·áºñ °è»ê (100 - ÇöÀç%) * ±Ý¾×»ó¼ö * (·¹º§ + ·¹º§º¸Á¤) / ±â¿ï±â * Ä¡·áÁ¾¸ñ»ó¼ö -- ÇöÀç% °¡ 0 ÀÏ °æ¿ì nilÀ̶ó°í ¿¡·¯³². ±×·¡¼­ Ã¼Å©ÇØ¼­ nilÀÏ °æ¿ì º»·¡ ÀǵµÇÑ °ªÀÎ -- 100À¸·Î ±×³É ¼ö½Ä¿¡ ¹Ú¾Æ ³ÖÀ½. if Stemp_H == nil then cost_H = math.floor( 100 * 0.85 * (lv + 4) / 10 * 1 ) else cost_H = math.floor( (100 - Stemp_H) * 0.85 * (lv + 4) / 10 * 1 ) end if Stemp_M == nil then cost_M = math.floor( 100 * 0.85 * (lv + 4) / 10 * 3 ) else cost_M = math.floor( (100 - Stemp_M) * 0.85 * (lv + 4) / 10 * 3 ) end cost_A = cost_H + cost_M -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°ÝÀº HP30% ³ôÀÌ´Â °ªÀ» Æ÷ÇÔÇØ¾ßÇÔ) cost_R = math.floor( (100) * 0.85 * (lv + 4) / 10 * 3 ) -- ÃÖ¼Ò ºÎȰ °¡°Ý(ÃÖÁ¾°¡°Ý) cost_T = cost_R + math.floor( (30) * 0.85 * (lv + 4) / 10 * 1 ) --##½ÃÀÛ -- HP °¡ 0 À̸é 30% ºÎȰ°ú ¿ÏÀü ºÎȰ ¸Þ´º if HP == 0 then text = sconv("@90010023", "#@cost@#", tostring(cost_T) ) --## ºÎȰ (HP30%ȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_RecoverEx_HP_Secroute(' .. handle .. ',' .. cost_T .. ',' .. 30 .. ')' ) text = sconv("@90010033", "#@cost@#", tostring(cost_R + cost_A) ) --## ºÎȰ (HP30%ȸº¹) #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Secroute(' .. handle .. ',' .. ( cost_R + cost_A ) .. ')' ) -- HP °¡ 0 ÀÌ ¾Æ´Ï¸é ¿ÏÀüÄ¡ ¾ÊÀº °Íµé Á¾·ùº°·Î Ã¼Å©ÇØ¼­ ¸Þ´º·Î ¶ç¿ò elseif HP ~= 0 then if HP < MaxHP or MP < MaxMP then text = sconv("@90010024", "#@cost@#", tostring( cost_A ) ) --##¸ðµÎ ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_ALL_Secroute(' .. handle .. ',' .. cost_A .. ')' ) end if HP > 0 and HP < MaxHP then text = sconv("@90010025", "#@cost@#", tostring( cost_H ) ) --## HP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_HP_Secroute(' .. handle .. ',' .. cost_H .. ')' ) end if MP >= 0 and MP < MaxMP then text = sconv("@90010026", "#@cost@#", tostring( cost_M ) ) --##³¡ MP ȸº¹ #@cost@#RP dlg_menu( text, 'Creature_Care_Recover_MP_Secroute(' .. handle .. ',' .. cost_M .. ')' ) end end dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010001", '' ) dlg_show() end -- Á¤ÇØÁø ºñÀ² ¸¸Å­¸¸ HP¸¦ Ä¡·áÇÏ´Â ÇÔ¼ö ( ÇÚµé, °¡°Ý, Ä¡·áÇÒºñÀ²) function Creature_Care_RecoverEx_HP_Secroute( handle, cost, ratio ) -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if is_premium() == false then return false end local Max_HP, Target_HP, temp, HP Max_HP = get_creature_value( handle, "max_hp" ) -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â Target_HP = math.floor(Max_HP * ratio / 100) set_creature_value( handle, "hp", Target_HP ) message( "@90010031" ) end function Creature_Care_Recover_HP_Secroute( handle, cost ) -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if is_premium() == false then return false end -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) message( "@90010031" ) end function Creature_Care_Recover_MP_Secroute( handle, cost ) -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if is_premium() == false then return false end -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) message( "@90010031" ) end function Creature_Care_Recover_SP_Secroute( handle, cost ) -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if is_premium() == false then return false end -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ --sp°ü·ÃÁÖ¼®Ã³¸® set_value( "gold", gold - cost ) -- Ä¡·á½ÃÄÑ ÁÖ±â --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end function Creature_Care_Recover_ALL_Secroute( handle, cost ) -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if is_premium() == false then return false end -- ÇöÀç µ· ¾ò¾î¿È local gold = get_value( "gold" ) -- µ· ¸ðÀÚ¶ó¸é KIN if gold < cost then dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010005" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() return end dlg_title( "@90700101" ) dlg_text_without_quest_menu( "@90010031" ) dlg_menu( "@90010003", 'Creature_Management_Secroute()' ) dlg_menu( "@90010002", '' ) dlg_show() -- Ä¡·áºñ¿ë Â÷°¨ set_value( "gold", gold - cost ) update_gold_chaos() -- Ä¡·á½ÃÄÑ ÁÖ±â set_creature_value( handle, "hp", get_creature_value( handle, "max_hp" ) ) set_creature_value( handle, "mp", get_creature_value( handle, "max_mp" ) ) --sp°ü·ÃÁÖ¼®Ã³¸® set_creature_value( handle, "sp", get_creature_value( handle, "max_sp" ) ) message( "@90010031" ) end --========================================================= -- Á¾Á· °øÅë ÇÔ¼ö --========================================================= -- Å©¸®Ã³ ÁøÈ­¿¡ ´ëÇÑ ¼³¸í function NPC_Description_Of_Evolution() --NPC ID¸¦ ¹Þ¾Æ¿Â´Ù. local npc_id = get_npc_id() -- °¢ Á¾Á·¿¡ µû¶ó À̸§ Ãâ·Â -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_title("@90400100") -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100100") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200100") -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600100") -- µµ½Ã À¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_title("@90702900") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_title("@90700100") end -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_text_without_quest_menu("@90400112") -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_text_without_quest_menu("@90100112") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_text_without_quest_menu("@90200112") -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_text_without_quest_menu("@90600112") -- µµ½Ã À¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_text_without_quest_menu("@90702912") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_text_without_quest_menu("@90700112") end -- ´ëÈ­ Á¾·á dlg_menu( "@90010002", "" ) dlg_show() end --========================================================================== -- Å©¸®Ã³ ÁøÈ­ ½Ã۱â --========================================================================== function NPC_Creature_Evolution_Menu() local npc_id, evolution_1_level, evolution_2_level --NPC ID¸¦ ¹Þ¾Æ¿Â´Ù. npc_id = get_npc_id() -- °¢ Á¾Á·¿¡ µû¶ó NPC À̸§ Ãâ·Â -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_title("@90400100") -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100100") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200100") -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600100") -- µµ½ÃÀ¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_title("@90702900") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then if is_premium() == false then return false end dlg_title("@90700100") end -- ÁøÈ­ °¡´ÉÇÑ Å©¸®Ã³¸¦ °¡Áö°í ÀÖÀ» ¶§ÀÇ ´ë»ç.(±âº»ÀûÀ¸·Î ÁøÈ­ °¡´ÉÇÑ Å©¸®Ã³°¡ ÀÖ´Ù°í °¡Á¤ÇÏ°í ´ë»ç¸¦ ±¸¼ºÇÑ µÚ -- ÁøÈ­ °¡´ÉÇÑ Å©¸®Ã³°¡ ¾øÀ» °æ¿ì ¾Æ·¡¿¡¼­ µ¤¾î¾´´Ù. -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_text_without_quest_menu("@90400113") -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_text_without_quest_menu("@90100113") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_text_without_quest_menu("@90200113") -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_text_without_quest_menu("@90600113") -- µµ½Ã À¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_text_without_quest_menu("@90702913") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_text_without_quest_menu("@90700113") end -- 1Â÷ ÁøÈ­(±âº»Çü -> ¼ºÀåÇü) °¡´É ·¹º§Àº 50·¹º§ ÀÌ»ó evolution_1_level = 50 -- 2Â÷ ÁøÈ­(¼ºÀåÇü -> ÁøÈ­Çü) °¡´É ·¹º§Àº 100·¹º§ ÀÌ»ó evolution_2_level = 100 local i, handle, lv, text, command, bEvolutionable, NumberOfEvolutionableCreature, creature_evolution_depth -- ÁøÈ­ °¡´É Å©¸®Ã³ÀÇ ¼ö. NumberOfEvolutionableCreature = 0 -- 0¹ø¿¡¼­ 5¹ø ½½·Ô±îÁö ÈȾ¸é¼­ ÁøÈ­ °¡´ÉÇÑ ¼Òȯ¼ö¸¦ ¸Þ´º¿¡ Ãß°¡ for i = 0, 5 do -- ÇÚµé ÃʱâÈ­ handle = 0 -- ÀåÂøÇÑ ¼Òȯ¼ö ÇÚµé ¾ò¾î¿È handle = get_creature_handle( i ) -- ÁøÈ­ °¡´É Ç÷¡±× ÃʱâÈ­ bEvolutionable = 0 -- ¸¸¾à ÀåÂøµÇ¾î ÀÖ´Ù¸é if handle ~= 0 and handle ~= nil then -- ¼Òȯ¼öÀÇ ÁøÈ­ÇüÅÂ. creature_evolution_depth = get_creature_value( handle, "evolution_depth" ) -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) -- ±âº»ÇüÀÏ ¶§, if creature_evolution_depth == 1 then -- Å©¸®Ã³ÀÇ ·¹º§ÀÌ ÁøÈ­ °¡´É ·¹º§ ÀÌ»óÀ̸é. if lv >= evolution_1_level then bEvolutionable = 1 end -- ¼ºÀåÇü ÀÏ ¶§, elseif creature_evolution_depth == 2 then -- Å©¸®Ã³ÀÇ ·¹º§ÀÌ ÁøÈ­ °¡´É ·¹º§ ÀÌ»óÀ̸é. if lv >= evolution_2_level then bEvolutionable = 1 end -- ÁøÈ­ÇüÀÏ ¶§. else bEvolutionable = 0 end -- ÁøÈ­ °¡´ÉÇϸé ÇØ´ç ¼Òȯ¼öÀÇ À̸§, LvÀ» ÅØ½ºÆ®·Î ±¸¼º if bEvolutionable == 1 then text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) -- ¼Òȯ¼ö À̸§À» ¸Þ´º¿¡ Ãß°¡ command = 'Creature_Evolution_sub( ' .. handle .. ' )' dlg_menu( text, command ) -- ÁøÈ­ °¡´É ¼Òȯ¼ö Ä«¿îÆ® Áõ°¡ NumberOfEvolutionableCreature = NumberOfEvolutionableCreature + 1 end end end -- ÁøÈ­ °¡´ÉÇÑ Å©¸®Ã³°¡ ¾øÀ» ¶§ÀÇ ´ë»ç. if NumberOfEvolutionableCreature ==0 then -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_text_without_quest_menu("@90400114") -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_text_without_quest_menu("@90100114") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_text_without_quest_menu("@90200114") -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_text_without_quest_menu("@90600114") -- µµ½Ã À¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_text_without_quest_menu("@90702914") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_text_without_quest_menu("@90700114") end end -- ´ëÈ­ Á¾·á dlg_menu( "@90010002", "" ) dlg_show() end function Creature_Evolution_sub( handle ) local npc_id, summon_state, temp_text -- NPC ID¸¦ ¹Þ¾Æ¿Â´Ù. npc_id = get_npc_id() -- Å©¸®Ã³ÀÇ ¼Òȯ »óŸ¦ ¹Þ¾Æ ¿Â´Ù. summon_state = get_creature_value( handle, "summon_state" ) -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) -- NPC À̸§ Ãâ·Â -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_title("@90400100") -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100100") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200100") -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600100") -- µµ½Ã À¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_title("@90702900") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_title("@90700100") end -- start of "¼Òȯ »óÅ¿¡ µû¸¥ ´ë»ç Ãâ·Â" -- ´ë»ó Å©¸®Ã³°¡ ¿ª¼Òȯ »óÅÂÀÏ °æ¿ì, ´ë»ó Å©¸®Ã³°¡ ÁøÈ­ ½Ãų Å©¸®Ã³°¡ ¸Â´ÂÁö Çѹø ´õ È®ÀÎÇÏ´Â ´ë»ç. if summon_state == 0 then -- ´ë»ç¿¡ Áý¾î ³ÖÀ» Å©¸®Ã³ À̸§ ¼¼ÆÃ text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) -- start of "Á¾Á·¿¡ µû¸¥ NPC ´ë»ç" -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then temp_text = sconv("@90400116", "#@creature_name@#", text) dlg_text_without_quest_menu(temp_text) -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then temp_text = sconv("@90100116", "#@creature_name@#", text) dlg_text_without_quest_menu(temp_text) -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then temp_text = sconv("@90200116", "#@creature_name@#", text) dlg_text_without_quest_menu(temp_text) -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then temp_text = sconv("@90600116", "#@creature_name@#", text) dlg_text_without_quest_menu(temp_text) -- µµ½Ã À¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 7029 then temp_text = sconv("@90702916", "#@creature_name@#", text) dlg_text_without_quest_menu(temp_text) -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then temp_text = sconv("@90700116", "#@creature_name@#", text) dlg_text_without_quest_menu(temp_text) end -- end of "Á¾Á·¿¡ µû¸¥ NPC ´ë»ç" -- ÇÚµéÀ» Æ÷ÇÔÇÑ Å©¸®Ã³ ÁøÈ­ ÇÔ¼ö. (¼­¹ö¿¡¼­ Á¦°øÇÏ´Â ±â´É) command = 'Creature_Evolution_exe( ' .. handle .. ' )' -- Å©¸®Ã³ ÁøÈ­ (½ÇÇà) ¸Þ´º. dlg_menu( "@90010064", command ) -- ´ë»ó Å©¸®Ã³°¡ ¼ÒȯµÈ »óÅÂÀÏ °æ¿ì. ÁøÈ­ ´ë»ó Å©¸®Ã³¸¦ ¿ª¼Òȯ ½ÃÄÑ¾ß µÈ´Ù´Â ´ë»ç Ãâ·Â. else -- start of "Á¾Á·¿¡ µû¸¥ NPC ´ë»ç" -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_text_without_quest_menu("@90400115") -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_text_without_quest_menu("@90100115") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_text_without_quest_menu("@90200115") -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_text_without_quest_menu("@90600115") -- µµ½Ã À¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 7029 then dlg_text_without_quest_menu("@90702915") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_text_without_quest_menu("@90700115") end -- end of "Á¾Á·¿¡ µû¸¥ NPC ´ë»ç" end -- end of "¼Òȯ »óÅ¿¡ µû¸¥ ´ë»ç Ãâ·Â" -- µ¹¾Æ°¡±â ¸Þ´º dlg_menu( "@90010003", "NPC_Creature_Evolution_Menu()" ) -- ´ëÈ­ Á¾·á. dlg_menu( "@90010002", "" ) dlg_show() end function Creature_Evolution_exe( handle ) local npc_id, creature_evolution_depth, lv, id, temp -- ¼Òȯ¼öÀÇ ÁøÈ­ÇüŸ¦ ¹Þ¾Æ¿È. creature_evolution_depth = get_creature_value( handle, "evolution_depth" ) -- ¼Òȯ¼öÀÇ ID ¾ò¾î¿È. id = get_creature_value( handle, "job" ) -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) -- ÁøÈ­ ÇüÅ¿¡ µû¶ó ÀÌÀü ÇüÅÂÀÇ ID ¹× ·¹º§ ÀúÀå. -- ±âº»Çü ÀÏ ¶§. if creature_evolution_depth == 1 then set_creature_value(handle, "ev_1_ID", id) set_creature_value(handle, "ev_1_level", lv) -- ¼ºÀåÇü ÀÏ ¶§. elseif creature_evolution_depth == 2 then set_creature_value(handle, "ev_2_ID", id) set_creature_value(handle, "ev_2_level", lv) -- ¿©±â±îÁö ³Ñ¾î ¿À¸é ¹º°¡ ÀÌ»óÇÑ »óÅÂ. else temp = "Error:CS1497:" .. handle ..":".. id ..":".. creature_evolution_depth ..":".. lv message( temp ) end -- Å©¸®Ã³¸¦ ÁøÈ­ ½ÃŲ´Ù. creature_evolution(handle) -- ¼Òȯ¼öÀÇ ÁøÈ­ÇüÅ¿¡ µû¶ó ÀÌÀü -- NPC ID¸¦ ¹Þ¾Æ¿Â´Ù. npc_id = get_npc_id() -- NPC À̸§ Ãâ·Â -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_title("@90400100") -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100100") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200100") -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600100") -- µµ½Ã À¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 7029 then dlg_title("@90702900") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_title("@90700100") end -- start of "Á¾Á·¿¡ µû¸¥ NPC ´ë»ç" -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_text_without_quest_menu("@90400117") -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_text_without_quest_menu("@90100117") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_text_without_quest_menu("@90200117") -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_text_without_quest_menu("@90600117") -- µµ½Ã À¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 7029 then dlg_text_without_quest_menu("@90702917") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_text_without_quest_menu("@90700117") end -- end of "Á¾Á·¿¡ µû¸¥ NPC ´ë»ç" -- ´ëÈ­ Á¾·á. dlg_menu( "@90010002", "" ) dlg_show() end --=========================================================== -- Å©¸®Ã³ °¢ÀÎġȯ ´ëÈ­ »óÀÚ - --=========================================================== function Creature_name_change_Menu() local npc_id, i, handle, lv, text, command, gold, name_change_gold -- npc id ¾ò¾î¿È npc_id = get_npc_id() -- NPC À̸§ Ãâ·Â -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_title("@90400101") dlg_text_without_quest_menu( "@90100120" ) -- °¢ÀÎġȯ ¼³¸í -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100101") dlg_text_without_quest_menu( "@90100120" ) -- °¢ÀÎġȯ ¼³¸í -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200101") dlg_text_without_quest_menu( "@90100120" ) -- °¢ÀÎġȯ ¼³¸í -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600101") dlg_text_without_quest_menu( "@90100120" ) -- °¢ÀÎġȯ ¼³¸í -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_title("@90700101") dlg_text_without_quest_menu( "@90100120" ) -- °¢ÀÎġȯ ¼³¸í -- µµ½ÃÀ¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_title("@90702901") dlg_text_without_quest_menu( "@90100120" ) -- °¢ÀÎġȯ ¼³¸í end -- 0¹ø¿¡¼­ 5¹ø ½½·Ô±îÁö ÈȾ¸é¼­ ¸Þ´º¿¡ Ãß°¡ for i = 0, 5 do -- ÇÚµé ÃʱâÈ­ handle = 0 -- ÀåÂøÇÑ ¼Òȯ¼ö ÇÚµé ¾ò¾î¿È handle = get_creature_handle( i ) -- ¸¸¾à ÀåÂøµÇ¾î ÀÖ´Ù¸é if handle ~= 0 and handle ~= nil then -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) -- ¼Òȯ¼ö °¢ÀÎġȯ °¡°Ý name_change_gold = lv * 1000 --##½ÃÀÛ -- ÇØ´ç ¼Òȯ¼öÀÇ Á¾Á·, Lv, °¡°ÝÀ» ÅØ½ºÆ®·Î ±¸¼º text = sconv("@90010147", "#@creature_name@#", "@"..tostring(get_creature_name_id( handle )), "#@creature_level@#",tostring(lv), "#@name_change_gold@#", tostring(name_change_gold)) --##³¡ #@creature_name@# Lv #@creature_level@# -- ¼Òȯ¼ö À̸§À» ¹Ù²Þ command = 'Creature_name_change_gold( ' .. handle .. ' )' dlg_menu( text, command ) end end dlg_menu( "@90010003", 'NPC_CreatureSetup_Deva_contact()' ) dlg_menu( "@90010002", '' ) dlg_show() end -- ¼ÒÁö±Ý È®ÀÎ ÈÄ °¢ÀÎġȯ ½Ã½ºÅÛ ¹Ú½º ¶ç¿ò. function Creature_name_change_gold(handle) local npc_id, lv, gold, name_change_gold -- npc id ¾ò¾î¿È npc_id = get_npc_id() -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ¾ò¾î¿È gold = get_value( "gold" ) -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) -- ¼Òȯ¼ö °¢ÀÎġȯ °¡°Ý name_change_gold = lv * 1000 if gold >= name_change_gold then creature_name_change_box(handle) else -- NPC À̸§ Ãâ·Â -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_title("@90400101") dlg_text_without_quest_menu( "@90010005" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100101") dlg_text_without_quest_menu( "@90010005" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200101") dlg_text_without_quest_menu( "@90010005" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600101") dlg_text_without_quest_menu( "@90010005" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_title("@90700101") dlg_text_without_quest_menu( "@90010005" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- µµ½ÃÀ¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_title("@90702901") dlg_text_without_quest_menu( "@90010005" ) -- µ·ÀÌ ¸ðÀÚ¶÷ end end dlg_menu( "@90010002", '' ) dlg_show() end --Å©¸®Ã³ À̸§ ¹Ù²Ù±â ¼º°ø ÇÑ µÚ ÀúÀå function change_summon_name( handle, new_Creature_name) local lv, gold, name_change_gold -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý Àоî¿È gold = get_value( "gold" ) -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) -- ¼Òȯ¼ö °¢ÀÎġȯ °¡°Ý name_change_gold = lv * 1000 -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ÀúÀå set_value( "gold", gold - name_change_gold ) update_gold_chaos() -- À̸§ º¯°æµÈ Å©¸®Ã³ ÀúÀåÇÔ change_creature_name( handle, new_Creature_name ) end --=========================================================== -- Å©¸®Ã³ ½ºÅ³ ÃʱâÈ­ ´ëÈ­ »óÀÚ. --=========================================================== -- ÇöÀç ±â´É ¸·¾ÆµÒ function reset_Creature_skill() local npc_id, i, handle, lv, text, command, temp_txt -- npc id ¾ò¾î¿È npc_id = get_npc_id() -- NPC À̸§ Ãâ·Â -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_title("@90400101") dlg_text_without_quest_menu( "@90100125" ) -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100101") dlg_text_without_quest_menu( "@90100125" ) -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200101") dlg_text_without_quest_menu( "@90100125" ) -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600101") dlg_text_without_quest_menu( "@90100125" ) -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_title("@90700101") dlg_text_without_quest_menu( "@90100125" ) -- µµ½ÃÀ¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_title("@90702901") dlg_text_without_quest_menu( "@90100125" ) end -- 0¹ø¿¡¼­ 5¹ø ½½·Ô±îÁö ÈȾ¸é¼­ ¸Þ´º¿¡ Ãß°¡ for i = 0, 5 do -- ÇÚµé ÃʱâÈ­ handle = 0 -- ÀåÂøÇÑ ¼Òȯ¼ö ÇÚµé ¾ò¾î¿È handle = get_creature_handle( i ) -- ¸¸¾à ÀåÂøµÇ¾î ÀÖ´Ù¸é if handle ~= 0 and handle ~= nil then -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) --##½ÃÀÛ -- ÇØ´ç ¼Òȯ¼öÀÇ À̸§, LvÀ» ÅØ½ºÆ®·Î ±¸¼º text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) --##³¡ #@creature_name@# Lv #@creature_level@# -- ¼Òȯ¼ö À̸§À» ¸Þ´º¿¡ Ãß°¡ command = 'question_skill_reset( ' .. handle .. ' )' dlg_menu( text, command ) end end dlg_menu( "@90010002", '' ) dlg_show() end -- Å©¸®Ã³ ½ºÅ³ ÃʱâÈ­ÇÒ °ÍÀÎÁö ¹®ÀÇ function question_skill_reset(handle) local npc_id, lv, gold, skill_reset_gold -- npc id ¾ò¾î¿È npc_id = get_npc_id() -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ¾ò¾î¿È gold = get_value( "gold" ) -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) -- ¼Òȯ¼ö ½ºÅ³ Ãë¼Ò °¡°Ý skill_reset_gold = lv * 5000 if npc_id == 4001 then dlg_title("@90400101") text = sconv("@90100127", "#@skill_reset_gold_text@#",tostring( skill_reset_gold )) -- ½ºÅ³ ÃʱâÈ­¿¡´Â xx ·çÇǰ¡ ÇÊ¿äÇÔ. dlg_text_without_quest_menu(text) -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100101") text = sconv("@90100127", "#@skill_reset_gold_text@#",tostring( skill_reset_gold )) -- ½ºÅ³ ÃʱâÈ­¿¡´Â xx ·çÇǰ¡ ÇÊ¿äÇÔ. dlg_text_without_quest_menu(text) -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200101") text = sconv("@90100127", "#@skill_reset_gold_text@#",tostring( skill_reset_gold )) -- ½ºÅ³ ÃʱâÈ­¿¡´Â xx ·çÇǰ¡ ÇÊ¿äÇÔ. dlg_text_without_quest_menu(text) -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600101") text = sconv("@90100127", "#@skill_reset_gold_text@#",tostring( skill_reset_gold )) -- ½ºÅ³ ÃʱâÈ­¿¡´Â xx ·çÇǰ¡ ÇÊ¿äÇÔ. dlg_text_without_quest_menu(text) -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_title("@90700101") text = sconv("@90100127", "#@skill_reset_gold_text@#",tostring( skill_reset_gold )) -- ½ºÅ³ ÃʱâÈ­¿¡´Â xx ·çÇǰ¡ ÇÊ¿äÇÔ. dlg_text_without_quest_menu(text) -- µµ½ÃÀ¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_title("@90702901") text = sconv("@90100127", "#@skill_reset_gold_text@#",tostring( skill_reset_gold )) -- ½ºÅ³ ÃʱâÈ­¿¡´Â xx ·çÇǰ¡ ÇÊ¿äÇÔ. dlg_text_without_quest_menu(text) end dlg_menu( "@90010016", 'Creature_skill_reset_success('..handle..')' ) dlg_menu( "@90010001", 'reset_Creature_skill()' ) dlg_show() end -- Å©¸®Ã³ ½ºÅ³ ¸®¼Â ¼º°ø function Creature_skill_reset_success(handle) local npc_id, lv, gold, skill_reset_gold -- npc id ¾ò¾î¿È npc_id = get_npc_id() -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ¾ò¾î¿È gold = get_value( "gold" ) -- ¼Òȯ¼öÀÇ ·¹º§ ¾ò¾î¿È. lv = get_creature_value( handle, "level" ) -- ¼Òȯ¼ö ½ºÅ³ Ãë¼Ò °¡°Ý skill_reset_gold = lv * 5000 if gold >= skill_reset_gold then -- NPC À̸§ Ãâ·Â -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_title("@90400101") dlg_text_without_quest_menu( "@90100128" ) -- ¼º°øÇß½À´Ï´Ù. -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ÀúÀå set_value( "gold", gold - skill_reset_gold ) update_gold_chaos() -- Å©¸®Ã³ ½ºÅ³ Ãë¼Ò(!!!!!!!!!!!) reset_summon_skill( handle ) -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100101") dlg_text_without_quest_menu( "@90100128" ) -- ¼º°øÇß½À´Ï´Ù. -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ÀúÀå set_value( "gold", gold - skill_reset_gold ) update_gold_chaos() -- Å©¸®Ã³ ½ºÅ³ Ãë¼Ò(!!!!!!!!!!!) reset_summon_skill( handle ) -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200101") dlg_text_without_quest_menu( "@90100128" ) -- ¼º°øÇß½À´Ï´Ù. -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ÀúÀå set_value( "gold", gold - skill_reset_gold ) update_gold_chaos() -- Å©¸®Ã³ ½ºÅ³ Ãë¼Ò(!!!!!!!!!!!) reset_summon_skill( handle ) -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600101") dlg_text_without_quest_menu( "@90100128" ) -- ¼º°øÇß½À´Ï´Ù. -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ÀúÀå set_value( "gold", gold - skill_reset_gold ) update_gold_chaos() -- Å©¸®Ã³ ½ºÅ³ Ãë¼Ò(!!!!!!!!!!!) reset_summon_skill( handle ) -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_title("@90700101") dlg_text_without_quest_menu( "@90100128" ) -- ¼º°øÇß½À´Ï´Ù. -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ÀúÀå set_value( "gold", gold - skill_reset_gold ) update_gold_chaos() -- Å©¸®Ã³ ½ºÅ³ Ãë¼Ò(!!!!!!!!!!!) reset_summon_skill( handle ) -- µµ½ÃÀ¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_title("@90702901") dlg_text_without_quest_menu( "@90100128" ) -- ¼º°øÇß½À´Ï´Ù. -- Ç÷¹ÀÌ¾î ¼ÒÁö±Ý ÀúÀå set_value( "gold", gold - skill_reset_gold ) update_gold_chaos() -- Å©¸®Ã³ ½ºÅ³ Ãë¼Ò(!!!!!!!!!!!) reset_summon_skill( handle ) end else -- NPC À̸§ Ãâ·Â -- °¡ÀÌ¾Æ ÀÏ ¶§ (4001 Å×ÀÌ¸Ó ¾Ë·¹À̾Æ) if npc_id == 4001 then dlg_title("@90400101") dlg_text_without_quest_menu( "@90100126" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- µ¥¹Ù ÀÏ ¶§ (1001 Å×ÀÌ¸Ó ¾È´Ù¸®¿¤) elseif npc_id == 1001 then dlg_title("@90100101") dlg_text_without_quest_menu( "@90100126" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- ¾Æ¼ö¶ó ÀÏ ¶§ (2001 ¼­¸Ó³Ê ½´¹Ù³ªÃ÷) elseif npc_id == 2001 then dlg_title("@90200101") dlg_text_without_quest_menu( "@90100126" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- ·Ðµµ ÀÏ ¶§ (6001 Å×ÀÌ¸Ó ¸¶¸£½º) elseif npc_id == 6001 then dlg_title("@90600101") dlg_text_without_quest_menu( "@90100126" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7001 Å×ÀÌ¸Ó ³×º§) elseif npc_id == 7001 then dlg_title("@90700101") dlg_text_without_quest_menu( "@90100126" ) -- µ·ÀÌ ¸ðÀÚ¶÷ -- µµ½ÃÀ¯Àû ÀÏ ¶§ (7029 Å×ÀÌ¸Ó °Ô½º) elseif npc_id == 7029 then dlg_title("@90702901") dlg_text_without_quest_menu( "@90100126" ) -- µ·ÀÌ ¸ðÀÚ¶÷ end end dlg_menu( "@90010003", 'reset_Creature_skill()' ) dlg_menu( "@90010002", '' ) dlg_show() end function Anmra_Super_Evolve() dlg_title( "ÊØæíÑ ÇáãÑÇÝÞ ÇáãØæÑ") dlg_text( "åá ÊÓÊØíÚ ÊÒæÏí ÈÇáãÚáæãÇÊ ÇáãäÇÓÈÉ .¿ ßí ÇÓÊØíÚ ÊÞÏíã áß ÇÝÖá ÎÏãÉ" ) local handle, summon_state, lv, lv_diff, cost, gold, player_lv for i = 0, 5 do handle = 0 handle = get_creature_handle( i ) summon_state = get_creature_value( handle, "summon_state" ) lv = get_creature_value( handle, "level" ) player_lv = gv( "lv" ) lv_diff = player_lv - lv cost = lv_diff * 10000 gold = gv( "gold" ) if handle ~= 0 and handle ~= nil then if player_lv >= lv then if summon_state == 0 then text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) broke = 'No_Gold()' command = 'Anmra_Creature_Evo_Confirm( ' .. handle .. ' )' if lv <= player_lv then if gold >= cost then dlg_menu( text, command ) else dlg_menu( text, broke ) end end else text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) command = 'Anmra_Creature_Summoned()' dlg_menu( text, command ) end end end end dlg_menu( "ÚæÏÉ", 'NPC_CreatureSetup_Secroute_contact()' ) dlg_menu( "@90010001", '' ) dlg_show() end function Anmra_Creature_Evo_Confirm( handle ) local lv, lv_diff, cost, gold, player_lv lv = get_creature_value( handle, "level" ) player_lv = gv( "lv" ) lv_diff = player_lv - lv cost = lv_diff * 10000 gold = gv( "gold" ) text = sconv("ÓæÝ Êßæä ÇáÊßáÝÉ #@price@# ÐåÈÉ åá ÇäÊ ãÊÃßÏ ãä ßæäß ÊÑíÏ ÇáÅÓÊãÑÇÑ", "#@price@#",tostring(cost)) dlg_title("Confirm") dlg_text( text ) dlg_menu("ÊÃßíÏ", 'Anmra_Creature_Evo_Function( ' .. handle .. ' )') dlg_menu( "ÚæÏÉ", 'Anmra_Super_Evolve()' ) dlg_menu( "@90010001", '' ) dlg_show() end function Anmra_Creature_Evo_Function( handle ) local evolution_depth, id, lv, summon_state, player_lv, gold, lv_diff, cost, gold_post evolution_depth = get_creature_value( handle, "evolution_depth" ) id = get_creature_value( handle, "job" ) lv = get_creature_value( handle, "level" ) summon_state = get_creature_value( handle, "summon_state" ) player_lv = gv( "lv" ) gold = gv( "gold" ) lv_diff = player_lv - lv cost = lv_diff * 10000 gold_post = gold - cost if evolution_depth == 1 then learn_creature_all_skill() set_creature_value( handle, "ev_1_ID", id ) set_creature_value( handle, "ev_1_level", 60 ) creature_evolution( handle ) learn_creature_all_skill() set_creature_value( handle, "ev_2_ID", id ) set_creature_value( handle, "ev_2_level", 115 ) creature_evolution( handle ) learn_creature_all_skill() for i = 0, 5 do set_creature_value( get_creature_handle( i ), "level", player_lv ) end elseif evolution_depth == 2 then learn_creature_all_skill() set_creature_value( handle, "ev_2_ID", id ) set_creature_value( handle, "ev_2_level", 115 ) creature_evolution( handle ) learn_creature_all_skill() for i = 0, 5 do set_creature_value( get_creature_handle( i ), "level", player_lv ) end elseif evolution_depth == 3 then learn_creature_all_skill() for i = 0, 5 do set_creature_value( get_creature_handle( i ), "level", player_lv ) end end if cost < 0 then av( "gold", cost ) else sv( "gold", gold - cost ) end update_gold_chaos() end function Anmra_Creature_Summoned() dlg_title("Error") dlg_text("Þã ÈÅáÛÇÁ ÊÝÚíá ÇáãÑÇÝÞ áÅßãÇá ÇáÚãáíÉ") dlg_menu( "ÚæÏÉ", 'NPC_CreatureSetup_Secroute_contact()' ) dlg_menu( "@90010001", '' ) dlg_show() end function Hlp_Fix() dlg_title( "ÊÎÝíÖ ÇáãÓÊæì" ) dlg_text( "åÐÇ ÇáÎíÇÑ ÓíÞæã ÈÎÝÖ ãÓÊæì ÇáãÑÇÝÞ ÇáÎÇÕ Èß Çáì ãÓÊæÇß ßí áÇ íßæä ßÓÑ Úáíß ÇËäÇÁ ÇáÊÏÑíÈ" ) local handle, summon_state, lv, player_lv, lv_diff, cost, gold for i = 0, 5 do handle = 0 handle = get_creature_handle( i ) summon_state = get_creature_value( handle, "summon_state" ) lv = get_creature_value( handle, "level" ) player_lv = gv( "lv" ) lv_diff = player_lv - lv cost = lv_diff * 10000 gold = gv( "gold" ) if handle ~= 0 and handle ~= nil then if lv > player_lv then text = sconv("@90010009", "#@creature_name@#",tostring(get_creature_value( handle, "name" )) ,"#@creature_level@#",tostring(lv)) broke = 'No_Gold()' command = 'Hlp_Fix_Confirm( ' .. handle .. ' )' if gold >= cost then dlg_menu( text, command ) else dlg_menu( text, broke ) end end end end dlg_menu( "ÚæÏÉ", 'NPC_CreatureSetup_Secroute_contact()' ) dlg_menu( "@90010001", '' ) dlg_show() end function Hlp_Fix_Confirm( handle ) local player_lv, lv, lv_diff, cost, gold player_lv = gv( "lv" ) lv = get_creature_value( handle, "level" ) lv_diff = lv - player_lv cost = lv_diff * 10000 gold = gv( "gold" ) text = sconv("ÓæÝ Êßæä ÇáÊßáÝÉ #@price@# ÐåÈÉ. åá ÇäÊ ãÊÃßÏ ãä ÅßãÇá ÇáÚãáíÉ", "#@price@#",tostring(cost)) dlg_title("Confirm") dlg_text( text ) dlg_menu("ÊÃßíÏ", 'Hlp_Fix_Function( ' .. handle .. ' )') dlg_menu( "ÚæÏÉ", 'Hlp_Fix()' ) dlg_menu( "@90010001", '' ) dlg_show() end function Hlp_Fix_Function( handle ) local player_lv, lv, lv_diff, cost, gold, gold_post player_lv = gv( "lv" ) lv = get_creature_value( handle, "level" ) lv_diff = player_lv - lv cost = lv_diff * 1000000 gold = gv( "gold" ) gold_post = gold - cost set_creature_value( handle, "level", player_lv ) av( "gold", cost ) end function No_Gold() dlg_title( "Error" ) dlg_text( "ÇÚÊÐÑ ÇäÊ áÇ Êãáß ãÇ íßÝí ãä ÇáÐåÈ" ) dlg_menu( "ÚæÏÉ", 'NPC_CreatureSetup_Secroute_contact()' ) dlg_menu( "@90010001", '' ) dlg_show() end