https://gamefaqs.gamespot.com/boards/604445-torchlight-ii/78453551
Security:
If you use this script only for single player mode apparently there is no rule that prohibits its use.
I made an script for me to move the character and attack automatically:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent ; Keeps a script permanently running (that is, until the user closes it or ExitApp is encountered).
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
var_g = 0
SetTimer, Button_Pressed, 1
return
Button_Pressed:
GetKeyState, state, w
if state = D
{
var_g = 0
send {Lbutton up}
sleep, 50
return
}
else
{}
GetKeyState, state, e
if state = D
{
var_g = 1
sleep, 50
return
}
else
{
if (var_g = 1)
{
GetKeyState, state, Rbutton
if state = D
{
send {Lbutton up}
sleep, 75
}
else
{
send {Lbutton down}
sleep, 75
send {Lbutton up}
sleep, 75
}
}
else
{}
}
return
F9::
{
var_g = 0
send {Lbutton up}
ExitApp
}
Script instructions:
-When the script is working with you inside the game the system is activated with the "e" key and turned off with "w"
-The script works with the game function "Move/Attack" and "Cast Active Skill" selected with the left and right mouse buttons in the game
-The keys for turning the system on and off(and others) can be changed by editing the script with a text program such as the common "notepad"
(if you have trouble editing the script it might be better to learn a little about the "AutoHotKey" program in the help file)
-Just turn on the system with the chosen keys while in the game, if you turn on the system outside the game and have problems, turn off the script with the "F9" key
I made a version of the script that will only turn on the system while in the game:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent ; Keeps a script permanently running (that is, until the user closes it or ExitApp is encountered).
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
var_g = 0
SetTimer, Button_Pressed, 1
return
Button_Pressed:
if WinActive("Torchlight II")
{
GetKeyState, state, w
if state = D
{
var_g = 0
send {Lbutton up}
sleep, 50
return
}
else
{}
GetKeyState, state, e
if state = D
{
var_g = 1
sleep, 50
return
}
else
{
if (var_g = 1)
{
GetKeyState, state, Rbutton
if state = D
{
send {Lbutton up}
sleep, 75
}
else
{
send {Lbutton down}
sleep, 75
send {Lbutton up}
sleep, 75
}
}
else
{}
}
}
return
F9::
{
var_g = 0
send {Lbutton up}
ExitApp
}
Some in-game skills cannot normally be used with the game's "Move/Attack" function(left button by default), but someone has made a mod that makes this possible.
Mod link:
https://steamcommunity.com/sharedfiles/filedetails/?id=149464234
http://steamworkshop.download/download/view/149464234
But a few skills may not work properly in this role in this mod.