EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Zone & World Emotes (https://www.eqemulator.org/forums/showthread.php?t=26480)

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!");
        }



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

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