/******************************************************************************* Script : cbt_ovr_common Name : Combat Override Attack Include Purpose : include script for combat override system (common functions) Author : Quixsilver Modified : May 30, 2010 This file is licensed under the terms of the GNU GENERAL PUBLIC LICENSE (GPL) Version 2 *******************************************************************************/ /********************************** TODO *************************************** /******************************** INCLUDES ************************************/ #include "x0_i0_position" #include "cbt_constant" /*************************** FUNCTION PROTOTYPES ******************************/ // This will toggle debugging on/off for the combat override system. void SetDebugMode(); // This determine if debug mode is on/off for the combat override system. int GetDebugMode(); // This will send a debug message to oPC if debugging combat override debugging is on. void DebugMessage(object oPC, string sMessage); /************************* FUNCTION IMPLEMENTATION ****************************/ void SetDebugMode() { int bDebug = GetDebugMode(); object oMod = GetModule(); if (GetIsObjectValid(oMod)) { if (!bDebug) { SetLocalInt(oMod, CBT_OVR_SVAR_DEBUG_MODE, TRUE); SendMessageToPC(OBJECT_SELF, "Combat Override System " + CBT_OVR_VERSION_NUMBER + ":"); SendMessageToPC(OBJECT_SELF, " Debug Mode ON."); } else { SetLocalInt(oMod, CBT_OVR_SVAR_DEBUG_MODE, FALSE); SendMessageToPC(OBJECT_SELF, " Debug Mode OFF."); } } else { SendMessageToPC(OBJECT_SELF, " [cbt_ovr_common.SetDebugMod] Unable to GetModule()."); } } int GetDebugMode() { object oMod = GetModule(); return GetLocalInt(oMod, CBT_OVR_SVAR_DEBUG_MODE); } void DebugMessage(object oPC, string sMessage) { if (GetDebugMode()) { if (GetIsPC(oPC) || GetIsDM(oPC)) { SendMessageToPC(oPC, " " + sMessage); } } }