Quest Updates
Moderator: Team Members
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
For reloaded quests from the DB I am calling a special LUA function called Reload(Quest, QuestGiver, Player, Step) that allows you to customize the quest depending on which step the player is on. This is necessary because some quests (ie Art of Combat or whatever it was called) adds steps along the way. So if a player was on step 3 of the quest the function would be called for steps 1 and 2 since they were already completed. Inside of this function you would need to add the steps , update text, etc just as if the player completed it initially. In fact if you aren't doing anything too crazy you could just call the existing lua function for that step if you wanted.
Here is the question: Would you like it to stay this way, or name the functions Reload%i (ie Reload1, Reload2, etc) with the number on the end being the completed step. It doesnt matter to me as it is a small change in the code, but it might make a huge different to you since you wont have to do a bunch of ifs for the steps.
Here is the question: Would you like it to stay this way, or name the functions Reload%i (ie Reload1, Reload2, etc) with the number on the end being the completed step. It doesnt matter to me as it is a small change in the code, but it might make a huge different to you since you wont have to do a bunch of ifs for the steps.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
OK, I got quests loading from the database. If you want me to change it to use multiple Reload functions I'll do that later. Here is an example Reload function that gets your Art of Combat quest to successfully load its status when a player logs off and back on:
The reason we need this Reload function is that is some cases you won't want to run the exact same code for reloading the quest as you did when the player did that steo normally. IE: If you spawn a special spawn for a previous step, you dont want to spawn it again when the player logged off and back on.
Edit: BTW this code is on public SVN now.
Code: Select all
function Reload(Quest, QuestGiver, Player, Step)
if Step == 1 then
step1_complete_talkToHayl(Quest, QuestGiver, Player)
else
if Step == 2 then
step2_complete_killedSparringPartner(Quest, QuestGiver, Player)
else
if Step == 3 then
step3_complete_talkToHayl(Quest, QuestGiver, Player)
end
end
end
endEdit: BTW this code is on public SVN now.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Ok, the new quest updates work and loading the quest progress works with one exception. I got a quest and then got to the end of it, but didn't hand it in. I deleted the quest and logged off and back on, and when I logged back on I had the quest again and it was back where it was when I tried to delete it.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
I found another problem
When you start having more than 1 grouptasktext, any step that is updated after that seems to use the very 1st grouptasktest.

So here every update after I completed that first taskgrouptext, will show the pop up message, "I reported to Sergeant Haggus and have been assigned my first duty."

So here every update after I completed that first taskgrouptext, will show the pop up message, "I reported to Sergeant Haggus and have been assigned my first duty."
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Fixed, I also fixed a couple of other bugs with it that you may not have noticed. One was the double update if you updated the taskgrouptext. Another was the out of order tasks if you loaded the progress from the DB. BTW be sure to read the private dev forum, there is a post you might be interested in 
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Got another one for ya
It's weird and I'm not sure exactly what is causing it but I *believe* it's /repop. What happens is, sometimes when you hail an NPC, they will only spit out the first conversation dialog, then when you click on the conversation option to continue the conversation, nothing happens and the conversation disappears.
I don't know if it's linked directly to quests but as far as I've seen it's only happened when the NPC offers or gives a quest update. Now, the weird part is, if I /kill the mob, the corpse of that NPC will talk to me, give quest updates like normal. They will do the same thing if I /kill and then /repop right away, they will act normal and talk to me and give me quest updates. If I just try a /repop without killing the NPC, he will act the way he was previously and not talk to me and not give me quest updates.
I'm not sure how this gets caused, it appears to be random to me.
I don't know if it's linked directly to quests but as far as I've seen it's only happened when the NPC offers or gives a quest update. Now, the weird part is, if I /kill the mob, the corpse of that NPC will talk to me, give quest updates like normal. They will do the same thing if I /kill and then /repop right away, they will act normal and talk to me and give me quest updates. If I just try a /repop without killing the NPC, he will act the way he was previously and not talk to me and not give me quest updates.
I'm not sure how this gets caused, it appears to be random to me.
Who is online
Users browsing this forum: No registered users and 0 guests