Quest Updates

Discussions of the design and development of in-game content.

Moderator: Team Members

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Quest Updates

Post by Scatman » Sun Aug 31, 2008 12:05 pm

Sorry to keep nagging you on quests here LE but I think we need something taken care of. The situation is, we receive the Art of War quest from Murrar which tells us to go speak to Hayle. So the first quest step is speak to Hayle. When we talk to Hayle the first time around to update that quest step, we need him to say the same thing (almost) that he says when you hail him without the quest. Then once the quest gets updated to go kill a sparring partner (step2), if you hail Hayle, without completing step2, he should ask if you are victorious yet.
The problem is, and correct me if I'm wrong, that quest updates appear to be getting updated after the hail, but before the spawnscript is run. Is that right?
If so, then trying to make Hayle say something before the first quest update is impossible and will just say the same thing.
It's hard to explain and took me a bit to figure out how to explain it hehe so if you need clarification let me know :P

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Sun Aug 31, 2008 12:44 pm

I'm not sure I understand the problem. Couldn't you just use the new GetQuestStep function in the hail script?

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Post by Scatman » Sun Aug 31, 2008 12:47 pm

I do use that. The problem is that the quest is updated before the spawnscript is run it seems. So I can't do anything before the quest step 1 is updated because it's updated before the hail function in the spawnscript is run.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Sun Aug 31, 2008 12:59 pm

So what exactly are you trying to make him do?

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Post by Scatman » Sun Aug 31, 2008 1:09 pm

Let's define what Hayl says when you don't have a quest as "A". We'll define what Hayl says after you get the quest from Murrar but before you update the quest at Hayl as "B". Then we'll define what Hayl says after you update the quest by talking to Hayl and you have to go kill a sparring partner as "C".
So right now let's say we don't have the quest. I hail Hayl and he says "A". Now, I go get the quest from Murrar and the first step of the quest is to talk to Hayl (GetQuestStep == 1). Now we go over to Hayl and talk to him to update the quest but when we talk to him we don't want him to say A or C, we want him to say B. Now the quest step updates and we have to kill a sparring partner (GetQuestStep == 2). Before I kill a sparing partner, just for shits and giggles, I go back to Hayl and hail him and he says C. That's how it should work.
What's happening right now is when we hail Hayl to update the fist step, he says C (not B) because the quest is getting updated before the hail function in his spawnscript is run. So when the spawnscript is run, the queststep is set at 2 already.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Sun Aug 31, 2008 1:37 pm

OK, I understand what you are talking about now, but why don't you just put the conversation stuff for B in the step1_complete_talkToHayl function? I really don't want to change the order in which the scripts are fired because I think it would be needed more in the order it is now then if it was reversed.
Alternately, I could always change the way that the chat updates work to something similar to the way the end of the quest works (you have to travel the conversation path). At the end of the quest it has to call GiveQuestReward, maybe I could make a function called SetStepComplete(Quest, step). That way you would be forced to set it complete when you are ready instead of exactly when the use hails it.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Post by Scatman » Sun Aug 31, 2008 7:42 pm

I would, but how can I get a reference to Hayl since he is not the QuestGiver? Murrar is. I never thought about it, is the QuestGiver reference just the ID number of the NPC? So instead of using Say(QuestGiver, "Text") I can use Say(hayl_id, "text")?

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Sun Aug 31, 2008 7:47 pm

Ahh I see what you are saying. QuestGiver is a spawn reference btw. What did you think about SetStepComplete(quest id, step)?

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Post by Scatman » Sun Aug 31, 2008 7:51 pm

Yah that would fix the problem I think. Because now the quest steps are automatically being updated as soon as you hail the npc and it's being updated before the spawnscript is run it appears, so therefore I can never do anything before the 1st quest step is completed (Dialog wise to the NPC who updates the chatstep).

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Sun Aug 31, 2008 8:07 pm

OK, it has been changed. The final syntax is SetStepComplete(Player, quest_id, step_id). Just add that to whatever conversation path you want to make. I'll upload the code in a few and /reload quests should work as well.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Post by Scatman » Sun Aug 31, 2008 8:13 pm

Cool, thanks!

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Post by Scatman » Mon Sep 01, 2008 4:19 am

Everything is working fine now with quests (the one's I've done so far) and they are exactly like live's. There is one thing wrong though. When I go to update the QuestTaskGroup and hide all the sub checkboxes for say QuestTaskGroup 1. I don't receive an update message for the quest update I just did. It just updates but I don't get a pop up message.
For example, you can see this from the first quest given by Murrar. Trainer Hayl tells you to go kill a sparring partner and the quest looks something like this.
.-I need to learn about combat
.....-x I spoke with Hayl.
.....-x I defeated a sparring partner
.....- I must return to Hayl with news of my victory.
(it wouldn't let me use spaces so I just used dots lol)
Where the x's are the completed steps. So now I go back to Hayl and when I do, I want that "Quest Update! blah blah" message to pop up telling me "I returned to Hayl" but it doesn't pop up. The QuestTaskGroup and the steps get set properly with the next QuestTaskGroup and step setup properly, just no pop-up message. Here's the code:

Code: Select all

function step3_complete_talkToHayl(Quest, QuestGiver, Player)
   UpdateQuestStepDescription(Quest, 3, "I have spoken to Sergeant Hayl McGuinness.")
   UpdateQuestTaskGroupDescription(Quest, 1, "I have won a match against one of the sparring partners.") 
   
   AddQuestStepChat(Quest, 4, "I should tell Murrar that my training was successful.", "I should return to Murrar Shar to show that I am ready for my next challenege.", 2530014) 
   AddQuestStepCompleteAction(Quest, 4, "step4_complete_talkToMurrar")
end
I want, "I have spoken to Sergeant Hayl McGuinness." to pop up and ding telling me I've done that step but it doesn't. If you want an overall look at the quest, it's named, art_of_combat.lua.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Mon Sep 01, 2008 11:18 am

Fixed, I'll upload it after I am finished with saving/loading character quest progress.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Post by Scatman » Mon Sep 01, 2008 12:45 pm

Thanks for fixing the one issue with the quest updates.
I'm not 100% positive I understand what is being done with the /reload. With the way it is now, you're saying that the steps that were already completed will be again re-completed automatically for the new change in the quest?
Otherwise, the /reload%i will only reload specific steps that the user of the /reload command will specify?
Sorry, just got back from a long day, my brain is fried :P...need..food

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Mon Sep 01, 2008 2:02 pm

Nope, not /reload- I am talking about something totally different. The Reload function is executed when a player's quest is loaded from the database after they logged off in the middle of the quest. It is just a way to set the status of the quest to what it was when they logged off.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests