Skyrim Destruction Enhancer script that I made.

Post gaming related scripts
alclarkey
Posts: 5
Joined: 25 Apr 2019, 15:53

Skyrim Destruction Enhancer script that I made.

14 May 2019, 16:19

Scroll Lock must be on to access script's functions.

Pause/Break kills the entire script.

Push Numpad1 to enable Togglefire mode, where when you click the middle mouse button, your guy will repeatedly fire destruction blasts until you push middlemouse again to turn it off.

Push Numpad2 to enable Holdfire mode, where while you hold the middle mouse button your guy will repeatedly fire destruction blasts until you release it.

Push Numpad3 to enable Quefire mode, which will fire a blast for every click of the middle mouse, and allows you to "que" up blasts ahead of time, right clicking will empty the que and stop firing.

Push Numpad4 to enable Rapidfire mode, which will continuously fire staggered destruction blasts from both hands while holding down middlemouse.

Turn Numlock off, and push Numpadleft to select left hand mode (fires blasts with only left hand, or whatever you have assigned to left click). Numpadmiddle for doublecast mode. And Numpadright for right hand mode.

Code: Select all

#MenuMaskKey vkFF
#InstallKeybdHook
#InstallMouseHook
#UseHook
#MaxThreadsPerHotkey 4

scrolllockstate := 0
scrolllockstate := getkeystate("ScrollLock", "T")
if scrolllockstate = 1
	setscrolllockstate, off
suspend
lbuttondowntimer := 0
rbuttondowntimer := 0
lbuttonuptimer := 0
rbuttonuptimer := 0
lbuttonstate := 0
rbuttonstate := 0
firemode := 0
clickque := 0
quefirestart := 1
whichhand := 0
whichhanda := 5


togglefire:
Loop
	{
	 whichhand := whichhanda
	 if firemode = 0
		break
	 if (whichhand = 4) or (whichhand = 5)
		send, {lbutton down}
	 if (whichhand = 6) or (whichhand = 5)
		send, {rbutton down}
	 loop, 44 ; This line determines how long to hold the buttons down, increase this if it is not firing, try increasing it 2 iterations at a time.
			 {
			  if firemode = 0
				break
			  sleep, 10
			 }
	 if (whichhand = 4) or (whichhand = 5)
		send, {lbutton up}
	 if (whichhand = 6) or (whichhand = 5)
		send, {rbutton up}
	 sleep, 180 ; Skyrim seems to need this long to recover from firing a blast before starting the next one, increase this if you are having trouble.
	}
return

repeatedfire:
hotkey, mbutton, mbuttonrepeatedfire, off
Loop
	{
 	 whichhand := whichhanda
	 BlockInput, MouseMoveOff
	 if (whichhand = 4) or (whichhand = 5)
		send, {Lbutton down}
	 if (whichhand = 6) or (whichhand = 5)
		Send, {Rbutton down}
	 loop, 44 ; This line determines how long to hold the buttons down, increase this if it is not firing, try increasing it 2 iterations at a time.
		{
		 sleep, 10
		 mbuttondown := getkeystate("mbutton", "P")
		 if mbuttondown = 0
			break
		}
	 if (whichhand = 4) or (whichhand = 5)
		send, {LButton up}
	 if (whichhand = 6) or (whichhand = 5)
		send, {RButton up}
	 sleep, 180 ; Skyrim seems to need this long to recover from firing a blast before starting the next one, increase this if you are having trouble.
	 mbuttondown := getkeystate("mbutton", "P")
	 if mbuttondown = 0
		break
	}
hotkey, mbutton, mbuttonrepeatedfire, On
return

quefire:
quefirestart := 0
hotkey, rbutton, rbuttonquefire, on
loop
	{
	 whichhand := whichhanda
	 Blockinput, mousemoveoff
	 scrolllockstate := getkeystate("ScrollLock", "T")
	 if scrolllockstate = 0
		break
	 if clickque < 1 
		break
	 if (whichhand = 4) or (whichhand = 5)
		send, {Lbutton down}
	 if (whichhand = 6) or (whichhand = 5)
	 send, {Rbutton down}
	 loop, 44 ; This line determines how long to hold the buttons down, increase this if it is not firing, try increasing it 2 iterations at a time.
			 {
			  scrolllockstate := getkeystate("ScrollLock", "T")
			  if scrolllockstate = 0
			  Break
			  if clickque < 1
			  break
			  sleep, 10
			 }
	 if (whichhand = 4) or (whichhand = 5)
		Send, {Lbutton up}
	 if (whichhand = 6) or (whichhand = 5)
		Send, {Rbutton up}
	 sleep, 180 ; Skyrim seems to need this long to recover from firing a blast before starting the next one, increase this if you are having trouble.
	 clickque := (clickque - 1)
	}
quefirestart := 1
if (whichhand = 4) or (whichhand = 5)
		Send, {Lbutton up}
	 if (whichhand = 6) or (whichhand = 5)
		Send, {Rbutton up}
sleep, 180
hotkey, rbutton, rbuttonquefire, off
return

rapidfire:
Loop
	{
	 mbuttondown := getkeystate("mbutton", "P")
	 if mbuttondown = 0
		break
	 scrolllockstate := getkeystate("ScrollLock", "T")
	 if scrolllockstate = 0
		break
	 if lbuttonuptimer = 0
		{
		 send, {lbutton down}
		 lbuttonuptimer := 16 ; Skyrim seems to need this long to recover from firing a blast before starting the next one, increase this if you are having trouble.
		 lbuttonstate := 1
		}
	 if lbuttondowntimer = 0
		{
		 send, {lbutton up}
		 lbuttondowntimer := 38 ; This line determines how long to hold the buttons down, increase this if it is not firing, try increasing it 2 iterations at a time.
		 lbuttonstate := 0
		}
	 if rbuttonuptimer = 0
		{
		 send, {rbutton down}
		 rbuttonuptimer := 16 ; Skyrim seems to need this long to recover from firing a blast before starting the next one, increase this if you are having trouble.
		 rbuttonstate := 1
		}
	 if rbuttondowntimer = 0
		{
		 send, {rbutton up}
		 rbuttondowntimer := 38 ; This line determines how long to hold the buttons down, increase this if it is not firing, try increasing it 2 iterations at a time.
		 rbuttonstate := 0
		}
	sleep, 10
	if lbuttonstate = 1
		lbuttondowntimer := (lbuttondowntimer - 1)
	if lbuttonstate = 0
		lbuttonuptimer := (lbuttonuptimer - 1)
	if rbuttonstate = 1
		rbuttondowntimer := (rbuttondowntimer - 1)
	if rbuttonstate = 0
		rbuttonuptimer := (rbuttonuptimer - 1)
	}
send {lbutton up}
send {rbutton up}
sleep, 250
return

mbuttontogglefire:		
if firemode = 0
	{
	 firemode := 1
	 gosub, togglefire
	}
firemode := 0
return

mbuttonrapidfire:
lbuttondowntimer := 38
rbuttondowntimer := 38
lbuttonuptimer := 16
rbuttonuptimer := 44
lbuttonstate := 0
rbuttonstate := 0
gosub, rapidfire
return

mbuttonrepeatedfire:
gosub, repeatedfire
return

mbuttonquefire:
clickque := (clickque + 1)
if quefirestart = 1
	gosub, quefire
return

rbuttonquefire:
clickque := 0
return

numpad1::
clickque := 0
hotkey, mbutton, mbuttonrepeatedfire, off
hotkey, mbutton, mbuttonquefire, off
hotkey, rbutton, rbuttonquefire, off
hotkey, mbutton, mbuttonrapidfire, off
hotkey, mbutton, mbuttontogglefire, on
return

numpad2::
clickque := 0
firemode := 0
hotkey, mbutton, mbuttontogglefire, off
hotkey, mbutton, mbuttonquefire, off
hotkey, rbutton, rbuttonquefire, off
hotkey, mbutton, mbuttonrapidfire, off
hotkey, mbutton, mbuttonrepeatedfire, on
return

numpad3::
firemode := 0
hotkey, mbutton, mbuttontogglefire, off
hotkey, mbutton, mbuttonrepeatedfire, off
hotkey, mbutton, mbuttonrapidfire, off
hotkey, mbutton, mbuttonquefire, on
return

numpad4::
clickque := 0
firemode := 0
hotkey, mbutton, mbuttontogglefire, off
hotkey, mbutton, mbuttonrepeatedfire, off
hotkey, mbutton, mbuttonquefire, off
hotkey, rbutton, rbuttonquefire, off
hotkey, mbutton, mbuttonrapidfire, on
return

NumpadLeft::
whichhanda := 4
return

NumpadClear::
whichhanda := 5
return

NumpadRight::
whichhanda := 6
return

scrolllock::
suspend
scrolllockstate := getkeystate("ScrollLock", "T")
if scrolllockstate = 0
	{
	 setscrolllockstate, on
	}
if scrolllockstate = 1
	{
	 setscrolllockstate, off
	 blockinput, off
	}
return

pause::
Suspend
ExitApp
return

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 8 guests