Osrs ode
From NWNWiki
osrs_ode is a script used by OSRS in the OnDeath event.
/////////////////////////////////////////////////////////////////////////////
//
// file:
// osrs_ode
//
// purpose:
// OnDeath
//
/////////////////////////////////////////////////////////////////////////////
// the OSRS include file
#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_PLACEABLE:
// Placeable::OnDeath Pre-event
if (!osrs_p_ode_pre())
{
return;
}
// Placeable::OnDeath event
if (!osrs_p_ode())
{
return;
}
// Placeable::OnDeath post-event
osrs_p_ode_post();
return;
case I_OSRS_EVENT_CLASS_CREATURE:
// Creature::OnDeath Pre-event
if (!osrs_c_ode_pre())
{
return;
}
// Creature::OnDeath event
if (!osrs_c_ode())
{
return;
}
// Creature::OnDeath post-event
osrs_c_ode_post();
return;
case I_OSRS_EVENT_CLASS_DOOR:
// Door::OnDeath Pre-event
if (!osrs_d_ode_pre())
{
return;
}
// Door::OnDeath event
if (!osrs_d_ode())
{
return;
}
// Door::OnDeath post-event
osrs_d_ode_post();
return;
default:
return;
}
}
