Jump to content
Home

Fixing Pet Skills Bug

Recommended Posts

Hi.

 

I recently faced an little bug in Fairy Skills related to the client, and it is in every client i tested (top1, pko). For some reason when you put certain combinations of skills like Meditation, Magic, Protection it does not shows the last skill or even shows a diferent level to it, like Expert when suposed to be novice. The solution is pretty simple.

 

1 - Go to your "Game Folder/scripts/lua/table/scripts.lua

2 - Add this function anywhere

function GetNum_Fixed ( Num )
    Num = tostring(Num)
    a = string.sub(Num, -1)
    a = tonumber(a)
    return a
end

3 - Search for function GetElfSkill

4 - Replace:

local Part7 = GetNum_Part7 ( Num )

To

local Part7 = GetNum_Fixed ( Num )

 

And its done.

Edited by Home
  • Like 5

Share this post


Link to post
Share on other sites

Hm, problem still occurs when I feed 3 skills, ( I have to feed multiple times until I get all 3 skills, which already happens without this solution you provided.)

  • Like 1

Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
20 hours ago, Vang said:

Hm, problem still occurs when I feed 3 skills, ( I have to feed multiple times until I get all 3 skills, which already happens without this solution you provided.)

 

In this case you just need to change success rate in feeding fairy.

Share this post


Link to post
Share on other sites
3 hours ago, Home said:

 

In this case you just need to change success rate in feeding fairy.

Where can I find this success rate of fairy in?


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
17 hours ago, Vang said:

Where can I find this success rate of fairy in?

function AddElfSkill 

 

 

at functions.lua

 

 

if you dont know how to edit, this is the function done im using on my server

 

function AddElfSkill(Item, SkillType, SkillNum)

	local Num = GetItemForgeParam(Item, 1)
	local Part1 = GetNum_Part1(Num)
	local Part2 = GetNum_Part2(Num)
	local Part3 = GetNum_Part3(Num)
	local Part4 = GetNum_Part4(Num)
	local Part5 = GetNum_Part5(Num)
	local Part6 = GetNum_Part6(Num)
	local Part7 = GetNum_Part7(Num)

	if Part2 == SkillNum then
		Part3 = SkillType
		Num = SetNum_Part3(Num, Part3)
		Num = SetNum_Part2(Num, Part2)
		SetItemForgeParam(Item, 1, Num)
		return
	end

	if Part4 == SkillNum then
		Part5 = SkillType
		Num = SetNum_Part5(Num, Part5)
		Num = SetNum_Part4(Num, Part4)
		SetItemForgeParam(Item, 1, Num)
		return
	end

	if Part6 == SkillNum then
		Part7 = SkillType
		Num = SetNum_Part7(Num, Part7)
		Num = SetNum_Part6(Num, Part6)
		SetItemForgeParam(Item, 1, Num)
		return
	end

	--local rad = math.random(1, 100)

	if Part2 == 0 and Part3 == 0 then
		Part2 = SkillNum
		Part3 = SkillType
		Num = SetNum_Part3(Num, Part3)
		Num = SetNum_Part2(Num, Part2)
		SetItemForgeParam(Item, 1, Num)
		return
	--[[
	else
		-- Go Pirate King Custom Feature 0% chance to override
		if rad == 0 then
			Part2 = SkillNum
			Part3 = SkillType
			Num = SetNum_Part3(Num, Part3)
			Num = SetNum_Part2(Num, Part2)
			SetItemForgeParam(Item, 1, Num)
			return
		end
	]]--
	end

	if Part4 == 0 and Part5 == 0 then
		Part4 = SkillNum
		Part5 = SkillType
		Num = SetNum_Part5(Num, Part5)
		Num = SetNum_Part4(Num, Part4)
		SetItemForgeParam(Item, 1, Num)
		return
	--[[
	else
		-- Go Pirate King Custom Feature 0% chance to override
		if rad == 0 then
			Part4 = SkillNum
			Part5 = SkillType
			Num = SetNum_Part5(Num, Part5)
			Num = SetNum_Part4(Num, Part4)
			SetItemForgeParam(Item, 1, Num)
			return
		end
		]]--
	end

	if Part6 == 0 and Part7 == 0 then
		Part6 = SkillNum
		Part7 = SkillType
		Num = SetNum_Part7(Num, Part7)
		Num = SetNum_Part6(Num, Part6)
		SetItemForgeParam(Item, 1, Num)
		return
	else
		Part6 = SkillNum
		Part7 = SkillType
		Num = SetNum_Part7(Num, Part7)
		Num = SetNum_Part6(Num, Part6)
		SetItemForgeParam(Item, 1, Num)
		return
	end
end

 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...