Hi i have problem with this script for buffing. I want it when i press F2 to fire buffs ( send keys ) and then put timers "on" for next buffing. So to do like this :
- run script
- script do nothing untill i press F2
- when i press F2 send keys ( cast time is Sleep() )
- put timers "on" and when buff cooldown time ends send only that key where timer is reached cooldown time and put timer "on" again
F2 pause/start script
EDIT :
i correct some of code and now it works, so when i press F2 it send keys but wont send again when cooldown time reach time given in array
Code:
Opt("SendKeyDelay", 5) ;5 milliseconds
HotKeySet("{F2}", "_Start")
Global $Run
Global $keys[7] = [3, 4, 5, 6, 7, 8, 9] ; keys
Global $cast[7] = [2000, 2000, 2000, 2000, 2000, 2000, 2000] ; cast
Global $cooldown[7] = [140000, 100000, 440000, 495000, 480000, 360000, 360000] ; cooldown
While 1
Sleep(100)
WEnd
Func _Start()
$Run = NOT $Run
While $Run
For $i=0 To UBound($keys)-1
If TimerDiff($cast[$i]) > $cooldown[$i] Then
Send($keys[$i])
$cooldown[$i]=TimerInit()
Sleep($cast[$i])
EndIf
Next
WEnd
EndFunc
HotKeySet("{F2}", "GO")
Dim $run, $action, $castTimer, $array[7][3] = [[3,140],[4,100],[5,440],[6,495],[7,480],[8,360],[9,360]] ; key, cd, cd-timer
While Sleep(1)
If $run And TimerDiff($castTimer)>=2000 And TimerDiff($array[$action][2])>=$array[$action][1]*1000 Then
ConsoleWrite("Send("&$array[$action][0]&")"&@CRLF)
$array[$action][2] = TimerInit()
$castTimer=TimerInit()
$action+=1
EndIf
If $action>=2UBound($array) Then $action=0
WEnd
Func GO()
$run = Not $run
EndFunc
HotKeySet("{F2}", "GO")
Dim $run, $action, $castTimer, $array[7][3] = [[3,140],[4,100],[5,440],[6,495],[7,480],[8,360],[9,360]] ; key, cd, cd-timer
While Sleep(1)
If $run And TimerDiff($castTimer)>=2000 And TimerDiff($array[$action][2])>=$array[$action][1]*1000 Then
ConsoleWrite("Send("&$array[$action][0]&")"&@CRLF)
$array[$action][2] = TimerInit()
$castTimer=TimerInit()
$action+=1
EndIf
If $action>=2UBound($array) Then $action=0
WEnd
Func GO()
$run = Not $run
EndFunc
This works fine but not good as it shoul be look on this pic
He cast 3456789 then when timer run out compare it it should cast then like 4389576 because of cooldown time.
And this is not all the same its just for test because i will make gui for it so it will read from it
Global $cast[7] = [2000, 2100, 1800, 2000, 2000, 2000, 2000]
This works fine but not good as it shoul be look on this pic
He cast 3456789 then when timer run out compare it it should cast then like 4389576 because of cooldown time.
And this is not all the same its just for test because i will make gui for it so it will read from it
Global $cast[7] = [2000, 2100, 1800, 2000, 2000, 2000, 2000]
look exaple how will it look like on pic
That's even more easy... I thought you wanted it to use the numbers in exactly the same order all the time...
Replacing the ordered actions by a simple for loop should do the trick =)
Code:
HotKeySet("{F2}", "GO")
Dim $run, $castTimer, $array[7][3] = [[3,140],[4,100],[5,440],[6,495],[7,480],[8,360],[9,360]] ; key, cd, cd-timer
While Sleep(1)
For $i=0 To UBound($array)-1
If $run And TimerDiff($castTimer)>=2000 And TimerDiff($array[$i][2])>=$array[$i][1]*1000 Then
ConsoleWrite("Send("&$array[$i][0]&")"&@CRLF)
$array[$i][2] = TimerInit()
$castTimer=TimerInit()
EndIf
Next
WEnd
Func GO()
$run = Not $run
EndFunc
Edit:
To add variable delays betweens each cast, you could simply add 2 more dimensions to the array :P (delay and timer)
Problem mit Array und for Schleife 11/25/2012 - C/C++ - 0 Replies Hallo, das folgende programm sollte eigentlich ein 11x11 feld aus zufälligen zahlen ausgeben, macht es allerdings nicht :confused:.
#include <iostream>
using namespace std;
int irand( int min, int max)
{
double r = max - min + 1;
return min + (int)(r * rand()/(RAND_MAX+1.0));
}
int main(){
[?]Array Problem (VB.NET 2012) 10/24/2012 - .NET Languages - 6 Replies Hallohallöchen,
Da ich gerade mega auf dem Schlauch stehe wollte ich mal fragen, ob mir einer von euch weiterhelfen kann.
Folgendes Problem:
Ich lese eine eine verschlüsselte .csv Datei ein, entschlüssel sie das folgender Syntax entsteht.
Array-Problem 05/13/2010 - AutoIt - 0 Replies Also ich habe die System-Zeit und das System-Datum in einen Array geladen:
#include <Date.au3>
Global $dat, $tim
$dat = _NowCalcDate()
If @error Then Return
$tim = _NowTime(5)
Skill Timers (Buff Period FAQ) 07/15/2009 - 12Sky2 - 7 Replies It helps you if you grinding arround and don't want to rebuff yourself with all your Skills (it is working on but i think it can be also done on Aeria)
You can use CE 5.5 (Cheat Engine)
1-After you logged on in the game you now go to CE by pressing Alt+Tab or Windows key
2-Select the Twelve Sky 2 process with CE
3-Now wirte for Value "0" Scan Type "Exact Value" and press "New Scan"