EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Sub EVENT_GAIN_EXP (https://www.eqemulator.org/forums/showthread.php?t=39942)

The Crucial One 08-18-2015 09:39 PM

Sub EVENT_GAIN_EXP
 
is there a command like this, I built a faction based evolving weapons script and was wondering if i could tie it into perl. reason being i find my players are farming Greys to gain rep and I want to try and avoid this. Any help would be most appreciated!


Thanks as always
The Crucial One

ba sorry for wrong forum wasnt paying attention /sigh

Shendare 08-18-2015 09:54 PM

Hmm... I wonder whether Kill_Merit takes into account whether you got xp or not.

sub EVENT_KILLED_MERIT

Triggered on NPC death when a client is in a group credited with doing the most damage to said loot table NPC.

Shendare 08-18-2015 10:06 PM

Aha. Looks like you could do a level con check in EVENT_KILLED_MERIT (which fires for each player who got credit for the kill), to see if the npc was grey to them or not.

It looks like what you'd check is $npc->GetLevelCon($client->GetLevel())

Here's a dump of the possible con values from common.h:

Code:

#define CON_GREEN                2
#define CON_LIGHTBLUE        18
#define CON_BLUE                4
#define CON_WHITE                20
#define CON_YELLOW                15
#define CON_RED                        13

I don't see an entry for grey. Might take some experimenting!

The Crucial One 08-18-2015 11:45 PM

did some testing with that its all based off the mobs con to player so its reversed haha but i think i might be able to work with something here

Also merit only works with groups so if ungrouped does not trigger sadly =(

Shendare 08-18-2015 11:51 PM

Well, crud. Hopefully somebody else has a more helpful suggestion!

The Crucial One 08-19-2015 12:03 AM

sub EVENT_DEATH {
$testmob = $entity_list->GetMobByNpcTypeID(999794);
my @hatelist = $testmob->GetHateList();
foreach $ent (@hatelist) {
@Concolor = (18, 4, 20, 15, 13);
foreach $Concolor (@Concolor) {
if ($client->GetLevelCon($testmob->GetLevel()) == $Concolor) {
quest::shout("Working");
}
}
}
}

this is what i ended up with thanks for your help!

Shendare 08-19-2015 12:03 AM

Sweet! Glad I was able to get you started in the right direction.

NatedogEZ 08-19-2015 02:23 AM

if you use EVENT_KILLED_MERIT it triggers for every PLAYER that got credit for that NPC death.

Meaning no need for a hatelist loop and can do pretty much the same thing


All times are GMT -4. The time now is 11:21 AM.

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