Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname SwapHand extends Quest
- Actor Property PlayerRef Auto
- EquipSlot Property OneH Auto
- EquipSlot Property TwoH Auto
- Event OnInit()
- Utility.Wait(3)
- RegisterForKey(45)
- TwoH = Game.GetForm(0x00013F45) As EquipSlot
- OneH = Game.GetForm(0x00013F44) as EquipSlot
- EndEvent
- Event OnKeyDown(int KeyCode)
- if KeyCode == 45
- ; 0 = left
- ; 1 = right
- ; ablefthand = false is right hand
- ; ablefthand = true is left hand
- if PlayerRef.GetEquippedItemType(0) == 1 || PlayerRef.GetEquippedItemType(0) == 2 || PlayerRef.GetEquippedItemType(0) == 3 || PlayerRef.GetEquippedItemType(0) == 4
- Weapon OneHander =PlayerRef.GetEquippedWeapon(abLeftHand = true)
- PlayerRef.UnEquipItem(OneHander)
- OneHander.SetWeaponType(5) ; sets weapon type to GS
- OneHander.SetEquipType(TwoH) ; sets equip type to GS
- Utility.Wait(1)
- PlayerRef.EquipItem(OneHander)
- endif
- if PlayerRef.GetEquippedItemType(1) == 5 || PlayerRef.GetEquippedItemType(1) == 6
- Weapon TwoHander = PlayerRef.GetEquippedWeapon(abLeftHand = false)
- PlayerRef.UnEquipItem(TwoHander)
- TwoHander.SetWeaponType(1) ; sets weapon type to sword
- TwoHander.SetEquipType(OneH) ; sets equip type to sword
- Utility.Wait(1)
- PlayerRef.EquipItem(TwoHander)
- endif
- endif
- EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement