Thread: Anti Train Code
View Single Post
  #5  
Old 07-21-2009, 10:35 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Actually I don't think EVENT_COMBAT would quite work right in the first place, so I changed it to EVENT_ATTACK and EVENT_KILLED_MERIT. I think that should work just fine as it is posted.

The idea is that if they are aggroing 1 mob (or more) less than every 30 seconds, the global would keep counting up until it finally kicks them. But, if they are just pulling constantly and killing really fast 1 by 1, they will get the points removed by the EVENT_KILLED_MERIT, so it won't ever kick them. And, if a monk is aggroing a bunch of stuff and FDing, most likely they are going to clear that 30 second timer from time to time so they shouldn't exceed the cap to be kicked. Like I said though, you will probably want to test it and maybe play around with it to see how well it works. Probably putting it in a zone that people commonly AE in will get some quick feedback on the settings for it or if there are issues.

You should be able to add that to the default.pl for your server in the quests/templates folder so it works for all zones if you want. Or you could add it to the default.pl for individual zones that you want to stop trains in. Or, if the NPCs in question already have scripts associated with them, you would just need to add those pieces into the existing scripts for the NPCs.

Yeah, I agree that it would be nice to have a code check for it, and maybe even some sort of rule. It would also be really handy to be able to do hate count for players or NPCs to see how many things total are on their hate list. That would make it pretty simple to limit trains via scripts.

Maybe at some point a rule could be added for this. It would probably be something that would fit into the same category with leashing NPCs to their spawn point, which is another thing I would like to see added at some point. The NPC leashing could be set by adding a new field to the npc_types table named something like "leashdist" so you could set leashes on a per NPC basis. For max train size, that is something that would probably need to go in the zones table so you could set the max hate count from npcs on a per zone basis in a field named something like "maxhatecount". Both new fields defaulting to 0 of course, which would mean those features are disabled.

I don't really have time to work on either of these atm, but they are good ideas to keep note of in case someone else finds the time to write them.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote