2025/05/23 Update

Removed Ambidexterity from Bladesinger Bonus feats.
Added loadhints.2da.
Set Lasher debug messages to DEBUG.
Enlarge & Reduce person applies a  Visual Transform to the target now.
Added HP Power Attack chat script to user notes.
This commit is contained in:
Jaysyn904 2025-05-23 14:19:45 -04:00
parent ced388312f
commit bca308549a
10 changed files with 611 additions and 279 deletions

View File

@ -87,7 +87,7 @@
83 WP_Scimitar 7925 1 2 0
84 WP_ThrowingAxe 7931 1 2 0
85 DefArrow 8 1 2 0
86 Ambidex 1 1 2 0
86 Ambidex 1 0 2 0
87 IMP_CRIT_ELVEN_LIGHTBLADE 24701 1 2 0
88 IMP_CRIT_ELVEN_THINBLADE 24709 1 2 0
89 FEAT_EPIC_SPELL_FOCUS_ABJURATION 610 1 2 0

View File

@ -0,0 +1,103 @@
2DA V2.0
LABEL HINT CAMPAIGNONLY
0 Hint1 67053 0
1 Hint2 67054 1
2 Hint3 67055 0
3 Hint3 67653 0
4 Hint3 67655 1
5 Hint3 67656 1
6 Hint3 67657 0
7 Hint3 67658 0
8 Hint3 67659 0
9 Hint3 67660 0
10 Hint3 67661 0
11 Hint3 67662 1
12 Hint3 67663 0
13 Hint3 67664 0
14 Hint3 67665 1
15 Hint3 67666 1
16 Hint3 67667 1
17 Hint3 67668 0
18 Hint3 67669 1
19 Hint3 67670 1
20 Hint3 67671 0
21 Hint3 67672 0
22 Hint3 67673 1
23 Hint3 67707 1
24 Hint 68481 0
25 Hint 68486 0
26 Qbar2Wp 45 0
27 DeadHen 68700 1
28 Hint 40109 0
29 Hint 40112 0
30 Hint 40113 2
31 Hint 40114 1
32 Hint 40115 2
33 Hint 40116 2
34 Hint 40117 2
35 Hint 40118 2
36 Hint 40119 2
37 Hint 40120 2
38 Hint 40121 2
39 Hint 40122 2
40 Hint 40123 2
41 Hint 40124 2
42 Hint 40125 2
43 Hint 40126 2
44 Hint 40127 2
45 Hint 40128 2
46 Hint 40129 2
47 Hint 40130 2
48 Hint 40131 2
49 Hint 40132 2
50 Hint 40133 2
51 Hint 40134 2
52 Hint 40135 2
53 Hint 40136 2
54 Hint 40137 2
55 Hint 40545 2
56 RestHint 40552 2
57 HealingHint 40575 2
58 DeathHint 40576 2
59 WeaponHint 40580 2
60 HenchEquipHint 76393 2
61 RaiseDead 83458 3
62 CraftFeatHint 83613 1
63 ContinualLight 83786 0
64 UseHenches 85567 3
65 RestHint2 85569 3
66 PowerAttack 85575 3
67 PaleMaster1 85703 3
68 PaleMaster2 85704 3
69 Wounding 85765 0
70 Geography101 86778 3
71 spellcasting 86871 3
72 lowac 86872 3
73 shapeshift 86873 3
74 lightgems 86874 3
75 useRelic 86881 3
76 PoolOfsouls 86882 3
77 Rest 86883 3
78 AC30 86884 3
79 Armor 86885 3
80 SpellMantle 86886 0
81 InvisiblityCounter 86887 3
82 UseProperWeapons 86888 3
83 IllithidBrainSuck 86889 3
84 AlchemistsFire 100938 0
85 WeaponFinesse 110100 3
86 StoresAndShifter 110118 0
87 PRC8_LETO 16852017 0
88 PRC8_SPONTANEOUS 16852018 0
89 PRC8_SPELLSLOTS 16852019 0
90 PRC8_TWOHANDED 16852020 0
91 PRC8_DELEVEL 16852021 0
92 PRC8_EXALTED_VILE 16852022 0
93 PRC8_OPTIONS 16852023 0
94 PRC8_INVALID_FEATS_SKILLS 16852024 0
95 PRC8_MARKER_FEATS 16852025 0
96 PRC8_INVOKING 16852026 0
97 PRC8_SPELLCRAFT 16852027 0
98 PRC8_TUMBLE 16852028 0
99 PRC8_MASTERFEATS 16852029 0

View File

@ -120,7 +120,7 @@ void RemoveFeatBonuses(object oPC)
{
object oSkin = GetPCSkin(oPC);
SendMessageToPC(oPC, "prc_lasher: Running RemoveFeatBonuses");
if(DEBUG) DoDebug("prc_lasher: Running RemoveFeatBonuses");
if(GetHasSpellEffect(SPELL_LASHER_CRACK_FATE, oPC))
{
@ -141,7 +141,7 @@ void ApplyWhipBonuses(object oPC, object oWhip, int iClassLevel)
// Only apply bonuses if the item is a whip
if (GetBaseItemType(oWhip) != BASE_ITEM_WHIP) return;
SendMessageToPC(oPC, "prc_lasher: Running ApplyWhipBonuses");
if(DEBUG) DoDebug("prc_lasher: Running ApplyWhipBonuses");
RemoveSpecificProperty(oWhip, ITEM_PROPERTY_DAMAGE_BONUS, IP_CONST_DAMAGETYPE_SLASHING, IP_CONST_DAMAGEBONUS_2, 1, "SLASHING_WHIP", -1, DURATION_TYPE_TEMPORARY);
@ -179,7 +179,7 @@ void main()
if (nEvent == FALSE)
{
SendMessageToPC(oPC, "prc_lasher: Registering Events");
if(DEBUG) DoDebug("prc_lasher: Registering Events");
AddEventScript(oPC, EVENT_ONPLAYEREQUIPITEM, "prc_lasher", TRUE, FALSE);
AddEventScript(oPC, EVENT_ONPLAYERUNEQUIPITEM, "prc_lasher", TRUE, FALSE);
}
@ -187,7 +187,7 @@ void main()
{
if (!GetIsObjectValid(oPC)) return;
{
SendMessageToPC(oPC, "prc_lasher: Running EVENT_ONPLAYEREQUIPITEM");
if(DEBUG) DoDebug("prc_lasher: Running EVENT_ONPLAYEREQUIPITEM");
object oMain = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
object oOff = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC);
@ -198,7 +198,7 @@ void main()
}
else if (nEvent == EVENT_ONPLAYERUNEQUIPITEM)
{
SendMessageToPC(oPC, "prc_lasher: Running EVENT_ONPLAYERUNEQUIPITEM");
if(DEBUG) DoDebug("prc_lasher: Running EVENT_ONPLAYERUNEQUIPITEM");
object oItem = GetItemLastUnequipped();
object oMain = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
@ -207,19 +207,19 @@ void main()
{
if(iClassLevel > 1) //improved knockdown (whip)
{
SendMessageToPC(oPC, "prc_lasher: Removing Improved Trip (Whip)");
if(DEBUG) DoDebug("prc_lasher: Removing Improved Trip (Whip)");
RemoveSpecificProperty(oSkin, ITEM_PROPERTY_BONUS_FEAT, IP_CONST_FEAT_IMPROVED_TRIP);
}
if(iClassLevel > 5) //improved disarm (whip)
{
SendMessageToPC(oPC, "prc_lasher: Removing Improved Disarm (Whip)");
if(DEBUG) DoDebug("prc_lasher: Removing Improved Disarm (Whip)");
RemoveSpecificProperty(oSkin, ITEM_PROPERTY_BONUS_FEAT, IP_CONST_FEAT_IMPROVED_DISARM);
}
RemoveSpecificProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS, IP_CONST_DAMAGETYPE_SLASHING, IP_CONST_DAMAGEBONUS_2, 1, "SLASHING_WHIP", -1, DURATION_TYPE_TEMPORARY);
SendMessageToPC(oPC, "prc_lasher: Removing Class Ability Bonuses");
if(DEBUG) DoDebug("prc_lasher: Removing Class Ability Bonuses");
RemoveFeatBonuses(oPC);
}

View File

@ -110,11 +110,15 @@ void DispelMonitor(object oCaster, object oTarget, int nSpellID, int nBeatsRemai
if ((sTag == "ARCANE_SIZE_DECREASE") ||
(sTag == "ARCANE_SIZE_INCREASE"))
{
if(DEBUG) DoDebug("sp_enred: Removing all effects.");
RemoveEffect(oTarget, eEffect);
}
eEffect = GetNextEffect(oTarget);
}
DelayCommand(0.0f, ResetSize(oTarget));
PRCRemoveEffectsFromSpell(oTarget, GetSpellId());
// Size has changed, evaluate PrC feats again
EvalPRCFeats(oTarget);
}
@ -135,11 +139,7 @@ void main()
oCaster = OBJECT_SELF;
}
if(nEvent == EVENT_ONPLAYERREST_STARTED)
{
ResetSize(oCaster);
}
else if(nEvent == FALSE)
if(nEvent == FALSE)
{
int nCasterLevel = PRCGetCasterLevel(oCaster);
int nSpellID = PRCGetSpellId();
@ -167,6 +167,7 @@ void main()
eLink = EffectLinkEffects(eLink, EffectAbilityDecrease(ABILITY_DEXTERITY, 2));
eLink = EffectLinkEffects(eLink, EffectAbilityIncrease(ABILITY_STRENGTH, 2));
eLink = EffectLinkEffects(eLink, EffectACDecrease(1));
eLink = EffectLinkEffects(eLink, EffectBonusFeat(FEAT_SIZE_INCREASE_1));
eLink = TagEffect(eLink, "ARCANE_SIZE_INCREASE");
}
else
@ -175,6 +176,7 @@ void main()
eLink = EffectLinkEffects(eLink, EffectAbilityIncrease(ABILITY_DEXTERITY, 2));
eLink = EffectLinkEffects(eLink, EffectAbilityDecrease(ABILITY_STRENGTH, 2));
eLink = EffectLinkEffects(eLink, EffectACIncrease(1));
eLink = EffectLinkEffects(eLink, EffectBonusFeat(FEAT_SIZE_DECREASE_1));
eLink = TagEffect(eLink, "ARCANE_SIZE_DECREASE");
}
@ -187,7 +189,7 @@ void main()
if(bMass)
{
lTarget = PRCGetSpellTargetLocation();
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE);
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
while(GetIsObjectValid(oTarget))
{
@ -203,11 +205,15 @@ void main()
effect eEffect = GetFirstEffect(oTarget);
while (GetIsEffectValid(eEffect))
{
DispelMonitor(oCaster, oTarget, nSpellID, 0);
string sTag = GetEffectTag(eEffect);
if (sTag == "ARCANE_SIZE_DECREASE")
{
RemoveEffect(oTarget, eEffect);
DelayCommand(0.0f, ResetSize(oTarget));
PRCRemoveEffectsFromSpell(oTarget, GetSpellId());
DeleteLocalInt(oTarget, "PRC_Power_Compression_SizeReduction");
}
eEffect = GetNextEffect(oTarget);
}
@ -222,6 +228,8 @@ void main()
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, nSpellID, nCasterLevel);
SetObjectVisualTransform(oTarget, OBJECT_VISUAL_TRANSFORM_SCALE, 1.5);
DelayCommand(fDuration, ResetSize(oTarget));
DelayCommand(6.0f, DispelMonitor(oCaster, oTarget, nSpellID, FloatToInt(fDuration) / 6));
if(DEBUG) DoDebug("sp_enred: DispelMonitor started.");
}
}
else
@ -232,11 +240,15 @@ void main()
effect eEffect = GetFirstEffect(oTarget);
while (GetIsEffectValid(eEffect))
{
DispelMonitor(oCaster, oTarget, nSpellID, 0);
string sTag = GetEffectTag(eEffect);
if (sTag == "ARCANE_SIZE_INCREASE")
{
RemoveEffect(oTarget, eEffect);
DelayCommand(0.0f, ResetSize(oTarget));
PRCRemoveEffectsFromSpell(oTarget, GetSpellId());
DeleteLocalInt(oTarget, "PRC_Power_Expansion_SizeIncrease");
}
eEffect = GetNextEffect(oTarget);
}
@ -251,15 +263,14 @@ void main()
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, nSpellID, nCasterLevel);
SetObjectVisualTransform(oTarget, OBJECT_VISUAL_TRANSFORM_SCALE, 0.5);
DelayCommand(fDuration, ResetSize(oTarget));
}
EvalPRCFeats(oTarget);
DelayCommand(6.0f, DispelMonitor(oCaster, oTarget, nSpellID, FloatToInt(fDuration) / 6));
if(DEBUG) DoDebug("sp_enred: DispelMonitor started.");
}
}
}
else if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nSaveDC))
{
if(bEnlarge)
if(bEnlarge) //:: Enlarge
{
if(GetLocalInt(oTarget, "PRC_Power_Compression_SizeReduction"))
{
@ -267,14 +278,23 @@ void main()
effect eEffect = GetFirstEffect(oTarget);
while (GetIsEffectValid(eEffect))
{
DispelMonitor(oCaster, oTarget, nSpellID, 0);
string sTag = GetEffectTag(eEffect);
if (sTag == "ARCANE_SIZE_DECREASE")
{
RemoveEffect(oTarget, eEffect);
DelayCommand(0.0f, ResetSize(oTarget));
PRCRemoveEffectsFromSpell(oTarget, GetSpellId());
DeleteLocalInt(oTarget, "PRC_Power_Compression_SizeReduction");
}
eEffect = GetNextEffect(oTarget);
}
}
else if(GetLocalInt(oTarget, "PRC_Power_Expansion_SizeIncrease"))
{
FloatingTextStringOnCreature("This creature's size cannot be increased further.", oTarget);
}
else
{
@ -282,9 +302,11 @@ void main()
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, nSpellID, nCasterLevel);
SetObjectVisualTransform(oTarget, OBJECT_VISUAL_TRANSFORM_SCALE, 1.5);
DelayCommand(fDuration, ResetSize(oTarget));
DelayCommand(6.0f, DispelMonitor(oCaster, oTarget, nSpellID, FloatToInt(fDuration) / 6));
if(DEBUG) DoDebug("sp_enred: DispelMonitor started.");
}
}
else
else //:: Reduce
{
if(GetLocalInt(oTarget, "PRC_Power_Expansion_SizeIncrease"))
{
@ -292,31 +314,45 @@ void main()
effect eEffect = GetFirstEffect(oTarget);
while (GetIsEffectValid(eEffect))
{
DispelMonitor(oCaster, oTarget, nSpellID, 0);
string sTag = GetEffectTag(eEffect);
if (sTag == "ARCANE_SIZE_INCREASE")
{
RemoveEffect(oTarget, eEffect);
DelayCommand(0.0f, ResetSize(oTarget));
PRCRemoveEffectsFromSpell(oTarget, GetSpellId());
DeleteLocalInt(oTarget, "PRC_Power_Compression_SizeIncrease");
}
eEffect = GetNextEffect(oTarget);
}
}
else if(GetLocalInt(oTarget, "PRC_Power_Compression_SizeReduction"))
{
FloatingTextStringOnCreature("This creature's size cannot be reduced further.", oTarget);
}
else
{
SetLocalInt(oTarget, "PRC_Power_Compression_SizeReduction", 1);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, nSpellID, nCasterLevel);
SetObjectVisualTransform(oTarget, OBJECT_VISUAL_TRANSFORM_SCALE, 1.5);
DelayCommand(fDuration, ResetSize(oTarget));
}
}
EvalPRCFeats(oTarget);
DelayCommand(6.0f, DispelMonitor(oCaster, oTarget, nSpellID, FloatToInt(fDuration) / 6));
if(DEBUG) DoDebug("sp_enred: DispelMonitor started.");
}
}
}
}
if(!bMass) break;
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE);
}
EvalPRCFeats(oTarget);
}
else if(nEvent == EVENT_ONPLAYERREST_STARTED)
{
ResetSize(oCaster);
}
PRCSetSchool();

View File

@ -71342,22 +71342,20 @@ When within your own black labyrinth, you are immune to the last two effects (mo
<entry id="71821" lang="en" sex="m">War mind Tower of Iron Will</entry>
<entry id="71822" lang="en" sex="m">War mind True Seeing, Psionic</entry>
<entry id="74500" lang="en" sex="m">####END_OF_PSI_SPELLBOOK_RESERVE</entry>
<entry id="74800" lang="en" sex="m">###PRC8 Loadscreen Hint Reserve 74800-75000-###
</entry>
<entry id="74800" lang="en" sex="m">###PRC8 Loadscreen Hint Reserve 74800-75000-###</entry>
<entry id="74801" lang="en" sex="m">LETO does not support the PRC8</entry>
<entry id="74802" lang="en" sex="m">Due to Bioware limitations, non-Bioware spontaneous casters do not use the normal spellbook. Those spells can be found in your class radial.</entry>
<entry id="74803" lang="en" sex="m">Due to Bioware limitations, only your highest level Arcane or Divine class can receive new Arcane or Divine spells at level up.</entry>
<entry id="74803" lang="en" sex="m">Due to Bioware limitations, only your highest level Arcane or Divine class will receive new Arcane or Divine spellslots at level up.</entry>
<entry id="74804" lang="en" sex="m">Two handed weapons are shown being wielded one handed to allow feats such as Monkey Grip &amp; Oversized Two-Weapon fighting to work properly. Combat isn't affected.</entry>
<entry id="74805" lang="en" sex="m">De-leveling isn't supported by the PRC8 &amp; can in fact break your character.
</entry>
<entry id="74806" lang="en" sex="m">Casting an Exalted or Vile spell causes ability damage.</entry>
<entry id="74805" lang="en" sex="m">De-leveling isn't supported by the PRC8 &amp; can in fact break your character.</entry>
<entry id="74806" lang="en" sex="m">Casting an Exalted or Vile spell causes ability damage to the caster.</entry>
<entry id="74807" lang="en" sex="m">Enable &amp; disable optional game features with the PRC Options radial.</entry>
<entry id="74808" lang="en" sex="m">Knockdown, Called Shot, Taunt &amp; Parry are not valid 3e D&amp;D feats or skills &amp; have been disabled in the PRC8.
</entry>
<entry id="74808" lang="en" sex="m">Knockdown, Called Shot, Taunt &amp; Parry are not valid 3e D&amp;D feats or skills &amp; have been disabled in the PRC8.</entry>
<entry id="74809" lang="en" sex="m">As in Neverwinter Nights 2, Arcane &amp; Divine prestige classes must pick a marker feat at 1st class level to choose which spellcasting class will be boosted by the new prestige class.</entry>
<entry id="74810" lang="en" sex="m">Some prestige classes can advance invoking or shadowcasting instead of spellcasting.</entry>
<entry id="74811" lang="en" sex="m">Spellcraft doesn't provide a bonus to your save vs. spells in 3e Dungeons &amp; Dragons. This is reflected in the PRC8.</entry>
<entry id="74812" lang="en" sex="m">Tumble doesn't provide a bonus to your Armor Class in 3e Dungeons &amp; Dragons. This is reflected in the PRC8.</entry>
<entry id="74813" lang="en" sex="m">Feats for Alternate Magic Systems (Psionics, Incarnum, etc) are all organized under a Masterfeat. Psionic Feats, ToB Feats, etc...</entry>
<entry id="75001" lang="en" sex="m">Favored Mystery - Black Labyrinth</entry>
<entry id="75002" lang="en" sex="m">Holy Warrior</entry>
<entry id="75003" lang="en" sex="m">Type of Feat: Reserve

View File

@ -0,0 +1,115 @@
//::///////////////////////////////////////////////
//:: Power Attack Events
//:: hp_pa_events
//:://////////////////////////////////////////////
/*
The NUI events for the Power Attack NUI Window
*/
//:://////////////////////////////////////////////
//:: Created By: Rakiov
//:: Created On: 22.05.2005
//:://////////////////////////////////////////////
#include "nw_inc_nui"
#include "hp_pa_view"
//
// SetWindowGeometry
// Sets the window geometry for the Power Attack NUI to the player
// so it can be remembered when opened next time
//
// Arguments:
// oPlayer object the player that owns the window
// nToken int the windowId
//
void SetWindowGeometry(object oPlayer, int nToken);
void main()
{
object oPlayer = NuiGetEventPlayer();
int nToken = NuiGetEventWindow();
string sEvent = NuiGetEventType();
string sElement = NuiGetEventElement();
int nIndex = NuiGetEventArrayIndex();
string sWindowId = NuiGetWindowId(oPlayer, nToken);
//HandleWindowInspectorEvent(); // used to debug
if(sWindowId != NUI_PRC_POWER_ATTACK_WINDOW)
{
return;
}
// Get the current Power Attack value for player
int currentPAAmount = GetLocalInt(oPlayer, "PRC_PowerAttack_Level");
// if the window is closed, save the geometry
if (sEvent == "close")
{
SetWindowGeometry(oPlayer, nToken);
return;
}
// Not a mouseup event, nothing to do.
if (sEvent != "mouseup")
{
return;
}
int currentBAB = GetBaseAttackBonus(oPlayer);
if (sElement == NUI_PRC_PA_LEFT_BUTTON_EVENT)
{
// if the decreased power attack doesn't go below 0 then perform PA decrease
if(currentPAAmount-1 >= 0)
{
SetLocalInt(oPlayer, "PRC_PowerAttack_Level", currentPAAmount-1);
ExecuteScript("hp_pa_script", oPlayer);
// if decreased pwoer attack is lower than the current BAB then allow
// the incrase button
if(currentPAAmount-1 <= currentBAB)
{
NuiSetBind(oPlayer, nToken, NUI_PRC_PA_RIGHT_BUTTON_ENABLED_BIND, JsonBool(TRUE));
}
}
else
{
// otherwise we have hit the limit and disable the left button
NuiSetBind(oPlayer, nToken, NUI_PRC_PA_LEFT_BUTTON_ENABLED_BIND, JsonBool(FALSE));
}
}
if (sElement == NUI_PRC_PA_RIGHT_BUTTON_EVENT)
{
//if the incrased power attack amount is less than or equal to the BAB
// then perform the PA increase
if(currentPAAmount+1 <= currentBAB)
{
SetLocalInt(oPlayer, "PRC_PowerAttack_Level", currentPAAmount+1);
ExecuteScript("hp_pa_script", oPlayer);
// if the increased power attack amount is greater than 0 then enable
// the decrease button
if (currentPAAmount+1 > 0)
{
NuiSetBind(oPlayer, nToken, NUI_PRC_PA_LEFT_BUTTON_ENABLED_BIND, JsonBool(TRUE));
}
}
else
{
// otherwise we have hit the limit and disable the right button
NuiSetBind(oPlayer, nToken, NUI_PRC_PA_RIGHT_BUTTON_ENABLED_BIND, JsonBool(FALSE));
}
}
currentPAAmount = GetLocalInt(oPlayer, "PRC_PowerAttack_Level");
// set the geometry to the player since we only get mouseup events on button presses :(
NuiSetBind(oPlayer, nToken, NUI_PRC_PA_TEXT_BIND, JsonString(IntToString(currentPAAmount)));
SetWindowGeometry(oPlayer, nToken);
}
void SetWindowGeometry(object oPlayer, int nToken)
{
json dimensions = NuiGetBind(oPlayer, nToken, "geometry");
SetLocalJson(oPlayer, NUI_PRC_PA_GEOMETRY_VAR, dimensions);
}

View File

@ -0,0 +1,63 @@
//::///////////////////////////////////////////////
//:: Power Attack NUI
//:: hp_pa_chatscript
//:://////////////////////////////////////////////
/*
A OnChat script that parses what is said and opens the power attack NUI
if provided /pa. Otherwise if /pa x is provided run the command directly
*/
//:://////////////////////////////////////////////
//:: Created By: Rakiov
//:: Created On: 22.05.2005
//:://////////////////////////////////////////////
#include "nw_inc_nui"
#include "hp_pa_view"
#include "hp_string_util"
void main()
{
// Get current player
object oPlayer = GetPCChatSpeaker();
if (!GetIsPC(oPlayer))
{
return;
}
// get current player message and split it up into a list
string sCommand = GetPCChatMessage();
json sCommandSplit = StringSplit(sCommand);
if(JsonGetLength(sCommandSplit) > 0)
{
string firstWord = JsonGetString(JsonArrayGet(sCommandSplit, 0));
// if first word is /pa we are using the power attack interface
if(firstWord == "/pa")
{
if(JsonGetLength(sCommandSplit) >= 2)
{
//if a parameter is given then run the power attack command directly.
string param1 = JsonGetString(JsonArrayGet(sCommandSplit, 1));
int paAmount = StringToInt(param1);
SetLocalInt(oPlayer, "PRC_PowerAttack_Level", paAmount);
ExecuteScript("hp_pa_script", oPlayer);
// update the NUI so it is in sync
int nToken = NuiFindWindow(oPlayer, NUI_PRC_POWER_ATTACK_WINDOW);
if (nToken != 0)
{
NuiSetBind(oPlayer, nToken, NUI_PRC_PA_TEXT_BIND, JsonString(IntToString(paAmount)));
}
}
else
{
// if no param is given then open the NUI
NuiPRCPowerAttackView(oPlayer);
}
// clear message from chat
SetPCChatMessage();
}
}
}

View File

@ -1,6 +1,6 @@
//::///////////////////////////////////////////////
//:: Power Attack Script
//:: prc_powatk_chs
//:: hp_pa_script
//:://////////////////////////////////////////////
/*
A script that sets the power attack on a player based on the amount
@ -13,63 +13,80 @@
#include "prc_spell_const"
void SetPowerAttack();
//
// SetPowerAttack
// Sets the power attack for a player, if the amount is less than or equal to
// the players BAB it will apply the power attack, otherwise it will tell
// the player it can't.
// Sets the power attack for a player, if the player has power attack and the
// amount is less than or equal to the players BAB it will apply the
// power attack and set the current power attack to the player at variable
// 'prcPaScriptPaVariable', otherwise it will tell the player it can't.
//
// Arguments:
// amount int the amount of power attack you want
// oPlayer object the player to apply the power attack to
//
//
void SetPowerAttack(int amount, object oPlayer);
void SetPowerAttack(int amount, object oPlayer)
{
//You need the power attack feat to use this
if (GetHasFeat(FEAT_POWER_ATTACK, oPlayer))
{
// It won't work if your BAB is lower than your PA Value
if(GetBaseAttackBonus(oPlayer) <= amount)
void main()
{
int amount = GetLocalInt(OBJECT_SELF, "PRC_PowerAttack_Level");
int prevPowerAttack5 = GetLocalInt(OBJECT_SELF, "prevPowerAttack5");
int prevPowerAttack1 = GetLocalInt(OBJECT_SELF, "prevPowerAttack1");
int powerAttack5Amount = amount / 5;
int powerAttack1Amount = amount % 5;
switch (powerAttack1Amount)
// Current actions can cause this to not run right away, so clear the queue
// and force this to happen.
ClearAllActions();
//sets the 5 values for Power attack ranging from 0,5,10,15,20 respectivly
if (prevPowerAttack5 != powerAttack5Amount)
{
//sets the 1 values for Power attack ranging from 0,1,2,3,4 respectivly
case 0: // Power Attack 0
ActionCastSpellAtObject(SPELL_POWER_ATTACK1, oPlayer, TRUE);
case 1: // Power Attack 1
ActionCastSpellAtObject(SPELL_POWER_ATTACK2, oPlayer, TRUE);
case 2: // Power Attack 2
ActionCastSpellAtObject(SPELL_POWER_ATTACK3, oPlayer, TRUE);
case 3: // Power Attack 3
ActionCastSpellAtObject(SPELL_POWER_ATTACK4, oPlayer, TRUE);
case 4: // Power Attack 4
ActionCastSpellAtObject(SPELL_POWER_ATTACK5, oPlayer, TRUE);
}
switch (powerAttack5Amount)
if (powerAttack5Amount == 0) // Power Attack 0
{
case 0: // Power Attack 0
ActionCastSpellAtObject(SPELL_POWER_ATTACK6, oPlayer, TRUE);
case 1: // Power Attack 5
ActionCastSpellAtObject(SPELL_POWER_ATTACK7, oPlayer, TRUE);
case 2: // Power Attack 10
ActionCastSpellAtObject(SPELL_POWER_ATTACK8, oPlayer, TRUE);
case 3: // Power Attack 15
ActionCastSpellAtObject(SPELL_POWER_ATTACK9, oPlayer, TRUE);
case 4: // Power Attack 20
ActionCastSpellAtObject(SPELL_POWER_ATTACK10, oPlayer, TRUE);
ActionDoCommand(ActionCastSpellAtObject(SPELL_POWER_ATTACK6, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
}
} else {
FloatingTextStringOnCreature("Power Attack Higher Than BAB", oPlayer);
if (powerAttack5Amount == 1) // Power Attack 5
{
ActionDoCommand(ActionCastSpellAtObject(SPELL_POWER_ATTACK7, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
}
} else {
FloatingTextStringOnCreature("Need Power Attack To Use", oPlayer);
if (powerAttack5Amount == 2) // Power Attack 10
{
ActionCastSpellAtObject(SPELL_POWER_ATTACK8, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
if (powerAttack5Amount == 3) // Power Attack 15
{
ActionCastSpellAtObject(SPELL_POWER_ATTACK9, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
if (powerAttack5Amount == 4) // Power Attack 20
{
ActionCastSpellAtObject(SPELL_POWER_ATTACK10, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
SetLocalInt(OBJECT_SELF, "prevPowerAttack5", powerAttack5Amount);
}
//:: void main (){}
if (prevPowerAttack1 != powerAttack1Amount)
{
//sets the 1 values for Power attack ranging from 0,1,2,3,4 respectivly
if (powerAttack1Amount == 0) // Power Attack 0
{
ActionDoCommand(ActionCastSpellAtObject(SPELL_POWER_ATTACK1, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
}
if (powerAttack1Amount == 1) // Power Attack 1
{
ActionDoCommand(ActionCastSpellAtObject(SPELL_POWER_ATTACK2, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
}
if (powerAttack1Amount == 2) // Power Attack 2
{
ActionCastSpellAtObject(SPELL_POWER_ATTACK3, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
if (powerAttack1Amount == 3) // Power Attack 3
{
ActionCastSpellAtObject(SPELL_POWER_ATTACK4, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
if (powerAttack1Amount == 4) // Power Attack 4
{
ActionCastSpellAtObject(SPELL_POWER_ATTACK5, OBJECT_SELF, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE);
}
SetLocalInt(OBJECT_SELF, "prevPowerAttack1", powerAttack1Amount);
}
}