|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Custom Custom Quests here |
05-04-2015, 04:04 PM
|
Sarnak
|
|
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
|
|
Okay I removed the level check, compiled, no errors everything loads just fine, however still no AAexp updates being sent.
|
05-04-2015, 04:20 PM
|
Sarnak
|
|
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
|
|
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.
|
05-04-2015, 04:41 PM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Quote:
Originally Posted by serivoth1234
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.
|
05-04-2015, 05:07 PM
|
Sarnak
|
|
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
|
|
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.
|
05-04-2015, 05:43 PM
|
Sarnak
|
|
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
|
|
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));
}
}
}
}
}
|
05-04-2015, 06:18 PM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
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));
}
}
}
}
}
|
05-04-2015, 06:24 PM
|
Sarnak
|
|
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
|
|
Awesome, works perfectly, thank you
|
05-04-2015, 06:44 PM
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
You da man, ghanja.
|
05-04-2015, 08:14 PM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Quote:
Originally Posted by Shendare
You da man, ghanja.
|
Appreciate that heh, but I pale in comparison to many others here.
|
05-04-2015, 08:37 PM
|
|
Developer
|
|
Join Date: Dec 2012
Posts: 515
|
|
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);
}
}
|
05-04-2015, 08:39 PM
|
Dragon
|
|
Join Date: Apr 2009
Location: California
Posts: 814
|
|
Oooh, nice. I don't remember that event.
|
|
|
|
05-04-2015, 08:42 PM
|
|
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Quote:
Originally Posted by NatedogEZ
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.
|
|
|
|
05-04-2015, 09:09 PM
|
|
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,071
|
|
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.
|
05-05-2015, 12:08 PM
|
Sarnak
|
|
Join Date: Aug 2009
Location: bum f*#k egypt
Posts: 37
|
|
EVENT_KILLED_MERIT works perfectly, thanks for the info on it.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 04:00 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|