Osrs odist
From NWNWiki
osrs_odist is a script used by OSRS in the OnDisturbed event.
/////////////////////////////////////////////////////////////////////////////
//
// file:
// osrs_odist
//
// purpose:
// OnDisturbed 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)
{
//////////////////////////////////////// creature
case I_OSRS_EVENT_CLASS_CREATURE:
// Creature::OnDisturbed Pre-event
if (!osrs_c_odist_pre())
{
return;
}
// Creature::OnDisturbed event
if (!osrs_c_odist())
{
return;
}
// Creature::OnDisturbed post-event
osrs_c_odist_post();
break;
//////////////////////////////////////// placeable
case I_OSRS_EVENT_CLASS_PLACEABLE:
// Placeable::OnDisturbed Pre-event
if (!osrs_p_odist_pre())
{
return;
}
// Placeable::OnDisturbed event
if (!osrs_p_odist())
{
return;
}
// Placeable::OnDisturbed post-event
osrs_p_odist_post();
break;
}
}
