Jump to content

6TH SKILL NOT POPPING UP FROM "special.active_skill_list"


Recommended Posts

Hello devs;
I searched days for solutions to this problem, but still got no luck; I'm pretty sure that I'm missing something!

I'm trying to figure out what's happening in my lua script, that should list all skills at "M" level; in order to upgrade them.
It works fine for every skill of every race except the 6th skill of ninja archer "Spark" and also the 6th skill of the mental warrior "Sword Orb":

So I'm assuming this is a "6th skill problem".

I have those 6th skills set in my db, they upgrade successfully with in game console command ("/setskillother name 51 21"), and they work perfectly in game.

I assume there must be something that I'm missing from my function to add them in the variable "skill_list", here's the function:

 

		function BuildMasterSkillList(job, group) -- FUNC LIST SKILLS FROM M1 TO M10
			MASTER_SKILL_LEVEL = 20
			GRAND_MASTER_SKILL_LEVEL = 30

			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 >= MASTER_SKILL_LEVEL and skill_level < GRAND_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 -- function BuildMasterSkillList

 

 

 

 

 

Also I'll post the "output" part of the same script, but I'm sure the problem isn't here:

 

 

			local menu_list = {}
			table.foreach(name_list, function(i, name) table.insert(menu_list, name) end)
			table.insert(menu_list, gameforge.locale.cancel) 

			local s=select_table(menu_list)
			
			if table.getn(menu_list) == s then
				return
			end





Thanks for your time and your precious help;

Greetings!

Link to comment
Share on other sites

Hello there!

You need to put the 6th skill in special.active_skill_list in order for this to work.

You can find it in locale/xx/quest/questlib.lua usually.

It should be something like this:

special.active_skill_list = {
    {
        { 1, 2, 3, 4, 5, 6},
        { 16, 17, 18, 19, 20, 21},
    },
    {
        {31, 32, 33, 34, 35, 36},
        {46, 47, 48, 49, 50, 51},
    },
    {
        {61, 62, 63, 64, 65, 66},
        {76, 77, 78, 79, 80, 81},
    },
    {
        {91, 92, 93, 94, 95, 96},
        {106, 107, 108, 109, 110, 111},
    },
}

 

Edited by regal
  • Love 3
Link to comment
Share on other sites

1 hour ago, regal said:

Hello there!

You need to put the 6th skill in special.active_skill_list in order for this to work.

You can find it in locale/xx/quest/questlib.lua usually.

It should be something like this:



special.active_skill_list = {
    {
        { 1, 2, 3, 4, 5, 6},
        { 16, 17, 18, 19, 20, 21},
    },
    {
        {31, 32, 33, 34, 35, 36},
        {46, 47, 48, 49, 50, 51},
    },
    {
        {61, 62, 63, 64, 65, 66},
        {76, 77, 78, 79, 80, 81},
    },
    {
        {91, 92, 93, 94, 95, 96},
        {106, 107, 108, 109, 110, 111},
    },
}

 

Thank you my friend @regal!

After adding the missing 6th skills vnums in the "special.active_skill_list", my quest script recognized the skills and prompted me their vnum.

I managed to associate that orphan vnums with some translated strings:
Looking around in locale.lua I noticed that every skill vnum is paired with a translated string found in translate.lua, so I just created new strings to match the said orphan vnums and everything worked like a charm!

Your help was precious, thank you very mutch, mate!
Good things to you!

 

 

1 hour ago, Finnis said:

I think you forgot to add the skill id in function active_skill_list from questlib.lua.

Edit: Sorry, didn't see that someone answered already.

No need to worry @Finnis;
Your answer was still valuable!

Thank you for helping and good things to you too!

MACRO

(This post can be closed, solution was found)

Edited by Macromango
  • Love 2
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.