QuestionSolvedQuick function question.

Posts 12 of 2 · Page 1 of 1
Quick function question.
Okay, so, I've got a bot script for Irukul that I'm trying to modify to work on another BQ. (script from here: Old way to bot Irukul)
My problem is I need to make the character walk forward for like, four seconds. How do I go about doing this?

Here's the code so far:
Code:
Opt("WinWaitDelay",100)
	Opt("WinDetectHiddenText",1)
	Opt("MouseCoordMode",0)


	Global $boatbot

	HotKeySet("{HOME}", "start")
	HotKeySet("{END}", "stop")

	While 1
		sleep ( 1 )
	WEnd

; -------- Functions -------------------

	Func start()
		$boatbot = Not $boatbot
		While $boatbot
			_WinWaitActivate("Vindictus","")
		Send("{NUMPADSUB}") ; ohk
		Sleep(100)
		Send("{NUMPAD0}") ; god
		Sleep(100)
		Send("{NUMPAD7}") ; spear
		Sleep(100)
		Send("{NUMPAD4}") ; mini-size
		Sleep (100)
		Send("w") ; Here's where I need it to move forward.
		Sleep (100)
		For $SPEARS = 1 To 20
		   Send("f") ; throw spear
		   Sleep(250)
		 Next
		Send("{NUMPAD3}") ; reload
		Sleep (6000)
		
	WEnd
EndFunc

Func _WinWaitActivate($title,$text,$timeout=0)
		WinWait($title,$text,$timeout)
		If Not WinActive($title,$text) Then WinActivate($title,$text)
		WinWaitActive($title,$text,$timeout)
	EndFunc


	Func stop()
		Exit
	EndFunc   ;==>stop
Nevermind, solved it.
This is what I'm using now:
Code:
Send("{W DOWN}") ; start pressing W
Sleep (5000)
Send("{W UP}") ; stop pressing W
(I'm pretty new to this, so it confused me for a while)
Posts 12 of 2 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?