Page 1 of 1

QUEST-Tutorial: The Art of Weapons (fixed)

Posted: Sat Aug 19, 2017 5:12 am
by Ememjr
This has been fixed on emu server

Having issue completing the following quest, first item completes, but no notification that second item completed, go to quest giver no completions and offers next quest
fixes so far
1 - quest id of 93 is wrong, should be 94, confirmed and fixed in eq2db editor,and my private server
2 - recipe creates item 89113 for tin hand axe quest is calling for 89115(a duplication item in DB)
3 -moved the line UpdateQuestTaskGroupDescription from function addstep3 to progress check function

Here is orinial script

Code: Select all

--[[
	Script Name		:	Quests/FrostfangSea/tutorial_the_art_of_weapons.lua
	Script Purpose	:	Tutorial: The Art of Weapons
	Script Author	:	theFoof
	Script Date		:	2013.10.19 
	Script Notes	:	

	Zone			:	Frostfang Sea
	Quest Giver		:	Glin Hammerhelm
	Preceded by		:	Tutorial: Learning to Cook
	Followed by		:	Tutorial: Scribing Scrolls
--]]

function Init(Quest)
	SetQuestFeatherColor(Quest, 2)
	AddQuestStepCraft(Quest, 1, "I need to create an elm greatstaff using the woodworking table.", 1, 100, "I must follow the tutor's instructions to review the crafting process.", 622, 76153)
	AddQuestStepCraft(Quest, 2, "I must create a tin hand axe using the forge.", 1, 100, "I must follow the tutor's instructions to review the crafting process.", 2154, 89115)
	AddQuestStepCompleteAction(Quest, 1, "MadeStaff")
	AddQuestStepCompleteAction(Quest, 2, "MadeAxe")
end

function Accepted(Quest, QuestGiver, Player)
end

function Deleted(Quest, QuestGiver, Player)
end

function Declined(Quest, QuestGiver, Player)
end

function MadeStaff(Quest, QuestGiver, Player)
	UpdateQuestStepDescription(Quest, 1, "I have created an elm greatstaff.")
	ProgressCheck(Quest, QuestGiver, Player)
end

function MadeAxe(Quest, QuestGiver, Player)
	UpdateQuestStepDescription(Quest, 2, "I created a tin hand axe.")
	ProgressCheck(Quest, QuestGiver, Player)
end

function ProgressCheck(Quest, QuestGiver, Player)
	if QuestStepIsComplete(Player, 93, 1) and QuestStepIsComplete(Player, 93, 2) then
		AddStep3(Quest, QuestGiver, Player)
	end
end

function AddStep3(Quest, QuestGiver, Player)
	SetCompleteFlag(Quest)
	UpdateQuestTaskGroupDescription(Quest, 1, "I have reviewed the process of crafting an item.")
	AddQuestStepChat(Quest, 3, "I should return to the tutor with the weapons.", 1, "I should return to the tutor with my work.", 0, GetSpawnID(QuestGiver))
	AddQuestStepCompleteAction(Quest, 3, "CompleteQuest")
end

function CompleteQuest(Quest, QuestGiver, Player)
	GiveQuestReward(Quest, Player)
end

function Reload(Quest, QuestGiver, Player)
	if QuestStepIsComplete(Player, 93, 1) then
		MadeStaff(Quest, QuestGiver, Player)
	end
	if QuestStepIsComplete(Player, 93, 2) then
		MadeAxe(Quest, QuestGiver, Player)
	end
end	
here is fixed script

Code: Select all

--[[
	Script Name		:	Quests/FrostfangSea/tutorial_the_art_of_weapons.lua
	Script Purpose	:	Tutorial: The Art of Weapons
	Script Author	:	theFoof
	Script Date		:	2013.10.19
	Script Notes	:

	Zone			:	Frostfang Sea
	Quest Giver		:	Glin Hammerhelm
	Preceded by		:	Tutorial: Learning to Cook
	Followed by		:	Tutorial: Scribing Scrolls
--]]

function Init(Quest)
	SetQuestFeatherColor(Quest, 2)
	AddQuestStepCraft(Quest, 1, "I need to create an elm greatstaff using the woodworking table.", 1, 100, "I must follow the tutor's instructions to review the crafting process.", 622, 76153)
	AddQuestStepCraft(Quest, 2, "I must create a tin hand axe using the forge.", 1, 100, "I must follow the tutor's instructions to review the crafting process.", 2154, 89113)
	AddQuestStepCompleteAction(Quest, 1, "MadeStaff")
	AddQuestStepCompleteAction(Quest, 2, "MadeAxe")
end

function Accepted(Quest, QuestGiver, Player)
end

function Deleted(Quest, QuestGiver, Player)
end

function Declined(Quest, QuestGiver, Player)
end

function MadeStaff(Quest, QuestGiver, Player)
	UpdateQuestStepDescription(Quest, 1, "I have created an elm greatstaff.")
	ProgressCheck(Quest, QuestGiver, Player)
end

function MadeAxe(Quest, QuestGiver, Player)
	UpdateQuestStepDescription(Quest, 2, "I created a tin hand axe.")
	ProgressCheck(Quest, QuestGiver, Player)
end

function ProgressCheck(Quest, QuestGiver, Player)
	if QuestStepIsComplete(Player, 94, 1) and QuestStepIsComplete(Player, 94, 2) then
		UpdateQuestTaskGroupDescription(Quest, 1, "I have reviewed the process of crafting an item.")
		AddStep3(Quest, QuestGiver, Player)
	end
end

function AddStep3(Quest, QuestGiver, Player)
	SetCompleteFlag(Quest)
	AddQuestStepChat(Quest, 3, "I should return to the tutor with the weapons.", 1, "I should return to the tutor with my work.", 0, GetSpawnID(QuestGiver))
	AddQuestStepCompleteAction(Quest, 3, "CompleteQuest")
end

function CompleteQuest(Quest, QuestGiver, Player)
	GiveQuestReward(Quest, Player)
end

function Reload(Quest, QuestGiver, Player)
	if QuestStepIsComplete(Player, 94, 1) then
		MadeStaff(Quest, QuestGiver, Player)
	end
	if QuestStepIsComplete(Player, 94, 2) then
		MadeAxe(Quest, QuestGiver, Player)
	end
end