[RELEASE] Pet System Advanced quest

09/15/2012 05:48 neograsia#61
Quote:
/usr/game/share/locale/turkey/quest/object/pet
already created. I have read all the pages again and again. but I could not find the problem. meanwhile, thank you for your response.

Edit: I solved the problem.. :)

I was trying to gm character and my nick is [GM]...

Quote:
local LOCAL_PATH = pc.get_name().."/"
....
mkdir "..LOCAL_PATH.."
so queslib.lua is trying to folder name [GM].. but cant create. I'm sorry for my limited english
09/15/2012 11:10 vpser#62
The quest is working %100

i am try with gm account no problem
09/15/2012 12:01 *~.ιηνιη¢ιвℓє.~*#63
Thats a Wonderful system :*
09/15/2012 13:15 neograsia#64
Quote:
Originally Posted by vpser View Post
The quest is working %100

i am try with gm account no problem
I said for who have the same problem with me, not for you.
09/15/2012 16:17 Gravity0#65
nice quest man...i really like it xD you helped a lot...whenever you want, can you release the pet-system gui? xDD that would be a really nice thing..thanks anyway
09/16/2012 02:23 neograsia#66
I have a new problem. pet is giving stats but bonus does not. Do you have any idea? (I know, the problem is probably my fault) I'd appreciate if you help. thanks..
09/16/2012 04:52 .Chuck#67
Nice, Thanks for Release
09/16/2012 07:58 [ShiizoPhreN]™#68
hi,
Kann man mit der art und weise wie das system hier aufgebaut ist pet und pferd rufen ?
oder wieder einfach nur eine weitere funktion was es schon soo oft gibt ?
09/16/2012 18:53 d3m0n3#69
Quote:
Originally Posted by neograsia View Post
I have a new problem. pet is giving stats but bonus does not. Do you have any idea? (I know, the problem is probably my fault) I'd appreciate if you help. thanks..
function for the bonus was not created. you need to add
09/16/2012 19:46 [ShiizoPhreN]™#70
GER: Hi
Also ich komme bis uz dem punkt wo ich ein Namen für das pet wählen soll danach schließ sich einfach das questfenster hat jemand ne info wie ich das behebe ?

ENG:Hi
So I come up to the point where I should choose a name for your pet then simply closes the window quest someone has an info how do I fix it?

Kind Regards
09/16/2012 20:04 d3m0n3#71
Quote:
Originally Posted by [ShiizoPhreN]™ View Post
GER: Hi
Also ich komme bis uz dem punkt wo ich ein Namen für das pet wählen soll danach schließ sich einfach das questfenster hat jemand ne info wie ich das behebe ?

ENG:Hi
So I come up to the point where I should choose a name for your pet then simply closes the window quest someone has an info how do I fix it?

Kind Regards
have you created the pet directory?
changed file links according to your local?
09/16/2012 21:31 neograsia#72
Quote:
Originally Posted by d3m0n3 View Post
function for the bonus was not created. you need to add
Thanks for the answer.. but..

Quote:
function evoca(i, stato)
local bonus = { 3,4,5,6, }
local status = PetArray[i][6]
local PetGrade = tonumber(GetGrade(i))
local PetName = data_tool(i, PET_NAME, PET_DATA, PET_READ)
local PetLevel = tonumber(data_tool(i, PET_LEVEL, PET_DATA, PET_READ))
local horse_level = horse.get_level()
local apply = 0
local level = 21 + i
if stato == PET_SUMMON then
local z = 1
while true do
if bonus[z] == nil then break end
apply = PetGrade*status[z]
affect.add_collect(bonus[z], apply, 60*60*8)
z = z + 1



quest_functions:
PetGiveExp
evoca
inizializza
npc.get_level
show_pet_menu
file
Can you tell an example please. If I solve this problem... I will not ask any more questions. I promise :p
09/16/2012 22:14 d3m0n3#73
Quote:
Originally Posted by neograsia View Post
Thanks for the answer.. but..



Can you tell an example please. If I solve this problem... I will not ask any more questions. I promise :p
can try this but is not tested:

Code:
function apply_bonus(i, mode)
	local a = {}
	local bon = {}
	local x = 1
	local y = 2
	local w = 1
	local bonus
	local PetGrade = tonumber(GetGrade(i))
	while true do
		a[x] = tonumber(data_tool(i, x, PET_BONUS, PET_READ))
		if a[x] == nil then break end
		x = x + 1
	end
	local z = tonumber(a[1])+2
	while true do
		bonus = tonumber(a[y])
		bon[y-1] = PetBonus[z][y][bonus]
		if bon[y-1] == nil then break end
		y = y + 1
	end	
	if mode == PET_SUMMON then
		while true do
			if bon[w] == nil then break end
			affect.add_collect(bon[w], PetGrade, 60*60*8)
			w = w + 1
		end	
	elseif mode == PET_UNSUMMON then
		while true do
			if bon[w] == nil then break end
			affect.remove_collect(bon[w], PetGrade, 60*60*8)
			w = w + 1
		end	
	end
end
or also this which is less beautiful but efficient

Code:
function apply_bonus(i, mode)
	local PetGrade = tonumber(GetGrade(i))
	local a = tonumber(data_tool(i, PET_BON1, PET_BONUS, PET_READ))
	local b = tonumber(data_tool(i, PET_BON2, PET_BONUS, PET_READ))
	local c = tonumber(data_tool(i, PET_BON3, PET_BONUS, PET_READ))
	local d = tonumber(data_tool(i, PET_BON4, PET_BONUS, PET_READ))
	local e = tonumber(data_tool(i, PET_TYPE, PET_BONUS, PET_READ))
	local bon1 = PetBonus[e+2][2][a]
	local bon2 = PetBonus[e+2][3][b]
	local bon3 = PetBonus[e+2][4][c]
	local bon4 = PetBonus[e+2][5][d]
	if mode == PET_SUMMON then
		affect.add_collect(bon1, PetGrade, 60*60*8)
		affect.add_collect(bon2, PetGrade, 60*60*8)
		affect.add_collect(bon3, PetGrade, 60*60*8)
		affect.add_collect(bon4, PetGrade, 60*60*8)
	elseif mode == PET_UNSUMMON then
		affect.remove_collect(bon1, PetGrade, 60*60*8)
		affect.remove_collect(bon2, PetGrade, 60*60*8)
		affect.remove_collect(bon3, PetGrade, 60*60*8)
		affect.remove_collect(bon4, PetGrade, 60*60*8)
	end
end
09/17/2012 00:52 neograsia#74
Code:
function apply_bonus(i, mode)
	local PetGrade = tonumber(GetGrade(i))
	local a = tonumber(data_tool(i, PET_BON1, PET_BONUS, PET_READ))
	local b = tonumber(data_tool(i, PET_BON2, PET_BONUS, PET_READ))
	local c = tonumber(data_tool(i, PET_BON3, PET_BONUS, PET_READ))
	local d = tonumber(data_tool(i, PET_BON4, PET_BONUS, PET_READ))
	local e = tonumber(data_tool(i, PET_TYPE, PET_BONUS, PET_READ))
	local bon1 = PetBonus[e+2][2][a]
	local bon2 = PetBonus[e+2][3][b]
	local bon3 = PetBonus[e+2][4][c]
	local bon4 = PetBonus[e+2][5][d]
	if mode == PET_SUMMON then
		affect.add_collect(bon1, PetGrade, 60*60*8)
		affect.add_collect(bon2, PetGrade, 60*60*8)
		affect.add_collect(bon3, PetGrade, 60*60*8)
		affect.add_collect(bon4, PetGrade, 60*60*8)
	elseif mode == PET_UNSUMMON then
		affect.remove_collect(bon1, PetGrade, 60*60*8)
		affect.remove_collect(bon2, PetGrade, 60*60*8)
		affect.remove_collect(bon3, PetGrade, 60*60*8)
		affect.remove_collect(bon4, PetGrade, 60*60*8)
	end
end
it is work. thank you very much indeed..
09/17/2012 14:12 sema1995#75
My problem is when click 53005 , leaves no the pet :S