Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #16  
Old 05-04-2015, 04:04 PM
serivoth1234
Sarnak
 
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
Default

Okay I removed the level check, compiled, no errors everything loads just fine, however still no AAexp updates being sent.
Reply With Quote
  #17  
Old 05-04-2015, 04:20 PM
serivoth1234
Sarnak
 
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
Default

Okay it's working now. Now I just need to get it to run on the mobs death and actually pass it to the player.
Reply With Quote
  #18  
Old 05-04-2015, 04:41 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by serivoth1234 View Post
Okay it's working now. Now I just need to get it to run on the mobs death and actually pass it to the player.
Show me the entire script where you tried using the code I provided for giving aa exp when a mob dies. Be sure to use [code ] blocks please.
Reply With Quote
  #19  
Old 05-04-2015, 05:07 PM
serivoth1234
Sarnak
 
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
Default

I got it working now. Works perfectly, thanks everyone for the assist I appreciate it. Ghanja your code worked as it is, I had a declaration out of place is all.
Reply With Quote
  #20  
Old 05-04-2015, 05:43 PM
serivoth1234
Sarnak
 
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
Default

Okay trying to get this to only fire off if the client is level 20 or above, however it works just fine without the if($ulevel >19)
Code:
sub EVENT_DEATH {
     if ($ulevel > 19){
	my @hate_list = $npc->GetHateList();
	my $hate_count = @hate_list;
	if ($hate_count > 0) {
		foreach $ent (@hate_list) {
			$hate_entity = $ent->GetEnt();
			$hate_client = $hate_entity->CastToClient();
			if (($hate_entity->IsClient()) && (!$hate_client->IsBecomeNPC())) {
				$hate_client->SetEXP($hate_client->GetEXP(),($hate_client->GetAAExp()+1000));
                                }
			}
		}
	}
}
Reply With Quote
  #21  
Old 05-04-2015, 06:18 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Code:
sub EVENT_DEATH {
	my @hate_list = $npc->GetHateList();
	my $hate_count = @hate_list;
	if ($hate_count > 0) {
		foreach $ent (@hate_list) {
			$hate_entity = $ent->GetEnt();
			$hate_client = $hate_entity->CastToClient();
			if (($hate_entity->IsClient()) && (!$hate_client->IsBecomeNPC())) {
				if ($hate_client->GetLevel() > 19) {
					$hate_client->SetEXP($hate_client->GetEXP(),($hate_client->GetAAExp()+1000));
				}
            }
		}
	}
}
Reply With Quote
  #22  
Old 05-04-2015, 06:24 PM
serivoth1234
Sarnak
 
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
Default

Awesome, works perfectly, thank you
Reply With Quote
  #23  
Old 05-04-2015, 06:44 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

You da man, ghanja.
Reply With Quote
  #24  
Old 05-04-2015, 08:14 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by Shendare View Post
You da man, ghanja.
Appreciate that heh, but I pale in comparison to many others here.
Reply With Quote
  #25  
Old 05-04-2015, 08:37 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

There is a sub event that already does that btw... you are just creating extra work for yourself


EVENT_KILLED_MERIT triggers for each client that was given CREDIT for the kill.

Example.. anyone in the raid / group, however, if you want it so that players can just run up and "tag" something while someone else is killing it.. that they get credit.

Meaning a non-grouped player could run around hitting mobs 1 time that other players are fighting and get credit with the way you have it written.


Changing to this would eliminate that.

Code:
sub EVENT_KILLED_MERIT {
	if ($ulevel > 19) {
		$client->SetEXP($client->GetEXP(), $client->GetAAExp()+1000);
	}
}
Reply With Quote
  #26  
Old 05-04-2015, 08:39 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Oooh, nice. I don't remember that event.
Reply With Quote
  #27  
Old 05-04-2015, 08:42 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by NatedogEZ View Post
There is a sub event that already does that btw... you are just creating extra work for yourself


EVENT_KILLED_MERIT triggers for each client that was given CREDIT for the kill.

Example.. anyone in the raid / group, however, if you want it so that players can just run up and "tag" something while someone else is killing it.. that they get credit.

Meaning a non-grouped player could run around hitting mobs 1 time that other players are fighting and get credit with the way you have it written.


Changing to this would eliminate that.

Code:
sub EVENT_KILLED_MERIT {
	if ($ulevel > 19) {
		$client->SetEXP($client->GetEXP(), $client->GetAAExp()+1000);
	}
}
I originally tried that, but found it was buggy. I dont recall precisely what was buggy with it, but, thus the work around.

I'll have to revisit the idea. That code I provided was a copy/paste from something done a year back, so, probably doesnt exist now. If not, well, then yes, that would be the best method to say the least.

So there you go, no shortage of options.
Reply With Quote
  #28  
Old 05-04-2015, 09:09 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Nothing should be buggy about the EVENT_KILLED_MERIT option

The only caveat is that you have to keep in mind is that each client does trigger the sub EVENT on its own as Natedog said.
Reply With Quote
  #29  
Old 05-05-2015, 12:08 PM
serivoth1234
Sarnak
 
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
Default

EVENT_KILLED_MERIT works perfectly, thanks for the info on it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:41 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3