EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   turning off client attack (https://www.eqemulator.org/forums/showthread.php?t=37448)

jdoran 10-29-2013 10:26 PM

turning off client attack
 
While I'm thinking of it... Here's another question that came up recently.

Does anyone know of a way for the server to turn off client attack?

The usage case: The player is fighting NPC001 and at some point the
NPC gives up and will cooperate with the player. The fight stops and
the player interacts with the NPC.

I have this working except for that one detail. When the NPC's health reaches a certain level the NPC's special attacks are changed to never aggro nor flee, and he is set to be invulnerable. The hate list is cleared. At this point the NPC will stand there and beg for his life.

On the client you get messages about the NPC being invulnerable. Sure the player can turn off autoattack. But the encounter would look a lot better if the client would stop attacking.

Dunge0nMastr 10-29-2013 10:27 PM

You could always depop and repop the mob there @ that state to clear the clients target.

jdoran 10-29-2013 10:55 PM

That sounds like a good idea, thanks.

Dunge0nMastr 10-29-2013 11:22 PM

more or less the work around ive used in the past.

Kayen 10-30-2013 03:25 PM

Kayen: Implemented Perl MOB Quest Object SetDisableMelee(1=Disabled) - Prevents the ability to auto attack.
Kayen: Implemented Perl MOB Quest Object IsMeleeDisabled()

Implemented these last year.

$client->SetDisableMelee(1)

That should do that trick for you.

Maceblade 10-31-2013 09:35 PM

You could always do:

Code:

        if ($hpevent == 50) {
                quest::emote("shakes with laughter and says, 'You are much stronger than I thought. I give up!");
                quest::modifynpcstat("special_attacks",ABfHG);
                    $npc->WipeHateList();

Makes him unattackable and will not aggro, its all i used.

Vexyl 10-31-2013 10:48 PM

Kayen already gave an exact solution to this problem; no work-around needed.


All times are GMT -4. The time now is 04:02 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.