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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-20-2017, 12:37 AM
JimB_1958
Sarnak
 
Join Date: Mar 2013
Location: Springfield MO
Posts: 66
Default Fun with /ooc

I have searched and have not found an answer to this.

I would like to have some fun with /ooc.

I would like to set a "word of the day" so as when players say that word in /ooc I can make something funky happen to them.

So far I have found nothing for pulling anything said in /ooc into a script.

Is it even possible?
__________________
"We are all on the same team, and I think not enough people realize this."
- Leetsauce
Reply With Quote
  #2  
Old 09-21-2017, 07:59 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
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
Reply


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 11:27 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3