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 |
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. |
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 |
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 =( |
Well, crud. Hopefully somebody else has a more helpful suggestion!
|
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! |
Sweet! Glad I was able to get you started in the right direction.
|
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.