mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
71 lines
1.9 KiB
Plaintext
71 lines
1.9 KiB
Plaintext
/**
|
|
|
|
*
|
|
* Title: cleanup.script
|
|
* Description: default player script for handling skill use cleanup
|
|
|
|
*/
|
|
|
|
/***** INCLUDES ********************************************************/
|
|
|
|
include library.utils;
|
|
include library.meditation;
|
|
include library.metrics;
|
|
|
|
/***** CONSTANTS *******************************************************/
|
|
|
|
/***** TRIGGERS ********************************************************/
|
|
trigger OnRecapacitated()
|
|
{
|
|
if ( hasObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE) )
|
|
{
|
|
int stamp = getIntObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE);
|
|
if ( stamp < 0 )
|
|
removeObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
/***** FUNCTIONS *******************************************************/
|
|
|
|
/***** MESSAGEHANDLERS *************************************************/
|
|
|
|
/***** FOR: player.skill.teraskasi *************************************/
|
|
messageHandler handlePowerBoostWane()
|
|
{
|
|
if ( !hasObjVar(self, meditation.VAR_POWERBOOST_ACTIVE) )
|
|
return SCRIPT_CONTINUE;
|
|
|
|
int expire = getIntObjVar(self, meditation.VAR_POWERBOOST_ACTIVE);
|
|
int d_expire = params.getInt("expiration");
|
|
if ( expire != d_expire )
|
|
return SCRIPT_CONTINUE;
|
|
|
|
sendSystemMessage(self, meditation.SID_POWERBOOST_WANE);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler handlePowerBoostEnd()
|
|
{
|
|
if ( !hasObjVar(self, meditation.VAR_POWERBOOST_ACTIVE) )
|
|
return SCRIPT_CONTINUE;
|
|
|
|
int expire = getIntObjVar(self, meditation.VAR_POWERBOOST_ACTIVE);
|
|
int d_expire = params.getInt("expiration");
|
|
if ( expire != d_expire )
|
|
return SCRIPT_CONTINUE;
|
|
|
|
sendSystemMessage(self, meditation.SID_POWERBOOST_END);
|
|
removeObjVar(self, meditation.VAR_POWERBOOST_ACTIVE);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler handlePowerBoostLog()
|
|
{
|
|
// Log the buff info after the powerboost has reached max effectiveness.
|
|
metrics.logBuffStatus(self);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|