EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   EVENT_AGGRO question? (https://www.eqemulator.org/forums/showthread.php?t=29398)

ChaosSlayerZ 08-30-2009 08:33 PM

EVENT_AGGRO question?
 
Does EVENT_AGGRO only triggers once? or does it triggers every time someone aggroes the mob /gets added to hate list?

For example Player A aggroed the mob, EVENT_AGGRO was triggered, now Player B joins in and starts beating on the mob to - does EVENT_AGGRO will trigger again?

if its not - how could I detect every instance when new player/new mob gets added to the hate list beyond the first?

thanks!


PS. One more thing if EVENT_AGGRO only fires once (until mob looses all aggro) then how its different from EVENT_COMBAT? Aren't they then redundant?

Shadow-Wolf 08-30-2009 10:56 PM

Quote:

Originally Posted by ChaosSlayerZ (Post 177637)
Does EVENT_AGGRO only triggers once? or does it triggers every time someone aggroes the mob /gets added to hate list?

For example Player A aggroed the mob, EVENT_AGGRO was triggered, now Player B joins in and starts beating on the mob to - does EVENT_AGGRO will trigger again?

if its not - how could I detect every instance when new player/new mob gets added to the hate list beyond the first?

thanks!


PS. One more thing if EVENT_AGGRO only fires once (until mob looses all aggro) then how its different from EVENT_COMBAT? Aren't they then redundant?

pretty sure the aggro event triggers only once. The combat event is not redundant cause it gives the script writer the ability to have code executed at the end of a battle that didn't necessarily mean the mob killed the players, like if they zoned.

ChaosSlayerZ 08-31-2009 04:23 PM

Ok thanks!

I found something interesting in latest updates:

Code:

sub EVENT_AGGRO_SAY
{
        if($text=~/hate/i)
        {
                my @hatelist = $npc->GetHateList();
                foreach $ent (@hatelist)
                {
                        my $h_ent = $ent->GetEnt();
                        my $h_dmg = $ent->GetDamage();
                        my $h_hate = $ent->GetHate();
                        if($h_ent)
                        {
                                my $h_ent_name = $h_ent->GetName();
                                quest::say("$h_ent_name is on my hate list with $h_hate hate and $h_dmg damage.");
                        }                       
                }
        }
}



I suppose I could use this as base to instead pull out players level rather than his hate?

I am hoping to use this to implement trivial Encounter Loot Code like it was on Firiona Vie server and on EQ2.
So if player on the list above certain level, he will be banished out of the zone.

pfyon 08-31-2009 05:58 PM

Quote:

Originally Posted by ChaosSlayerZ (Post 177691)
I am hoping to use this to implement trivial Encounter Loot Code like it was on Firiona Vie server and on EQ2.
So if player on the list above certain level, he will be banished out of the zone.

Correct me if I'm wrong, but I am pretty sure the trivial loot code made mobs not drop loot for you if you were too high level, not banish you.

ChaosSlayerZ 08-31-2009 06:38 PM

Quote:

Originally Posted by pfyon (Post 177699)
Correct me if I'm wrong, but I am pretty sure the trivial loot code made mobs not drop loot for you if you were too high level, not banish you.

true, but there is an inherited problem with TLC how it was done on EQ1.
Such as it doesn't prevent Kill stealing by someone who cannot kill mob legibly just to ruin your day. In EQ2 it was impossible to KS cause as soon player A would aggro the mob the encounter would be LOCKED on that player (and his group) and no one else could dmg the mob.

Unfortunately we are unable to reproduce such system. So by banishing the player I am trying to solve 3 problems at once:

-prevent farming of lower level mobs by players who are way to high of lev for the given encounter
-prevent high lev people assisting low level people in the fight which is otherwise trivial to them (healing, buffing, dealing dmg etc)
-prevent high lev jerks going around and ruining people kills even if they can't get the loot.

Not to mention I don't think "denial of loot" is something what is can be done with just the scripts. I could make it so a special BONUS loot only drops of the mob if player is within right level range (and again must check for entire group) in a form of spawning a CHEST, but then the chest itself could become a target of ninja looting

It would be nice if we could LOCK the encounter like they do it in eq2, but pretty sure this will require some server side coding

pfyon 08-31-2009 07:05 PM

You might be able to just have it show no loot to people outside the lvl range. Doesn't solve the problem of high lvls buffing lower lvls to kill mobs, but if a jerk went around killing everything, the corpses would be lootable for stuff by people of the correct lvl range (after 6 mins or whatever the timer is).

ChaosSlayerZ 08-31-2009 07:12 PM

Quote:

Originally Posted by pfyon (Post 177704)
You might be able to just have it show no loot to people outside the lvl range. Doesn't solve the problem of high lvls buffing lower lvls to kill mobs, but if a jerk went around killing everything, the corpses would be lootable for stuff by people of the correct lvl range (after 6 mins or whatever the timer is).

well how would you do that - prevent loot showing - example of actual script?

Also I want to point out that I don't plan on using this script on ALL mobs. Just on the name bosses who carry specially valuable loot. So a high lev person can still run around low level dungeon farming junk drops/cash or collecting faction.

Romell 08-31-2009 07:56 PM

I wrote a script that will de-pop fabled mobs and repop the regular version with EVENT AGRO using a level threshold. Maybe on the bosses you want to do this to, have the EVENT AGRO pop the same boss with no loot, or spawn some sort of PH. Just a thought to solve one of the problems. Not sure if you wanted to have to do DB changes to make it work.

ChaosSlayerZ 08-31-2009 08:33 PM

Quote:

Originally Posted by Romell (Post 177707)
I wrote a script that will de-pop fabled mobs and repop the regular version with EVENT AGRO using a level threshold. Maybe on the bosses you want to do this to, have the EVENT AGRO pop the same boss with no loot, or spawn some sort of PH. Just a thought to solve one of the problems. Not sure if you wanted to have to do DB changes to make it work.

well since we have found out that EVENT AGRO only fires once - the problem is that a player who is in legal level range will agro the mob and then any number of out of level people can jump in and start beating on it and get the loot at the end

Romell 08-31-2009 08:36 PM

On second thought, What if you used EVENT DEATH. Set the threshold so that people who are of level to fight and kill the mob receive the loot via quest::summonitem and the others who would be way too high or are just there to KS would be banished and the have the script repop the mob.

ChaosSlayerZ 08-31-2009 08:40 PM

Quote:

Originally Posted by Romell (Post 177710)
On second thought, What if you used EVENT DEATH. Set the threshold so that people who are of level to fight and kill the mob receive the loot via quest::summonitem and the others who would be way too high or are just there to KS would be banished and the have the script repop the mob.

umm it will work but then you will have to either:
-give each person VERY specific loot usable by their class
or
-give them random loot which is dropable and non lore to avoid situations where entire group which has say no ranger receives 6 ranger only no drop bows as reward =)

This will work for number of situation however, like given out specific class based rewards or quest drops, but in my case i actually do not want to give 6 pieces of loot on 1 groupable boss- i only want to give 2 items randomly chosen

Romell 08-31-2009 08:43 PM

I see what you mean, my perl skills are limited lol

ChaosSlayerZ 08-31-2009 08:46 PM

Quote:

Originally Posted by Romell (Post 177712)
I see what you mean, my perl skills are limited lol

no-no its a very fine idea you had with generating loot after the fight, and its something I haven't even thought of, and it will work for many situations, when we do want to give people equal loot distribution after the fight (kind of like giving quest flags). It juts won't work for my specific case :cool:

Sinister 09-01-2009 11:00 AM

When you summon items in a quest script you can have it pick random items. So if you had a mob drop 5 items, you just have it pick one at random and then summon that item id for the player that is in the correct level range. If you have the PEQ version, check out the Nillipus quest.

ChaosSlayerZ 09-01-2009 11:43 AM

Quote:

Originally Posted by Sinister (Post 177740)
When you summon items in a quest script you can have it pick random items. So if you had a mob drop 5 items, you just have it pick one at random and then summon that item id for the player that is in the correct level range. If you have the PEQ version, check out the Nillipus quest.

yes, I know I can do that but that doesn't solves the fair loot distribution issue.
You have 6 people group, but ALL of them in valid level range. Who should get a loot? Just one random person? My players going to kill me for that :D


All times are GMT -4. The time now is 09:38 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.