Need help with Slider

12/21/2013 00:16 mlukac89#16
No i dont want to make a bot, i want to make macro thats 2 diferent things. Bot is killing mobs, but macro is for pvp (player vs player) to cast all your skills faster as possible. Here is example

[Only registered and activated users can see links. Click Here To Register...]

So up is keys you want to spam, and in input fields are cast time for each skill.
And you controll speed of fire that skills with it.

I dont need to anyone make me anything just to explain me how things works, but only problem on this is bar 2 dont works and it doesn´t loop, when you press CRTL+x its fire skills from bar and stop so you must pressing CRTL+x all time.

But i want to make myself one that i can control speed of fire skills. I made mine to switch bars, now just im stuck with that stupid slider, or doesn´t to be a slider it can be input field with number like 99.
So how to calculate that ? :confused:
12/21/2013 01:34 KDeluxe#17
OK, that makes things a lot easier.
Code:
$castTime = GUICtrlRead($input)
$castTime = $castTime - ($castTime / 100 * GUICtrlRead($slider))
Well, I think it's still stupid. Why do you want to "spam" the keys? There's no reason for that. A bot is something that automates tasks. That's exactly your goal, so you want to create a bot. Killing mobs is not a requirement for a bot (bots are responsible for more than 60 % of all web traffic).
Back to your problem: Use lolkops script and add a hotkey. The called function needs to change the state of the $run variable.
12/21/2013 06:02 lolkop#18
Quote:
Originally Posted by mlukac89 View Post
Oh i see but i have problem with script you made i put out timer init and timer diff because its not work good i also tried like this, because in game on skill it say example 6 seconds but more cooldown you have like 80% then its cooldown like 1-2

And for cast time too on skill say 2,1 second and i put 2100 but its skip alot, it send keys like 100 ms and it depends of cast time you have 99%

So i need to control cast with slider cast time of skill 2,1 sec + slider = slider on max fire faster, slider on lower fire slower


Code:
If $run Then
		For $i=0 To 9
			If GUICtrlRead($macroArray[0][$i][1])=1 And GUICtrlRead($macroArray[0][$i][2]) Then
				MySend(GUICtrlRead($macroArray[0][$i][0]))
			EndIf
			If GUICtrlRead($macroArray[1][$i][1])=1 And GUICtrlRead($macroArray[1][$i][2]) Then
				MySend('+'&GUICtrlRead($macroArray[1][$i][0]))
			EndIf
		Next
	EndIf

And on the end it need to be something like this :

cast time on skill 2,1 second - + with slider
+ cooldown time from skill 6 sec - + my cooldown 1-80%

skill picture
[Only registered and activated users can see links. Click Here To Register...]

stats picture
[Only registered and activated users can see links. Click Here To Register...]

So fire if checked skill bar 1 = 3,4,5,6,7,8,9,0,ß,´´
Fire if checked skill bar 2 = 3,4,5,6,7,8,9,0,ß,´´

wait for cooldown of skill and fire again
you just f***ed up the script...
actually you're checking if the value in the time field is !=0 now? o0

sry but obviously i don't get, what you're tryin to do with the script...

i thought this should be a timed macro tool... but it looks like, you're just tryin to build a nonstop keyspamming tool. beside that, i still don't get, what the slider is used for...
12/22/2013 00:38 mlukac89#19
This isnt fcked up the script for sure because it works but still problem with you original script is that script send keys too fast and it fire like this 1, ctrl4, 6,ctrl7, 2 ......

But it need to fire 3,4,5,6,7,8,9,0,ß,´´ in that order and if checkbox checked in second skill bar then send ctrl3 .....

But you added a timer init and timer diff which calculate cooldown time but i didnt added it in gui, and problem with that is showed on picture 1 and 2 cooldown on skills isnt then same if you use lens+ they give 30% cooldown so skill have less cooldown, if use combi too 20% cooldown so even faster cooldown on skill but your script read original cooldown. But nevermind for that because you cant calculate that without reading memory i know that for sure.

And diference between Bot and Macro is that Bot you set up and he kill mobs, using buffs, movments, but macro is used for casting skills very fast and only skills, etc...

Lets say we made a classic spammer with "Input" that send keys we enter in, in any window Notepad for example, and in "input field for cast time" you enter 2300 (2,3 sec) thats the time for send key every 2,3 sec, but if you move slider higher it send it faster for example 1 second or less not anymore 2,3 sec.

[Only registered and activated users can see links. Click Here To Register...]

here is code
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Simple spammer", 442, 160, 210, 166)
$inputtext = GUICtrlCreateLabel("Input text to spam", 8, 8, 88, 17)
$textInput = GUICtrlCreateInput("", 8, 24, 425, 21)
$timetosendinseconds = GUICtrlCreateLabel("Time to send ( in seconds 1 sec = 1000 ms )", 8, 56, 212, 17)
$timeInput = GUICtrlCreateInput("2300", 224, 53, 33, 21)
$ctrl = GUICtrlCreateLabel("CTRL + x ( start / stop loop )", 8, 104, 138, 17)
$startBtn = GUICtrlCreateButton("Start", 8, 128, 75, 25)
GUICtrlSetFont(-1, 9, 800, 0, "Verdana")
$Slider1 = GUICtrlCreateSlider(8, 72, 422, 30)
GUISetState(@SW_SHOW)

HotKeySet("^x", "_spam")

Global $run
Global $handle

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

		Case $startBtn ; start button just give focut to window nothing else
			$handle = WinGetHandle("New Text Document (2) - Notepad")
			If WinExists($handle) Then WinActivate($handle)
			TrayTip("Spammer running", "Press CTRL + x to start spam", 10, 1)

	EndSwitch
WEnd

Func _spam()

	$run = Not $run
	While True
		If $run Then
			$text = GUICtrlRead($textInput)
			$time = GUICtrlRead($timeInput)
			$time = $time - ($time / 100 * GUICtrlRead($Slider1))
			ControlSend($handle, "", "", $text)
			Sleep($time)
		EndIf
	WEnd

EndFunc
Get it now ?

And thank you KDeluxe you solved my problem that i have in first place, but i dont know why i cant close script i run it, click stat it focuses on window, when i press ctrl+x he start to spam, when i increase slider it send faster ;), when i press ctrl+x again it stop spam, but i cant close Gui :confused: