Page 5 of 9

Posted: Fri Sep 19, 2008 12:56 pm
by Scatman
Ok now she says what she is supposed to but too many times. After she stops after moving to her first location, she will spam "1" until she starts moving again. Then after reaching loaction 2, and stops, she'll start spamming "2" over and over until she starts moving to location 3, etc.

Posted: Fri Sep 19, 2008 1:42 pm
by LethalEncounter
Bah, first she wasn't saying it enough. Now it is too much. Make up your mind! :P Anyways, it is fixed and on public SVN now.

Posted: Fri Sep 19, 2008 1:49 pm
by Scatman
Hehe, seems I'm a little bi-polar. :) Ok once Tess is updated I'll test it out. I've got another question for ya though.
Do we have a LUA function to check if a specific quest step is completed? In a lot of cases I can use GetQuestStep(spawn, step_id) to see what step I'm on but for this quest I have 3 steps under one grouptasktext so 3 steps are showing at once and I can do them in any order. I have to basically insult each NPC and so there is no specific order I have to talk to them. Well if I talk to the 3rd NPC and complete the 3rd step first, then GetQuestStep would return 1, because it returns the first queststep not completed yet. So I'd only want that 3rd NPC to react to my insult once. Let me know if you need more clarification. I looked for a function in LuaFunctions.cpp but I didn't see one.

Posted: Fri Sep 19, 2008 1:58 pm
by LethalEncounter
Ahh, yah I didn't think of that when I made the GetQuestStep function. I'll make a function called QuestStepIsComplete(Player, Quest OR Quest ID, Step ID) that returns true if the step has been completed. Note that the second argument will be a Quest or a Quest ID (not both).

Posted: Fri Sep 19, 2008 2:09 pm
by Scatman
Perfect :) thanks. Is there anyway I can have edit permissions to the LUA Functions sticky so I can throw all these new functions in there? Referring to the new functions is getting to be a bit tedious.

Posted: Fri Sep 19, 2008 2:11 pm
by LethalEncounter
Heh, sure :) The post is horribly outdated so it could definitely use some cleanup if you are willing :)

Posted: Fri Sep 19, 2008 2:15 pm
by Scatman
Yep :) I like to have a reference because I always forget which params go first or which params the new functions have. I'll go through with the LuaFunctions.cpp and make sure everything is up-to-date.

Posted: Fri Sep 19, 2008 2:24 pm
by LethalEncounter
You should have access now. If you can't let me know.

Posted: Fri Sep 19, 2008 3:19 pm
by Scatman
Haha k now she is saying it twice. She says "1" once she stops, and then "1" right before she begins moving to location 2. Then she'll say "2" once she stops and "2" once more right before walking to location 3. :P

Posted: Fri Sep 19, 2008 3:47 pm
by LethalEncounter
Bah, kk, I think I finally got it fixed :)

Posted: Fri Sep 19, 2008 6:57 pm
by LethalEncounter
OK, my changes are checked in. I added the following LUA commands:
AddQuestPrereqRace(Quest, race id)
AddQuestPrereqClass(Quest, class id)
AddQuestPrereqTradeskillLevel (not used yet)
AddQuestPrereqTradeskillClass (not used yet)
AddQuestSelectableRewardItem(Quest, item id, quantity)
Quests should now allow you to choose an item when you complete it if you use the AddQuestSelectableRewardItem function. You can mix and match with AddQuestRewardItem if you want. Note that you can call the AddQuestPrereqRace and AddQuestPrereqClass more than once with multiple race/classes. If the player is any of the races in the prereq races then the quest is shown (assuming it passes all other prereqs). The same for classes.
Oh and btw, the server should prevent you from having any items in your overflow slot by checking the items in a quest reward before you accept them.

Posted: Fri Sep 19, 2008 7:11 pm
by Scatman
Nice! Thanks!

Posted: Fri Sep 19, 2008 7:32 pm
by John Adams
LethalEncounter wrote:AddQuestPrereqRace(Quest, race id)
So, is this actually the race_id, or race_type id?
/laugh
/stare
/shakefist
/cry
/run

Posted: Fri Sep 19, 2008 7:56 pm
by LethalEncounter
race_id, these are only for clients so they should have real race_id values.

Posted: Sun Sep 21, 2008 2:34 am
by John Adams
Scatman, we got a LUA to cover this? haha.
Castleview1.wmv
Interesting quest, the High Elf mentor. The planter by the merchants spawns a couple of mobs that I also took video of. I'm sure it's not hard to code, but I hadn't seen a quest do what this one did (planting something that appears magically - then stays?)