NWNWiki
Advertisement
NWNWiki
3,718
pages

The osrs_opresp script is used by the Open Source Rule Set to handle the OnPlayerRespawn event. The content of the script is the following.

/////////////////////////////////////////////////////////////////////////////
//
// file:
//      osrs_opresp
//
// purpose:
//      OnPlayerRespawn event script.
//
/////////////////////////////////////////////////////////////////////////////

// the include file for Open Source Rule Set events
#include "osrs_inc"

/////////////////////////////////////////////////////////////////////////////
void main()
{
    // determine what type of object is calling this script
    int iCallingClass = osrs_GetCallerEventClass(OBJECT_SELF);
    switch(iCallingClass)
    {
        ////////////////////////////////////////      module
        case I_OSRS_EVENT_CLASS_MODULE:
            // Module::OnPlayerRespawn Pre-event
            if (!osrs_mo_opresp_pre())
            {
                return;
            }

            // Module::OnPlayerRespawn event
            if (!osrs_mo_opresp())
            {
                return;
            }

            // Module::OnPlayerRespawn post-event
            osrs_mo_opresp_post();

            break;

    }
}
Advertisement