Area Changes and other fixes
added areas and ccoh, fixed some areas to work with crafting fixed some on death issues added server entry/ooc
This commit is contained in:
@@ -1,165 +0,0 @@
|
||||
//Added BY SEYMOR-OMNIS///////////////////////////////
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
// Slam Attack Ability
|
||||
void vamp_slamattack(object oPC,object oTarget)
|
||||
{
|
||||
object oMod = GetModule();
|
||||
|
||||
int iHourLength = GetLocalInt(oMod, "HourLength");
|
||||
float fDrain = IntToFloat(iHourLength*24);
|
||||
float fTemphealth = IntToFloat(iHourLength);
|
||||
|
||||
|
||||
PrintString("vamp_slamattack(): - PC|" + GetName(oPC) + " TARGET|" + GetName(oTarget) + " - Function called.");
|
||||
// If target is not a creature then skip everything
|
||||
if ((GetObjectType(oTarget) == OBJECT_TYPE_CREATURE))
|
||||
{
|
||||
// Get distance to target. If distance is < 3m attempt slam attack
|
||||
if (GetDistanceBetween(oPC,oTarget)<3.0f)
|
||||
{
|
||||
PrintString("vamp_slamattack(): - PC|" + GetName(oPC) + " TARGET|" + GetName(oTarget) + " - Target is in range.");
|
||||
// If target is not dead nor sleeping make slam attack attempt
|
||||
// This section also checks for effects that would leave a person helpless in dodging
|
||||
effect eEffect = GetFirstEffect(oTarget);
|
||||
int iDominated = FALSE;
|
||||
int iParalyzed = FALSE;
|
||||
int iStunned = FALSE;
|
||||
int iSleep = FALSE;
|
||||
while(GetIsEffectValid(eEffect))
|
||||
{
|
||||
int iType = GetEffectType(eEffect);
|
||||
if(iType == EFFECT_TYPE_DOMINATED)
|
||||
iDominated = TRUE;
|
||||
else if(iType == EFFECT_TYPE_PARALYZE)
|
||||
iParalyzed = TRUE;
|
||||
else if(iType == EFFECT_TYPE_STUNNED)
|
||||
iStunned = TRUE;
|
||||
else if(iType == EFFECT_TYPE_SLEEP)
|
||||
iSleep = TRUE;
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
}
|
||||
int iNegLvlImmune = GetIsImmune(oTarget,IMMUNITY_TYPE_NEGATIVE_LEVEL);
|
||||
|
||||
if ( GetIsDead(oTarget)==FALSE && iDominated==FALSE && iParalyzed==FALSE && iStunned==FALSE && iSleep==FALSE && GetIsResting(oTarget)==FALSE )
|
||||
{
|
||||
PrintString("vamp_slamattack(): - PC|" + GetName(oPC) + " TARGET|" + GetName(oTarget) + " - Target is not dead or sleeping.");
|
||||
SendMessageToPC(oPC, "You attempt to slam attack victim");
|
||||
// If target is PC send message to him.
|
||||
if (GetIsPC(oTarget) == TRUE)
|
||||
{
|
||||
SetPCDislike(oPC,oTarget);
|
||||
SendMessageToPC(oTarget,GetName(oPC)+" attempts to hit you!");
|
||||
}
|
||||
// If target is NPC change target hostile.
|
||||
else
|
||||
{
|
||||
PrintString("vamp_slamattack: NPC ["+GetName(oTarget)+"] attacked by ["+GetName(oPC)+"].");
|
||||
// This following command is buggy because it means that
|
||||
// if there are any Defenders or Commoners or Merchants
|
||||
// or factions hostile to Faction Hostile, they will
|
||||
// attack the victim.
|
||||
// ChangeToStandardFaction(oTarget,STANDARD_FACTION_HOSTILE);
|
||||
|
||||
// If the victim does not consider their attacker an enemy...
|
||||
// (don't do this if they are already in combat it might
|
||||
// interfere with the NPC's thought process)
|
||||
if (!GetIsEnemy(oPC,oTarget))
|
||||
{
|
||||
PrintString("vamp_slamattack: NPC ["+GetName(oTarget)+"] will now be the enemy of ["+GetName(oPC)+"].");
|
||||
// make them hate the PC Vampire
|
||||
AdjustReputation(oPC, oTarget, -100);
|
||||
SetIsTemporaryEnemy(oPC, oTarget);
|
||||
// Have them attack!
|
||||
AssignCommand(oTarget, ActionAttack(oPC));
|
||||
// Depreciated?
|
||||
// AssignCommand(oTarget, DetermineCombatRound(oPC));
|
||||
}
|
||||
}
|
||||
// Attempt slam attack. Base Attack +d20 against target AC & an accurate grapple check
|
||||
if ((GetBaseAttackBonus(oPC)+d20(1)) >= GetAC(oTarget) && GetIsDead(oTarget)==FALSE)
|
||||
{
|
||||
PrintString("vamp_slamattack(): - PC|" + GetName(oPC) + " TARGET|" + GetName(oTarget) + " - Bit target!!!.");
|
||||
SendMessageToPC(oPC, "You slam attack victim");
|
||||
if (GetIsPC(oTarget) == TRUE)
|
||||
{
|
||||
SendMessageToPC(oTarget,GetName(oPC)+" has hit you!");
|
||||
}
|
||||
// Apply effects to target. 2 neg. levels and 1d6 Bludgeoning damage due to getting hit
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectDamage(d6(1),DAMAGE_TYPE_BLUDGEONING,DAMAGE_POWER_NORMAL),oTarget);
|
||||
int x;
|
||||
for (x=0;x<2;x++)
|
||||
{
|
||||
if (iNegLvlImmune == FALSE)
|
||||
{
|
||||
int iNegEnergySave = FortitudeSave(oTarget,10 + (GetHitDice(oPC)/2)+GetAbilityModifier(ABILITY_CHARISMA,oPC),SAVING_THROW_TYPE_NEGATIVE,oPC);
|
||||
if(iNegEnergySave == 0)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectNegativeLevel(1)),oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE),oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectTemporaryHitpoints(5),oPC,fTemphealth);
|
||||
}
|
||||
else if(iNegEnergySave == 1)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectNegativeLevel(1),oTarget,fDrain);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE),oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectTemporaryHitpoints(5),oPC,fTemphealth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// If slam attack attempt failed
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC, "Victim dodged your slam attack attempt.");
|
||||
if (GetIsPC(oTarget) == TRUE)
|
||||
{
|
||||
SendMessageToPC(oTarget,"You succesfully dodged "+GetName(oPC)+" hit attempt!");
|
||||
}
|
||||
}
|
||||
}
|
||||
// Target is dead or sleeping. No difficult dc.
|
||||
else if( GetIsDead(oTarget)==FALSE )
|
||||
{
|
||||
PrintString("vamp_slamattack(): - PC|" + GetName(oPC) + " TARGET|" + GetName(oTarget) + " - Target is dead... vampire bites victim.");
|
||||
|
||||
SendMessageToPC(oTarget,GetName(oPC)+" hits you!");
|
||||
int x;
|
||||
for (x=0;x<2;x++)
|
||||
{
|
||||
if(iNegLvlImmune == FALSE)
|
||||
{
|
||||
int iNegEnergySave = FortitudeSave(oTarget,10 + (GetHitDice(oPC)/2)+GetAbilityModifier(ABILITY_CHARISMA,oPC),SAVING_THROW_TYPE_NEGATIVE,oPC);
|
||||
if(iNegEnergySave == 0)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectNegativeLevel(1)),oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE),oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectTemporaryHitpoints(5),oPC,fTemphealth);
|
||||
}
|
||||
else if(iNegEnergySave == 1)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectNegativeLevel(1),oTarget,fDrain);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE),oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectTemporaryHitpoints(5),oPC,fTemphealth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SendMessageToPC(oPC, "You hit your target.");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// PC is too far to slam attack.
|
||||
else SendMessageToPC(oPC, "You are too far to slam attack victim.");
|
||||
|
||||
}
|
||||
// Target does not have blood.
|
||||
else
|
||||
{
|
||||
PrintString("vamp_slamattack(): - PC|" + GetName(oPC) + " TARGET|" + GetName(oTarget) + " - Target is dead and can not be sucked.");
|
||||
SendMessageToPC(oPC, "Target is not a living creature.");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user