Re: Keys for attack, char. swapping (autohotkey script, v 0.
Posted: Fri Apr 13, 2012 2:42 pm
Nice work d32!
I'm going to play around with character spell casting this afternoon/weekend.
Something like this might work for customized casting (user records/inputs the spell for each hotkey, f1,f2,f3,f4 and the spell plays it back)
An array/ini file like this
--Another way to do this might be to find the relative position of each of the 9 elements based on where the left hand is for any given character.
There shouldn't be much variance.
--If we know the left hand for character 1 is at X,Y. We then can work out that the elements are within Px and Py pixels in any given direction.
Edit: What we'd need is , using X,Y of the center of a character's left hand slot, find the variable (% of the screen --- the number you multiply by the resolution to get a given location) for the first, second, and third columns, and the first second and third rows, in relation to the center of the hand.
like, if the click to open the spells starts at 2,2 when clicking to open the cast menu, then we need to figure out RES_X * WHAT, RES_Y * WHAT gives you 2,1, 1,2, 1,3, 3,3 etc.
im guessing it's something like -0.03 * RESX to move left one, +0.03 * RESX to move right one, but these numbers are guesses based off the 0.2 script.
I'm going to play around with character spell casting this afternoon/weekend.
Something like this might work for customized casting (user records/inputs the spell for each hotkey, f1,f2,f3,f4 and the spell plays it back)
Code: Select all
control+f1::
start loop while key x is not pressed
user clicks to open casting screen
user inputs spell pattern
user clicks cast
user presses X
locations are stored either in an ini file , or in an array.
return
then when the user pressed
f1::
read mouse location
store mouse location
read ini
find the key name ;f1
read the number of locations recorded and saved to f1
replay the locations with 10-30 ms pauses between clicks
return mouse position to original location
An array/ini file like this
Code: Select all
[f1]
number_of_clicks=4
1=980,765 ;open spell combo
2=373,241 ;spell component 1
3=345,423 ;spell component 2
4=1000,321 ;cast
--Another way to do this might be to find the relative position of each of the 9 elements based on where the left hand is for any given character.
There shouldn't be much variance.
--If we know the left hand for character 1 is at X,Y. We then can work out that the elements are within Px and Py pixels in any given direction.
Edit: What we'd need is , using X,Y of the center of a character's left hand slot, find the variable (% of the screen --- the number you multiply by the resolution to get a given location) for the first, second, and third columns, and the first second and third rows, in relation to the center of the hand.
Code: Select all
1,1 1,2 1,3
2,1 2,2 2,3
3,1 3,2 3,3
im guessing it's something like -0.03 * RESX to move left one, +0.03 * RESX to move right one, but these numbers are guesses based off the 0.2 script.