-- Lua ½ºÅ©¸³Æ® ¾Ïȣȭ function get_module_name() return "NPC_ChipExchange" end -- Ĩ ±³È¯»ó Ŭ¸¯½Ã È£Ãâ ÇÔ¼ö function NPC_ChipExchange_contact() local npc_id = get_npc_id() local quest_progress_lak = get_quest_progress(1032) local npc_name = "@"..get_npc_type().."|@"..get_npc_name() dlg_title(npc_name) local qstart_text = get_value( "level" ) local quest_progress1 = get_quest_progress(2008) local quest_progress100 = get_quest_progress(2000) if npc_id == 4015 then dlg_text("@90401502") -- ¹Ì·¡¸¦ ¿¹¾ðÇÏ´Â ¼Ò³à if qstart_text == 50 or qstart_text > 50 and quest_progress100 == 0 then dlg_menu( "@90999617", "quest_rumor()" ) end if quest_progress1 == 255 then dlg_menu( "@90999842", "quest_witcharmy2()" ) end elseif npc_id == 1015 then dlg_text("@90101502") if qstart_text == 50 or qstart_text > 50 and quest_progress100 == 0 then dlg_menu( "@90999617", "quest_rumor2()" ) end -- ±¤½Åµµ ¾Ï»ìÀÚ if quest_progress1 == 255 then dlg_menu( "@90999842", "quest_witcharmy1()" ) end elseif npc_id == 2015 then dlg_text("@90201502") elseif npc_id == 6015 then dlg_text("@90601502") elseif npc_id == 7039 then dlg_text("@90703902") elseif npc_id == 7603 then dlg_text("@90760302") elseif npc_id == 7606 then dlg_text("@90760602") elseif npc_id == 11130 then dlg_text("@90999411") elseif npc_id == 7015 then if is_premium() then dlg_text("@90701502") else dlg_text( "@90700118" ) end end if quest_progress_lak == 2 then dlg_text("@90302324") else if npc_id == 7015 and is_premium() == false then else -- dlg_menu( "@90010077", 'ChipExchange_Exchange_Menu( 4, 1 )' ) dlg_menu( "@90010078", 'ChipExchange_lak_to_RP()' ) -- dlg_menu( "@90610513", 'ChipExchange_lak_to_JP()' ) -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7015 ¶óÅ© Æ®·¹ÀÌ´õ ·çºó½ºÅ°) if npc_id == 7015 then if is_premium() then -- dlg_menu( "@90010079", "open_market( 'secroute_boost_chip' )" ) end else -- dlg_menu( "@90010079", "open_market( 'boost_chip' )" ) end --dlg_menu( "@91002068", 'etherealExchange_select()' ) --dlg_menu( "@91002069", 'Exchange_ethereal_and_accelerator_to_RP()' ) end end dlg_menu( "@90010002", "" ) dlg_show() end -- ¼¼ºÎ´ëÈ­ function quest_rumor() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title("@90401501") dlg_text( "@90999618" ) -- ¼¼ºÎ´ëÈ­ 1-1b, ¹Ì·¡¸¦ ³»´Ùº¸´Â ¼Ò³à dlg_menu( "@90999621", "quest_rumor_a()" ) dlg_menu( "@90010002", '' ) dlg_show() end -- ¼¼ºÎ´ëÈ­ function quest_rumor_a() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title("@90401501") dlg_text( "@90999622" ) -- ¼¼ºÎ´ëÈ­ 1-1b, ¹Ì·¡¸¦ ³»´Ùº¸´Â ¼Ò³à dlg_menu( "@90999625", "quest_rumor_b()" ) dlg_menu( "@90010002", '' ) dlg_show() end -- ¼¼ºÎ´ëÈ­ function quest_rumor_b() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title("@90401501") dlg_text( "@90999626" ) -- ¼¼ºÎ´ëÈ­ 1-1b, ¹Ì·¡¸¦ ³»´Ùº¸´Â ¼Ò³à dlg_menu( "@90999627", "quest_rumor_c()" ) dlg_menu( "@90010002", '' ) dlg_show() end -- ¼¼ºÎ´ëÈ­ °á±¹ ·¹»þ¿¡ °üÇÑ Á¤º¸´Â ¾øÀ½. function quest_rumor_c() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title("@90401501") dlg_text( "@90999628" ) dlg_menu( "@90010002", '' ) dlg_show() end -- ¼¼ºÎ´ëÈ­ ¸¶¸°´À function quest_rumor2() -- ´ÙÀ̾ó·Î±× Ãâ·Â dlg_title("@90101501") dlg_text( "@90999619" ) dlg_menu( "@90010002", '' ) dlg_show() end -- ¶óÅ©¸¦ ºÎ½ºÆ® ĨÀ¸·Î ±³È¯ÇÑ´Ù. function ChipExchange_lak_to_chip() -- Àӽà º¯¼ö ¼±¾ð°ú µ¿½Ã¿¡ NPC ID °¡Á®¿À±â local npc_id = get_npc_id() local npc_name = "@"..get_npc_type().."|@"..get_npc_name() dlg_title(npc_name) -- <´ë»ç Ãâ·Â> °¢ NPC¿¡ µû¶ó ÀûÇÕÇÑ -- °¡ÀÌ¾Æ ÀÏ ¶§ (4015 ºÎ½ºÆ®Ä¨±³È¯»ó ¶õƼ½º) if npc_id == 4015 then dlg_text_without_quest_menu("@90401503") -- µ¥¹Ù ÀÏ ¶§ (1015 ºÎ½ºÆ®Ä¨±³È¯»ó ¸¶¸°´À) elseif npc_id == 1015 then dlg_text_without_quest_menu("@90101503") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2015 ºÎ½ºÆ®Ä¨±³È¯»ó ¶óÇǽº) elseif npc_id == 2015 then dlg_text_without_quest_menu("@90201503") -- ¼ö·ÃÀÚÀÇ ¼¶ ½´¸®¸£ ÀÏ ¶§ (3023 ºÎ½ºÆ®Ä¨±³È¯»ó ½´¸®¸£) elseif npc_id == 3023 then dlg_text_without_quest_menu("@90302303") -- ·Ðµµ ÀÏ ¶§ (6015 ¶óÅ© Æ®·¹ÀÌ´õ Ä¡¿ì) elseif npc_id == 6015 then dlg_text_without_quest_menu("@90601503") -- µµ½Ã À¯Àû ÀÏ ¶§ (7039 ¶óÅ© Æ®·¹ÀÌ´õ Ƽ·¹) elseif npc_id == 7039 then dlg_text_without_quest_menu("@90703903") -- ÀÒ¾î¹ö¸° ºñ¹ÐÀÇ ¼¶ ÀÏ ¶§ (7603 ¶óÅ© Æ®·¹ÀÌ´õ ±×¶õü½ºÅÍ) elseif npc_id == 7603 then dlg_text_without_quest_menu("@90760303") -- ÇØ¾È°¡ Ä·ÇÁ ÀÏ ¶§ (7606 ¶óÅ© Æ®·¹ÀÌ´õ ÇÇÄ«Å÷) elseif npc_id == 7606 then dlg_text_without_quest_menu("@90760603") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7015 ¶óÅ© Æ®·¹ÀÌ´õ ·çºó½ºÅ°) elseif npc_id == 7015 then dlg_text_without_quest_menu("@90701503") -- ¸¶¸®Ä¹ ¸¶ÄÏ ÀÏ ¶§ (11130 ¶óÅ© Æ®·¹ÀÌ´õ ½Ã³ª) elseif npc_id == 11130 then dlg_text_without_quest_menu("@90999412") end -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end -- <°øÅë ¸Þ´º> -- ChipExchange_chip_choice ( ĨÁ¾·ù ) // 1 : Æ÷½ºÄ¨, 2 : ¼Ò¿ïĨ, 3 : ·ç³ªÄ¨, 4 ½ºÅ³: ·ç³ªÄ¨ -- Æ÷½ºÄ¨. --dlg_menu( "@90010081", 'ChipExchange_chip_choice( 1 )' ) -- ¼Ò¿ïĨ. --dlg_menu( "@90010080", 'ChipExchange_chip_choice( 2 )' ) -- ·ç³ªÄ¨. --dlg_menu( "@90010241", 'ChipExchange_chip_choice( 3 )' ) -- ·ç³ªÄ¨. dlg_menu( "@90010241", 'ChipExchange_chip_choice( 4 )' ) -- ¼ö·ÃÀÚÀÇ ¼¶ ½´¸®¸£ ÀÏ ¶§ (3023 ºÎ½ºÆ®Ä¨±³È¯»ó ½´¸®¸£) if npc_id == 3023 then --µ¹¾Æ°¡±â dlg_menu( "@90010003", 'NPC_ChipExchange_beginner_contact()' ) else --µ¹¾Æ°¡±â dlg_menu( "@90010003", 'NPC_ChipExchange_contact()' ) end --´ëÈ­ Á¾·á dlg_menu( "@90010002", "" ) -- ´ÙÀ̾ó·Î±× Ãâ·ÂÇϱâ dlg_show() end -- ĨÀÇ ·©Å©¸¦ ¼±ÅÃÇÑ´Ù. function ChipExchange_chip_choice( select ) -- Àӽà º¯¼ö ¼±¾ð°ú µ¿½Ã¿¡ NPC ID °¡Á®¿À±â local npc_id = get_npc_id() local npc_name = "@"..get_npc_type().."|@"..get_npc_name() dlg_title(npc_name) -- <´ë»ç Ãâ·Â> °¢ NPC¿¡ µû¶ó ÀûÇÕÇÑ -- °¡ÀÌ¾Æ ÀÏ ¶§ (4015 ºÎ½ºÆ®Ä¨±³È¯»ó ¶õƼ½º) if npc_id == 4015 then dlg_text_without_quest_menu("@90401507") -- µ¥¹Ù ÀÏ ¶§ (1015 ºÎ½ºÆ®Ä¨±³È¯»ó ¸¶¸°´À) elseif npc_id == 1015 then dlg_text_without_quest_menu("@90101507") -- ¾Æ¼ö¶ó ÀÏ ¶§ (2015 ºÎ½ºÆ®Ä¨±³È¯»ó ¶óÇǽº) elseif npc_id == 2015 then dlg_text_without_quest_menu("@90201507") -- ¼ö·ÃÀÚÀÇ ¼¶ ½´¸®¸£ ÀÏ ¶§ (3023 ºÎ½ºÆ®Ä¨±³È¯»ó ½´¸®¸£) elseif npc_id == 3023 then dlg_text_without_quest_menu("@90302322") -- ·Ðµµ ÀÏ ¶§ (6015 ¶óÅ© Æ®·¹ÀÌ´õ Ä¡¿ì) elseif npc_id == 6015 then dlg_text_without_quest_menu("@90601507") -- µµ½Ã À¯Àû ÀÏ ¶§ (7039 ¶óÅ© Æ®·¹ÀÌ´õ Ƽ·¹) elseif npc_id == 7039 then dlg_text_without_quest_menu("@90703907") -- ÀÒ¾î¹ö¸° ºñ¹ÐÀÇ ¼¶ ÀÏ ¶§ (7603 ¶óÅ© Æ®·¹ÀÌ´õ ±×¶õü½ºÅÍ) elseif npc_id == 7603 then dlg_text_without_quest_menu("@90760307") -- ÇØ¾È°¡ Ä·ÇÁ ÀÏ ¶§ (7606 ¶óÅ© Æ®·¹ÀÌ´õ ÇÇÄ«Å÷) elseif npc_id == 7606 then dlg_text_without_quest_menu("@90760607") -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7015 ¶óÅ© Æ®·¹ÀÌ´õ ·çºó½ºÅ°) elseif npc_id == 7015 then dlg_text_without_quest_menu("@90701507") -- ¸¶¸®Ä¹ ¸¶ÄÏ ÀÏ ¶§ (11130 ¶óÅ© Æ®·¹ÀÌ´õ ½Ã³ª) elseif npc_id == 11130 then dlg_text_without_quest_menu("@90999413") end -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end -- Æ÷½ºÄ¨ ÀÏ ¶§ if select == 1 then -- ¼ö·ÃÀÚÀÇ ¼¶ ¸Þ´º (1·©Å© Æ÷½ºÄ¨¸¸..) -- ChipExchange_Select_Menu ( ĨÁ¾·ù, Ĩ·©Å© ) dlg_menu( "@90010095", 'ChipExchange_Exchange_Menu( ' .. select .. ', 1 )' ) if npc_id ~= 3023 then -- <°øÅë ¸Þ´º> -- 2·©Å© Æ÷½ºÄ¨. dlg_menu( "@90010096", 'ChipExchange_Exchange_Menu( ' .. select .. ', 2 )' ) -- 3·©Å© Æ÷½ºÄ¨. dlg_menu( "@90010097", 'ChipExchange_Exchange_Menu( ' .. select .. ', 3 )' ) -- 4·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690004", 'ChipExchange_Exchange_Menu( ' .. select .. ', 4 )' ) -- 5·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690005", 'ChipExchange_Exchange_Menu( ' .. select .. ', 5 )' ) -- 6·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690006", 'ChipExchange_Exchange_Menu( ' .. select .. ', 6 )' ) -- 7·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690007", 'ChipExchange_Exchange_Menu( ' .. select .. ', 7 )' ) end -- ¼Ò¿ïĨ ÀÏ ¶§ elseif select == 2 then -- ¼ö·ÃÀÚÀÇ ¼¶ ¸Þ´º (1·©Å© ¼Ò¿ïĨ¸¸..) dlg_menu( "@90010101", 'ChipExchange_Exchange_Menu( ' .. select .. ', 1 )' ) if npc_id ~= 3023 then -- 2·©Å© ¼Ò¿ïĨ. dlg_menu( "@90010102", 'ChipExchange_Exchange_Menu( ' .. select .. ', 2 )' ) -- 3·©Å© ¼Ò¿ïĨ. dlg_menu( "@90010103", 'ChipExchange_Exchange_Menu( ' .. select .. ', 3 )' ) -- 4·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690104", 'ChipExchange_Exchange_Menu( ' .. select .. ', 4 )' ) -- 5·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690105", 'ChipExchange_Exchange_Menu( ' .. select .. ', 5 )' ) -- 6·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690106", 'ChipExchange_Exchange_Menu( ' .. select .. ', 6 )' ) -- 7·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690107", 'ChipExchange_Exchange_Menu( ' .. select .. ', 7 )' ) end -- ·ç³ªÄ¨ ÀÏ ¶§ elseif select == 3 then -- ¼ö·ÃÀÚÀÇ ¼¶ ¸Þ´º (1·©Å© ·ç³ªÄ¨¸¸..) dlg_menu( "@90010242", 'ChipExchange_Exchange_Menu( ' .. select .. ', 1 )' ) if npc_id ~= 3023 then -- 2·©Å© ·ç³ªÄ¨. dlg_menu( "@90010243", 'ChipExchange_Exchange_Menu( ' .. select .. ', 2 )' ) -- 3·©Å© ·ç³ªÄ¨. dlg_menu( "@90010244", 'ChipExchange_Exchange_Menu( ' .. select .. ', 3 )' ) -- 4·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690204", 'ChipExchange_Exchange_Menu( ' .. select .. ', 4 )' ) -- 5·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690205", 'ChipExchange_Exchange_Menu( ' .. select .. ', 5 )' ) -- 6·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690206", 'ChipExchange_Exchange_Menu( ' .. select .. ', 6 )' ) -- 7·©Å© Æ÷½ºÄ¨. dlg_menu( "@10690207", 'ChipExchange_Exchange_Menu( ' .. select .. ', 7 )' ) end -- ½ºÅ³: ·ç³ªÄ¨ ÀÏ ¶§ elseif select == 4 then -- ¼ö·ÃÀÚÀÇ ¼¶ ¸Þ´º (1·©Å© ·ç³ªÄ¨¸¸..) dlg_menu( "@90010242", 'ChipExchange_Exchange_Menu( ' .. select .. ', 1 )' ) --if npc_id ~= 3023 then -- 2·©Å© ·ç³ªÄ¨. --dlg_menu( "@90010243", 'ChipExchange_Exchange_Menu( ' .. select .. ', 2 )' ) -- 3·©Å© ·ç³ªÄ¨. --dlg_menu( "@90010244", 'ChipExchange_Exchange_Menu( ' .. select .. ', 3 )' ) -- 4·©Å© Æ÷½ºÄ¨. --dlg_menu( "@10690204", 'ChipExchange_Exchange_Menu( ' .. select .. ', 4 )' ) -- 5·©Å© Æ÷½ºÄ¨. --dlg_menu( "@10690205", 'ChipExchange_Exchange_Menu( ' .. select .. ', 5 )' ) -- 6·©Å© Æ÷½ºÄ¨. --dlg_menu( "@10690206", 'ChipExchange_Exchange_Menu( ' .. select .. ', 6 )' ) -- 7·©Å© Æ÷½ºÄ¨. --dlg_menu( "@10690207", 'ChipExchange_Exchange_Menu( ' .. select .. ', 7 )' ) --end end --µ¹¾Æ°¡±â dlg_menu( "@90010003", 'ChipExchange_lak_to_chip()' ) --´ëÈ­ Á¾·á dlg_menu( "@90010002", "" ) -- ´ÙÀ̾ó·Î±× Ãâ·ÂÇϱâ dlg_show() end function ChipExchange_Exchange_Menu( chip_type, chip_rank ) -- Àӽà º¯¼ö ¼±¾ð°ú µ¿½Ã¿¡ NPC ID °¡Á®¿À±â local npc_id = get_npc_id() local npc_name = "@"..get_npc_type().."|@"..get_npc_name() dlg_title(npc_name) -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end local numrac, numofchip, text, price, handle_1_rank_force,price_1_rank_force handle_1_rank_force = get_item_handle( 690001 ) -- Æ÷½ºÄ¨ °¡°Ý °¡Á® ¿À±â price_1_rank_force = get_item_price( handle_1_rank_force) local price_2_rank_force = get_item_price( 690002) local price_3_rank_force = get_item_price( 690003) local price_4_rank_force = get_item_price( 690004) local price_5_rank_force = get_item_price( 690005) local price_6_rank_force = get_item_price( 690006) local price_7_rank_force = get_item_price( 690007) -- ¼Ò¿ïĨ °¡°Ý °¡Á® ¿À±â local price_1_rank_soul = get_item_price( 690101) local price_2_rank_soul = get_item_price( 690102) local price_3_rank_soul = get_item_price( 690103) local price_4_rank_soul = get_item_price( 690104) local price_5_rank_soul = get_item_price( 690105) local price_6_rank_soul = get_item_price( 690106) local price_7_rank_soul = get_item_price( 690107) -- ·ç³ªÄ¨ °¡°Ý °¡Á® ¿À±â local price_1_rank_luna = get_item_price( 690201) local price_2_rank_luna = get_item_price( 690202) local price_3_rank_luna = get_item_price( 690203) local price_4_rank_luna = get_item_price( 690204) local price_5_rank_luna = get_item_price( 690205) local price_6_rank_luna = get_item_price( 690206) local price_7_rank_luna = get_item_price( 690207) -- ·ç³ªÄ¨ °¡°Ý °¡Á® ¿À±â local price_1_rank_skill_luna = get_item_price( 690303) -- ÀÏ¹Ý È¯À²Àº 250 local exchange_rate = 250 -- ½ÃÅ©·çÆ® ÇÁ¸®ÆÐ½º°¡ Ȱ¼ºÈ­µÈ »óÅÂ(ÇÁ¸®¹Ì¾ö ȸ¿ø)ÀÌ°í ½ÃÅ©·çÆ®ÀÏ ¶§, -- ÇÁ¸®¹Ì¾ö ¼­ºñ½º üũ ÁÖ¼®Ã³¸® if is_premium() then if npc_id == 7015 then exchange_rate = 375 end end -- ·©Å©¿¡ µû¶ó Ĩ °¡°Ý °áÁ¤. -- 1·©Å© Æ÷½º, ¼Ò¿ïĨÀÇ °¡°ÝÀº 100, ·ç³ªÄ¨ÀÇ °¡°ÝÀº 120 (¶óÅ©¸¦ ĨÀ¸·Î ±³È¯½Ã¿¡´Â 20% ÇÒÀÎ ÆÇ¸Å) if chip_rank == 1 then if chip_type == 1 then price = 80 elseif chip_type == 2 then price = 80 elseif chip_type == 3 then price = 104 elseif chip_type == 4 then price = 104 end -- 2·©Å© Æ÷½º, ¼Ò¿ïĨÀÇ °¡°ÝÀº 200, ·ç³ªÄ¨ÀÇ °¡°ÝÀº 240 (¶óÅ©¸¦ ĨÀ¸·Î ±³È¯½Ã¿¡´Â 20% ÇÒÀÎ ÆÇ¸Å) elseif chip_rank == 2 then if chip_type == 1 then price = 160 elseif chip_type == 2 then price = 160 elseif chip_type == 3 then price = 208 elseif chip_type == 4 then price = 208 end -- 3·©Å© Æ÷½º, ¼Ò¿ïĨÀÇ °¡°ÝÀº 400, ·ç³ªÄ¨ÀÇ °¡°ÝÀº 480 (¶óÅ©¸¦ ĨÀ¸·Î ±³È¯½Ã¿¡´Â 20% ÇÒÀÎ ÆÇ¸Å) elseif chip_rank == 3 then if chip_type == 1 then price = 320 elseif chip_type == 2 then price = 320 elseif chip_type == 3 then price = 416 elseif chip_type == 4 then price = 416 end -- 4·©Å© Æ÷½º, ¼Ò¿ïĨÀÇ °¡°ÝÀº 400, ·ç³ªÄ¨ÀÇ °¡°ÝÀº 480 (¶óÅ©¸¦ ĨÀ¸·Î ±³È¯½Ã¿¡´Â 20% ÇÒÀÎ ÆÇ¸Å) elseif chip_rank == 4 then if chip_type == 1 then price = 560 elseif chip_type == 2 then price = 560 elseif chip_type == 3 then price = 728 elseif chip_type == 4 then price = 728 end -- 5·©Å© Æ÷½º, ¼Ò¿ïĨÀÇ °¡°ÝÀº 400, ·ç³ªÄ¨ÀÇ °¡°ÝÀº 480 (¶óÅ©¸¦ ĨÀ¸·Î ±³È¯½Ã¿¡´Â 20% ÇÒÀÎ ÆÇ¸Å) elseif chip_rank == 5 then if chip_type == 1 then price = 880 elseif chip_type == 2 then price = 880 elseif chip_type == 3 then price = 1144 elseif chip_type == 4 then price = 1144 end -- 6·©Å© Æ÷½º, ¼Ò¿ïĨÀÇ °¡°ÝÀº 400, ·ç³ªÄ¨ÀÇ °¡°ÝÀº 480 (¶óÅ©¸¦ ĨÀ¸·Î ±³È¯½Ã¿¡´Â 20% ÇÒÀÎ ÆÇ¸Å) elseif chip_rank == 6 then if chip_type == 1 then price = 1280 elseif chip_type == 2 then price = 1280 elseif chip_type == 3 then price = 1664 elseif chip_type == 4 then price = 1664 end -- 7·©Å© Æ÷½º, ¼Ò¿ïĨÀÇ °¡°ÝÀº 400, ·ç³ªÄ¨ÀÇ °¡°ÝÀº 480 (¶óÅ©¸¦ ĨÀ¸·Î ±³È¯½Ã¿¡´Â 20% ÇÒÀÎ ÆÇ¸Å) elseif chip_rank == 7 then if chip_type == 1 then price = 1760 elseif chip_type == 2 then price = 1760 elseif chip_type == 3 then price = 2288 elseif chip_type == 4 then price = 2288 end end -- º¯°æµÈ ±âÁØÈ¯À² 250, numrac = gv("chaos") -- ÇöÀç ¼öÁýÇÑ ¶óÅ©ÀÇ ¾çÀ» °¡Á®¿Â´Ù. numofchip = math.floor(numrac * exchange_rate / price) -- Àû´çÇÑ °è»êÀ¸·Î ÆÇ¸Å °¡´ÉÇÑ ÃÖ´ë ĨÀÇ °³¼ö¸¦ °è»êÇÑ´Ù. local default_num, num1, num2, num3, num4 -- ÇöÀç °¡Áø ¶óÅ©·®¿¡ µû¶ó¸Þ´º ±¸¼º -- 10 ¹Ì¸¸ÀÏ ¶§ if numrac < 100 then -- ÃÖ¼Ò ±³È¯ °³¼ö °è»ê num1 = math.floor ( exchange_rate / price ) -- ȯÀ²º¸´Ù Ĩ °¡°ÝÀÌ ³ôÀ» ¶§, ±×³É ¹«½ÃÇϰí 2·Î ÅëÀÏ. if num1 == 0 then num1 = 2 end num2 = num1 * 2 num3 = num1 * 4 num4 = num1 * 8 -- 10 ÀÌ»óÀÏ ¶§ else num1 = 10 if numrac >= 5000 then default_num = 5000 elseif numrac >= 3000 then default_num = 3000 else default_num = math.floor( numrac * 0.01 ) * 100 end num2 = default_num / 4 num3 = default_num / 2 num4 = default_num end -- <´ë»ç Ãâ·Â> °¢ NPC¿¡ µû¶ó ÀûÇÕÇÑ -- °¡ÀÌ¾Æ ÀÏ ¶§ (4015 ºÎ½ºÆ®Ä¨±³È¯»ó ¶õƼ½º). if npc_id == 4015 then if chip_type == 1 then text = sconv("@90401504", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90401505", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end -- µ¥¹Ù ÀÏ ¶§ (1015 ºÎ½ºÆ®Ä¨±³È¯»ó ¸¶¸°´À) elseif npc_id == 1015 then if chip_type == 1 then text = sconv("@90401504", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90401505", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end -- ¾Æ¼ö¶ó ÀÏ ¶§ (2015 ºÎ½ºÆ®Ä¨±³È¯»ó ¶óÇǽº) elseif npc_id == 2015 then if chip_type == 1 then text = sconv("@90401504", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90401505", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end -- ¼ö·ÃÀÚÀÇ ¼¶ ½´¸®¸£ ÀÏ ¶§ (3023 ºÎ½ºÆ®Ä¨±³È¯»ó ½´¸®¸£) elseif npc_id == 3023 then if chip_type == 1 then text = sconv("@90401504", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90401505", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end -- ·Ðµµ ÀÏ ¶§ (6015 ¶óÅ© Æ®·¹ÀÌ´õ Ä¡¿ì) elseif npc_id == 6015 then if chip_type == 1 then text = sconv("@90401504", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90401505", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end -- µµ½Ã À¯Àû ÀÏ ¶§ (7039 ¶óÅ© Æ®·¹ÀÌ´õ Ƽ·¹) elseif npc_id == 7039 then if chip_type == 1 then text = sconv("@90401504", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90401505", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end -- ÀÒ¾î¹ö¸° ºñ¹ÐÀÇ ¼¶ ÀÏ ¶§ (7603 ¶óÅ© Æ®·¹ÀÌ´õ ±×¶õü½ºÅÍ) elseif npc_id == 7603 then if chip_type == 1 then text = sconv("@90401504", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90401505", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end -- ÇØ¾È°¡ Ä·ÇÁ ÀÏ ¶§ (7606 ¶óÅ© Æ®·¹ÀÌ´õ ÇÇÄ«Å÷) elseif npc_id == 7606 then if chip_type == 1 then text = sconv("@90401504", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90401505", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7015 ¶óÅ© Æ®·¹ÀÌ´õ ·çºó½ºÅ°) elseif npc_id == 7015 then if chip_type == 1 then text = sconv("@90401504", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90401505", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90401509", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end -- ¸¶¸®Ä¹ ¸¶ÄÏ ÀÏ ¶§ (11130 ¶óÅ© Æ®·¹ÀÌ´õ ½Ã³ª) elseif npc_id == 11130 then if chip_type == 1 then text = sconv("@90999414", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ) , "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 2 then text = sconv("@90999415", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 3 then text = sconv("@90999416", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. elseif chip_type == 4 then text = sconv("@90999416", "#@rac@#", tostring( numrac ) , "#@ranktype@#", tostring( chip_rank ), "#@number@#",tostring(numofchip)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end end dlg_text_without_quest_menu( text ) -- ´ë»çâ¿¡ ÅØ½ºÆ® »ðÀÔ -- <°øÅë ¸Þ´º> -- ÀüºÎ ±³È¯. if numofchip > 0 then dlg_menu( "@90010083", 'ChipExchange_Do_Exchange(' .. chip_type.. ', ' .. chip_rank .. ', ' .. numrac .. ', ' .. exchange_rate.. ', ' .. price .. ')' ) end -- function ChipExchange_Do_Exchange( ĨŸÀÔ, Ĩ·©Å©, ±³È¯ÇÒ¶óÅ©·®, ±âÁØÈ¯À², Ĩ°¡°Ý ) // ĨŸÀÔ 1 : Æ÷½ºÄ¨, 2 : ¼Ò¿ïĨ, 3 : ·ç³ªÄ¨ if numrac >= num1 then -- #@number@#¶óÅ©¸¸ ±³È¯. num1 text = sconv("@90010082", "#@number@#", tostring( num1 ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_Do_Exchange(' .. chip_type.. ', ' .. chip_rank .. ', ' .. num1 .. ', ' .. exchange_rate.. ', ' .. price .. ')' ) end if numrac >= num2 then -- #@number@#¶óÅ©¸¸ ±³È¯. num2 text = sconv("@90010082", "#@number@#", tostring( num2 ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_Do_Exchange(' .. chip_type.. ', ' .. chip_rank .. ', ' .. num2 .. ', ' .. exchange_rate.. ', ' .. price .. ')' ) end if numrac >= num3 then -- #@number@#¶óÅ©¸¸ ±³È¯. num3 text = sconv("@90010082", "#@number@#", tostring( num3 ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_Do_Exchange(' .. chip_type.. ', ' .. chip_rank .. ', ' .. num3 .. ', ' .. exchange_rate.. ', ' .. price .. ')' ) end if numrac >= num4 then -- #@number@#¶óÅ©¸¸ ±³È¯. num4 text = sconv("@90010082", "#@number@#", tostring( num4 ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_Do_Exchange(' .. chip_type.. ', ' .. chip_rank .. ', ' .. num4 .. ', ' .. exchange_rate.. ', ' .. price .. ')' ) end --µ¹¾Æ°¡±â --dlg_menu( "@90010003", 'ChipExchange_chip_choice( ' .. chip_type.. ' )' ) dlg_menu( "@90010003", 'NPC_ChipExchange_contact()' ) --´ëÈ­ Á¾·á dlg_menu( "@90010002", "" ) -- ´ÙÀ̾ó·Î±× Ãâ·ÂÇϱâ dlg_show() end function ChipExchange_Do_Exchange( chip_type, chip_rank, lak, exchange_rate, price ) local temp_lak, i, numofchip, player_lak, item_id, item_id_500, item_id_1000, numofchip_bag -- ¶óÅ© 1 ¸ð¾Æ¿À±â Äù½ºÆ® »óÅ äũ local quest_progress_lak = get_quest_progress(1032) player_lak = gv("chaos") -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end -- Æ÷½ºÄ¨ if chip_type == 1 then if chip_rank == 1 then item_id = 690001 elseif chip_rank == 2 then item_id = 690002 elseif chip_rank == 3 then item_id = 690003 elseif chip_rank == 4 then item_id = 690004 elseif chip_rank == 5 then item_id = 690005 elseif chip_rank == 6 then item_id = 690006 elseif chip_rank == 7 then item_id = 690007 end -- ¼Ò¿ïĨ elseif chip_type == 2 then if chip_rank == 1 then item_id = 690101 elseif chip_rank == 2 then item_id = 690102 elseif chip_rank == 3 then item_id = 690103 elseif chip_rank == 4 then item_id = 690104 elseif chip_rank == 5 then item_id = 690105 elseif chip_rank == 6 then item_id = 690106 elseif chip_rank == 7 then item_id = 690107 end -- ·ç³ªÄ¨ elseif chip_type == 3 then if chip_rank == 1 then item_id = 690201 elseif chip_rank == 2 then item_id = 690202 elseif chip_rank == 3 then item_id = 690203 elseif chip_rank == 4 then item_id = 690204 elseif chip_rank == 5 then item_id = 690205 elseif chip_rank == 6 then item_id = 690206 elseif chip_rank == 7 then item_id = 690207 end -- ½ºÅ³: ·ç³ªÄ¨ elseif chip_type == 4 then if chip_rank == 1 then item_id = 690303 item_id_500 =690321 item_id_1000 =690322 elseif chip_rank == 2 then item_id = 690303 item_id_500 =690321 item_id_1000 =690322 elseif chip_rank == 3 then item_id = 690303 item_id_500 =690321 item_id_1000 =690322 elseif chip_rank == 4 then item_id = 690303 item_id_500 =690321 item_id_1000 =690322 elseif chip_rank == 5 then item_id = 690303 item_id_500 =690321 item_id_1000 =690322 elseif chip_rank == 6 then item_id = 690303 item_id_500 =690321 item_id_1000 =690322 elseif chip_rank == 7 then item_id = 690303 item_id_500 =690321 item_id_1000 =690322 end end -- ¶óÅ© Äù½ºÆ®°¡ Á¾·á°¡´ÉÇÒ °æ¿ì(¶óÅ©¸¦ ¸ð¾Æ¿ÔÀ» °æ¿ì) ±³È¯À̳ª ȯÀüÀº Äù½ºÆ® ¿Ï·áÇÏÁö ¾ÊÀ¸¸é ºÒ°¡´ÉÇÏ´Ù´Â ´ë»ç Ãâ·Â. if quest_progress_lak == 2 then set_auto_user( 1 ) add_state( 5997, 10, 8640000 ) kick_auto_to_another_world() elseif player_lak >= lak then temp_lak = player_lak - lak -- ¶óÅ©¸¦ ĨÀ¸·Î ±³È¯½Ã¿¡´Â 80%·Î ÆÇ¸Å numofchip = math.floor(lak * exchange_rate / price) -- Àû´çÇÑ °è»êÀ¸·Î ÆÇ¸Å °¡´ÉÇÑ ÃÖ´ë ĨÀÇ °³¼ö¸¦ °è»êÇÑ´Ù. -- ¶óÅ©¸¦ ±î°í sv("chaos", temp_lak ) update_gold_chaos() -- Ĩ °³¼ö°¡ 1000ÀÌ ³Ñ´Â °æ¿ì if numofchip >= 1000 then numofchip_bag = math.floor( numofchip/1000 ) numofchip = ((numofchip/1000) - numofchip_bag)*1000 insert_item( item_id_1000, numofchip_bag ) insert_item( item_id, numofchip ) else -- ĨÀ» ³Ö¾îÁØ´Ù. insert_item( item_id, numofchip ) end end end -- ¶óÅ©¸¦ ·çÇǷΠȯÀüÇÑ´Ù. function ChipExchange_lak_to_RP() -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end -- Àӽà º¯¼ö ¼±¾ð°ú µ¿½Ã¿¡ NPC ID °¡Á®¿À±â local npc_id = get_npc_id() local npc_name = "@"..get_npc_type().."|@"..get_npc_name() dlg_title(npc_name) local numrac, exchange_rupy, text, nummoney, player_money -- ÀÏ¹Ý È¯À²Àº 250 --local exchange_rate = 250 / 125 local exchange_rate = 1000000 -- ÇÁ¸®¹Ì¾ö ¼­ºñ½º üũ ÁÖ¼®Ã³¸® -- ½ÃÅ©·çÆ® ÇÁ¸®ÆÐ½º°¡ Ȱ¼ºÈ­µÈ »óÅÂ(ÇÁ¸®¹Ì¾ö ȸ¿ø)ÀÌ°í ½ÃÅ©·çÆ®ÀÏ ¶§¿¡´Â, -- ÀÏ¹Ý È¯À²ÀÇ 50%(250 * 0.5)ÀÎ 125¸¦ Ãß°¡ Áö±ÞÇÑ´Ù. if is_premium() then if npc_id == 7015 then --exchange_rate = exchange_rate + 125 exchange_rate = exchange_rate + 63 end end -- ¾ï¸¸ÀåÀÚ(ȣĪ ID : 69)¸¦ ÁÖ È£ÄªÀ¸·Î »ç¿ë ½Ã, -- ÀÏ¹Ý È¯À²ÀÇ 10%(250 * 0.1)ÀÎ 25¸¦ Ãß°¡ Áö±ÞÇÑ´Ù. if get_main_title() == 69 then --exchange_rate = exchange_rate + 25 exchange_rate = exchange_rate + 25 -- ³¡¾ø´Â ºÎ¸¦ °¡Áø ÀÚ(ȣĪ ID : 70)¸¦ ÁÖ È£ÄªÀ¸·Î »ç¿ë ½Ã, -- ÀÏ¹Ý È¯À²ÀÇ 20%(250 * 0.2)ÀÎ 50¸¦ Ãß°¡ Áö±ÞÇÑ´Ù. elseif get_main_title() == 70 then --exchange_rate = exchange_rate + 50 exchange_rate = exchange_rate + 50 end numrac = gv("chaos") -- ÇöÀç ¼öÁýÇÑ ¶óÅ©ÀÇ ¾çÀ» °¡Á®¿Â´Ù. exchange_rupy = math.floor(numrac * exchange_rate) -- ȯÀü °¡´ÉÇÑ ÃÖ´ë ·çÇÇÀÇ ·®À» °è»êÇÑ´Ù. player_money = gv("gold") -- À¯Àú ÇöÀç ¼ÒÁö±ÝÀ» °¡Á®¿Â´Ù. nummoney = exchange_rupy + player_money -- À¯Àú ÇöÀç ¼ÒÁö±Ý°ú ȯÀü±Ý¾×À» ÇÕÄ£´Ù. if nummoney > 999999999999 then -- ȯÀü°¡´ÉÇÑ ÃÖ´ë ·çÇÇ ·®°ú À¯Àú ÇöÀç ¼ÒÁö±ÝÀ» ÇÕÃļ­ 1000¾ïÀÌ ³Ñ´ÂÁö üũ ÇÑ´Ù. dlg_text("@90760310") -- ¼ÒÁö±ÝÀÌ ÃʰúµÇ¾ú´Ù´Â ¸Þ½ÃÁöÃâ·Â dlg_menu( "@90010003", 'NPC_ChipExchange_contact()' ) -- µ¹¾Æ°¡±â dlg_show() -- º¸À̱â return end -- <´ë»ç Ãâ·Â> °¢ NPC¿¡ µû¶ó ÀûÇÕÇÑ -- °¡ÀÌ¾Æ ÀÏ ¶§ (4015 ºÎ½ºÆ®Ä¨±³È¯»ó ¶õƼ½º). if npc_id == 4015 then text = sconv("@90401506", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. -- µ¥¹Ù ÀÏ ¶§ (1015 ºÎ½ºÆ®Ä¨±³È¯»ó ¸¶¸°´À) elseif npc_id == 1015 then text = sconv("@90101506", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. -- ¾Æ¼ö¶ó ÀÏ ¶§ (2015 ºÎ½ºÆ®Ä¨±³È¯»ó ¶óÇǽº) elseif npc_id == 2015 then text = sconv("@90201506", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. -- ¼ö·ÃÀÚÀÇ ¼¶ ½´¸®¸£ ÀÏ ¶§ (3023 ºÎ½ºÆ®Ä¨±³È¯»ó ½´¸®¸£) elseif npc_id == 3023 then text = sconv("@90302306", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. -- ·Ðµµ ÀÏ ¶§ (6015 ¶óÅ© Æ®·¹ÀÌ´õ Ä¡¿ì) elseif npc_id == 6015 then text = sconv("@90601506", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. -- µµ½Ã À¯Àû ÀÏ ¶§ (7039 ¶óÅ© Æ®·¹ÀÌ´õ Ƽ·¹) elseif npc_id == 7039 then text = sconv("@90703906", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. -- ÀÒ¾î¹ö¸° ºñ¹ÐÀÇ ¼¶ ÀÏ ¶§ (7603 ¶óÅ© Æ®·¹ÀÌ´õ ±×¶õü½ºÅÍ) elseif npc_id == 7603 then text = sconv("@90760306", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. -- ÇØ¾È°¡ Ä·ÇÁ ÀÏ ¶§ (7606 ¶óÅ© Æ®·¹ÀÌ´õ ÇÇÄ«Å÷) elseif npc_id == 7606 then text = sconv("@90760606", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. -- ½ÃÅ©·çÆ® ÀÏ ¶§ (7015 ¶óÅ© Æ®·¹ÀÌ´õ ·çºó½ºÅ°) elseif npc_id == 7015 then text = sconv("@90701506", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. -- ¸¶¸®Ä¹ ¸¶ÄÏ ÀÏ ¶§ (11130 ¶óÅ© Æ®·¹ÀÌ´õ ½Ã³ª) elseif npc_id == 11130 then text = sconv("@90999417", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(format_num(exchange_rupy,0))) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. end dlg_text_without_quest_menu( text ) -- ´ë»çâ¿¡ ÅØ½ºÆ® »ðÀÔ -- <°øÅë ¸Þ´º> -- ÀüºÎ ±³È¯. if numrac > 0 then dlg_menu( "@90010083", 'ChipExchange_RP_num(' .. numrac .. ', ' .. exchange_rate .. ')' ) end local num1, num2, num3, num4 num1 = 10 if numrac <10 then num1 = 1 num2 = 5 num3 = 10 num4 = 20 elseif numrac < 200 then num2 = 30 num3 = 50 num4 = 100 elseif numrac < 500 then num2 = 50 num3 = 100 num4 = 300 elseif numrac < 5000 then num2 = 50 num3 = 200 num4 = 500 else num1 = 5000 num2 = 7000 num3 = 8000 num4 = 9000 end if numrac >= num1 then -- #@number@#¶óÅ©¸¸ ±³È¯. num1 text = sconv("@90010082", "#@number@#", tostring( format_num(num1,0) ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_RP_num(' .. num1 .. ', ' .. exchange_rate .. ')' ) end if numrac >= num2 then -- #@number@#¶óÅ©¸¸ ±³È¯. num2 text = sconv("@90010082", "#@number@#", tostring( format_num(num2,0) ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_RP_num(' .. num2 .. ', ' .. exchange_rate .. ')' ) end if numrac >= num3 then -- #@number@#¶óÅ©¸¸ ±³È¯. num3 text = sconv("@90010082", "#@number@#", tostring( format_num(num3,0) ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_RP_num(' .. num3 .. ', ' .. exchange_rate .. ')' ) end if numrac >= num4 then -- #@number@#¶óÅ©¸¸ ±³È¯. num4 text = sconv("@90010082", "#@number@#", tostring( format_num(num4,0) ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_RP_num(' .. num4 .. ', ' .. exchange_rate .. ')' ) end -- ¼ö·ÃÀÚÀÇ ¼¶ ½´¸®¸£ ÀÏ ¶§ (3023 ºÎ½ºÆ®Ä¨±³È¯»ó ½´¸®¸£) if npc_id == 3023 then --µ¹¾Æ°¡±â dlg_menu( "@90010003", 'NPC_ChipExchange_beginner_contact()' ) else --µ¹¾Æ°¡±â dlg_menu( "@90010003", 'NPC_ChipExchange_contact()' ) end --´ëÈ­ Á¾·á dlg_menu( "@90010002", "" ) -- ´ÙÀ̾ó·Î±× Ãâ·ÂÇϱâ dlg_show() end -- ·çÇÇ È¯Àü (ƯÁ¤°ª) function ChipExchange_RP_num( lak, exchange_rate ) -- ¶óÅ© 1 ¸ð¾Æ¿À±â Äù½ºÆ® »óÅ äũ local quest_progress_lak = get_quest_progress(1032) local temp_money, temp_lak local player_money, player_lak -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end player_money = gv("gold") player_lak = gv("chaos") -- ¶óÅ© Äù½ºÆ®°¡ Á¾·á°¡´ÉÇÒ °æ¿ì(¶óÅ©¸¦ ¸ð¾Æ¿ÔÀ» °æ¿ì) ±³È¯À̳ª ȯÀüÀº Äù½ºÆ® ¿Ï·áÇÏÁö ¾ÊÀ¸¸é ºÒ°¡´ÉÇÏ´Ù´Â ´ë»ç Ãâ·Â. if quest_progress_lak == 2 then set_auto_user( 1 ) add_state( 5997, 10, 8640000 ) kick_auto_to_another_world() elseif player_lak >= lak then -- º¯°æµÈ ±âÁØÈ¯À² 250, 1·©Å© ĨÀÇ °¡°ÝÀº 100 (¶óÅ©¸¦ ĨÀ¸·Î ±³È¯½Ã¿¡´Â 20ÇÁ·Î ÇÒÀÎ ÆÇ¸Å) temp_money = player_money + ( lak * exchange_rate ) temp_lak = player_lak - lak -- µ·À» ³Ö¾îÁÖ°í sv("gold", temp_money ) update_gold_chaos() -- ¶óÅ©¸¦ ±ñ´Ù. sv("chaos", temp_lak ) update_gold_chaos() end --ȯÀü½Ã ȣĪ ºÎ¿© update_title_condition( 9002003, lak ) end ---------------¶óÅ©¸¦ JP·Î ±³È¯--------------- function ChipExchange_lak_to_JP() -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end -- Àӽà º¯¼ö ¼±¾ð°ú µ¿½Ã¿¡ NPC ID °¡Á®¿À±â local npc_id = get_npc_id() local npc_name = "@"..get_npc_type().."|@"..get_npc_name() dlg_title(npc_name) local exchange_rate = 10 local numrac, exchange_jp, player_jp, text, numjp numrac = gv("chaos") -- ÇöÀç ¼öÁýÇÑ ¶óÅ©ÀÇ ¾çÀ» °¡Á®¿Â´Ù. exchange_jp = math.floor(numrac * exchange_rate) -- ȯÀü °¡´ÉÇÑ ÃÖ´ë JP·®À» °è»êÇÑ´Ù. player_jp = gv("jp") -- À¯Àú ÇöÀç JP¸¦ °¡Á®¿Â´Ù. numjp = exchange_jp + player_jp -- À¯Àú ÇöÀç ¼ÒÁö jp°ú ȯÀü jp¸¦ ÇÕÄ£´Ù. if numjp > 99999000000 then -- ȯÀü°¡´ÉÇÑ ÃÖ´ë JP ·®°ú À¯Àú ÇöÀç JP¸¦ ÇÕÃļ­ 99,999,000,000ÀÌ ³Ñ´ÂÁö üũ ÇÑ´Ù. dlg_text("@90610514") -- ÃÖ´ë JP°¡ ÃʰúµÇ¾ú´Ù´Â ¸Þ½ÃÁöÃâ·Â dlg_menu( "@90010003", 'NPC_ChipExchange_contact()' ) -- µ¹¾Æ°¡±â dlg_show() -- º¸À̱â return end text = sconv("@90610515", "#@rac@#", tostring( numrac ) , "#@number@#",tostring(exchange_jp)) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_text_without_quest_menu( text ) -- ´ë»çâ¿¡ ÅØ½ºÆ® »ðÀÔ -- <°øÅë ¸Þ´º> -- ÀüºÎ ±³È¯. if numrac > 0 then dlg_menu( "@90010083", 'ChipExchange_JP_num(' .. numrac .. ')' ) end local num1, num2, num3, num4 num1 = 10 if numrac <10 then num1 = 1 num2 = 5 num3 = 10 num4 = 20 elseif numrac < 200 then num2 = 30 num3 = 50 num4 = 100 elseif numrac < 500 then num2 = 50 num3 = 100 num4 = 300 elseif numrac < 5000 then num2 = 50 num3 = 200 num4 = 500 else num1 = 5000 num2 = 7000 num3 = 8000 num4 = 9000 end if numrac >= num1 then -- #@number@#¶óÅ©¸¸ ±³È¯. num1 text = sconv("@90010082", "#@number@#", tostring( num1 ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_JP_num(' .. num1 ..')' ) end if numrac >= num2 then -- #@number@#¶óÅ©¸¸ ±³È¯. num2 text = sconv("@90010082", "#@number@#", tostring( num2 ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_JP_num(' .. num2 ..')' ) end if numrac >= num3 then -- #@number@#¶óÅ©¸¸ ±³È¯. num3 text = sconv("@90010082", "#@number@#", tostring( num3 ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_JP_num(' .. num3 ..')' ) end if numrac >= num4 then -- #@number@#¶óÅ©¸¸ ±³È¯. num4 text = sconv("@90010082", "#@number@#", tostring( num4 ) ) -- º¯¼ö¸¦ ½ÇÁ¦ °ª(½ºÆ®¸µ)À¸·Î ġȯ ½ÃŲ´Ù. dlg_menu( text, 'ChipExchange_JP_num(' .. num4 .. ')' ) end -- ¼ö·ÃÀÚÀÇ ¼¶ ½´¸®¸£ ÀÏ ¶§ (3023 ºÎ½ºÆ®Ä¨±³È¯»ó ½´¸®¸£) if npc_id == 3023 then --µ¹¾Æ°¡±â dlg_menu( "@90010003", 'NPC_ChipExchange_beginner_contact()' ) else --µ¹¾Æ°¡±â dlg_menu( "@90010003", 'NPC_ChipExchange_contact()' ) end --´ëÈ­ Á¾·á dlg_menu( "@90010002", "" ) -- ´ÙÀ̾ó·Î±× Ãâ·ÂÇϱâ dlg_show() end -- JP ȯÀü function ChipExchange_JP_num( lak ) -- ¶óÅ© 1 ¸ð¾Æ¿À±â Äù½ºÆ® »óÅ äũ local quest_progress_lak = get_quest_progress(1032) local temp_lak, player_lak -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end player_lak = gv("chaos") -- ¶óÅ© Äù½ºÆ®°¡ Á¾·á°¡´ÉÇÒ °æ¿ì(¶óÅ©¸¦ ¸ð¾Æ¿ÔÀ» °æ¿ì) ±³È¯À̳ª ȯÀüÀº Äù½ºÆ® ¿Ï·áÇÏÁö ¾ÊÀ¸¸é ºÒ°¡´ÉÇÏ´Ù´Â ´ë»ç Ãâ·Â. if quest_progress_lak == 2 then set_auto_user( 1 ) add_state( 5997, 10, 8640000 ) kick_auto_to_another_world() elseif player_lak >= lak then temp_lak = player_lak - lak -- JP ³Ö¾îÁÖ°í add_exp_jp( 0, lak * 10 ) -- ¶óÅ©¸¦ ±ñ´Ù. sv("chaos", temp_lak ) update_gold_chaos() message( sconv( "@90610516", "#@jp_num@#", lak * 10) ) end end -----------¶óÅ©¸¦ JP·Î ±³È¯ ³¡-------------- function etherealExchange_select() -- Àӽà º¯¼ö ¼±¾ð°ú µ¿½Ã¿¡ NPC ID °¡Á®¿À±â local npc_id = get_npc_id() local npc_name = "@"..get_npc_type().."|@"..get_npc_name() dlg_title(npc_name) -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end dlg_text("@91002070") -- ij¸¯ÅÍ ¿¡Å׸®¾ó·Î ÀüȯÇÒ ¿¡Å׸®¾ó ½ºÅæÀ» ¼±ÅÃÇØÁÖ¼¼¿ä local checked_item_id = {1100501, 1100502, 1100503, 1100504, 1100505, 1100506, 1100507, 1100508} local existed_item_id = {} local existed_item_count = 0 local i for i = 1, 8 do local count = find_item( checked_item_id[i] ) if count ~= 0 then existed_item_count = existed_item_count + 1 existed_item_id[existed_item_count] = checked_item_id[i] end end for i = 1, existed_item_count do dlg_menu( tostring( get_item_name_by_code( existed_item_id[i] ) ), "etherealExchange_stone_to_character(" .. existed_item_id[i] .. ")" ) end dlg_menu( "@90010003", "NPC_ChipExchange_contact()" ) -- µ¹¾Æ°¡±â dlg_show() -- º¸À̱â end function etherealExchange_stone_to_character( item_code ) -- Àӽà º¯¼ö ¼±¾ð°ú µ¿½Ã¿¡ NPC ID °¡Á®¿À±â local npc_id = get_npc_id() local npc_name = "@"..get_npc_type().."|@"..get_npc_name() dlg_title(npc_name) -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end dlg_text("@91002071") -- ij¸¯ÅÍ ¿¡Å׸®¾ó·Î ÀüȯÇÒ ¿¡Å׸®¾ó ½ºÅæÀ» ¼±ÅÃÇØÁÖ¼¼¿ä local found_item_handle = get_item_handle_list( item_code ) local i for i = 1, table.getn( found_item_handle ) do dlg_menu( tostring( get_item_name( found_item_handle[i] ) ) .. "(" .. math.ceil( get_item_ethereal_durability( found_item_handle[i] ) / 10000 ) .. ")", "etherealExchange_calculator(" .. found_item_handle[i] .. ")" ) end dlg_menu( "@90010003", "NPC_ChipExchange_contact()" ) -- µ¹¾Æ°¡±â dlg_show() -- º¸À̱â end function etherealExchange_calculator( item_handle ) if is_erasable_item( item_handle ) == 0 then return end local item_ethereal = get_item_ethereal_durability( item_handle ) local character_ethereal = gv( 'ethereal_stone' ) local charge_ethereal = 100000000 - character_ethereal if charge_ethereal > item_ethereal then charge_ethereal = item_ethereal end set_item_ethereal_durability( item_handle, item_ethereal - charge_ethereal ) sv( 'ethereal_stone', character_ethereal + charge_ethereal ) item_ethereal = get_item_ethereal_durability( item_handle ) if item_ethereal < 10000 then ethereal_and_accelertor_delete( item_handle, 1 ) end end function Exchange_ethereal_and_accelerator_to_RP() -- Àӽà º¯¼ö ¼±¾ð°ú µ¿½Ã¿¡ NPC ID °¡Á®¿À±â local npc_id = get_npc_id() local npc_name = "@"..get_npc_type().."|@"..get_npc_name() dlg_title(npc_name) -- ½ÃÅ©·çÆ® NPC ÀÏ ¶§ ½ÃÅ©·çÆ®°¡ ¾Æ´Ï¸é if get_npc_id() == 7015 then if is_premium() == false then return false end end dlg_text("@91002074") -- ºó ¿¡Å׸®¾ó ½ºÅæ°ú ÃËÁøÁ¦ ¸ðµÎ ·çÇÇ·Î ±³È¯ -- ¿¡Å׸®¾ó ½ºÅæ 8Á¾ local checked_item_id = {1100501, 1100502, 1100503, 1100504, 1100505, 1100506, 1100507, 1100508} local found_item_handle = {} local i for i = 1, 8 do found_item_handle = get_item_handle_list( checked_item_id[i] ) for j = 1, table.getn( found_item_handle ) do if get_item_ethereal_durability( found_item_handle[j] ) < 10000 then ethereal_and_accelertor_delete( found_item_handle[j], 1 ) end end end -- Ã˸Š3Á¾ checked_item_id = {1100601, 1100602, 1100603} for i = 1, 3 do local count = find_item( checked_item_id[i] ) ethereal_and_accelertor_delete( get_item_handle( checked_item_id[i] ), count ) end dlg_menu( "@90010003", "NPC_ChipExchange_contact()" ) -- µ¹¾Æ°¡±â dlg_show() -- º¸À̱â end function ethereal_and_accelertor_delete( item_handle, count ) if is_erasable_item( item_handle ) == 0 or count == 0 then return end local price_table = {} price_table[ 1100501 ] = 100000 price_table[ 1100502 ] = 5000000 price_table[ 1100503 ] = 10000000 price_table[ 1100504 ] = 10 price_table[ 1100505 ] = 10 price_table[ 1100506 ] = 10 price_table[ 1100507 ] = 10 price_table[ 1100508 ] = 10 price_table[ 1100601 ] = 1000 price_table[ 1100602 ] = 500 price_table[ 1100603 ] = 200000 sv( 'gold', gv( 'gold' ) + price_table[ get_item_code( item_handle ) ] * count ) update_gold_chaos() delete_item( item_handle, count ) end