get class that did finishing blow
how would i get the class of the player that got the finishing blow on a mob and then repop him if its not = to random class
example Code:
my $Random; |
is there no way to find who did the killing blow?
|
ok i got this working but not all the way.
Code:
my $Random; what i want to do is not give exp if i can but i don't really care about the exp what i care about is if your not the right class that kills them then don't leave a corpse and repop. |
edit: Or not...
|
or not? im guessing you posted something that did not work?
|
EVENT_DEATH will trigger as the mob dies, so you will not be able to prevent it from dying and leaving a corpse. However, why don't you make it do all this at a 0% health event? Granted if your NPC does not have a lot of hit points, there is a possibility of him still dying upon final blow from 1% to death... Just an option.
|
ok i have no problem with doing that but how do i find out who hit him last at that point
|
You can always run a test to see if it picks up the person that damages him into the HP event.
Try having setting up a few health events and have the NPC say $name in health events when damaging with 2 or 3 characters to test it out. |
its calling out the npcs name at the hp events. so im guessing its not triggered by the player
|
If you want to delete the corpse after it dies, you should check out this quest I posted here:
http://www.eqemulator.net/forums/showthread.php?t=25927 You will still need a way to get the class that got the kill, but one you do, you can replace the IsEmpty check in my script to check for the class instead. Might be useful. So, are you trying to ensure that a certain class is soloing this NPC, or the only thing that matters is if the right class gets the killing blow? If you are trying to make sure that the right class is the only one killing it, you could probably just have it check everyone on the hate list and check their class and if they aren't the right one it depops. |
I think he is talking final blow. Just like in some of the trials in MPG.
|
Quote:
|
ok this is working now the only problem i have is the exp.
Code:
my $Random; could i use sub EVENT_KILLED_MERIT and some math to get how much exp was given out and then take it away? |
All times are GMT -4. The time now is 08:32 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.