View Single Post
  #4  
Old 11-01-2011, 08:08 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

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, unless the code also checks each task to see if the target matches the random mob.

I doubt that would affect anything besides the load time on taskmaster however its pretty sloppy design and could lead to performance issues.

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).

So I guess in the end I was no help, pretty usual.
Reply With Quote