[REL] Morrowind Lockpicking

Post » Mon May 16, 2011 3:40 pm

For the thieves guild quest where Amusei steals someones heirloom or whatever I told him i'd give him a lockpick but I can't give him a MW Style Lockpick.
User avatar
Nikki Hype
 
Posts: 3429
Joined: Mon Jan 01, 2007 12:38 pm

Post » Mon May 16, 2011 4:50 am

For the thieves guild quest where Amusei steals someones heirloom or whatever I told him i'd give him a lockpick but I can't give him a MW Style Lockpick.

I know, I http://www.gamesas.com/index.php?/topic/1126244-morrowind-style-lockpicking/page__p__16552267__fromsearch__1&#entry16552267.

But I suppose it's a good idea to mention this here as well, so thanks for reminding me.

Like I said, my computer is broken and I can't currently work on anything, but I'll try to fix this as soon as I can. For the moment, please just try the workaround I posted.
Basically, the problem is the same as the one where you aren't able to hide a lockpick anymore when going to jail, since my lockpicks don't count as such. It is a dialogue check, so the best solution might be a small code that automatically converts one of my lockpicks into a vanilla lockpick when the player is in dialogue mode. Should be fairly easy to do (I already have two such codes for different purposes in the mod anyway).

Edit: I just looked at the script, and I think this would be the way to do it:

In my main script at the very end, there's this code:
begin MenuModeIf ( AttackDisabled == 1 )	EnableControl 4	set AttackDisabled to 0EndIfIf ( Player.GetItemCount Lockpick > 0 )	Set NumberLockpicks to Player.GetItemCount Lockpick	Player.RemoveItemNS Lockpick NumberLockpicks	Player.AddItemNS FrbitLockpickApprentice NumberLockpicksEndIfend


That last if condition needs to be replaced with the following if condition:

If ( MenuMode == 1009 )	If ( Player.GetItemCount Lockpick < 1 ) && ( Player.GetItemCount FrbitLockpickApprentice > 0 )  Player.RemoveItemNS FrbitLockpickApprentice		Player.AddItemNS Lockpick 1	EndIfElse	If ( Player.GetItemCount Lockpick > 0 )		Set NumberLockpicks to Player.GetItemCount Lockpick		Player.RemoveItemNS Lockpick NumberLockpicks		Player.AddItemNS FrbitLockpickApprentice NumberLockpicks	EndIfEndIf


That should (I think) give the player an Apprentice's lockpick every time he's in dialogue mode, if he has one. The result is that when arrested, you'll be able to hide that one lockpick, and when Amusei wants a lockpick, you'll have one you can give him.
In order to keep the code short, I decided not to include similar options for the other lockpick types introduced by my mod; it seems also better from a gameplay perspective, as you wouldn't want to give Amusei one of the higher quality lockpicks, and giving you only a low quality lockpick for jail seems more balanced (and interesting).

So... anyone willing to edit the mod like this? :>
Well, I suppose not. But it would be highly appreciated, since I won't be able to do these changes in the near future myself.
User avatar
Davorah Katz
 
Posts: 3468
Joined: Fri Dec 22, 2006 12:57 pm

Post » Mon May 16, 2011 6:48 pm

I completely forgot that I made that thread, and I don't think i've played oblivion since then. I'll go download the CS and make that change quick.
User avatar
Melanie
 
Posts: 3448
Joined: Tue Dec 26, 2006 4:54 pm

Post » Mon May 16, 2011 10:28 am

You put this in the readme under installation:
- Do NOT use Zumbs Lockpicking Mod together with this one! You'll have to make a decision which one you want to use. (Psymon I'm looking at you)


What? I know I use a lot of mods, but c'mon.

I have this mod installed in two games and am thankful for the update.

I only use Zumbs with Nehrim because it has no lists.
User avatar
noa zarfati
 
Posts: 3410
Joined: Sun Apr 15, 2007 5:54 am

Post » Mon May 16, 2011 2:55 pm

I have found a bug of the last version 3.0 and OOO traps; it's summarized in this video:

http://www.youtube.com/watch?v=2vcOsf96FPI

Look at the final sequence ("This is not Good").

- If you press SPACE BAR when facing a OOO trapped chest, the mod is working 100% OK
- If you use use a lockpick as weapon when facing a OOO trapped chest, you still get a chance to open it if you answer NO to the question.

(My character 75 Security, 90 Agility, Entrance Fort Urasek).
User avatar
Stryke Force
 
Posts: 3393
Joined: Fri Oct 05, 2007 6:20 am

Post » Mon May 16, 2011 1:06 pm

Hmm, interesting. The only time you make a mouse click is inside the message, yes?
Would be great if someone could show me the corresponding script in OOO, so that I can figure out what the problem is. Maybe I'm misunderstanding my own code, but technically it shouldn't make a lockpicking attempt there, because you didn't click while in GameMode.
I'll look into it as soon as I can. Darn, there's always something with OOO.

Psymon - Sorry about that, I think that's still from version 2.0 or something. Around the time you said something about using both of them at the same time, and I explained why you shouldn't do that, and the result was that little joke. I completely forgot that's still in there.
So that's three reasons already to upload a new version as soon as I get my computer back.
User avatar
Sanctum
 
Posts: 3524
Joined: Sun Aug 20, 2006 8:29 am

Post » Mon May 16, 2011 9:11 am

Hmm, interesting. The only time you make a mouse click is inside the message, yes?

When you press SPACE BAR or Mouse Click/using lockpick as weapon you get a chance to:
- Instantly trapped (injured or even killed) by the chest poison spell.
- Instantly Dodge the poison chest (depending on your agility and luck)
- Get the window message: "Should I open this trapped chest?" yes or not?

the three cases and poison chest randomly happen everytime you load the game
(I mean If you save just before opening the chest, every time you load this savegame you get a different situation of how react the chest when activated by SPACE BAR or mouse click)

Here is a Refscope screenshot of this chest:
http://img44.imageshack.us/img44/1007/ooochestrefscopelog.jpg

Using TES4Edit, the script 05003D67 (05 is because OOO esm hold the 5th position in my Wrye Bash list) is corresponding to:
13ContTrapCrimeNoHiFi01NR
Spoiler
scriptName 13ContTrapCrimeNoHiFi01NR

; 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
; lbspell2OOOO 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 variables
Ref Looter
Short ZapLooterChance
Short Zapsvcka
Short UnlockLooterChance
Short LooterLockPicks
Short SoundClosed
Short SoundOpen

; Lb's short and float list
short iAmTarget
short cancelTarget
short curHealth
float startDist
float startAngle
float curAngle
; End Lb's short and float list

; Lap's short and ref list
short trapped
short detected
short button
short whoops
short lockedonce
short magic
short random
ref los
short spellcounter
short combatcheck
short message
; End Lap's short and ref list

; OOO's short list
short H2HBashing
short TwoHBladeBashing
short TwoHBluntBashing
short OneHBluntBashing
short OneHBladeBashing
short DaleDuro
; End OOO's short list

short sOpen
short sPlayerOwned

;************************************************* Lap's Begin OnLoad Inclusion

begin OnLoad

If OOOHC == 1
If sOpen == 4
PlayGroup Forward 1
EndIf
Endif

if GetLocked == 1 && GetLockLevel != 100
set trapped to 1
else
return
endif

end


Begin OnReset

; Enable
If OOOHC == 1
If sOpen != 4
Set sOpen to 0
Reset3DState
EndIf
Endif

End

begin 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
EndIf

If 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
EndIf
Endif


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
endif
endif
;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**********************************************************end

end


Begin MenuMode 1014

If OOOHC == 1
If sOpen == 1
Set sOpen to 2
EndIf
Endif

End

Begin MenuMode 1008

If OOOHC == 1
If sOpen == 1
Unlock
PlayGroup Forward 0
Set sOpen to 4
EndIf
Endif
If OOOHC != 1
If SoundOpen == 1
PlaySound DRSChestOpen
Set SoundOpen to 0
Set SoundClosed to 1
Endif
Endif

End


begin GameMode ;**********************************************GAME MODE ON*************************************

If OOOHC != 1 && MenuMode != 1
If SoundClosed == 1
PlaySound3D DRSChestClose
Set SoundClosed to 0
Endif
Endif

If GetDistance Player >= 256 && LapDetectTrapsSpell != 1
Return
Endif

;************************************************* Lap's Trap Section of GameMode

if 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
endif
endif

;if DaleDuro == 1
if message == 0
set button to -1
endif

if message == 1
set button to GetButtonPressed
endif

if button == 0 || button == 1
set whoops to 0
set message to 0
endif

; set los to GetSelf

if trapped == 1 && LapDetectTrapsSpell == 1 && spellcounter == 0
set los to GetSelf
if player.GetLOS los == 1
set detected to 1
endif
PlayMagicShaderVisuals effectEnchantDestruction
set spellcounter to 2
endif

if trapped != 1 || LapDetectTrapsSpell == 0
StopMagicShaderVisuals effectEnchantDestruction
endif

if LapDetectTrapsSpell == 0
set spellcounter to 0
endif

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
endif
endif

if whoops == 1 && message == 0
set 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 2
endif

If 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
EndIf
Endif
;***************************************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
endif
elseif ( 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
return
elseif ( iAmTarget == 0 )
return ; skip everything below if not currently targeted
endif

if ( getDistance player > ( startDist + 50 ) ) ; cancel target when player moves too far away
set cancelTarget to 1
return
elseif ( 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.
;return
elseif ( 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
endif



else
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...)
endif
endif

end

User avatar
Claire Jackson
 
Posts: 3422
Joined: Thu Jul 20, 2006 11:38 pm

Previous

Return to IV - Oblivion