-
Member
reset all quests?
Is there a way to reset all quests so that the player can do them again? Preferably something I could put in to a lua script? I've had a look but haven't had much luck finding anything.
-
-
Member
Oh, that's a shame. I had wanted to write some sort of New Game+ type script Maybe there is a long way round to do it.. :/
-
What quests a player has completed is stored in the character database. The server probably caches at least some of this data in memory. You would need to expose a function to the Lua engine for clearing quests completed for a player. This could be as simple as running a query like DELETE FROM character_quest WHERE userid = { player->GetUserId() }, but that is pseudocode and you may need to update the cached data.
-
Post Thanks / Like - 1 Thanks
sh1tdev (1 members gave Thanks to stoneharry for this useful post)
-
Member
Hmm, then I guess I could use this Eluna command to run an SQL string...
Global:CharDBQuery - Eluna
CharDBQuery( DELETE FROM character_quest WHERE userid = { player->GetUserId() } ) <-- pseudocode
I think there is a bit more to it, but would this be the right idea/track, stoneharry? I'd have to do this for the weekly and daily data tables too and probably the reputations... And if I were to reset the character's level I'd probably want to unequip everything first... Do you have any other feedback? Sorry, I'm a hobbyist/just starting to delve in to this so I'm looking for a bit of guidance to check I am thinking ahead appropriately.
EDIT: I should mention I want to do this for a NewGame+ type of script.
Last edited by sh1tdev; 09-21-2019 at 08:51 PM.
-
Reset all, and make the quest repeatable or a daily quest?
Should be easier.
-
Post Thanks / Like - 1 Thanks
stoneharry (1 members gave Thanks to Harambeqt for this useful post)
-
Member
I'm not sure that would work the way I am intending? The idea is so that when the player reaches level x they can do a quest which will allow them to return to level 1, with a permanent buff for +1% stats + exp. This will allow the player to return back to the "start of the game" so to speak. The big issue with making all the quests repeatable is that it won't follow that flow of completing all the content. So what I want is to have all the quests they did on the journey from level 1 to 60 get reset from completed to incomplete and available again to do like they never did them before. The difference is this time, they have all the gold from the first playthrough, all the items, and a neat little permanent buff to show off how much of a hardcore leveling hero they are too.
Having looked at quest_tracker on azerothcore's wiki and inside the db itself.. there is literally nothing there. the db table is empty and the wiki is blank. I literally cannot find where the completed quest db is... but there must be a record of it on the server... it's doing my head in >_<;;
-
Originally Posted by
sh1tdev
I'm not sure that would work the way I am intending? The idea is so that when the player reaches level x they can do a quest which will allow them to return to level 1, with a permanent buff for +1% stats + exp. This will allow the player to return back to the "start of the game" so to speak. The big issue with making all the quests repeatable is that it won't follow that flow of completing all the content. So what I want is to have all the quests they did on the journey from level 1 to 60 get reset from completed to incomplete and available again to do like they never did them before. The difference is this time, they have all the gold from the first playthrough, all the items, and a neat little permanent buff to show off how much of a hardcore leveling hero they are too.
Having looked at quest_tracker on azerothcore's wiki and inside the db itself.. there is literally nothing there. the db table is empty and the wiki is blank. I literally cannot find where the completed quest db is... but there must be a record of it on the server... it's doing my head in >_<;;
You could delete the character and create a new one copying over only some of the data. If you want to do it without the player relogging it will be a lot more difficult.
Yes, starting with the CharDBQuery function will get you a prototype working. If you are using TC then: TrinityCore Collaboration Platform I believe AzerothCore is a fork of Mangos/TC so the table structure is likely to be similar.
The primary key for the table is GUID, which I think is the LowGUID actually. Object:GetGUIDLow - Eluna
I'm not sure what you mean by a NewGame+ type script. You're on the right track, let us know if you get stuck.
Last edited by stoneharry; 09-22-2019 at 02:54 PM.
-
Member
You would need to expose a function to the Lua engine for clearing quests completed for a player