EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   mobs broadcasting (https://www.eqemulator.org/forums/showthread.php?t=24821)

jenco420 04-05-2008 12:44 AM

mobs broadcasting
 
Is it possible to have a mob Broadcast something on death? i.e Lord Nagafen broadcasts Jenco has slain me !

ChaosSlayer 04-05-2008 12:51 AM

sub EVENT_DEATH

{

quest::say("I'll be back...");

}

jenco420 04-05-2008 01:00 AM

like broadcasting as in Serverwide message sorry if i sounded confusing =-/

AndMetal 04-05-2008 01:29 AM

quest::shout2() will do a worldwide shout.

jenco420 04-05-2008 01:30 AM

thanks andmetal was what i was looking for =)

ChaosSlayer 04-05-2008 01:55 AM

hmm is there a world wide emote?

trevius 04-05-2008 05:24 AM

Not an emote, just a world-wide shout =P

ChaosSlayer 04-05-2008 12:47 PM

well Nagafen shouting on his own death so he can be heard on velious kind of unrealistic =)

an emote like "you hear news that Nagafen has fallen at the hands of BLA" would be more appropriete.
but I hear zone/server emotes do not realy work...

So_1337 04-05-2008 01:13 PM

Right. Be nice to be able to code a broadcast as you can do with #emote world within the perl function, but that's a way off, I'd imagine. I'm pretty sure that any time it was ever done on Live that it was actually done manually by a GM, as I've seen a few with typos =P

ChaosSlayer 04-05-2008 01:31 PM

well if you can send a zone/server wide shout, then to make it an emote all you need is to chage the heading so it dont say "nagafen shouts" in front of it.
this is of course up to coders to look into =)

Striat 04-06-2008 01:57 AM

Added for zone emote and world emotes

Add to questmgr.cpp :

Code:

void QuestManager::ze(int type, const char *str) {
        entity_list.Message(0, type, str);
}

void QuestManager::we(int type, const char *str) {
        worldserver.SendEmoteMessage(0, 0, type, str);
}

to questmgr.h :
Code:

        void ze(int type, const char *str);
        void we(int type, const char *str);

To perlparser.cpp :

Code:

XS(XS__ze);
XS(XS__ze)
{
        dXSARGS;
        if (items != 2)
                Perl_croak(aTHX_ "Usage: ze(type, str)");

        int        type = (int)SvIV(ST(0));
        char *                str = (char *)SvPV_nolen(ST(1));

        quest_manager.ze(type, str);

        XSRETURN_EMPTY;
}

XS(XS__we);
XS(XS__we)
{
        dXSARGS;
        if (items != 2)
                Perl_croak(aTHX_ "Usage: we(type, str)");

        int        type = (int)SvIV(ST(0));
        char *                str = (char *)SvPV_nolen(ST(1));

        quest_manager.we(type, str);

        XSRETURN_EMPTY;
}

and at the bottom of perlparser.cpp :

Code:

                newXS(strcpy(buf, "ze"), XS__ze, file);
                newXS(strcpy(buf, "we"), XS__we, file);

Now for usage:

Code:

sub EVENT_SPAWN {
        #ze = zone emote.  15 is the type(color).  Yellow in this case.
        #we = world emote.  13 is the type(color).  Red in this case.
        quest::ze(15, "Welcome to the zone!");
        quest::we(15, "Prepare for a new world of challenges!");
        }


ChaosSlayer 04-06-2008 03:09 AM

you should submit this to code submission forum :cool:
would be nice to see devs incorporate this into main build


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

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