Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-21-2017, 07:59 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,604
Default

Check lines 785-1156 in zone/client.cpp.

Line 785 should look like this:
Code:
void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_skill, const char* orig_message, const char* targetname) {
Check line 873 for this:
Code:
switch(chan_num)
Lines 1054-1126 contain the lines where /say is parsed to Perl.
Code:
case 8: { /* Say */
    if(message[0] == COMMAND_CHAR) {
        if(command_dispatch(this, message) == -2) {
            if(parse->PlayerHasQuestSub(EVENT_COMMAND)) {
                int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0);
                if(i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
                    Message(13, "Command '%s' not recognized.", message);
                }
            } else {
                if(!RuleB(Chat, SuppressCommandErrors))
                    Message(13, "Command '%s' not recognized.", message);
            }
        }
        break;
    }

#ifdef BOTS
    if (message[0] == BOT_COMMAND_CHAR) {
        if (bot_command_dispatch(this, message) == -2) {
            if (parse->PlayerHasQuestSub(EVENT_COMMAND)) {
                int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0);
                if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
                    Message(13, "Bot command '%s' not recognized.", message);
                }
            }
            else {
                if (!RuleB(Chat, SuppressCommandErrors))
                    Message(13, "Bot command '%s' not recognized.", message);
            }
        }
        break;
    }
#endif

    Mob* sender = this;
    if (GetPet() && GetTarget() == GetPet() && GetPet()->FindType(SE_VoiceGraft))
        sender = GetPet();

    entity_list.ChannelMessage(sender, chan_num, language, lang_skill, message);
    parse->EventPlayer(EVENT_SAY, this, message, language);

    if (sender != this)
        break;

    if(quest_manager.ProximitySayInUse())
        entity_list.ProcessProximitySay(message, this, language);

    if (GetTarget() != 0 && GetTarget()->IsNPC() &&
        !IsInvisible(GetTarget())) {
        if(!GetTarget()->CastToNPC()->IsEngaged()) {
            CheckLDoNHail(GetTarget());
            CheckEmoteHail(GetTarget(), message);

            if(DistanceSquaredNoZ(m_Position, GetTarget()->GetPosition()) <= RuleI(Range, Say)) {
                NPC *tar = GetTarget()->CastToNPC();
                parse->EventNPC(EVENT_SAY, tar->CastToNPC(), this, message, language);

                if(RuleB(TaskSystem, EnableTaskSystem)) {
                    if(UpdateTasksOnSpeakWith(tar->GetNPCTypeID())) {
                        tar->DoQuestPause(this);
                    }
                }
            }
        }
        else {
            if (DistanceSquaredNoZ(m_Position, GetTarget()->GetPosition()) <= RuleI(Range, Say)) {
                parse->EventNPC(EVENT_AGGRO_SAY, GetTarget()->CastToNPC(), this, message, language);
            }
        }

    }
    break;
}
You can just use that as an example and put it in the OOC part of the switch.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:43 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3