Page 1 of 1

Quest Development

Posted: Mon Jan 19, 2009 9:50 pm
by Scatman
I ran into a quest the other day which I think will require some more server support. I was thinking of ways this can be done because I'm fairly certain I can implement it, I just wanted to get an opinion first.

The quest is, you have 8 steps given to you right away. You have to plant seeds into 8 plant boxes. The problem is, if I used AddQuestStepSpell, the same spell would update all 8 steps at once. Also, each planter box updates its own corresponding quest step (so you can't click the same planter box 8 times).

I thought of two ways so far:
1) Make it so every time you cast a spell on a spawn, a function from the target's spawn script is called. This would require making another type of quest step that can only be updated via SetStepComplete.

2) If that doesn't sound like a good idea, I could always implement an GetID LUA function to compare which planter box the target is in the cast function of the spell, and update the step by figuring out which planter box was the target of the spell.

Either way, I think we're going to need some kind of "dummy" quest step that can only be updated by SetStepComplete or SetStepQuantityComplete. What do you guys think?

Re: Quest Development

Posted: Mon Jan 19, 2009 10:15 pm
by LethalEncounter
Sounds like AddQuestStepSpell needs a parameter that specifies the max number of steps that is can update for one cast. That or hard code it to only allow one step update per cast.

Re: Quest Development

Posted: Mon Jan 19, 2009 10:22 pm
by Scatman
Hmm that sounds like a good idea. The only problem is, if I click planter box 8, step 1 will still be completed first. Then step 2, then step 3, etc. We'd need it so if you click planter box 8, quest step 8 is completed. If you click planter box 5, step 5 is completed, etc.

Re: Quest Development

Posted: Mon Jan 19, 2009 10:26 pm
by John Adams
Right, in any order. Cuz that's how I did the quest in Castleview originally.