Thanks.
scriptName 13ContTrapCrimeNoHiFi01; Adapted and reworked script based off Lap's Security Rebalance,; Scruggsywuggsy's LockBash 1.1 and Dejunai's Harvest Containers' code.; These scripts have suffixes to indicate whether they are trapped and whether they trigger; crime detection by nearby NPCs. Traps are given in the OnLoad block, only for locks; below lvl 100. Crime detection vs angering "evil" faction beings is decided in the ; GameMode block, right at the start of the bashing code. LbSpellOOO indicates Crime and; lbspell2OOO indicates angering "evil" faction beings (used in non-law-abiding areas).; Harvest Container functions obey a global check so that they can be turned on or off in; console. The code also allows NPCs from certain factions to loot the contents of the; container. Also, they can be affected by traps, although the system for this is different; than the traps' system responsible for player-interaction with the container. Finally, the; suffix NR is assigned to those containers not set to respawn, for HC purposes.; Jorge "Oscuro" Salgado; NPC ref for looting/trap checks & randomizing trap variablesRef LooterShort ZapLooterChanceShort ZapsvckaShort UnlockLooterChanceShort LooterLockPicksShort SoundClosedShort SoundOpen; Lb's short and float listshort iAmTargetshort cancelTargetshort curHealthfloat startDistfloat startAnglefloat curAngle; End Lb's short and float list; Lap's short and ref listshort trappedshort detectedshort buttonshort whoopsshort lockedonceshort magicshort randomref losshort spellcountershort combatcheckshort message; End Lap's short and ref list; OOO's short listshort H2HBashingshort TwoHBladeBashingshort TwoHBluntBashingshort OneHBluntBashingshort OneHBladeBashingshort DaleDuro; End OOO's short listshort sOpenshort sPlayerOwned;************************************************* Lap's Begin OnLoad Inclusionbegin OnLoadIf OOOHC == 1 If sOpen == 4 PlayGroup Forward 1 EndIfEndifif GetLocked == 1 && GetLockLevel != 100set trapped to 1else returnendifendBegin OnReset ; EnableIf OOOHC == 1 Set sOpen to 0 Reset3DStateEndifEndbegin onActivate If IsActionRef Player != 1 Activate If OOOHC == 1 If sOpen > 0 PlayGroup Backward 1 Set sOpen to 0 Else PlayGroup Forward 1 Set sOpen to 5 EndIf Endif Set Looter to GetActionRef If Looter.GetInFaction AdventurerFaction If Trapped == 1 && GetLocked == 1 ; adds below what happens if locked and trapped Set ZapLooterChance to GetRandomPercent If ZapLooterChance <= 50 Set Zapsvcka to GetRandomPercent If Zapsvcka <= 10 Cast TrapContainerBoltLvl1 Looter Elseif Zapsvcka > 10 && Zapsvcka <= 20 Cast TrapContainerDarkIceStormLvl1 Looter Cast StandardSilence3Journeyman Looter Elseif Zapsvcka > 20 && Zapsvcka <= 30 Cast TrapContainerDamageHealthLvl1 Looter Cast StandardDrainMagicka3Journeyman Looter Cast TrapContainerFireLvl1 Looter Elseif Zapsvcka > 30 && Zapsvcka <= 40 Cast TrapContainerBoltLvl2 Looter Elseif Zapsvcka > 40 && Zapsvcka <= 50 Cast TrapContainerDarkIceStormLvl2 Looter Cast StandardSilence3Journeyman Looter Elseif Zapsvcka > 50 && Zapsvcka <= 60 Cast StandardDrainMagicka4Expert Looter Cast TrapContainerDamageHealthLvl2 Looter Cast StandardDisintegrateArmor2Apprentice Looter Cast TrapContainerFireLvl2 Looter Elseif Zapsvcka > 60 && Zapsvcka <= 70 Cast TrapContainerBoltLvl3 Looter Cast StandardShockDamageTarget5Master Looter Elseif Zapsvcka > 70 && Zapsvcka <= 80 Cast TrapContainerDarkIceStormLvl3 Looter Cast StandardSilence4Expert Looter Elseif Zapsvcka > 80 && Zapsvcka <= 90 Cast StandardDrainMagicka5Master Looter Cast StandardDisintegrateArmor2Apprentice Looter Cast TrapContainerDamageHealthLvl3 Looter Elseif Zapsvcka > 90 && Zapsvcka <= 100 Cast TrapContainerFireLvl4 Looter Cast TrapContainerFireLvl2 Looter Endif Endif ; adds below what happens when container does not zap or has zapped Set Trapped to 0 Endif ; adds below what happens if the container is not trapped and is locked If GetLocked == 1 && Trapped == 0 Set UnlockLooterChance to GetRandomPercent Set LooterLockPicks to Looter.GetItemCount Lockpick If GetLockLevel <= 40 && LooterLockPicks >= 1 If UnlockLooterChance <= 65 If Looter.GetDead != 1 Looter.RemoveItem Lockpick 1 Unlock RemoveAllItems Looter If OOOHC != 1 PlaySound3D DRSChestOpen Endif Return Else Return Endif Else If OOOHC != 1 PlaySound3D DRSChestLocked Endif Looter.EVP Return Endif Elseif GetLockLevel > 40 && GetLockLevel != 100 && LooterLockPicks >= 3 If UnlockLooterChance <= 50 If Looter.GetDead != 1 Looter.RemoveItem Lockpick 3 Unlock RemoveAllItems Looter If OOOHC != 1 PlaySound3D DRSChestOpen Endif Return Else Return Endif Else If OOOHC != 1 PlaySound3D DRSChestLocked Endif Looter.EVP Return Endif Elseif LooterLockPicks == 0 || GetLockLevel == 100 ; lock-level 100 = needs key If OOOHC != 1 PlaySound3D DRSChestLocked Endif Looter.EVP Return Endif Elseif GetLocked == 0 && Trapped == 0 ; adds below what happens when not trapped or not locked Unlock If Looter.GetDead != 1 RemoveAllItems Looter If OOOHC != 1 PlaySound3D DRSChestOpen Endif Return Else Return Endif Endif ; end of checks for container's states (locked and/or trapped) Endif; adds below what happens when the looter is not an adventurer If OOOHC != 1 If GetLocked == 1 PlaySound3D DRSChestLocked Elseif GetLocked != 1 PlaySound3D DRSChestOpen Endif Endif Return EndIfIf OOOHC == 1 If IsAnimPlaying == 1 Return EndIf If sOpen == 4 If Player.IsSneaking == 1 PlayGroup Backward 0 Set sOpen to 0 Else Activate EndIf Return EndIf If GetLocked == 0 DisablePlayerControls PlayGroup Forward 0 Set sOpen to 3 Return EndIf; Set sPlayerOwned to 0; If IsOwner == 1; Set sPlayerOwned to 1; ElseIf IsOwner Blades == 1; If Player.GetInFaction Blades == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner MagesGuild == 1; If Player.GetInFaction MagesGuild == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner ThievesGuild == 1; If Player.GetInFaction ThievesGuild == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner FightersGuild == 1; If Player.GetInFaction FightersGuild == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner DarkBrotherhood == 1; If Player.GetInFaction DarkBrotherhood == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner ArenaCombatants == 1; If Player.GetInFaction ArenaCombatants == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner KnightsWhiteStallion == 1; If Player.GetInFaction KnightsWhiteStallion == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner KnightsThornFaction == 1; If Player.GetInFaction KnightsThornFaction == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner OrderoftheVirtuousBlood == 1; If Player.GetInFaction OrderoftheVirtuousBlood == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner MythicDawn == 1; If Player.GetInFaction MythicDawn == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner BlackwoodCompanyFACTION == 1; If Player.GetInFaction BlackwoodCompanyFACTION == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner MQEndFaction == 1; If Player.GetInFaction MQEndFaction == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; ElseIf IsOwner PlayerFaction == 1; If Player.GetInFaction PlayerFaction == 1; Set sPlayerOwned to 1; Else; Set sPlayerOwned to -1; EndIf; EndIf; If sPlayerOwned == 1; DisablePlayerControls; PlayGroup Forward 0; Set sOpen to 3; Return; EndIf; If sPlayerOwned == 0; If Player.IsInMyOwnedCell == 1; Unlock; DisablePlayerControls; PlayGroup Forward 0; Set sOpen to 3; Return; EndIf; EndIf If GetLocked == 1 Set sOpen to 1; Activate EndIfEndif if ( isActionRef player == 0 ) ; npc trying to activate, so do normal action activate;OOO: laps inclusion***********begin elseif GetLocked == 0 set whoops to 0 Activate player If OOOHC != 1 Set SoundOpen to 1 Endif Return;OOO: laps inclusion***********end elseif ( iAmTarget == 1 ) return ; already targeted for bashing elseif ( ( player.IsWeaponOut == 0 || player.IsSneaking == 1 ) && LapNoCombatLock == 1 && player.IsInCombat == 1 ) Message "I cannot lockpick while in combat!" return elseif ( ( player.IsWeaponOut == 1 && player.IsSneaking == 0 ) && player.GetAv Strength < 35 ) Message "I am not strong enough to bash this lock open" return elseif player.GetActorValue Security + 39 < GetLockLevel && GetLocked == 1 && GetLockLevel != 100 && LAPMinLock == 1 && ( player.IsWeaponOut == 0 || player.IsSneaking == 1 ) Message "This lock is beyond my abilities." Return elseif ( player.IsWeaponOut == 0 || iAmTarget == 1 || getLockLevel == 100 || player.IsSneaking ) ; (( player.getweaponskilltype != 2 && player.getweaponanimtype != 2 ) || ( player.getweaponskilltype != 0 && player.getweaponanimtype != 0 )) ;OOO: added && trapped == 2 + condensed the bashing disabled conditions, got rid of its GetLocked == 0 condition, as I wrote that one above.;OOO: Lap's Inclusion************************************************begin (desired trap section of Lap's OnActivate block) if trapped == 1 set whoops to 1 If detected == 1 MessageBox "I suspect that there is a trap here. Should I attempt to disarm it?", "No, don't open it", "Yes, open it" Set message to 1 endif If detected == 0 If player.GetActorValue Luck /4 + GetRandomPercent + player.GetActorValue Security >= GetLockLevel / 2 +100 + LapTrapDifficulty MessageBox "I suspect that there is a trap here. Should I attempt to disarm it?", "No, don't open it", "Yes, open it" Set message to 1 Set detected to 1 else set whoops to 1 Activate Player If OOOHC != 1 Set SoundOpen to 1 Endif endif endif else set whoops to 0 ;OOO: Added line Activate Player If OOOHC != 1 Set SoundOpen to 1 Endif Return endif else;Lap's Inclusion**********************************************************end set startDist to getDistance player set startAngle to ( player.getAngle z ) if ( startAngle < 0 ) set startAngle to ( startAngle + 360 ) endif set iAmTarget to 1 playmagicshadervisuals effectSoulTrap set lbBashMeOOO to 1 ; tells power attack voice to play on next swing if ( curHealth == 0 ) ; set up lock health based on lock level if ( getLockLevel <= 7 ) set curHealth to 120 + LapBashLockDifficulty elseif ( getLockLevel <= 20 ) set curHealth to 250 + LapBashLockDifficulty elseif ( getLockLevel <= 40 ) set curHealth to 370 + LapBashLockDifficulty elseif ( getLocklevel <= 80 ) set curHealth to 490 + LapBashLockDifficulty elseif ( getLockLevel <= 99 ) set curHealth to 610 + LapBashLockDifficulty elseif ( getLockLevel < 121 ) ; shouldn't be needed but justin case set cancelTarget to 1 return endif endif endifendif;OOO: Lap's Inclusion************************************************begin (Modified bashing section of Lap's OnActivate block) if player.GetWeaponSkillType == 0 && player.GetWeaponAnimType == 0 set H2HBashing to ( player.GetActorValue strength / 4 + player.GetActorValue handtohand / 7 + GetRandomPercent / 2 ) elseif player.GetWeaponSkillType == 1 && player.GetWeaponAnimType == 1 set OneHBladeBashing to ( player.GetActorValue strength / 3 + player.GetActorValue blade / 6 + GetRandomPercent / 2 ) endif elseif player.GetWeaponSkillType == 1 && player.GetWeaponAnimType == 2 set TwoHBladeBashing to ( player.GetActorValue strength / 2 + player.GetActorValue blade / 4 + GetRandomPercent / 2 ) endif elseif player.GetWeaponSkillType == 2 && player.GetWeaponAnimType == 1 set OneHBluntBashing to ( player.GetActorValue strength / 3 + player.GetActorValue blunt / 4 + GetRandomPercent / 2 ) endif else player.GetWeaponSkillType == 2 && player.GetWeaponAnimType == 2 set TwoHBluntBashing to ( player.GetActorValue strength / 2 + player.GetActorValue blunt / 2 + GetRandomPercent / 2 ) endif;Lap's Inclusion**********************************************************endendBegin MenuMode 1014If OOOHC == 1 If sOpen == 1 Set sOpen to 2 EndIfEndifEndBegin MenuMode 1008If OOOHC == 1 If sOpen == 1 Unlock PlayGroup Forward 0 Set sOpen to 4 EndIfEndifIf OOOHC != 1 If SoundOpen == 1 PlaySound DRSChestOpen Set SoundOpen to 0 Set SoundClosed to 1 EndifEndif Endbegin GameMode ;**********************************************GAME MODE ON*************************************If OOOHC != 1 && MenuMode != 1 If SoundClosed == 1 PlaySound3D DRSChestClose Set SoundClosed to 0 EndifEndifIf GetDistance Player >= 256 && LapDetectTrapsSpell != 1ReturnEndif;************************************************* Lap's Trap Section of GameModeif iAmTarget == 1 if LapNoCombatLock == 1 && ( player.IsInCombat == 1 ) set combatcheck to 1 if GetLocked == 1 Message "There is no time for lockpicking or bashing!" 4 set cancelTarget to 1 set iAmTarget to 0 set lbBashMeOOO to 0 stopMagicShaderVisuals effectSoulTrap; Return endif elseif LapNoCombatLock == 1 && ( player.IsInCombat == 0 ) if GetLocked == 1 set combatcheck to 0 endif endifendif;if DaleDuro == 1if message == 0set button to -1endifif message == 1set button to GetButtonPressedendifif button == 0 || button == 1set whoops to 0set message to 0endif; set los to GetSelfif trapped == 1 && LapDetectTrapsSpell == 1 && spellcounter == 0 set los to GetSelf if player.GetLOS los == 1 set detected to 1 endifPlayMagicShaderVisuals effectEnchantDestructionset spellcounter to 2endifif trapped != 1 || LapDetectTrapsSpell == 0StopMagicShaderVisuals effectEnchantDestructionendifif LapDetectTrapsSpell == 0set spellcounter to 0endif if button == 1 && trapped == 1 If player.GetActorValue Luck /4 + GetRandomPercent + player.GetActorValue Security >= GetLockLevel / 3 +100 + LapTrapDifficulty PlaySound UILockTumblerLock If player.GetActorValue Luck /4 + GetRandomPercent + player.GetActorValue Security >= GetLockLevel / 3 +100 + LapTrapDifficulty set random to GetRandomPercent if player.GetLevel <= 15 if random <= 25 MessageBox "Trap disarmed and extracted. I gained a shocking poison." player.additem LAPPoisonShockingAOOO 1 endif if random > 25 && random <= 50 player.additem LAPPoisonCombustionAOOO 1 MessageBox "Trap disarmed and extracted. I gained a combustion poison." endif if random > 50 && random <= 75 player.additem LAPPoisonFreezingGraspAOOO 1 MessageBox "Trap disarmed and extracted. I gained a freezing grasp poison." endif if random >75 && random <=99 player.additem LAPPoisonRustAOOO 1 MessageBox "Trap disarmed and extracted. I gained a devouring rust poison." endif endif if player.GetLevel > 15 && player.GetLevel <= 30 if random <= 25 MessageBox "Trap disarmed and extracted. I gained a shocking poison." player.additem LAPPoisonShockingBOOO 1 endif if random > 25 && random <= 50 player.additem LAPPoisonCombustionBOOO 1 MessageBox "Trap disarmed and extracted. I gained a combustion poison." endif if random > 50 && random <= 75 player.additem LAPPoisonFreezingGraspBOOO 1 MessageBox "Trap disarmed and extracted. I gained a freezing grasp poison." endif if random >75 && random <=99 player.additem LAPPoisonRustBOOO 1 MessageBox "Trap disarmed and extracted. I gained a devouring rust poison." endif endif if player.GetLevel > 30 if random<= 25 MessageBox "Trap disarmed and extracted. I gained a shocking poison." player.additem LAPPoisonShockingCOOO 1 endif if random > 25 && random <= 50 player.additem LAPPoisonCombustionCOOO 1 MessageBox "Trap disarmed and extracted. I gained a combustion poison." endif if random > 50 && random <= 75 player.additem LAPPoisonFreezingGraspCOOO 1 MessageBox "Trap disarmed and extracted. I gained a freezing grasp poison." endif if random >75 && random <=99 player.additem LAPPoisonRustCOOO 1 MessageBox "Trap disarmed and extracted. I gained a devouring rust poison." endif endif ;OOO: 3 endifs left else Message "Trap disarmed" 4 endif ;OOO: 2 endifs left else if player.GetActorValue Agility / 4 + player.GetActorValue Acrobatics / 2 + GetRandomPercent + player.GetActorValue Luck / 3 + LapTrapDifficulty > 120 cast LAPDodgedOOO player TriggerHitShader 2 Message "I dodged the trap!" 4 else set whoops to 1 endif endif ;OOO: Last endif. set trapped to 2 set button to -1 endifendifif whoops == 1 && message == 0set whoops to GetRandomPercent if player.GetLevel <= 10 if whoops <= 25 cast TrapContainerBoltLvl1 player endif if whoops > 25 && whoops <= 50 cast TrapContainerFireLvl1 player endif if whoops > 50 && whoops <= 75 cast TrapContainerDarkIceStormLvl1 player cast StandardSilence3Journeyman player endif if whoops > 75 && whoops <= 99 cast TrapContainerDamageHealthLvl1 player cast StandardDrainMagicka3Journeyman player endif endif if player.GetLevel > 10 && player.GetLevel <=20 if whoops <= 25 cast TrapContainerBoltLvl2 player endif if whoops > 25 && whoops <= 50 cast TrapContainerFireLvl2 player endif if whoops > 50 && whoops <= 75 cast TrapContainerDarkIceStormLvl2 player cast StandardSilence3Journeyman player endif if whoops > 75 && whoops <= 99 cast StandardDrainMagicka4Expert player cast TrapContainerDamageHealthLvl2 player cast StandardDisintegrateArmor2Apprentice player endif endif if player.GetLevel > 20 && player.GetLevel <= 30 if whoops <= 25 cast TrapContainerBoltLvl3 player endif if whoops > 25 && whoops <= 50 cast TrapContainerFireLvl3 player endif if whoops > 50 && whoops <= 75 cast TrapContainerDarkIceStormLvl3 player cast StandardSilence4Expert player endif if whoops > 75 && whoops <= 99 cast StandardDrainMagicka5Master player cast StandardDisintegrateArmor2Apprentice player cast TrapContainerDamageHealthLvl3 player endif endif if player.GetLevel > 30 if whoops <= 25 cast StandardShockDamageTarget5Master player cast TrapContainerBoltLvl3 player endif if whoops > 25 && whoops <= 50 cast TrapContainerFireLvl4 player endif if whoops > 50 && whoops <= 75 cast TrapContainerDarkIceStormLvl3 player cast StandardSilence5Master player cast StandardFrostDamageTarget5Master player endif if whoops > 75 && whoops <= 99 cast StandardDrainMagicka3Journeyman player cast StandardDrainMagicka5Master player cast StandardDisintegrateArmor4Expert player cast TrapContainerDamageHealthLvl3 player endif endif set whoops to 0 set trapped to 2endifIf OOOHC == 1 If IsAnimPlaying == 1 Return EndIf If sOpen == 5 PlayGroup Backward 1 Set sOpen to 0 Return EndIf If sOpen == 3 EnablePlayerControls Set sOpen to 4 Activate Return EndIf If sOpen == 2 If GetLocked == 1 Set sOpen to 0 EndIf Return EndIf If sOpen == 1 If GetLocked == 1 Set sOpen to 0 EndIf EndIfEndif;***************************************Lb's GameMode Code:if ( cancelTarget < 0 ) ; door was just bashed open, but don't activate immediately set cancelTarget to ( cancelTarget - 1 ) if ( cancelTarget < -25 ) stopMagicShaderVisuals effectSoulTrap activate player If OOOHC != 1 Set SoundOpen to 1 Endif set cancelTarget to 0 set iAmTarget to 0 set lbBashMeOOO to 0 else return endifelseif ( cancelTarget == 1 ) ; door became untargeted for some reason, so untarget it set cancelTarget to 0 if ( iAmTarget ) set iAmTarget to 0 set lbBashMeOOO to 0 stopmagicshadervisuals effectSoulTrap endif returnelseif ( iAmTarget == 0 ) return ; skip everything below if not currently targetedendifif ( getDistance player > ( startDist + 50 ) ) ; cancel target when player moves too far away set cancelTarget to 1 returnelseif ( player.IsSneaking || player.IsWeaponOut == 0 || player.getAv strength < 35 || getLocked == 0 || getLockLevel == 100 ) set cancelTarget to 1 ; player no longer equipped for bashing or door was successfully unlocked ; OOO: Added condition for Trap needing to be disabled. return;elseif ( player.getWeaponSkillType != 2 && player.getWeaponAnimType != 2 ); only blunt or 2-hand swords ;set cancelTarget to 1 ; player changed weapons or broke his weapon OOO: Got rid of these conditions, as now all weapons can bash. ;returnelseif ( lbBashMeOOO == -1 ) ; player just swung weapon at this door if ( ( curHealth / player.getav strength ) > 8 ) ; not strong enough message "I am not strong enough to bash this lock open." set cancelTarget to 1 return else cast lbSpell2OOO player ; broadcasts sound of bashing to nearby enemies if player.GetWeaponSkillType == 0 && player.GetWeaponAnimType == 0 ; OOO: This specifies the values for substracting from Chest's health by the type of weapon used in the bashing. set curHealth to ( curHealth - H2HBashing ); lock 121 ; makes lock unpickable - no need for this, really... if ( curHealth < 1 ) ; OOO: Added If/endif for trap's spring if unlocked without detecting/disarming. if trapped == 1 set whoops to 1 else unlock If OOOHC == 1 PlayGroup Forward 0 Set sOpen to 4 Endif; message "You bashed open the lock!" set cancelTarget to -1; set iAmTarget to 0; set lbBashMeOOO to 0 set curhealth to 0; activate player-don't do this immediately...wait until swing finishes, above return endif else; message "You damaged the door." set lbBashMeOOO to 1 endif elseif player.GetWeaponSkillType == 1 && player.GetWeaponAnimType == 1 ; OOO: This specifies the values for substracting from Chest's health by the type of weapon used in the bashing. set curHealth to ( curHealth - OneHBladeBashing ); lock 121 ; makes lock unpickable - no need for this, really... if ( curHealth < 1 ) if trapped == 1 set whoops to 1 else unlock If OOOHC == 1 PlayGroup Forward 0 Set sOpen to 4 Endif; message "You bashed open the lock!" set cancelTarget to -1; set iAmTarget to 0; set lbBashMeOOO to 0 set curhealth to 0; activate player-don't do this immediately...wait until swing finishes, above return endif else; message "You damaged the door." set lbBashMeOOO to 1 endif elseif player.GetWeaponSkillType == 1 && player.GetWeaponAnimType == 2 ; OOO: This specifies the values for substracting from Chest's health by the type of weapon used in the bashing. set curHealth to ( curHealth - TwoHBladeBashing ); lock 121 ; makes lock unpickable - no need for this, really... if ( curHealth < 1 ) if trapped == 1 set whoops to 1 else unlock If OOOHC == 1 PlayGroup Forward 0 Set sOpen to 4 Endif; message "You bashed open the lock!" set cancelTarget to -1; set iAmTarget to 0; set lbBashMeOOO to 0 set curhealth to 0; activate player-don't do this immediately...wait until swing finishes, above return endif else; message "You damaged the door." set lbBashMeOOO to 1 endif elseif player.GetWeaponSkillType == 2 && player.GetWeaponAnimType == 1 ; OOO: This specifies the values for substracting from Chest's health by the type of weapon used in the bashing. set curHealth to ( curHealth - OneHBluntBashing ); lock 121 ; makes lock unpickable - no need for this, really... if ( curHealth < 1 ) if trapped == 1 set whoops to 1 else unlock If OOOHC == 1 PlayGroup Forward 0 Set sOpen to 4 Endif; message "You bashed open the lock!" set cancelTarget to -1; set iAmTarget to 0; set lbBashMeOOO to 0 set curhealth to 0; activate player-don't do this immediately...wait until swing finishes, above return endif else; message "You damaged the door." set lbBashMeOOO to 1 endif elseif player.GetWeaponSkillType == 2 && player.GetWeaponAnimType == 2 ; OOO: This specifies the values for substracting from Chest's health by the type of weapon used in the bashing. set curHealth to ( curHealth - TwoHBluntBashing ); lock 121 ; makes lock unpickable - no need for this, really... if ( curHealth < 1 ) if trapped == 1 set whoops to 1 else unlock If OOOHC == 1 PlayGroup Forward 0 Set sOpen to 4 Endif; message "You bashed open the lock!" set cancelTarget to -1; set iAmTarget to 0; set lbBashMeOOO to 0 set curhealth to 0; activate player-don't do this immediately...wait until swing finishes, above return endif else; message "You damaged the door." set lbBashMeOOO to 1 endif endif endifelse set curAngle to player.getAngle z if ( curAngle < 0 ) set curAngle to ( curAngle + 360 ) endif if ( curAngle > ( startAngle + 25 ) || curAngle < ( startAngle - 25 ) ) || combatcheck == 1 set cancelTarget to 1 ; player changed his facing, not looking at object anymore (probably, anyway...) endifendifend
else;Lap's Inclusion**********************************************************end set startDist to getDistance player set startAngle to ( player.getAngle z ) if ( startAngle < 0 ) set startAngle to ( startAngle + 360 ) endif set iAmTarget to 1 playmagicshadervisuals effectSoulTrap set lbBashMeOOO to 1 ; tells power attack voice to play on next swing if ( curHealth == 0 ) ; set up lock health based on lock level if ( getLockLevel <= 7 ) set curHealth to 120 + LapBashLockDifficulty elseif ( getLockLevel <= 20 ) set curHealth to 250 + LapBashLockDifficulty elseif ( getLockLevel <= 40 ) set curHealth to 370 + LapBashLockDifficulty elseif ( getLocklevel <= 80 ) set curHealth to 490 + LapBashLockDifficulty elseif ( getLockLevel <= 99 ) set curHealth to 610 + LapBashLockDifficulty elseif ( getLockLevel < 121 ) ; shouldn't be needed but justin case set cancelTarget to 1 return endif endif endifendif ;<--------This is the extra endif you should remove