Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 08:50

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Need help with Slider

Discussion on Need help with Slider within the AutoIt forum part of the Coders Den category.

Reply
 
Old 12/21/2013, 00:16   #16
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
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



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 ?
mlukac89 is offline  
Old 12/21/2013, 01:34   #17
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,147
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.
KDeluxe is offline  
Old 12/21/2013, 06:02   #18
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
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


stats picture


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...
lolkop is offline  
Old 12/22/2013, 00:38   #19
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
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.



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
mlukac89 is offline  
Reply


Similar Threads Similar Threads
Slider mit JavaScript bauen
06/16/2013 - Web Development - 2 Replies
Hallo zusammen, ich habe vor, meiner Games-Webseite einen komplett neuen Look zu verpassen. Dabei habe ich an eine etwas dynamischere Webseite gedacht. Ich arbeite momentan daran, einen Slider zu bauen. Im Internet habe ich schon einige Slider gefunden, wie zum Beispiel den hier: jQuery-Slider kostenlos downloaden | Webentwickler Blog Jedoch sind mir die alle zu einfach. :cool: Wie kann ich denn so etwas komplett selbst nachbauen und dann später noch erweitern?
Help with slider
10/08/2012 - AutoIt - 2 Replies
Ehy i need help to write a script with slider and if i move slider i write in memory the byte(read of slider) how i can? $PROCESS2 = _MEMORYOPEN(ProcessExists("process")) $Addres = 0x0000001 $read = GUICtrlRead($Slider1) _MemoryAsmWrite(Number($Addres), "BYTE" & $read,"DWORD",$PROCESS2 ) i trie to do a simple function but dont work...
problem mit slider
09/16/2012 - AutoIt - 1 Replies
versuche derzeit in einem kleinen musikplayer über einen slider zu bestimmten stellen im lied zu springen (geht ja mit soundseek in autoit) allerdings stehe ich vor folgendem problem: Local $hLenght = _SoundLength ($hFile, 2) Local $hPosition = _SoundPos ($hFile, 2) Local $hPosition2 = _SoundPos ($hFile, 1) $soundstate = _soundstatus($hfile) if not @error Then Local $SoundLenght = $hLenght / 1000 Local $SoundPosition = $hPosition / 1000
Per Slider Musikstelle ändern
11/22/2011 - AutoIt - 2 Replies
Hallo liebe Community, ich habe mal wieder ein Problem: Ich habe mir ein kleines GUI gebastelt mit dem ich .mp3 dateien abspielen kann. Nun habe ich einen Slider eingebaut um den aktuellen Soundstatus abzufragen. Nur weis ich jetzt nicht so genau wie ich per Slider zur gewünschten stelle im Song switchen kann. Hier sind ein paar Auszüge: Global $h_sound Global $max_sec $Slider2 = GUICtrlCreateSlider(0, 108, 300, 25) GUICtrlSetData($Slider2,0)
[Homepage] Images Slider
04/12/2011 - Flyff Private Server - 4 Replies
Willkommen auf meinem ersten richtigen Tut. Hier wird genau erklärt wie ihr einen "Slider" in eurer Homepage einbaut. Das ist eine Box wo Bidler gezeigt werden. (Je 10 Sekunden wechseln sie sich.) Das gibt es auch in der Elitepvpers Startseite. Viel spass! 1. Neue Javasript Datei namens "slider.js" erstellen 2. Js Datei öffnen und folgendes reinschreiben $(".image_reel").css({'width' : imageReelWidth});



All times are GMT +2. The time now is 08:50.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.