Updating scripts for PRC.

Updating scripts for PRC.
This commit is contained in:
Jaysyn904 2022-10-07 21:14:47 -04:00
parent 8d97886c3f
commit 55766b63b5
11 changed files with 187 additions and 164 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.mod
*.mod

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,33 +1,40 @@
#include "prc_class_const"
location lTarget;
object oTarget;
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int nClass;
nClass = GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
+GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
+GetLevelByClass(CLASS_TYPE_HEALER, oPC)
+GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
+GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC);
object oPC = GetEnteringObject();
if (nClass > 10)
{
if (GetIsSkillSuccessful (oPC, SKILL_CONCENTRATION, 80))
{
if (!GetIsPC(oPC)) return;
oTarget = GetWaypointByTag("mudslide");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
DelayCommand(1.0, FloatingTextStringOnCreature("You found a magical entrance to a small cave!", oPC));
if ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC)>10))
{
if (GetIsSkillSuccessful(oPC, SKILL_CONCENTRATION, 80))
{
oTarget = GetWaypointByTag("mudslide");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
DelayCommand(1.0, FloatingTextStringOnCreature("You found a magical entrance to a small cave!", oPC));
}
}
}
}
}
}

View File

@ -1,140 +1,151 @@
#include "x2_inc_switches"
#include "prc_class_const"
void main()
{
object oPC = GetPCItemLastEquippedBy();
object oItem = GetPCItemLastEquipped();
object oPC = GetPCItemLastEquippedBy();
if (!GetIsPC(oPC)) return;
object oItem;
oItem = GetPCItemLastEquipped();
//:: If they have the spell Clarity On take off the crown.
if (GetHasSpellEffect(SPELL_CLARITY)== TRUE)
{
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature("A greater power prevents you from using this crown.", oPC);
return;
}
if (!GetIsPC(oPC)) return;
//:: Classes with Immunity to Mind Effects take off the crown and stop script.
if ((GetLevelByClass(CLASS_TYPE_MONK, oPC) > 19 == TRUE)
|| (GetLevelByClass(CLASS_TYPE_BINDER, oPC) > 18 == TRUE)
|| (GetLevelByClass(CLASS_TYPE_BAELNORN, oPC) > 0 == TRUE)
|| (GetLevelByClass(CLASS_TYPE_LICH, oPC) > 0 == TRUE)
|| (GetLevelByClass(CLASS_TYPE_PLANT, oPC) > 0 == TRUE)
|| (GetLevelByClass(CLASS_TYPE_UNDEAD, oPC) > 0 == TRUE)
|| (GetLevelByClass(CLASS_TYPE_BLIGHTLORD, oPC) > 9 == TRUE)
|| (GetLevelByClass(CLASS_TYPE_DREAD_NECROMANCER, oPC) > 19 == TRUE))
{
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature("A greater power prevents you from using this crown.", oPC);
return;
}
//If they have the spell Clarity On take off the crown.
if (GetHasSpellEffect(SPELL_CLARITY)== TRUE)
{
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature("A greater power prevents you from using this crown.", oPC);
return;
}
//if they are a monk take off the crown and stop script.
if (GetLevelByClass(CLASS_TYPE_MONK, oPC) >0 == TRUE)
{
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature("A greater power prevents you from using this crown.", oPC);
return;
}
//if they have mind immunity take off the crown and stop script.
if (GetIsImmune(oPC, IMMUNITY_TYPE_MIND_SPELLS)== TRUE)
{
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature("A greater power prevents you from using this crown.", oPC);
return;
}
object oTarget;
oTarget = oPC;
if (GetItemPossessedBy(oPC, "secret2")== OBJECT_INVALID)
{
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConfused(), oTarget);
}
effect eEffect;
eEffect = EffectDamageIncrease(DAMAGE_BONUS_2d12, DAMAGE_TYPE_POSITIVE);
//:: If they have mind immunity take off the crown and stop script.
if (GetIsImmune(oPC, IMMUNITY_TYPE_MIND_SPELLS)== TRUE)
{
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature("A greater power prevents you from using this crown.", oPC);
return;
}
object oTarget = oPC;
eEffect = SupernaturalEffect(eEffect);
if (GetItemPossessedBy(oPC, "secret2")== OBJECT_INVALID)
{
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConfused(), oTarget);
}
effect eEffect;
eEffect = EffectDamageIncrease(DAMAGE_BONUS_2d12, DAMAGE_TYPE_POSITIVE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageIncrease(DAMAGE_BONUS_2d12, DAMAGE_TYPE_NEGATIVE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageIncrease(DAMAGE_BONUS_2d12, DAMAGE_TYPE_NEGATIVE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectRegenerate(65, 6.0f);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectRegenerate(65, 6.0f);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectACIncrease(40);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectACIncrease(40);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectAttackIncrease(20);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectAttackIncrease(20);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectTemporaryHitpoints(300);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectTemporaryHitpoints(300);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectInvisibility(EFFECT_TYPE_INVISIBILITY);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectInvisibility(EFFECT_TYPE_INVISIBILITY);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectConcealment(60);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectConcealment(60);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectSpellResistanceIncrease(50);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectSpellResistanceIncrease(50);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectSavingThrowIncrease(SAVING_THROW_ALL, 12, SAVING_THROW_TYPE_ALL);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectSavingThrowIncrease(SAVING_THROW_ALL, 12, SAVING_THROW_TYPE_ALL);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_BLUDGEONING, 90);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_BLUDGEONING, 90);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_PIERCING, 90);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_PIERCING, 90);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_SLASHING, 90);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_SLASHING, 90);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_MAGICAL, 90);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_MAGICAL, 90);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectImmunity(IMMUNITY_TYPE_CRITICAL_HIT);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectImmunity(IMMUNITY_TYPE_CRITICAL_HIT);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectTrueSeeing();
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
eEffect = EffectTrueSeeing();
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
}
}

View File

@ -1,37 +1,38 @@
//Created by Genisys / Guile 5/20/08
#include "x2_inc_switches"
#include "prc_class_const"
void main()
{
object oPC;
oPC = GetPCItemLastEquippedBy();
object ranger = oPC;
object oItem;
int nSlot;
int a =GetLevelByClass(CLASS_TYPE_RANGER, ranger);
{
object oPC = GetPCItemLastEquippedBy();
object oItem;
int nSlot;
int nRanger = GetLevelByClass(CLASS_TYPE_RANGER, oPC);
//If not level 21 ranger unequip it!
if(a<=20)
{
//Tell the PC why they can't equip it..
FloatingTextStringOnCreature("You must be at least a level 21 ranger to use this item!", oPC, FALSE);
//:: If not level 21 ranger unequip it!
if(nRanger <= 20)
{
//:: Tell the PC why they can't equip it..
FloatingTextStringOnCreature("You must be at least a level 21 ranger to use this item!", oPC, FALSE);
for (nSlot=0; nSlot<NUM_INVENTORY_SLOTS; nSlot++)
{
oItem=GetItemInSlot(nSlot, oPC);
for (nSlot=0; nSlot<NUM_INVENTORY_SLOTS; nSlot++)
{
oItem=GetItemInSlot(nSlot, oPC);
if (GetIsObjectValid(oItem))
{
//Unequip all item tag named "artifact"
if(GetTag(oItem) == "ranger")
{
AssignCommand(oPC, ActionUnequipItem(oItem));
}
else
{ }
}
}
}
//End Script
}
if (GetIsObjectValid(oItem))
{
//: Unequip all item tag named "artifact"
if(GetTag(oItem) == "ranger")
{
AssignCommand(oPC, ActionUnequipItem(oItem));
}
else
{
FloatingTextStringOnCreature("You feel the power of nature flowing through you!", oPC, FALSE);
}
}
}
}
}

View File

@ -1,30 +1,31 @@
#include "x2_inc_switches"
void main()
{
int nEvent =GetUserDefinedItemEventNumber();
switch (nEvent)
{
case X2_ITEM_EVENT_ACTIVATE:
ExecuteScript("ac_"+GetTag(GetItemActivated()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_EQUIP:
ExecuteScript("eq_"+GetTag(GetPCItemLastEquipped()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_UNEQUIP:
ExecuteScript("ue_"+GetTag(GetPCItemLastUnequipped())
, OBJECT_SELF); break;
case X2_ITEM_EVENT_ACQUIRE:
ExecuteScript("aq_"+GetTag(GetModuleItemAcquired()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_UNACQUIRE:
ExecuteScript("ua_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_SPELLCAST_AT:
ExecuteScript("sp_"+GetTag(GetModuleItemLost()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()),
OBJECT_SELF); break;
}
}
int nEvent = GetUserDefinedItemEventNumber();
switch (nEvent)
{
case X2_ITEM_EVENT_ACTIVATE:
ExecuteScript("ac_"+GetTag(GetItemActivated()), OBJECT_SELF); break;
case X2_ITEM_EVENT_EQUIP:
ExecuteScript("eq_"+GetTag(GetPCItemLastEquipped()), OBJECT_SELF); break;
case X2_ITEM_EVENT_UNEQUIP:
ExecuteScript("ue_"+GetTag(GetPCItemLastUnequipped()), OBJECT_SELF); break;
case X2_ITEM_EVENT_ACQUIRE:
ExecuteScript("aq_"+GetTag(GetModuleItemAcquired()), OBJECT_SELF); break;
case X2_ITEM_EVENT_UNACQUIRE:
ExecuteScript("ua_"+GetTag(GetModuleItemLost()), OBJECT_SELF); break;
case X2_ITEM_EVENT_SPELLCAST_AT:
ExecuteScript("sp_"+GetTag(GetModuleItemLost()), OBJECT_SELF); break;
case X2_ITEM_EVENT_ONHITCAST:
ExecuteScript("on_"+GetTag(GetSpellCastItem()), OBJECT_SELF); break;
}
}

Binary file not shown.