PDA

View Full Version : hand in depop existing and pop in aggro


Rhodan
11-09-2006, 04:05 AM
I'm about to tackle my first "real" quest and I'm wondering what the best way is to go about this. As usual I'm not after code but just some advice.

I have a non-aggro mob with no loot standing around being lazy. When a character walks up and hands it a specific item it will attack the player. If the player kills the mob then the corpse will have a reward item. This reward item would not be on the corpse had the character simply killed the mob without doing a hand in first.

I'm thinking the simple way to do this is by having an event_item sub that will quest::addloot() the mob the reward item when the right hand-in is received by it and then quest::attack() the player. Anything wrong with this?

The more complicated way would be to replace the mob with another mob (tougher one maybe) which already has a loottable with the reward item on it.

The event_item would depop() the orignal mob then spawn() the second and issue an attack(). However, I'm not really sure if this would work. Would the spawned in mob still be controlled by the original mob's quest script or would it be completely seperate and only run its own script? If the latter, then I have to figure out how to get it to attack the specific player. The lazy way would be to just make it aggresive so that it simply attacks whomever is near but thats not quite the effect that I'm thinking of. I've read through the lexicon a couple of times but don't really see how to do this. Any ideas?

John Adams
11-09-2006, 05:07 AM
The more complicated way would be to replace the mob with another mob (tougher one maybe) which already has a loottable with the reward item on it.
I think this is actually a less complicated way to do it. I've seen this before, I'm sure. One of the scripts you can look at are the SK and Cleric epic scripts in Qeynos Catacombs (i believe they spawn a replacement killer) and the lakerathe zone "Shmendrick" or something like that. And that Natalie chick or whatever her name is. Wow, I am helpful, huh?

Anyway, good ideas. Let us know how you do. :)