[SWSRO][ZSZC]Loader/Bot/Autopot/Silkmod

08/14/2009 00:34 sin2022#241
guys F7 push Start/Stop
is working :)



Code:
Global $Paused
HotKeySet("{F7}", "Pause")
Func Pause()

$Paused = NOT $Paused

While $Paused

Sleep (400)

WEnd

EndFunc ; => Pause()


NEW BOT


Code:
#Include <GuiListView.au3>
Dim $listview[3] = ['Belt','Slot','Delay'], $child_buf_ok = -1, $child_atk_ok = -1, $CharnameOffset = 0xA9CBB8, $run = False
GUICreate('Swsro Bot', 341, 370, @DesktopWidth/2-400/2, @DesktopHeight/2-341/2, 0x100A0000)
GUICtrlCreateGroup("Character", 5, 5, 325, 45)
$char = GUICtrlCreateCombo("", 10, 20, 230, -1, 3)
GUICtrlSetFont(-1, 10)
$refresh = GUICtrlCreateButton("Refresh", 250, 19, 70, 26)

Global $Paused
HotKeySet("{F7}", "Pause")

GUICtrlCreateGroup("Buffs", 5, 50, 160, 250)
$buf = GUICtrlCreateListView("Belt|Slot|Delay", 10, 65, 150, 200)
_GUICtrlListView_SetColumnWidth($buf, 2, -2)
For $i=0 To 2
	_GUICtrlListView_SetColumn($buf, $i, $listview[$i], -1, 2)
Next
$buf_add = GUICtrlCreateButton("Add", 10, 270, 70)
$buf_del = GUICtrlCreateButton("Delete", 90, 270, 70)
GUICtrlCreateGroup("Attack Skills", 170, 50, 160, 250)
$atk = GUICtrlCreateListView("Belt|Slot", 175, 65, 150, 200)
For $i=0 To 1
	_GUICtrlListView_SetColumnWidth($atk, $i, 73)
	_GUICtrlListView_SetColumn($atk, $i, $listview[$i], -1, 2)
Next
$atk_add = GUICtrlCreateButton("Add", 175, 270, 70)
$atk_del = GUICtrlCreateButton("Delete", 255, 270, 70)

$start = GUICtrlCreateButton("Start Bot", 10, 305, 150)
$stop = GUICtrlCreateButton("Stop Bot", 175, 305, 150)

CharList()
ini()

While 1
	Switch GUIGetMsg()
		Case -3
			Exit
		Case $buf_add
			$child = GUICreate("Add Buff", 100, 150, -1, -1, 0x10000000, 0x88)
			GUICtrlCreateLabel("Belt:", 5, 13)
			$child_belt = GUICtrlCreateCombo("", 45, 10, 40, -1, 3)
			GUICtrlSetData(-1, "F1|F2|F3|F4", "F1")
			GUICtrlCreateLabel("Slot:", 5, 43)
			$child_slot = GUICtrlCreateCombo("", 45, 40, 40, -1, 3)
			GUICtrlSetData(-1, "0|1|2|3|4|5|6|7|8|9", 1)
			GUICtrlCreateLabel("Delay:", 5, 73)
			$child_delay = GUICtrlCreateInput(100, 45, 70, 40)
			$child_buf_ok = GUICtrlCreateButton("OK", 5, 100, 85, 20, 1)
		Case $child_buf_ok
			GUICtrlCreateListViewItem(GUICtrlRead($child_belt)&"|"&GUICtrlRead($child_slot)&"|"&GUICtrlRead($child_delay), $buf)
			GUIDelete($child)
		Case $buf_del
			_GUICtrlListView_DeleteItemsSelected($buf)
		Case $atk_add
			$child = GUICreate("Add Attack Skill", 100, 120, -1, -1, 0x10000000, 0x88)
			GUICtrlCreateLabel("Belt:", 5, 13)
			$child_belt = GUICtrlCreateCombo("", 45, 10, 40, -1, 3)
			GUICtrlSetData(-1, "F1|F2|F3|F4", "F1")
			GUICtrlCreateLabel("Slot:", 5, 43)
			$child_slot = GUICtrlCreateCombo("", 45, 40, 40, -1, 3)
			GUICtrlSetData(-1, "0|1|2|3|4|5|6|7|8|9", 1)
			$child_atk_ok = GUICtrlCreateButton("OK", 5, 70, 85, 20, 1)
		Case $child_atk_ok
			GUICtrlCreateListViewItem(GUICtrlRead($child_belt)&"|"&GUICtrlRead($child_slot), $atk)
			GUIDelete($child)
		Case $atk_del
			_GUICtrlListView_DeleteItemsSelected($atk)
		Case $refresh
			CharList()
			ini()
		Case $start
			FileDelete(GUICtrlRead($char)&".ini")
			For $i=0 To _GUICtrlListView_GetItemCount($atk)-1
				IniWrite(GUICtrlRead($char)&".ini", "atk_skill", $i+1, _GUICtrlListView_GetItemTextString($atk, $i))
			Next
			For $i=0 To _GUICtrlListView_GetItemCount($buf)-1
				IniWrite(GUICtrlRead($char)&".ini", "buf_skill", $i+1, _GUICtrlListView_GetItemTextString($buf, $i))
			Next
			$run = True
		Case $stop
			$run = False
		Case $char
			ini()
		Case Else
			If $run Then bot(GUICtrlRead($char))
	EndSwitch
WEnd

Func bot($charname)
	$buff_skill = IniReadSection($charname&".ini", "buf_skill")
	If IsArray($buff_skill) And $buff_skill[0][0]<>0 Then
		For $i=1 To $buff_skill[0][0]
			$string = StringSplit($buff_skill[$i][1], "|")
			Buff($charname, $string[1], $string[2], $string[3])
		Next
	EndIf
	$attack_skill = IniReadSection($charname&".ini", "atk_skill")
	If IsArray($attack_skill) And $attack_skill[0][0]<>0 Then
		For $i=1 To $attack_skill[0][0]
			$string = StringSplit($attack_skill[$i][1], "|")
			Skill($charname, $string[1], $string[2])
		Next
	EndIf
EndFunc

Func Skill($charname, $bar, $slot, $delay = 0.5)
	If Not IsDeclared($charname&"skill" & $slot) Then
		SendSro(GetHandle($charname), $bar)
		SendSro(GetHandle($charname), $slot)
		Assign($charname&"skill" & $slot, TimerInit(), 2)
	ElseIf TimerDiff(Eval($charname&"skill" & $slot)) > $delay * 1000 Then
		SendSro(GetHandle($charname), $bar)
		SendSro(GetHandle($charname), $slot)
		Assign($charname&"skill" & $slot, TimerInit(), 2)
	EndIf
EndFunc

Func Buff($charname, $bar, $slot, $delay = 300)
	If Not IsDeclared($charname&"buff" & $slot) Then
		Sleep(2000)
		SendSro(GetHandle($charname), $bar)
		SendSro(GetHandle($charname), $slot)
		Sleep(2000)
		Assign($charname&"buff" & $slot, TimerInit(), 2)
	ElseIf TimerDiff(Eval($charname&"buff" & $slot)) > $delay * 1000 Then
		Sleep(2000)
		SendSro(GetHandle($charname), $bar)
		SendSro(GetHandle($charname), $slot)
		Sleep(2000)
		Assign($charname&"buff" & $slot, TimerInit(), 2)
	EndIf
EndFunc

Func CharList()
	$list = WinList("[CLASS:CLIENT]")
	For $i=1 To $list[0][0]
		Local $mid = memopen(WinGetProcess($list[$i][1]))
		Local $name = memread($mid, $CharnameOffset, 'char[12]')
		GUICtrlSetData($char, $name, $name)
		memclose($mid)
	Next
EndFunc

Func GetHandle($charname)
	Local $list = WinList("[CLASS:CLIENT]")
	For $i=1 To $list[0][0]
		Local $mid = memopen(WinGetProcess($list[$i][1]))
		Local $name = memread($mid, $CharnameOffset, 'char[12]')
		If $name = $charname Then
			memclose($mid)
			Return $list[$i][1]
		EndIf
		memclose($mid)
	Next
EndFunc

Func SendSro($handle, $key)
	Switch $key
		Case "F1"
			$k = 0x70
		Case "F2"
			$k = 0x71
		Case "F3"
			$k = 0x72
		Case "F4"
			$k = 0x73
		Case Else
			$k = 0x30+$key
	EndSwitch
	For $i=1 To 5
		DllCall("User32.dll", "int", "PostMessageA", "hwnd", $handle, "int", 0x100, "int", $k, "int", 0)
		DllCall("User32.dll", "int", "PostMessageA", "hwnd", $handle, "int", 0x101, "int", $k, "int", 0)
	Next
EndFunc

Func ini()
	_GUICtrlListView_DeleteAllItems($atk)
	_GUICtrlListView_DeleteAllItems($buf)
	If FileExists(GUICtrlRead($char)&".ini") Then
		$section = IniReadSection(GUICtrlRead($char)&".ini", "atk_skill")
		For $i=1 To $section[0][0]
			GUICtrlCreateListViewItem($section[$i][1], $atk)
		Next
		$section = IniReadSection(GUICtrlRead($char)&".ini", "buf_skill")
		For $i=1 To $section[0][0]
			GUICtrlCreateListViewItem($section[$i][1], $buf)
		Next
	EndIf
EndFunc

Func memopen($pid)
	Local $mid = DllCall('kernel32.dll', 'int', 'OpenProcess', 'int', 0x1F0FFF, 'int', 1, 'int', $pid)
	Return $mid[0]
EndFunc

Func memread($mid, $adress, $type = 'dword')
	Local $struct = DllStructCreate($type)
	DllCall('kernel32.dll', 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
	Return DllStructGetData($struct, 1)
EndFunc

Func memclose($mid)
	DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $mid)
EndFunc

Func Pause()

$Paused = NOT $Paused

While $Paused

Sleep (400)

WEnd

EndFunc ; => Pause()
08/14/2009 01:05 lolkop#242
Quote:
Originally Posted by sin2022 View Post
guys F7 push Start/Stop
is working :)
dude sleep will ruin the bot...
08/14/2009 01:33 sin2022#243
yes dude
F7 sleep
dont start / stop
yes stop / start
:D
08/14/2009 04:01 CCG#244
are there any " I <3 lolkop " t-shirts out there? i'd buy 5! xD

man you're my hero :o


i hope you keep up the good work :]
08/14/2009 21:03 Ruthgaur#245
Lolcop, i have very big ask for you :)

Could you add little changed bot version, which would be same like this one, but bot wouldn't run to find next mob? He could just stay in one place.. cause when he is looking for next mob, he very often stuck on treeor any other obstacle :) please, do ur guess. Thx, and very great job man :) (sry for my english)
08/14/2009 21:53 ecsromaster#246
hi
i have a little problem
the bot doesnt select mobs
can somebody tell me how i can make the bot let select mobs
08/14/2009 22:24 andrelac#247
You need to put the auto select on skill's bar and BOT :D Put on F1-1 (example).

If you don't have autoselect search for one (in lolkop's post there's 1).
08/14/2009 23:17 didartje1#248
When i am logged in and then start bot i dont see the skills??? someone help me!!
08/14/2009 23:43 ecsromaster#249
so put it in as an attack skill?
08/14/2009 23:57 Taraz0r#250
sinces... how should this bot..work but i can't find any media.pk2 with autoselect cuz when i try to log on into sun world sro with the media.pk2 puff update and the autoselect sh1t dissapear ..

so if someone wanna help me just send me a pm or write here

regratz :) have a nice day and peace
08/15/2009 03:18 luevang#251
where can i download autolect media please ????
08/15/2009 09:39 PhameUs#252
Why are there so friggin many ...

*takes a deep breath... *

nvm. >.>



Q. OMG LOL I DONT HAEV AUTOSALECT WTF!!11!11
A. Use lolkop's patch for autoselect.

Q. Q. WTF LOL WH3R3 DO I DOWNLOAD THIS PATCH?!1!!11?
A. [ [Only registered and activated users can see links. Click Here To Register...] ]

Q. OMG IT DOASNT ATAK?!1
A. Put autoselect on F1-1 for example and use it as a skill.

Q. OMG WTF LOL TEH BOT STIL DO3SNT ATAK!!!11!1
A. Press the start button.

Q. OMG TEH BOT DO3SNT STOPP!1111111 WTF11!!!!
A. Press the stop button and wait about 3 seconds.
08/16/2009 11:42 ecsromaster#253
i downloaded all this stuff but it still doesnt attack mobs (i play ecsro)
-autopot
-swsro bot ( the new one for ecsro too)
-swsro autoselect
-private server loader
it keeps saying:
target is not selected !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!
08/16/2009 12:53 ecsromaster#254
so u need another program that selects mobs too use this bot ??/
08/16/2009 13:00 ecsromaster#255
hi (Agian -.-)


is that autoselect the number 1 or the number 2?
(the autoselect from lolskops patch)