EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   Adding FTE mesages (https://www.eqemulator.org/forums/showthread.php?t=42960)

Bovon 05-26-2020 05:41 PM

Adding FTE mesages
 
Hello, first post, please let me know if this is the wrong forum.

I have a server up and running on a linux machine.

P99 has an FTE (first to engage) message feature where the moment a raid boss engages somebody after not being aggro'd at all, there is a zonewide message that says <mob name> engages <player name> in yellow text.

I like that feature and so far I've found the message() feature but haven't been able to get much further than that. Has anybody else implemented something like that and can give me some direction?

Thanks.

snirke 01-28-2021 06:45 PM

i'm looking for the same thing.

Huppy 01-28-2021 10:08 PM

That can be done with an EVENT_AGGRO in the npc script in the quests folder. You would have to get to know a bit of perl (or lua) scripting. If you look at a really simple one, like Cognoggin in quests/lfaydark.

You can get lots of samples from existing quests, from the server/quests folder to use as a base for the learning process. Of course using the wiki on github helps out too. ;)

demonstar55 01-29-2021 05:48 PM

I would not be opposed to adding this as a option in code so people don't have to add this to the quest for a million different NPCs. Probably just add something to NPCType and if that flag is set, say it, probably where we process EVENT_AGGRO.

Splose 01-30-2021 06:40 PM

global/global_npc
Code:

sub EVENT_AGGRO {
        if($npc->IsRaidTarget()) {
                quest::ze(15, "" . $npc->GetCleanName() . " has engaged " . $client->GetCleanName() . "!");
                quest::worldwidemessage(15, "[FTE] - " . $npc->GetCleanName() . " has engaged " . $client->GetCleanName() . " in $zonesn.", 1, 255);        #:: Worldwide GM only message
        }
}

Quote:

Originally Posted by demonstar55 (Post 266027)
I would not be opposed to adding this as a option in code so people don't have to add this to the quest for a million different NPCs. Probably just add something to NPCType and if that flag is set, say it, probably where we process EVENT_AGGRO.

You don't have to add it for every npc big lols. This will affect every NPC in every basement.

Huppy 01-30-2021 07:27 PM

For my own preferences, I wouldn't want the message code-forced on every raid mob. I like to pick and choose, so demonstar's db flag is a good idea. ;)

EDIT:

The options would be left wide open for all npc's with a little sql.

UPDATE npc_types SET aggromessage = 1 WHERE raid_target = 1;

or getting a little more picky:

UPDATE npc_types SET aggromessage = 1 WHERE raid_target = 1 AND hp > 500000;

or sending out a message when someone engages the quillmane:

UPDATE npc_types SET aggromessage = 1 WHERE id = 14139;

Personally, I would love to see it spit out a we and mm server-wide message for all npctypes flagged.

Splose 01-30-2021 08:02 PM

Quote:

Originally Posted by Huppy (Post 266038)
For my own preferences, I wouldn't want the message code-forced on every raid mob. I like to pick and choose, so demonstar's db flag is a good idea. ;)

I just wrote what the guy above asked for.. You can just drop that in and it instantly works. The original guy didn't even know how to send a message so I don't think he's gonna know how to add it and handle it in the source.

Besides that the raid_target field doesn't do anything except for add the "this creature would take an army to defeat" message when you consider the mob. Any mob you'd care about having FTE on a p99-like server would already be designated as a raid target so the flag you guys are talking about pretty much already exists.

Edit:

With the PR I just added you'll be able to #npcedit raidtarget making it even easier to use it this way.. you can also change the == in my plugin to >= which will allow you to set raidtarget to 2.. this wont give you the con message but will give an FTE message.. so you could just set quillmane's raid_target field to 2.


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

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