Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // -= WMK:modAQOOM =-
- public saved var wmkMapMenuData : WmkMapMenuData;
- public var wmkMapMenu : WmkMapMenuEx;
- // -= WMK:modAQOOM =-
- // AeroHD -- AutoLootMenu++
- private var mAutoLootConfig : CAHDAutoLootConfig;
- private var mAutoLootNotificationManager : CAHDAutoLootNotificationManager;
- // AeroHD -- AutoLootMenu--
- // CrossbowDamageBoost
- var crossbowDmgProcessor : CrossbowDamageBoostProcessor;
- // CrossbowDamageBoost
- crossbowDmgProcessor = new CrossbowDamageBoostProcessor in this;
- crossbowDmgProcessor.Init();
- muts = SSS_Patch_MutagenStacking(muts); //zur13 modSSS mutTabs
- SSS_FixEquippedMutagens(); //zur13 modSSS mutTabs
- // AeroHD -- AutoLootMenu++
- mAutoLootConfig = new CAHDAutoLootConfig in this;
- mAutoLootNotificationManager = new CAHDAutoLootNotificationManager in this;
- AddTimer('InitAHDAutoLoot', 3.0);
- // AeroHD -- AutoLootMenu--
- //modThrowingDaggers++
- timer function ScanForTDAmmo( dt : float, id : int )
- {
- var tkstacks : array< SItemUniqueId >;
- var tkammo : int;
- var throwingknives : array< SItemUniqueId >;
- var throwingknife : SItemUniqueId;
- var i : int;
- tkstacks = thePlayer.inv.GetItemsByTag('ThrowingKnifeAmmo');
- throwingknives = thePlayer.inv.GetItemsByTag('ThrowingKnife');
- throwingknife = throwingknives[0];
- if( IsMutationActive( EPMT_Mutation5 ) && GetStat( BCS_Focus ) >= 1.f ) //zur13 modSSS
- if( IsMutationActive( EPMT_Mutation7 ) ) //zur13 modSSS
- if( IsMutationActive( EPMT_Mutation8 ) ) //zur13 modSSS
- if( IsMutationActive( EPMT_Mutation10 ) ) //zur13 modSSS
- if(throwingknives.Size() > 0)
- {
- for(i = 0; i < tkstacks.Size(); i += 1)
- {
- tkammo = tkammo + thePlayer.inv.GetNumOfStackedItems(tkstacks[i]);
- }
- thePlayer.inv.SingletonItemSetAmmo(throwingknife, tkammo);
- if(tkstacks.Size() > 0)
- {
- RemoveTimer('ScanForTDAmmo');
- }
- }
- }
- //modThrowingDaggers--
- var cnt, transmutationCount, mutagenCount, i : int;
- if( !actorVictim.IsAlive() )
- {
- return false;
- }
- // AeroHD -- AutoLootMenu++
- mAutoLootNotificationManager.ShowNotification(true);
- // AeroHD -- AutoLootMenu--
- WmkGetMapMenuInstance().OnTick(deltaTime); // -= WMK:modAQOOM =-
- public final function MutationResearchWithItem(mutation : EPlayerMutationType, item : SItemUniqueId) : bool
- return ( ( W3PlayerAbilityManager ) abilityManager ).MutationResearchWithItem( mutation, item );
- // CrossbowDamageBoost
- var result : string;
- // CrossbowDamageBoost
- result = GetLocStringByKeyExtWithParams( locKey, , , arrStr );
- if (mutationType == EPMT_Mutation9)
- if( IsMutationActive( EPMT_Mutation8 ) ) //zur13 modSSS
- {
- result += "<br>Increases manually aimed shot critical chance by additional 15%. Increases critical hit damage by 50%.";
- }
- if ((recipe.cookedItemType != EACIT_Bolt) && (recipe.cookedItemType != EACIT_Undefined) && (recipe.level <= GetSkillLevel(S_Alchemy_s18)))
- // W3EE - Begin
- private var CurrentPotionSlot : EEquipmentSlots;
- private var CurrentConsumableSlot : SItemUniqueId;
- private var InventoryConsumableSlot : SItemUniqueId;
- private var inventoryCall : bool;
- private function GetPotionSlot() : EEquipmentSlots
- {
- return CurrentPotionSlot;
- }
- private function SetPotionSlot( slot : EEquipmentSlots )
- {
- CurrentPotionSlot = slot;
- }
- private function GetConsumableSlot() : SItemUniqueId
- {
- return CurrentConsumableSlot;
- }
- private function SetConsumableSlot( item : SItemUniqueId )
- {
- CurrentConsumableSlot = item;
- }
- private function GetInvPotSlot() : SItemUniqueId
- {
- return InventoryConsumableSlot;
- }
- private function SetInvPotSlot( item : SItemUniqueId )
- {
- InventoryConsumableSlot = item;
- }
- private function GetWasInvCall() : bool
- {
- return inventoryCall;
- }
- private function SetWasInvCall( i : bool )
- {
- inventoryCall = i;
- }
- timer function ConsumePotionTimer( dt : float, id : int )
- {
- var wep : EPlayerWeapon;
- wep = thePlayer.GetWep();
- if ( !thePlayer.GetStaggeredDuringAnim() )
- {
- if( GetWasInvCall() )
- DrinkPreparedPotion( GetPotionSlot(), GetInvPotSlot() );
- else
- DrinkPreparedPotion( GetPotionSlot() );
- if( thePlayer.IsInCombat() )
- if ( wep == PW_Fists || wep == PW_None )
- AddTimer('ResetAnimationSpeed', 1.73f,false);
- else AddTimer('ResetAnimationSpeed', 1.64f,false);
- else
- if ( wep == PW_Fists || wep == PW_None )
- AddTimer('ResetAnimationSpeed', 2.60f,false);
- else AddTimer('ResetAnimationSpeed', 2.55f,false);
- }
- else
- {
- thePlayer.SetAnimatedState(false);
- }
- }
- timer function AnimationSpeed( dt : float, id : int )
- {
- if ( !thePlayer.GetStaggeredDuringAnim() )
- {
- ((CAnimatedComponent)((CActor)thePlayer).GetComponentByClassName('CAnimatedComponent')).SetAnimationTimeMultiplier(2.0);
- }
- }
- timer function AnimationSpeedCombat( dt : float, id : int )
- {
- if ( !thePlayer.GetStaggeredDuringAnim() )
- {
- ((CAnimatedComponent)((CActor)thePlayer).GetComponentByClassName('CAnimatedComponent')).SetAnimationTimeMultiplier(3.0);
- }
- }
- timer function ResetAnimationSpeed( dt : float, id : int )
- {
- if ( !thePlayer.GetStaggeredDuringAnim() )
- {
- ((CAnimatedComponent)((CActor)thePlayer).GetComponentByClassName('CAnimatedComponent')).SetAnimationTimeMultiplier(1.0);
- if( thePlayer.IsInCombat() )
- thePlayer.weaponHolster.OnEquipMeleeWeapon( thePlayer.GetWep(), true, false );
- thePlayer.SetAnimatedState(false);
- }
- }
- timer function Drink( dt : float, id : int )
- {
- if ( !thePlayer.GetStaggeredDuringAnim() )
- {
- thePlayer.PlayerStartAction( 1, 'work_stand_drink_02' );
- }
- }
- timer function Eat( dt : float, id : int )
- {
- if ( !thePlayer.GetStaggeredDuringAnim() )
- {
- thePlayer.PlayerStartAction( 1, 'work_stand_eat_01' );
- }
- }
- timer function ConsumeItemTimer( dt : float, id : int )
- {
- ConsumeItem( GetConsumableSlot() );
- thePlayer.SetAnimatedState(false);
- }
- public function DrinkPotionFromSlot(slot : EEquipmentSlots, optional itemId : SItemUniqueId, optional invcall : bool) : void
- // W3EE - End
- // W3EE - Begin
- var anim : CComponent;
- var weps : EPlayerWeapon;
- SetWasInvCall(invcall);
- if( invcall )
- SetInvPotSlot(itemId);
- else
- GetItemEquippedOnSlot(slot, itemId);
- if( ( IsInShallowWater() || IsSwimming() || GetOilAnimState() || GetIsInAnimatedState() || IsInAir() || IsCurrentlyDodging() || GetIsStaggered() || ( ( inv.ItemHasTag(itemId, 'Drinks') || inv.ItemHasTag(itemId, 'Edibles') ) && IsInCombat() ) ) && theGame.GetInGameConfigWrapper().GetVarValue('TESAnims', 'PotAnim') )
- theGame.GetGuiManager().ShowNotification( GetLocStringByKeyExt( "menu_cannot_perform_action_now" ) );
- theSound.SoundEvent( "gui_global_denied" );
- return;
- if( !SSS_IsMutationEquipped( mutationType, SSS_GetEquippedMutationType() ) ) //zur13 modSSS
- weps = thePlayer.weaponHolster.GetCurrentMeleeWeapon();
- thePlayer.SetWep( weps );
- thePlayer.SetStaggeredDuringAnim(false);
- if( !theGame.GetInGameConfigWrapper().GetVarValue('TESAnims', 'PotAnim') )
- {
- if( inv.ItemHasTag(itemId, 'Drinks') || inv.ItemHasTag(itemId, 'Edibles') )
- if( invcall )
- ConsumeItem( GetInvPotSlot() );
- else
- ConsumeItem(itemId);
- if ( ToxicityLowEnoughToDrinkPotion(slot) && thePlayer.inv.SingletonItemGetAmmo(itemId) > 0 )
- if( invcall )
- DrinkPreparedPotion( GetPotionSlot(), GetInvPotSlot() );
- else
- DrinkPreparedPotion( slot, itemId );
- }
- else
- hud = (CR4ScriptedHud)theGame.GetHud();
- if ( hud )
- {
- module = (CR4HudModuleItemInfo)hud.GetHudModule("ItemInfoModule");
- if( module )
- {
- module.ForceShowElement();
- }
- }
- SSS_UnequipAllMutagens(); //zur13 modSSS mutTabs
- return;
- if ( ToxicityLowEnoughToDrinkPotion(slot) && thePlayer.inv.SingletonItemGetAmmo(itemId) > 0 )
- {
- thePlayer.SetAnimatedState(true);
- pam = (W3PlayerAbilityManager)abilityManager; //zur13 modSSS fixed orig script error
- theGame.GetGuiManager().GetCommonMenu().CloseMenu();
- RaiseEvent('ForcedUsableItemUnequip');
- if ( thePlayer.IsInCombat() )
- {
- if (weps == PW_Fists || weps == PW_None)
- {
- SetPotionSlot(slot);
- if( theGame.GetInGameConfigWrapper().GetVarValue('TESAnims', 'PotBottle') )
- thePlayer.PlayerStartAction( 1, 'geralt_determined_gesture_drink' );
- else
- thePlayer.PlayerStartAction( 1, 'high_standing_determined_gesture_drink' );
- AddTimer('AnimationSpeedCombat', 0.1, false);
- AddTimer('ConsumePotionTimer', 1.25f, false);
- }
- else
- {
- SetPotionSlot(slot);
- AddTimer('AnimationSpeedCombat', 0.1, false);
- thePlayer.OnMeleeForceHolster(true);
- thePlayer.OnRangedForceHolster(true);
- if( theGame.GetInGameConfigWrapper().GetVarValue('TESAnims', 'PotBottle') )
- thePlayer.PlayerStartAction( 1, 'geralt_determined_gesture_drink' );
- else
- thePlayer.PlayerStartAction( 1, 'high_standing_determined_gesture_drink' );
- AddTimer('ConsumePotionTimer', 1.35f, false);
- }
- }
- else
- {
- if (weps == PW_Fists || weps == PW_None)
- {
- SetPotionSlot(slot);
- if( theGame.GetInGameConfigWrapper().GetVarValue('TESAnims', 'PotBottle') )
- thePlayer.PlayerStartAction( 1, 'geralt_determined_gesture_drink' );
- else
- thePlayer.PlayerStartAction( 1, 'high_standing_determined_gesture_drink' );
- AddTimer('AnimationSpeed', 0.1, false);
- AddTimer('ConsumePotionTimer', 1.85f, false);
- }
- else
- {
- SetPotionSlot(slot);
- AddTimer('AnimationSpeed', 0.1, false);
- thePlayer.OnMeleeForceHolster(true);
- thePlayer.OnRangedForceHolster(true);
- if( theGame.GetInGameConfigWrapper().GetVarValue('TESAnims', 'PotBottle') )
- thePlayer.PlayerStartAction( 1, 'geralt_determined_gesture_drink' );
- else
- thePlayer.PlayerStartAction( 1, 'high_standing_determined_gesture_drink' );
- AddTimer('ConsumePotionTimer', 1.95f, false);
- }
- }
- return;
- }
- else { if( !ToxicityLowEnoughToDrinkPotion(slot) && !inv.ItemHasTag(itemId, 'Drinks') && !inv.ItemHasTag(itemId, 'Edibles') ) { SendToxicityTooHighMessage(); return; } }
- if( inv.ItemHasTag(itemId, 'Drinks') )
- {
- thePlayer.SetAnimatedState(true);
- theGame.GetGuiManager().GetCommonMenu().CloseMenu();
- RaiseEvent('ForcedUsableItemUnequip');
- if ( weps == PW_Fists || weps == PW_None )
- {
- SetConsumableSlot(itemId);
- thePlayer.PlayerStartAction( 1, 'work_stand_drink_02' );
- AddTimer('ConsumeItemTimer', 1.2f, false);
- }
- else
- {
- SetConsumableSlot(itemId);
- thePlayer.OnMeleeForceHolster( true );
- thePlayer.OnRangedForceHolster( true );
- AddTimer('Drink', 2.1, false);
- AddTimer('ConsumeItemTimer', 3.2f, false);
- else
- if( inv.ItemHasTag(itemId, 'Edibles') )
- {
- thePlayer.SetAnimatedState(true);
- theGame.GetGuiManager().GetCommonMenu().CloseMenu();
- RaiseEvent('ForcedUsableItemUnequip');
- if ( weps == PW_Fists || weps == PW_None )
- {
- SetConsumableSlot(itemId);
- thePlayer.PlayerStartAction( 1, 'work_stand_eat_01' );
- AddTimer('ConsumeItemTimer', 1.7f, false);
- }
- else
- {
- SetConsumableSlot(itemId);
- thePlayer.OnMeleeForceHolster(true);
- thePlayer.OnRangedForceHolster(true);
- AddTimer('Eat', 1.4, false);
- AddTimer('ConsumeItemTimer', 3.3f, false);
- }
- }
- else { theGame.GetGuiManager().ShowNotification( GetLocStringByKeyExt( "menu_cannot_perform_action_now" ) ); }
- // W3EE - End
- if(!forceBodkin && (forceHarpoon || GetCurrentStateName() == 'Swimming' || IsSwimming() || IsDiving()) )
- var i, groupID : int;
- {
- var silverSword, steelSword, armor, boots, gloves, pants : SItemUniqueId; // modScalingArmors
- // modScalingArmors BEGIN
- GetItemEquippedOnSlot(EES_SilverSword, silverSword);
- GetItemEquippedOnSlot(EES_SteelSword, steelSword);
- GetItemEquippedOnSlot(EES_Armor, armor);
- GetItemEquippedOnSlot(EES_Boots, boots);
- GetItemEquippedOnSlot(EES_Gloves, gloves);
- GetItemEquippedOnSlot(EES_Pants, pants);
- inv.GetItemLevel(silverSword);
- inv.GetItemLevel(steelSword);
- inv.GetItemLevel(armor);
- inv.GetItemLevel(boots);
- inv.GetItemLevel(gloves);
- inv.GetItemLevel(pants);
- // modScalingArmors END
- //CrossbowDamageBoost
- var extraBoltDamage : float;
- var boltDamageFactor : float;
- // CrossbowDamageBoost++
- extraBoltDamage = crossbowDmgProcessor.GetExtraBoltDamage(GetLevel());
- boltDamageFactor = crossbowDmgProcessor.GetBoltDamageMod(GetInventory().GetItemName(item));
- // CrossbowDamageBoost--
- playerOffenseStats.crossbowSteelDmg = steelDmg * crossbowDmgProcessor.crossbowDamageBoostData.ExplosiveBoltFactor; // CrossbowDamageBoost
- // CrossbowDamageBoost
- extraBoltDamage *= crossbowDmgProcessor.crossbowDamageBoostData.ExplosiveWitcherFactor;
- // unmodified game bug fix - fire bolts also have silver damage
- // CrossbowDamageBoost
- // - 1.0 crossbow hack - calculate crossbow multiplicative value as it is displayed on crossbow damage
- // so 101% means 1.01 of bolt damage, not 2.01
- attackPower.valueMultiplicative -= 1.0;
- // CrossbowDamageBoost
- if(CanUseSkill(S_Sword_s15))
- {
- attackPower.valueMultiplicative += 0.12 * GetSkillLevel(S_Sword_s15);
- }
- // CrossbowDamageBoost
- // Cat eyes mutation simply gives attack power bonus instead of base damage increase
- if (hackMode != 1 && ( IsMutationActive( EPMT_Mutation9 ) || hackMode == 2 ) )
- attackPower.valueMultiplicative += 0.6;
- }
- //mutation 9 increases base damage
- /*if( hackMode != 1 && ( IsMutationActive( EPMT_Mutation9 ) || hackMode == 2 ) )
- {
- }*/
- // CrossbowDamageBoost - include extra bolt base damage
- playerOffenseStats.crossbowSteelDmg = (playerOffenseStats.crossbowSteelDmg * crossbowDmgProcessor.crossbowDamageBoostData.SteelBoltFactor + attackPower.valueBase + extraBoltDamage * crossbowDmgProcessor.crossbowDamageBoostData.SteelWitcherFactor * boltDamageFactor)
- * attackPower.valueMultiplicative + attackPower.valueAdditive;
- playerOffenseStats.crossbowSilverDmg = (playerOffenseStats.crossbowSilverDmg * crossbowDmgProcessor.crossbowDamageBoostData.SilverBoltFactor + attackPower.valueBase + extraBoltDamage * crossbowDmgProcessor.crossbowDamageBoostData.SilverWitcherFactor * boltDamageFactor)
- * attackPower.valueMultiplicative + attackPower.valueAdditive;
- // CrossbowDamageBoost++
- public function GetCrossbowCritChanceReduction() : float
- {
- if (CanUseSkill(S_Perk_19))
- {
- return FloorF(GetStat(BCS_Focus)) * 0.02;
- }
- else
- {
- return 0.0;
- }
- }
- public timer function OnCrossbowDmgProcessorTimer(dt : float, id : int)
- {
- crossbowDmgProcessor.OnTimer();
- }
- // CrossbowDamageBoost--
- // CrossbowDamageBoost code disable. This mutation no longer gives base damage bonus.
- /*if( IsMutationActive( EPMT_Mutation9 ) && inv.IsItemBolt( weaponId ) && IsDamageTypeAnyPhysicalType( damageTypeName ) )
- }*/
- else
- // AeroHD -- AutoLootMenu++
- timer function InitAHDAutoLoot(dt : float, id : int)
- {
- mAutoLootConfig.Init();
- mAutoLootNotificationManager.Reset();
- }
- public function GetAutoLootConfig() : CAHDAutoLootConfig { return mAutoLootConfig; }
- public function GetAutoLootNotificationManager() : CAHDAutoLootNotificationManager { return mAutoLootNotificationManager; }
- timer function TrueAutoLootMode( dt : float, id : int )
- {
- if( GetAutoLootConfig().ModEnabled() || GetAutoLootConfig().TrueAutoLootEnabled() )
- }
- //zur13 modSSS
- public function SSS_GetEquippedMutationType() : array< EPlayerMutationType >
- {
- return ( ( W3PlayerAbilityManager ) abilityManager ).SSS_GetEquippedMutationType();
- }
- //zur13 modSSS mutTabs
- public function SSS_FixEquippedMutagens()
- {
- var item : SItemUniqueId;
- var i : int;
- for( i = EES_SkillMutagen5 ; i < EES_SkillMutagen48; i=i+1 )
- {
- if( GetItemEquippedOnSlot( i, item ) )
- {
- inv.SetItemStackable( item, false );
- }
- }
- }
- //zur13 modSSS mutTabs
- public function SSS_Patch_MutagenStacking(muts : array< SItemUniqueId >) : array< SItemUniqueId >
- {
- var i, j, quantity : int;
- var item : SItemUniqueId;
- for( i = EES_SkillMutagen5 ; i < EES_SkillMutagen48; i=i+1 )
- {
- if( GetItemEquippedOnSlot( i, item ) )
- {
- muts.Remove( item );
- inv.SetItemStackable( item, false );
- }
- }
- return muts;
- {
- mAutoLootConfig.GetFeatureManager().TryAreaLooting("true_autoloot_mode");
- AddTimer('TrueAutoLootMode', mAutoLootConfig.GetTrueAutoLootTime());
- }
- }
- // AeroHD -- AutoLootMenu--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement