Files
dsrc/sku.0/sys.server/compiled/game/script/player/skill/cleanup.script
T
2013-09-10 23:17:15 -07:00

73 lines
2.0 KiB
Plaintext

/**
* Copyright (c)2000-2002 Sony Online Entertainment Inc.
* All Rights Reserved
*
* Title: cleanup.script
* Description: default player script for handling skill use cleanup
* @author $Author:$
* @version $Revision:$
*/
/***** 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;
}