• Announcement:
    In order to download VIP files, you need to UPGRADE your account.

Not answered Sage skills effect&quest problem

Member
Oct
Threads
1
12
1
3
HubMoney
118
Hello

Problem with the Sage skills system:
Everything seems to work as it should, except:

  • After installing sage skill, use the effects of a skill improved by 1
I understand what needs to be changed, but I don't understand where exactly. Can anyone tell me which files are responsible for this?

2.png

  • The quest of the stone to improve skills P1-P2-...P10-S does not work. The quest closes after clicking Yes.
I attach the quest.

1.png

For some reason it was in .lua format
Tell me how the quest file is fundamentally different.lua from .quest?

Thank you.

Code:
quest training_sagemaster_skill begin
    state start begin
        function BuildSageMasterSkillList(job, group)
            PERFECT_MASTER_SKILL_LEVEL = 40
            SAGE_MASTER_SKILL_LEVEL = 50
          
            local skill_list = special.active_skill_list[job+1][group]
            local ret_vnum_list = {}
            local ret_name_list = {}
          
            table.foreach(skill_list,
            function(i, skill_vnum)
            local skill_level = pc.get_skill_level(skill_vnum)
          
            if skill_level >= PERFECT_MASTER_SKILL_LEVEL and skill_level < SAGE_MASTER_SKILL_LEVEL then
                table.insert(ret_vnum_list, skill_vnum)
                local name = locale.GM_SKILL_NAME_DICT[skill_vnum]
                if name == nil then
                    name = skill_vnum
                end
              
                table.insert(ret_name_list, name)
            end
            end)
          
            return {ret_vnum_list, ret_name_list}
        end
      
        when 50569.use begin
            say_title(item_name(50569))
            say("")
            if pc.get_skill_group() == 0 then
                say("You didn't start an apprenticeship yet.")
                return
            end
          
            --if get_time() < pc.getqf("next_time") then
                --if not pc.is_skill_book_no_delay() then
                    --say("When your training is done, you have to")
                    --say("rest for 5 hours.")
                    --say("")
                    --return
                --end
            --end
          
            local result = training_sagemaster_skill.BuildSageMasterSkillList(pc.get_job(), pc.get_skill_group())
            local vnum_list = result[1]
            local name_list = result[2]
            if table.getn(vnum_list) == 0 then
                say("No skill was learned yet through the skill")
                say("training of the Perfect Grand Masters.")
                say("")
                return
            end
          
            say("Please choose the skill you want to learn:")
            say("")
          
            local menu_list = {}
            table.foreach(name_list, function(i, name) table.insert(menu_list, name) end)
            table.insert(menu_list, "Close")
          
            local s=select_table(menu_list)
            if table.getn(menu_list) == s then
                return
            end
          
            local skill_name = name_list[s]
            local skill_vnum = vnum_list[s]
            local skill_level = pc.get_skill_level(skill_vnum)
            local cur_alignment = pc.get_real_alignment()
            local need_alignment = 1000 + 500 * (skill_level - 30)
          
            local title = string.format("%s Perfect Grand Master", skill_name)
          
            say_title(item_name(50569))
            say("")
            say("When your waste your Good/Evils points during")
            say("the training it's possible that you can be")
            say("downgraded, even under the level of a Ronin.")
            say("")
            say("Do you want to continue?")
            say("")
            local s = select("Yes", "No") 
            if s == 2 then
                return
            end
          
            if cur_alignment <- 19000+need_alignment then
                say_title(title)
                say("")
                say_reward("You don't have enough alignment points")
                say_reward("for a Grand Master training.")
                say("")
                return
            end
          
            --if get_time() < pc.getqf("next_time") then
                --if pc.is_skill_book_no_delay() then
                    --pc.remove_skill_book_no_delay()
                --else
                    --return
                --end
            --end
          
            --pc.setqf("next_time", get_time()+60*60*5)
            if s == 1 then
            if pc.learn_sage_master_skill(skill_vnum) then
                say_title(title)
                say("")
                if pc.get_skill_level(skill_vnum) == 50 then
                    say(string.format("%s became a sage Master.", skill_name))
                else
                    say(string.format("You raised %s to P%d.", skill_name, skill_level-40+1+1))
                end
              
                say("My body is full of power. Something comes out here!")
                say_reward("You have completed higher level of training successfully.")
                say("")
            else
                say_title(title)
                say("")
                say_reward("That did not work. Darn!")
                say("")
            end
            end
            pc.remove_item(50569, 1)
        end
    end
end
 
Last edited:
Metin2Hub Bot
M2Hub Bot
Feb
Threads
65
1,505
1
610
113
HubMoney
975
Hello

Problem with the Sage skills system:
Everything seems to work as it should, except:

  • 1. After installing sage skill, use the effects of a skill improved by 1
I understand what needs to be changed, but I don't understand where exactly. Can anyone tell me which files are responsible for this?

View attachment 1277

  • The quest of the stone to improve skills P1-P2-...P10-S does not work. The quest closes after clicking Yes.
I attach the quest.

View attachment 1278

For some reason it was in .lua format
Tell me how the quest file is fundamentally different.lua from .quest?

Thank you.

Code:
quest training_sagemaster_skill begin
    state start begin
        function BuildSageMasterSkillList(job, group)
            PERFECT_MASTER_SKILL_LEVEL = 40
            SAGE_MASTER_SKILL_LEVEL = 50
            
            local skill_list = special.active_skill_list[job+1][group]
            local ret_vnum_list = {}
            local ret_name_list = {}
            
            table.foreach(skill_list,
            function(i, skill_vnum)
            local skill_level = pc.get_skill_level(skill_vnum)
            
            if skill_level >= PERFECT_MASTER_SKILL_LEVEL and skill_level < SAGE_MASTER_SKILL_LEVEL then
                table.insert(ret_vnum_list, skill_vnum)
                local name = locale.GM_SKILL_NAME_DICT[skill_vnum]
                if name == nil then
                    name = skill_vnum
                end
                
                table.insert(ret_name_list, name)
            end
            end)
            
            return {ret_vnum_list, ret_name_list}
        end
        
        when 50569.use begin
            say_title(item_name(50569))
            say("")
            if pc.get_skill_group() == 0 then
                say("You didn't start an apprenticeship yet.")
                return
            end
            
            --if get_time() < pc.getqf("next_time") then
                --if not pc.is_skill_book_no_delay() then
                    --say("When your training is done, you have to")
                    --say("rest for 5 hours.")
                    --say("")
                    --return
                --end
            --end
            
            local result = training_sagemaster_skill.BuildSageMasterSkillList(pc.get_job(), pc.get_skill_group())
            local vnum_list = result[1]
            local name_list = result[2]
            if table.getn(vnum_list) == 0 then
                say("No skill was learned yet through the skill")
                say("training of the Perfect Grand Masters.")
                say("")
                return
            end
            
            say("Please choose the skill you want to learn:")
            say("")
            
            local menu_list = {}
            table.foreach(name_list, function(i, name) table.insert(menu_list, name) end)
            table.insert(menu_list, "Close")
            
            local s=select_table(menu_list)
            if table.getn(menu_list) == s then
                return
            end
            
            local skill_name = name_list[s]
            local skill_vnum = vnum_list[s]
            local skill_level = pc.get_skill_level(skill_vnum)
            local cur_alignment = pc.get_real_alignment()
            local need_alignment = 1000 + 500 * (skill_level - 30)
            
            local title = string.format("%s Perfect Grand Master", skill_name)
            
            say_title(item_name(50569))
            say("")
            say("When your waste your Good/Evils points during")
            say("the training it's possible that you can be")
            say("downgraded, even under the level of a Ronin.")
            say("")
            say("Do you want to continue?")
            say("")
            local s = select("Yes", "No")   
            if s == 2 then
                return
            end
            
            if cur_alignment <- 19000+need_alignment then
                say_title(title)
                say("")
                say_reward("You don't have enough alignment points")
                say_reward("for a Grand Master training.")
                say("")
                return
            end
            
            --if get_time() < pc.getqf("next_time") then
                --if pc.is_skill_book_no_delay() then
                    --pc.remove_skill_book_no_delay()
                --else
                    --return
                --end
            --end
            
            --pc.setqf("next_time", get_time()+60*60*5)
            if s == 1 then
            if pc.learn_sage_master_skill(skill_vnum) then
                say_title(title)
                say("")
                if pc.get_skill_level(skill_vnum) == 50 then
                    say(string.format("%s became a sage Master.", skill_name))
                else
                    say(string.format("You raised %s to P%d.", skill_name, skill_level-40+1+1))
                end
                
                say("My body is full of power. Something comes out here!")
                say_reward("You have completed higher level of training successfully.")
                say("")
            else
                say_title(title)
                say("")
                say_reward("That did not work. Darn!")
                say("")
            end
            end
            pc.remove_item(50569, 1)
        end
    end
end

Hello dear user,

Your post will be under surveillance by bots for the next few hours.

Forum description : Metin2 private server, Metin2 download, Metin2 support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2.
 
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock