Initial Upload
Initial Upload
This commit is contained in:
40
_module/nss/m_onuserdefined.nss
Normal file
40
_module/nss/m_onuserdefined.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
s_moduserdef - Incorporate this code into Module::OnUserDefined
|
||||
*/
|
||||
#include "nw_i0_spells"
|
||||
#include "lod_boss_inc"
|
||||
#include "areascan_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
float fDelay;
|
||||
switch (GetUserDefinedEventNumber()) {
|
||||
case 200:
|
||||
/*
|
||||
Export all characters every 'n' seconds. Note that this event triggers
|
||||
itself, on a timer, when finished -- until the module is unloaded.
|
||||
*/
|
||||
SendMessageToAllDMs("Server will export all characters in 10 seconds.");
|
||||
DelayCommand(10.0, ExportAllCharacters());
|
||||
DelayCommand(400.0, SignalEvent(OBJECT_SELF, EventUserDefined(200)));
|
||||
break;
|
||||
|
||||
case 555:
|
||||
fDelay = GetRandomDelay(240.0, 2000.0);
|
||||
SendMessageToAllDMs("Random Spawn Delay for respawn is: " + FloatToString(fDelay));
|
||||
DelayCommand(fDelay, SendMessageToAllDMs("Random Spawn Monster Time Expired, firing function"));
|
||||
DelayCommand(fDelay, SpawnRandomBoss());
|
||||
break;
|
||||
|
||||
case 556:
|
||||
/*
|
||||
Scans through all areas in the modules area list and destroys all
|
||||
encounters above a predefined max.
|
||||
*/
|
||||
SearchAndDestroy();
|
||||
DelayCommand(45.0, SignalEvent(OBJECT_SELF, EventUserDefined(556)));
|
||||
break;
|
||||
|
||||
|
||||
} /* switch */
|
||||
}
|
||||
Reference in New Issue
Block a user