Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify "Trigger" "Interact" in GameNPC.cs so Broadcast (b) and Yell (y) options work #358

Open
DeerHunt3r opened this issue Oct 25, 2021 · 0 comments

Comments

@DeerHunt3r
Copy link

OnTheDOL has mentioned it should be easy to make this change so Broadcast (b) and Yell (y) work when triggers with interact are assigned to a mob. This will allow you to assign yell and broadcast text to mobs so they don't pop up a window every time, instead a message can be put into the chat window.

This code snip is the original GameNPC.cs and I think where the modification needs to be made.

// for interact text we pop up a window
if (trigger == eAmbientTrigger.interact)
{
(living as GamePlayer).Out.SendMessage(text, eChatType.CT_System, eChatLoc.CL_PopupWindow);
return;
}

        // broadcasted , yelled or talked ?
        if (chosen.Voice.StartsWith("b"))
        {
            foreach (GamePlayer player in CurrentRegion.GetPlayersInRadius(X, Y, Z, 25000, false, false))
            {
                player.Out.SendMessage(text, eChatType.CT_Broadcast, eChatLoc.CL_ChatWindow);
            }
            return;
        }
        if (chosen.Voice.StartsWith("y"))
        {
            Yell(text);
            return;
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant