Jump to content

[HELP] Warp Ring


Go to solution Solved by caanmasu,

Recommended Posts

  • Active+ Member

Can someone help me cooldown time from ring ? and also add me grotto 2 TP  
 

quest ring_warp begin
    state start begin
        when 10031.sig_use begin
        --    if pc.get_level() < item.get_value (0) then
        --        say("·¹º§ÀÌ ³·¾Æ ¸ø°¡³×")
        --        say("")
        --        return
        --    end
        

      local empire = pc.get_empire()

            local max_use = item.get_value(0)
            local n = item.get_socket (0)
            if n >= max_use then
                say (gameforge.ring_warp._010_say)
                return
            end
            
            local t = item.get_socket(1)
            if t > get_global_time() then
                say (string.format(gameforge.ring_warp._020_say, (t - get_global_time()) / 1 ))
                return 
            end
            say(string.format(gameforge.ring_warp._030_say, max_use -n))
            local sub_set = 0
            
            local town1={
                    gameforge.functions._100_say,
                    gameforge.functions._110_say,
                    gameforge.functions._120_say,
                }
            
            local town2={
                    gameforge.functions._130_say,
                    gameforge.functions._140_say,
                    gameforge.functions._150_say,
                }
            sub_set = select(town1[empire],town2[empire],locale.map_name[64], locale.map_name[63], locale.map_name[61],locale.map_name[62],gameforge.locale.cancel)
            if sub_set == 7 then -- ´Ý±â
                return
            end
            
            local warp = {
                { -- empire town -1
                
                    { 474300 , 954800 },
                    { 63800 , 166400 },
                    { 959900 , 269200 },
                },
                { -- empire town -2
                    { 353100 , 882900},
                    { 145500 , 240000 },
                    { 863900 , 246000 },
                    
                },
                -- 64 map_n_threeway
                {
                    { 402100, 673900 },
                    { 270400, 739900 },
                    { 321300, 808000 },
                },
                -- 63 metin2_map_n_desert_01
                {
                    { 217800, 627200 },
                    { 221900, 502700 },
                    { 344000, 502500 },
                },
                -- 61 map_n_snowm_01
                {
                    { 434200, 290600 },
                    { 375200, 174900 },
                    { 491800, 173600 },
                },
                -- 62 metin2_map_n_flame_01
                {
                    { 599400, 756300 },
                    { 597800, 622200 },
                    { 730700, 689800 },
                },
            }

            if not pc.warp(warp[sub_set][empire][1], warp[sub_set][empire][2]) then
                return
            end

            item.set_socket(1, get_global_time() + item.get_value(1))
            if n == max_use - 1 then
                item.remove()
            else
                item.set_socket(0, n + 1)
            end
        end --when
     end -- end_of_state
end -- end_of_quest

 

spacer.png

Link to comment
Share on other sites

  • Solution

1. Cooldown time: 
item_proto -> value1. Put cooldown time in seconds. Example 5 minutes: 300.

 

2. Grotto 2 TP: 

Add your map name in locale.lua (map index 73), then add the variable in select:

original:

            sub_set = select(town1[empire],town2[empire],locale.map_name[64], locale.map_name[63], locale.map_name[61],locale.map_name[62],gameforge.locale.cancel)
            if sub_set == 7 then -- ´Ý±â
                return
            end

new:

            sub_set = select(town1[empire],town2[empire],locale.map_name[64], locale.map_name[63], locale.map_name[61],locale.map_name[62], locale.map_name[73], gameforge.locale.cancel)
            if sub_set == 8 then -- ´Ý±â --put 8 instead 7
                return
            end

Add:

                -- 73 metin2_map_skipia_dungeon_02
                {
                    { 153600, 1203200 },
                    { 153600, 1203200 },
                    { 153600, 1203200 },
                },


Below of:

                -- 62 metin2_map_n_flame_01
                {
                    { 153600, 1203200 },
                    { 153600, 1203200 },
                    { 153600, 1203200 },
                },

                

(no tested)

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.