View Single Post
  #5  
Old 11-03-2011, 12:09 AM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

Quote:
Originally Posted by Caryatis View Post
The biggest flaw in your idea(imo) is that you are going to be creating hundreds of tasks automatically, even more if you do this on a popular server and the task is repeatable. If you had this capability, you would probably use it again, then you have thousands of tasks that are only ever used once,
Yeah, if I had gotten this to actual work I was going to delete the task from the database once the player completed it. Using the task system was only a means to an end--to track when the kill was made.

Quote:
Originally Posted by Caryatis View Post
unless the code also checks each task to see if the target matches the random mob.
This actually is a really good idea except here I read that "the maximum task id is 9999," thus what I said about clearing them out.

Quote:
Originally Posted by Caryatis View Post
If I was going to do this I would set a global for the NPCType and then add a sub EVENT_DEATH check for the global in the default.pl in templates, if the global matches the player and zone then updatetaskactivity. This is not an ideal solution as it won't work for mobs with scripts that have a death event and its still pretty sloppy imo. It would also require a custom perl command as you would need to set the zone field to the zone you wish the mob killed in as opposed to the zone that the npc setting the global is in(and I figure if you are in there adding that, you would probably just be adding the reloadall).
This is really some good thinking. I appreciate you taking the time to talk it out. I need to think through some similar scenarios and I believe that eventually I'll figure out something that will work.

Quote:
Originally Posted by Caryatis View Post
So I guess in the end I was no help, pretty usual.
Actually you provided a lot of food for thought which is half the fun for me, thanks.

An alternative route might be to randomly select an item dropped by the random MOB and then use that as a turn in. Easy to store. Easy to track. There are loopholes, the PC could just get the item from somewhere else and never kill the assigned MOB, but maybe I'll just call that a feature rather than a bug.
Reply With Quote