Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. Scriptname SwapHand extends Quest
  2.  
  3. Actor Property PlayerRef Auto
  4. EquipSlot Property OneH Auto
  5. EquipSlot Property TwoH Auto
  6.  
  7. Event OnInit()
  8. Utility.Wait(3)
  9. RegisterForKey(45)
  10.  
  11. TwoH = Game.GetForm(0x00013F45) As EquipSlot
  12. OneH = Game.GetForm(0x00013F44) as EquipSlot
  13.  
  14. EndEvent
  15.  
  16. Event OnKeyDown(int KeyCode)
  17.  
  18. if KeyCode == 45
  19. ; 0 = left
  20. ; 1 = right
  21. ; ablefthand = false is right hand
  22. ; ablefthand = true is left hand
  23.  
  24. if PlayerRef.GetEquippedItemType(0) == 1 || PlayerRef.GetEquippedItemType(0) == 2 || PlayerRef.GetEquippedItemType(0) == 3 || PlayerRef.GetEquippedItemType(0) == 4
  25. Weapon OneHander =PlayerRef.GetEquippedWeapon(abLeftHand = true)
  26. PlayerRef.UnEquipItem(OneHander)
  27. OneHander.SetWeaponType(5) ; sets weapon type to GS
  28. OneHander.SetEquipType(TwoH) ; sets equip type to GS
  29. Utility.Wait(1)
  30. PlayerRef.EquipItem(OneHander)
  31. endif
  32.  
  33. if PlayerRef.GetEquippedItemType(1) == 5 || PlayerRef.GetEquippedItemType(1) == 6
  34. Weapon TwoHander = PlayerRef.GetEquippedWeapon(abLeftHand = false)
  35. PlayerRef.UnEquipItem(TwoHander)
  36. TwoHander.SetWeaponType(1) ; sets weapon type to sword
  37. TwoHander.SetEquipType(OneH) ; sets equip type to sword
  38. Utility.Wait(1)
  39. PlayerRef.EquipItem(TwoHander)
  40. endif
  41.  
  42.  
  43. endif
  44.  
  45. EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement