NWNWiki
Advertisement
NWNWiki
3,718
pages

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

/////////////////////////////////////////////////////////////////////////////
//
// file:
//      osrs_ott
//
// purpose:
//      OnTrapTriggered 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)
    {
        case I_OSRS_EVENT_CLASS_TRAP:
            // Trap::OnTrapTriggered Pre-event
            if (!osrs_tra_ott_pre())
            {
                return;
            }

            // Trap::OnTrapTriggered event
            if (!osrs_tra_ott())
            {
                return;
            }

            // Trap::OnTrapTriggered post-event
            osrs_tra_ott_post();

            break;



    }
}
Advertisement