diff --git a/New Text Document.txt b/New Text Document.txt index dd8c889..8632c37 100644 --- a/New Text Document.txt +++ b/New Text Document.txt @@ -1 +1 @@ -next: 17595 \ No newline at end of file +next: 17596 \ No newline at end of file diff --git a/data/XML/quests.xml b/data/XML/quests.xml index cb4f22c..00570fc 100644 --- a/data/XML/quests.xml +++ b/data/XML/quests.xml @@ -1,131 +1,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - + + - - - + + - - + + - + - + @@ -140,39 +35,21 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + - + + - + + - + @@ -191,7 +68,7 @@ - + @@ -199,10 +76,10 @@ - + - + @@ -211,14 +88,13 @@ - + - diff --git a/data/npc/amber.npc b/data/npc/amber.npc index ef12fd0..64ba853 100644 --- a/data/npc/amber.npc +++ b/data/npc/amber.npc @@ -74,7 +74,7 @@ Topic=3 -> "Ok, then I don't tell you more about the orcish language." "backpack",QuestValue(18502)=0 -> * Topic=4,"minotaur","leather" -> "Well, if you really like this backpack, I could make one for you, but minotaur leather is hard to come by these days. Are you willing to put some work into this?", Topic=5 Topic=5,"yes" -> "Alright then, if you bring me 100 pieces of fine minotaur leather I will see what I can do for you. You probably have to kill really many minotaurs though...", - "so good luck!", SetQuestValue(18502,1) + "so good luck!", SetQuestValue(18502,1), SetQuestValue(17594,1) "addon",QuestValue(18502)=1 -> Type=5878, Amount=100, "Ah, right, almost forgot about the backpack! Have you brought me 100 pieces of minotaur leather as requested?", Topic=6 "backpack",QuestValue(18502)=1 -> * diff --git a/data/npc/bigben.npc b/data/npc/bigben.npc index b0a044a..fa76652 100644 --- a/data/npc/bigben.npc +++ b/data/npc/bigben.npc @@ -74,7 +74,7 @@ Topic=6,"yes",Count(Type)>=Amount -> "Cling clang!", Delete(Type), Type=5892, Am Topic=6,"yes" -> "You not have stuff me want for." Topic=6 -> "Silly lil' one you are." -Topic=2,"yes" -> "Me need gift for woman. We dance, so me want to give her bast skirt. But she big is. So I need many to make big one. Bring three okay? Me wait.", SetQuestValue(17500,1) +Topic=2,"yes" -> "Me need gift for woman. We dance, so me want to give her bast skirt. But she big is. So I need many to make big one. Bring three okay? Me wait.", SetQuestValue(17500,1), SetQuestValue(17595,1) "bast skirt",QuestValue(17500)=1 -> Type=3560, Amount=3, "Lil' one bring three bast skirts?", Topic=3 Topic=3,"yes",Count(Type)>=Amount -> "Good good! Woman happy will be. Now me happy too and help you.", Delete(Type), SetQuestValue(17500,2) diff --git a/data/npc/bron.npc b/data/npc/bron.npc index ee4494d..cd1b551 100644 --- a/data/npc/bron.npc +++ b/data/npc/bron.npc @@ -28,7 +28,7 @@ Topic=1,"yes" -> "Really! That is such an incredibly nice offer! I already have "This way he might learn that violence doesn't always help, but that a friendly word might just do the trick. ...", "Have you understood everything I told you and are really willing to take this risk?", Topic=2 Topic=1 -> "Maybe another time." -Topic=2,"yes" -> "You are indeed not only well educated, but also very courageous. I wish you good luck, you are my last hope.", SetQuestValue(17532,1) +Topic=2,"yes" -> "You are indeed not only well educated, but also very courageous. I wish you good luck, you are my last hope.", SetQuestValue(17532,1), SetQuestValue(17594,1) Topic=2 -> "Maybe another time." "Brother","is","right","Fist","not","always","good",QuestValue(17532)=3 -> "Oh! He really said that? I am so proud of you, %N. These are really good news. Everything would be great... if only there wasn't this person near my house.", SetQuestValue(17532,4) diff --git a/data/npc/ceiron.npc b/data/npc/ceiron.npc index 6c52251..5fce27b 100644 --- a/data/npc/ceiron.npc +++ b/data/npc/ceiron.npc @@ -28,7 +28,7 @@ Topic=2,"yes" -> "I hope that I am not asking too much of you with this task. I "I would be deeply grateful if you could support me in this matter and collect a sample of the blooming Griffinclaw for me. ...", "Have you understood everything I told you and will fulfill this task for me?", Topic=3 Topic=2 -> "Maybe another time." -Topic=3,"yes" -> Type=4867, Amount=1, "Alright then. Take this botanist's container and return to me once you were able to retrieve a sample. Don't lose patience!", Create(Type), SetQuestValue(17535,1) +Topic=3,"yes" -> Type=4867, Amount=1, "Alright then. Take this botanist's container and return to me once you were able to retrieve a sample. Don't lose patience!", Create(Type), SetQuestValue(17535,1), SetQuestValue(17594,1) Topic=3 -> "Maybe another time." "task",QuestValue(17535)=1 -> Type=5937, Amount=1, "Were you able to obtain a sample of the Griffinclaw?", Topic=4 diff --git a/data/npc/elane.npc b/data/npc/elane.npc index 17bff0c..6fbcc94 100644 --- a/data/npc/elane.npc +++ b/data/npc/elane.npc @@ -139,7 +139,7 @@ Topic=6,"yes" -> "Alright, I will give you a chance. Pay close attention to what "Lastly, for our arrow heads we need a lot of steel. Best would be one piece of royal steel, one piece of draconian steel and one piece of hell steel. ...", "Did you understand everything I told you and are willing to handle this task?", Topic=7 Topic=6 -> "However." -Topic=7,"yes" -> "That's the spirit! I hope you will find my crossbow, %N.", SetQuestValue(17539,1) +Topic=7,"yes" -> "That's the spirit! I hope you will find my crossbow, %N.", SetQuestValue(17539,1), SetQuestValue(17594,1) Topic=7 -> "Maybe another time." "crossbow",QuestValue(17539)=1 -> Type=5947, Amount=1, "I'm so excited! Have you really found my crossbow?", Topic=8 diff --git a/data/npc/hanna.npc b/data/npc/hanna.npc index 72cc0af..2f69e76 100644 --- a/data/npc/hanna.npc +++ b/data/npc/hanna.npc @@ -82,7 +82,7 @@ Topic=2 -> "Maybe next time." "addon",QuestValue(18501)=0 -> "Pretty, isn't it? My friend Amber taught me how to make it, but I could help you with one if you like. What do you say?", Topic=3 "hat",QuestValue(18501)=0 -> * Topic=3,"yes" -> "Okay, here we go, listen closely! I need a few things... a basic hat of course, maybe a legion helmet would do. Then about 100 chicken feathers...", - "and 50 honeycombs as glue. That's it, come back to me once you gathered it!", SetQuestValue(18501,1) + "and 50 honeycombs as glue. That's it, come back to me once you gathered it!", SetQuestValue(18501,1), SetQuestValue(17594,1) Topic=3 -> "Maybe another time." "addon",QuestValue(18501)=1 -> "Oh, you're back already? Did you bring a legion helmet, 100 chicken feathers and 50 honeycombs?", Topic=4 diff --git a/data/npc/hugo.npc b/data/npc/hugo.npc index 403239b..67d62b0 100644 --- a/data/npc/hugo.npc +++ b/data/npc/hugo.npc @@ -58,7 +58,7 @@ Topic=1,"yes" -> "Good! Listen, I need the following material - first, 20 pieces "Secondly, 50 pieces of minotaur leather. Third, I need bat wings, maybe 10. And 30 heaven blossoms, the flowers elves cultivate. ...", "Have you noted down everything and will help me gather the material?", Topic=2 Topic=1 -> "Maybe another time." -Topic=2,"yes" -> "Terrific! What are you waiting for?! Start right away to gather 20 pieces of brown cloth and come back once you have them!", SetQuestValue(17563,1) +Topic=2,"yes" -> "Terrific! What are you waiting for?! Start right away to gather 20 pieces of brown cloth and come back once you have them!", SetQuestValue(17563,1), SetQuestValue(17594,1) Topic=2 -> "Maybe another time." "brown","cloth",QuestValue(17563)=1 -> Type=5913, Amount=20, "Ah! Have you brought 20 pieces of brown cloth?", Topic=3 diff --git a/data/npc/lubo.npc b/data/npc/lubo.npc index 976a262..a33026a 100644 --- a/data/npc/lubo.npc +++ b/data/npc/lubo.npc @@ -69,7 +69,7 @@ Topic=1 -> "Hmm, but next time." "backpack",QuestValue(18502)=0 -> * Topic=4,"minotaur","leather" -> "Well, if you really like this backpack, I could make one for you, but minotaur leather is hard to come by these days. Are you willing to put some work into this?", Topic=5 Topic=5,"yes" -> "Alright then, if you bring me 100 pieces of fine minotaur leather I will see what I can do for you. You probably have to kill really many minotaurs though...", - "so good luck!", SetQuestValue(18502,1) + "so good luck!", SetQuestValue(18502,1), SetQuestValue(17594,1) "addon",QuestValue(18502)=1 -> Type=5878, Amount=100, "Ah, right, almost forgot about the backpack! Have you brought me 100 pieces of minotaur leather as requested?", Topic=6 "backpack",QuestValue(18502)=1 -> * diff --git a/data/npc/marina.npc b/data/npc/marina.npc index 1db8445..7a4afb6 100644 --- a/data/npc/marina.npc +++ b/data/npc/marina.npc @@ -26,7 +26,7 @@ Topic=1,"yes" -> "Well, everyone would say that in your positi Topic=1 -> "Get out of there!" Topic=2,"yes" -> " It's funny how easy it is to get humans to say what you want. Now, proving it will be even more fun! ...", "You want me to touch something gooey, so you have to touch something gooey for me too. ...", - "I love honey and I haven't eaten it in a while, so bring me 50 honeycombs and worship my beauty a little more, then we will see.", SetQuestValue(17504,1) + "I love honey and I haven't eaten it in a while, so bring me 50 honeycombs and worship my beauty a little more, then we will see.", SetQuestValue(17504,1), SetQuestValue(17595,1) Topic=2 -> "Get out of there!" "honeycomb",QuestValue(17504)=1 -> Type=5902, Amount=50, "Did you bring me the 50 honeycombs I requested and do you absolutely admire my beauty?", Topic=3 diff --git a/data/npc/norma.npc b/data/npc/norma.npc index f896ca2..50f9e3f 100644 --- a/data/npc/norma.npc +++ b/data/npc/norma.npc @@ -170,7 +170,7 @@ Topic=2 -> "Maybe next time." "addon",QuestValue(18501)=0 -> "Pretty, isn't it? I made it myself, but I could teach you how to do that if you like. What do you say?", Topic=3 "hat",QuestValue(18501)=0 -> * Topic=3,"yes" -> "Okay, here we go, listen closely! I need a few things... a basic hat of course, maybe a legion helmet would do. Then about 100 chicken feathers...", - "and 50 honeycombs as glue. That's it, come back to me once you gathered it!", SetQuestValue(18501,1) + "and 50 honeycombs as glue. That's it, come back to me once you gathered it!", SetQuestValue(18501,1), SetQuestValue(17594,1) Topic=3 -> "Maybe another time." "addon",QuestValue(18501)=1 -> "Oh, you're back already? Did you bring a legion helmet, 100 chicken feathers and 50 honeycombs?", Topic=4 diff --git a/data/npc/quentin.npc b/data/npc/quentin.npc index 646c8f2..3b94784 100644 --- a/data/npc/quentin.npc +++ b/data/npc/quentin.npc @@ -125,7 +125,7 @@ VANISH,! -> "Remember: If you are heavily wounded or poisoned, I "However, this prayer needs the combined energy of ten priests. Each of them has to say one line of the prayer. ...", "I could start with the prayer, but since the next priest has to be in a different location, you probably will have to travel a lot. ...", "Is this stake really important enough to you so that you are willing to take this burden?", Topic=1 -Topic=1,"yes" -> "Alright, I guess you need a stake first. Maybe Gamon can help you, the leg of a chair or something could just do. Try asking him for a stake, and if you have one, bring it back to me.", SetQuestValue(17576,1) +Topic=1,"yes" -> "Alright, I guess you need a stake first. Maybe Gamon can help you, the leg of a chair or something could just do. Try asking him for a stake, and if you have one, bring it back to me.", SetQuestValue(17576,1), SetQuestValue(17595,1) Topic=1 -> "Fine. You are free to decline my offer." "stake",QuestValue(17576)=1,Count(5941)<=0 -> "I guess you couldn't convince Gamon to give you a stake, eh?" diff --git a/src/behaviourdatabase.cpp b/src/behaviourdatabase.cpp index 02bedc5..a948179 100644 --- a/src/behaviourdatabase.cpp +++ b/src/behaviourdatabase.cpp @@ -973,7 +973,7 @@ void BehaviourDatabase::checkAction(const NpcBehaviourAction* action, Player* pl case BEHAVIOUR_TYPE_EXPIRINGQUESTVALUE: { int32_t questNumber = evaluate(action->expression, player, message); int32_t ticks = evaluate(action->expression2, player, message); - player->addStorageValue(questNumber, OTSYS_TIME() + ticks); + player->addStorageValue(questNumber, OTSYS_TIME_MINUTES() + (ticks / 60 / 1000)); break; } case BEHAVIOUR_TYPE_ADDOUTFITADDON: { @@ -1201,7 +1201,7 @@ int32_t BehaviourDatabase::evaluate(NpcBehaviourNode* node, Player* player, cons int32_t questNumber = evaluate(node->left, player, message); int32_t questValue; player->getStorageValue(questNumber, questValue); - return questValue - OTSYS_TIME(); + return questValue - OTSYS_TIME_MINUTES(); } case BEHAVIOUR_TYPE_MESSAGE_COUNT: { int32_t value = searchDigit(message); diff --git a/src/tools.h b/src/tools.h index 2e1716f..f4c71f2 100644 --- a/src/tools.h +++ b/src/tools.h @@ -108,4 +108,9 @@ inline int64_t OTSYS_TIME() return std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); } +inline int32_t OTSYS_TIME_MINUTES() +{ + return std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); +} + #endif