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,22 +1,29 @@
#include "prc_class_const"
location lTarget;
object oTarget;
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int nClass;
if ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC)>10))
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);
if (nClass > 10)
{
if (GetIsSkillSuccessful (oPC, SKILL_CONCENTRATION, 80))
{
oTarget = GetWaypointByTag("mudslide");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;

View File

@ -1,15 +1,14 @@
#include "x2_inc_switches"
#include "prc_class_const"
void main()
{
object oPC = GetPCItemLastEquippedBy();
object oItem;
oItem = GetPCItemLastEquipped();
object oItem = GetPCItemLastEquipped();
if (!GetIsPC(oPC)) return;
//If they have the spell Clarity On take off the crown.
//:: If they have the spell Clarity On take off the crown.
if (GetHasSpellEffect(SPELL_CLARITY)== TRUE)
{
AssignCommand(oPC, ClearAllActions());
@ -17,15 +16,25 @@ 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)
//:: 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 mind immunity take off the crown and stop script.
//:: If they have mind immunity take off the crown and stop script.
if (GetIsImmune(oPC, IMMUNITY_TYPE_MIND_SPELLS)== TRUE)
{
AssignCommand(oPC, ClearAllActions());
@ -33,13 +42,16 @@ AssignCommand(oPC, ActionUnequipItem(oItem));
FloatingTextStringOnCreature("A greater power prevents you from using this crown.", oPC);
return;
}
object oTarget;
oTarget = oPC;
object oTarget = oPC;
if (GetItemPossessedBy(oPC, "secret2")== OBJECT_INVALID)
{
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConfused(), oTarget);
}
effect eEffect;
eEffect = EffectDamageIncrease(DAMAGE_BONUS_2d12, DAMAGE_TYPE_POSITIVE);
eEffect = SupernaturalEffect(eEffect);
@ -136,5 +148,4 @@ eEffect = SupernaturalEffect(eEffect);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
}

View File

@ -1,18 +1,19 @@
//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 oPC = GetPCItemLastEquippedBy();
object oItem;
int nSlot;
int a =GetLevelByClass(CLASS_TYPE_RANGER, ranger);
//If not level 21 ranger unequip it!
if(a<=20)
int nSlot;
int nRanger = GetLevelByClass(CLASS_TYPE_RANGER, oPC);
//:: If not level 21 ranger unequip it!
if(nRanger <= 20)
{
//Tell the PC why they can't equip it..
//:: 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++)
@ -21,17 +22,17 @@ if(a<=20)
if (GetIsObjectValid(oItem))
{
//Unequip all item tag named "artifact"
//: 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);
}
}
}
}
//End Script
}

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;
}
}
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.