Files
dsrc/sku.0/sys.server/compiled/game/script/player/skill/cleanup.script
T

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;
}