m (// add link to event) |
No edit summary |
||
Line 25: | Line 25: | ||
case I_OSRS_EVENT_CLASS_CREATURE: |
case I_OSRS_EVENT_CLASS_CREATURE: |
||
// Creature::OnDisturbed Pre-event |
// Creature::OnDisturbed Pre-event |
||
− | if ( |
+ | if (osrs_c_odist_pre()) |
{ |
{ |
||
return; |
return; |
||
Line 31: | Line 31: | ||
// Creature::OnDisturbed event |
// Creature::OnDisturbed event |
||
− | if ( |
+ | if (osrs_c_odist()) |
{ |
{ |
||
return; |
return; |
Revision as of 08:52, 29 January 2007
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; } }