enderalse/source/scripts/playertransformstorage.psc

137 lines
3.5 KiB
Plaintext
Raw Normal View History

2024-01-16 01:56:39 +00:00
ScriptName playerTransformStorage Extends Quest
;-- Variables ---------------------------------------
Armor armor1
Armor armor10
Armor armor11
Armor armor12
Armor armor13
Armor armor14
Armor armor2
Armor armor3
Armor armor4
Armor armor5
Armor armor6
Armor armor7
Armor armor8
Armor armor9
;-- Properties --------------------------------------
Form Property EquippedItemLeft Auto
Form Property EquippedItemRight Auto
Race Property originalRace Auto
Int Property whatKindLeft Auto
Int Property whatKindRight Auto
;-- Functions ---------------------------------------
; Skipped compiler generated GetState
; Skipped compiler generated GotoState
Event OnInit()
2024-02-13 10:59:56 +00:00
originalRace =(Game.GetForm(0x14) as Actor).GetRace()
2024-01-16 01:56:39 +00:00
EndEvent
Function checkForEquipedItems()
2024-02-13 10:59:56 +00:00
Actor PlayerRef = Game.GetForm(0x14) as Actor
2024-01-16 01:56:39 +00:00
EquippedItemLeft = PlayerRef.GetEquippedObject(0)
EquippedItemRight = PlayerRef.GetEquippedObject(1)
If !EquippedItemLeft
whatKindLeft = 0
ElseIf EquippedItemLeft as Weapon
whatKindLeft = 1
ElseIf EquippedItemLeft as Spell
whatKindLeft = 2
Else
whatKindLeft = 1
EndIf
If !EquippedItemRight
whatKindRight = 0
ElseIf EquippedItemRight as Weapon
whatKindRight = 1
ElseIf EquippedItemRight as Spell
whatKindRight = 2
Else
whatKindLeft = 1
EndIf
2024-02-13 10:59:56 +00:00
armor1 = PlayerRef.GetWornForm(1) as Armor
armor2 = PlayerRef.GetWornForm(2) as Armor
armor3 = PlayerRef.GetWornForm(4) as Armor
armor4 = PlayerRef.GetWornForm(8) as Armor
armor5 = PlayerRef.GetWornForm(16) as Armor
armor6 = PlayerRef.GetWornForm(32) as Armor
armor7 = PlayerRef.GetWornForm(64) as Armor
armor8 = PlayerRef.GetWornForm(128) as Armor
armor9 = PlayerRef.GetWornForm(256) as Armor
armor10 = PlayerRef.GetWornForm(512) as Armor
armor11 = PlayerRef.GetWornForm(1024) as Armor
armor12 = PlayerRef.GetWornForm(2048) as Armor
armor13 = PlayerRef.GetWornForm(4096) as Armor
armor14 = PlayerRef.GetWornForm(8192) as Armor
2024-01-16 01:56:39 +00:00
EndFunction
Function equipeItems()
2024-02-13 10:59:56 +00:00
Actor PlayerRef = Game.GetForm(0x14) as Actor
2024-01-16 01:56:39 +00:00
If whatKindRight == 2
PlayerRef.EquipSpell(EquippedItemRight as Spell, 1)
Else
if SKSE.GetVersion()
PlayerRef.EquipItemEx(EquippedItemRight, 1, False, True)
else
PlayerRef.EquipItem(EquippedItemRight, False, True)
endif
2024-01-16 01:56:39 +00:00
EndIf
If whatKindLeft == 2
PlayerRef.EquipSpell(EquippedItemLeft as Spell, 0)
Else
if SKSE.GetVersion()
PlayerRef.EquipItemEx(EquippedItemLeft, 2, False, True)
else
PlayerRef.EquipItem(EquippedItemLeft, False, True)
endif
2024-01-16 01:56:39 +00:00
EndIf
If armor1
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor1 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor2
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor2 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor3
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor3 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor4
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor4 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor5
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor5 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor6
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor6 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor7
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor7 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor8
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor8 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor9
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor9 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor10
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor10 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor11
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor11 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor12
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor12 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor13
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor13 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
If armor14
2024-02-13 10:59:56 +00:00
PlayerRef.EquipItem(armor14 as Form, False, True)
2024-01-16 01:56:39 +00:00
EndIf
EndFunction