View Full Version : Sub EVENT_GAIN_EXP
The Crucial One
08-18-2015, 09:39 PM
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:
#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
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.