I am trying to fix the quest tainted in queens colony the quest script had quest, questGiver,player instead of Quest, QuestGiver, PLayer through out it
but now on the line
GiveQuestItem(Quest, Player, "I've cleared out many spiders and as a result found an unusual item.", 10317)
i am getting an error on the server console that says
LUA GiveQuestItem command error: unable to get a valid client from the given spawn
this works on the first run of quest but fails if for some reason you camp or zone reloads so that the quest reloads at the correct step
Quest tainted
Moderator: Team Members
Forum rules
READ THE STICKY ON PROPER BUG SUBMISSION FORMAT BEFORE POSTING.
READ THE STICKY ON PROPER BUG SUBMISSION FORMAT BEFORE POSTING.
- Ememjr
- Team Member
- Posts: 975
- Joined: Wed Mar 15, 2017 9:41 am
- EQ2Emu Server: Perseverance
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Quest tainted
These are just variable names so they don't really matter as long as they are consistent through out the script.Ememjr wrote: Sun Apr 02, 2017 3:50 pm I am trying to fix the quest tainted in queens colony the quest script had quest, questGiver,player instead of Quest, QuestGiver, PLayer
I am not sure why the player would be invalid I will have to look at that but this also brings up an interesting point, that function giving the error causes the quest reward window to pop up and if some one logs out after getting that we wouldn't want the window to pop up again when they log back in giving them a dupe item. Might be best to add another parameter to the function call reload or something and put a "if reload == false then" around that line then from the reload function pass true for that param. That would also bypass the error but not solve the root cause of the error.
- Ememjr
- Team Member
- Posts: 975
- Joined: Wed Mar 15, 2017 9:41 am
- EQ2Emu Server: Perseverance
Re: Quest tainted
well when quest was used instead of Quest it gave an error of invalid quest error
and when player was used vs Player it gave an invalid spawn error
as for dupeing there would need to be options ie if its a quest item only (no trade no value and doesnt do anything to hurt game otherwise then it should be able to give another one if it was deleted i will delete quest agian, but to test but i dont recall the quet reward box coming up when first getting the item
and when player was used vs Player it gave an invalid spawn error
as for dupeing there would need to be options ie if its a quest item only (no trade no value and doesnt do anything to hurt game otherwise then it should be able to give another one if it was deleted i will delete quest agian, but to test but i dont recall the quet reward box coming up when first getting the item
- Ememjr
- Team Member
- Posts: 975
- Joined: Wed Mar 15, 2017 9:41 am
- EQ2Emu Server: Perseverance
Re: Quest tainted
oh yes reward box came up but on reload after camping no box comes up and still got no valid client, but since i still a have in inventory from before it worked there was something else i mmust have change as well comparing the orginal with the new, becuase
when first runnign this quest it would not even show in journal correctly when reloaded, becuase of a quest script error
when first runnign this quest it would not even show in journal correctly when reloaded, becuase of a quest script error
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Quest tainted
They need to be consistent through out the function, a quick look at tainted on the web editor I see this
This will work as the parameters are quest and player and that is used through out the function, now in reload
step 1, 2, and 3 will give errors because the parameters for reload are Quest, QuestGiver, Player but it uses quest, questgiver, player which will all be null so the error won't actually happen on these lines but in the functions it is calling.
Your error was in step1_toxicCrawlers, you said it worked the first time but on a reload it gave the error and that is because of what I pointed out in the reload function above, it is essentially calling step1_toxicCrawlers(nil, nil, nil).
Code: Select all
function completed(quest, questGiver, player)
UpdateQuestDescription(quest, "While killing toxic crawlers to test Deianeira's theory on poison, I found a piece of parchment hinting that someone had influenced the toxic crawlers by hiding some kind of totem in their main nest. After I removed Direspike from the lair, the totem shattered on its own. The poison theory seems shattered as well.")
GiveQuestReward(quest, player)
end
Code: Select all
function Reload(Quest, QuestGiver, Player, Step)
if Step == 1 then
step1_toxicCrawlers(quest, questGiver, player)
elseif Step == 2 then
step2_complete_examinedParchment(quest, questGiver, player)
elseif Step == 3 then
step3_complete_toxicCrawlers(quest, questGiver, player)
elseif Step == 4 then
step4_complete_putParchmentTogether(Quest, QuestGiver, Player)
elseif Step == 5 then
step5_complete_foundParchment(Quest, QuestGiver, Player)
elseif Step == 6 then
step6_complete_harvestedParchment(Quest, QuestGiver, Player)
elseif Step == 7 then
step7_complete_putParchmentTogether(Quest, QuestGiver, Player)
elseif Step == 8 then
step8_complete_killedDireSpike(Quest, QuestGiver, Player)
end
end
Your error was in step1_toxicCrawlers, you said it worked the first time but on a reload it gave the error and that is because of what I pointed out in the reload function above, it is essentially calling step1_toxicCrawlers(nil, nil, nil).
- Ememjr
- Team Member
- Posts: 975
- Joined: Wed Mar 15, 2017 9:41 am
- EQ2Emu Server: Perseverance
Re: Quest tainted
okay thanks i will correct that and fix in the web editor if i can
Who is online
Users browsing this forum: No registered users and 0 guests