mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
You can now rename your beast as much as you would like. Police officers will no longer harass corpses. Static NPC's conversing will now successfully converse with one another. When a player dies, the pet will go invulnerable and be immediately packed up. When respecing professions, your weapon will now be unequiped. Fixed the chat system for some NPC's. You can now only mount your vehicle from less than 5 meters. Quest items that can be clicked on cannot be used from less than 5 meters. Added a message to the QaSetup script, notifying the QA that they have received their items.
125 lines
2.9 KiB
Plaintext
125 lines
2.9 KiB
Plaintext
/**
|
|
|
|
*
|
|
* Title: meditate.script
|
|
* Description: meditate script for players using the meditate command
|
|
|
|
*/
|
|
|
|
/***** INCLUDES ********************************************************/
|
|
|
|
include library.buff;
|
|
include library.combat;
|
|
include library.utils;
|
|
include library.prose;
|
|
include library.meditation;
|
|
include library.player_structure;
|
|
|
|
inherits systems.combat.combat_base;
|
|
|
|
/***** CONSTANTS *******************************************************/
|
|
|
|
|
|
/***** TRIGGERS ********************************************************/
|
|
|
|
|
|
/***** HANDLERS ********************************************************/
|
|
|
|
|
|
/***** FORCE OF WILL ********************************************************/
|
|
commandHandler cmdForceOfWill()
|
|
{
|
|
int modval = meditation.getMeditationSkillMod(self);
|
|
if ( modval < 1 )
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if ( getPosture(self) != POSTURE_INCAPACITATED )
|
|
{
|
|
//sendSystemMessage(self, meditation.SID_FORCEOFWILL_FAIL);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
int stamp = getIntObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE);
|
|
if ( stamp < 0 )
|
|
{
|
|
//sendSystemMessage(self, meditation.SID_FORCEOFWILL_LOST);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
int now = getGameTime();
|
|
int delta = now - (stamp+3600);
|
|
if ( delta < 0 )
|
|
{
|
|
string time_string = player_structure.assembleTimeRemaining(player_structure.convertSecondsTime(-delta));
|
|
prose_package ppUnavailable = prose.getPackage(meditation.SID_FORCEOFWILL_UNAVAILABLE, time_string);
|
|
//sendSystemMessageProse(self, ppUnavailable);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
int roll = rand(0, 100);
|
|
if ( roll < 5 || modval < roll )
|
|
{
|
|
//sendSystemMessage(self, meditation.SID_FORCEOFWILL_UNSUCCESSFUL);
|
|
setObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE, -1);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
else
|
|
{
|
|
meditation.forceOfWill(self, modval-roll);
|
|
setObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE, now);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
commandHandler cmdForceOfWillFail()
|
|
{
|
|
//sendSystemMessage(self, meditation.SID_FORCEOFWILL_FAIL);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
/***** POWER BOOST ********************************************************/
|
|
commandHandler cmdPowerBoost()
|
|
{
|
|
if(!isIdValid(self))
|
|
{
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
|
|
int modval = meditation.getMeditationSkillMod(self);
|
|
if((modval < 1))
|
|
{
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
|
|
if(!meditation.isMeditating(self))
|
|
{
|
|
combat.sendCombatSpamMessage(self, meditation.SID_POWERBOOST_FAIL);
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
|
|
if(buff.hasBuff(self, "powerBuff"))
|
|
{
|
|
combat.sendCombatSpamMessage(self, meditation.SID_POWERBOOST_ACTIVE);
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
|
|
float duration = 300.0f + ((float)(modval) * 3.0f);
|
|
|
|
if(!combatStandardAction("powerBoost", self, self, null, "", ""))
|
|
{
|
|
return SCRIPT_OVERRIDE;
|
|
}
|
|
|
|
buff.applyBuff(self, "powerBoost", duration);
|
|
|
|
combat.sendCombatSpamMessage(self, meditation.SID_POWERBOOST_BEGIN);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
commandHandler cmdPowerBoostFail()
|
|
{
|
|
combat.sendCombatSpamMessage(self, meditation.SID_POWERBOOST_FAIL);
|
|
return SCRIPT_CONTINUE;
|
|
}
|