Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

[Feature Request] f_onserver_broadcast #1145

Closed canerksk closed 3 months ago

canerksk commented 1 year ago

With this function we can check all announcements (serv.b ) on the server.

For example, we can record an announcement written with serv.b Yell in mysql/sqlite and then easily display or log it on our website. We can control all announcements made on the server under a single function.

eg;

void CWorldComm::Broadcast(lpctstr pMsg) // static
{
    // System broadcast in bold text
    ADDTOCALLSTACK("CWorldComm::Broadcast");

    CScriptTriggerArgs args;
    args.m_s1 = pMsg;
    g_Serv.r_Call("f_onserver_broadcast", &g_Serv, &args);

    Speak( nullptr, pMsg, HUE_TEXT_DEF, TALKMODE_BROADCAST, FONT_BOLD );
}

The codes here are purely examples. Although many have been tested, some may need to be rewritten.