Форум Альянса

Объявление

С Новым 2009-м Годом!!!

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Форум Альянса » Архив » Скрипт для AutoIt (под бота)


Скрипт для AutoIt (под бота)

Сообщений 1 страница 2 из 2

1

Нужно указать путь к игре, лог и пасс и номер чара СЛЕВА (обычно 1)
Запускать сначала бот

$login="username"
$password="password"
$character="1"
$i=1
HotKeySet("{PAUSE}", "Pause")
Global $Paused
while 1=1
sleep(5000)
if WinExists("SRO_Client") then
sleep(500)
If WinActive("SRO_Client") and PixelGetColor(436,365) = 16777215 and PixelGetColor(588,373) = 16777215 and PixelGetColor(518,420) = 16710616  then
     MouseMove(504,421,0)
    sleep(500)
     MouseClick("left",504,421,1)
    sleep(200)
    MouseClick("left",504,421,1)
     sleep(2000)
endif
If WinActive("SRO_Client") and PixelGetColor(77,47) = 3947324  then
      if WinActive("SRO_Client") and PixelGetColor(53,164) <> 0 then
         Sleep(2000)
         Send("e")
         Sleep(2000)
         MouseMove(523,589,0)
         MouseClick("left",523,589,1,0)
         Sleep(2000)
         MouseMove(397,590,0)
         MouseClick("left",397,590,1,0)
         Sleep(500)
         MouseMove(463,527,0)
         MouseClick("left",463,527,1,0)
         Sleep(500)
         Send("e")
         Sleep(10000)
      endif         
   endif
else
Run("C:\Program Files\Silkroad\sro_client.exe 1234 /18 0 0")

while (PixelGetColor(22,757) <> 16744576) and (WinExists("ERROR") <> 1) and (WinExists("NetError","") <> 1)
sleep(500)
wend
if WinExists("ERROR") or WinExists("NetError","") then
  WinActivate("ERROR")
  sleep(200)
  ControlClick("ERROR","","Button1","left")
  WinActivate("NetError","")
  sleep(200)
  ControlClick("NetError","","Button1","left")
  sleep(2000)
else
  WinActivate("SRO_Client")
  loginStart()
EndIf
endif
wend
func loginStart()
sleep(200)
ControlSend("SRO_Client", "", "", "{SPACE}")
sleep(1000)
Send($login)
sleep(1000)
ControlSend("SRO_Client", "", "", "{TAB}")
sleep(1000)
send($password)
sleep(1000)
ControlSend("SRO_Client", "", "", "{Enter}")
sleep(4000)
while PixelGetColor(254,87) <> 14402189 and PixelGetColor(491,424) <> 16710616
  ControlSend("SRO_Client", "", "", "{Enter}")
  sleep(4000)
wend
if (PixelGetColor(528,425) = 16710616) then
  MouseMove(513,423,0)
  MouseClick("left",513,423,1)
  sleep(2000)
else
  if (PixelGetColor(254,87) = 14402189) then
   sleep(3000)
   If $character=1 then
    MouseMove(325,348,0)
    MouseClick("left",325,348,2)
    MouseClick("left",325,348,2)
   EndIf
   If $character=2 then
    MouseMove(521,362,0)
    MouseClick("left",521,362,2)
    MouseClick("left",521,362,2)
   EndIf
   If $character=3 then
    MouseMove(704,374,0)
    MouseClick("left",704,374,2)
    MouseClick("left",704,374,2)
   EndIf
   sleep(800)
   If ($i=1) then
    sleep(2200)
    MouseMove(791,710,0)
    MouseClick("left",791,710,2)
    Sleep(45000)
   ControlSend("SRO_Client", "", "", "{INSERT}")
   ControlSend("SRO_Client", "", "", "{HOME}")
   sleep(5000)
   MouseMove(475,330,0)
   MouseClick("left", 475, 330, 1)
   ControlSend("SRO_Client", "", "", "{HOME}")
    ControlSend("SRO_Client", "", "", "{INSERT}")
   Sleep(2000)
   ControlSend("SRO_Client", "", "", "{HOME}")
   sleep(2200)
   MouseMove(475,330,0)
   MouseClick("left", 475, 330, 1)
   ControlSend("SRO_Client", "", "", "{HOME}")
   sleep(5000)
    ControlSend("SRO_Client", "", "", "{INSERT}")
   else
    if (PixelGetColor(528,425) = 16710616) then
     MouseMove(513,423,0)
     MouseClick("left",513,423,1)
     sleep(2000)
    else
     MouseMove(996,712,0)
     MouseClick("left",996,712,1)
     sleep(3500)
     loginStart()
    if (PixelGetColor(528,425) = 16710616) then
     MouseMove(513,423,0)
     MouseClick("left",513,423,1)
     sleep(2000)
    EndIf
    Endif
   Endif
  Endif
endif
EndFunc
Func Pause()
    $Paused = NOT $Paused
While  $Paused
        Sleep (400)
WEnd
EndFunc ; => Pause()

0

2

Еще один вариант, если первый не пашет...

Код:
$login="Ваш Логин" 
$password="Ваш Пасс" 
$character= 1 
HotKeySet("{PAUSE}", "Pause") 
Global $Paused 
while 1=1 
sleep(5000) 
if WinExists("SRO_Client") then 
sleep(500) 
If WinActive("SRO_Client") and PixelGetColor(399,329) = 1579032 then 
     MouseMove(504,421,0) 
    sleep(500) 
     MouseClick("left",504,421,1) 
    sleep(200) 
    MouseClick("left",504,421,1) 
     sleep(2000) 
 endif 
 If WinActive("SRO_Client") and PixelGetColor(77,47) = 3947324  then 
      if WinActive("SRO_Client") and PixelGetColor(53,164) <> 0 then 
         Sleep(2000) 
         Send("e") 
         Sleep(5000) 
         MouseMove(523,589,0) 
         MouseClick("left",523,589,1,0) 
         Sleep(5000) 
         MouseMove(397,590,0) 
         MouseClick("left",397,590,1,0) 
         Sleep(500) 
         MouseMove(463,527,0) 
         MouseClick("left",463,527,1,0) 
         Sleep(500) 
         Send("e") 
         Sleep(10000) 
      endif           
   endif 
else 
Run("C:\Silkroad\sro_client.exe 1234 /18 0 0") 

while (PixelGetColor(22,757) <> 16744576) and (WinExists("ERROR") <> 1) and (WinExists("NetError","") <> 1) and (WinExists("Error") <> 1) 
sleep(500) 
wend 
if WinExists("ERROR") or WinExists("NetError","") or WinExists("Error") then 
  WinActivate("ERROR") 
  sleep(200) 
  ControlClick("ERROR","","Button1","left") 
  WinActivate("NetError","") 
  sleep(200) 
  ControlClick("NetError","","Button1","left") 
  WinActivate("Error") 
  sleep(200) 
  ControlClick("Error","","Button1","left") 
  sleep(2000) 
   
   
else 
  WinActivate("SRO_Client") 
  loginStart() 
EndIf 
endif 
wend 
func loginStart() 
sleep(200) 
ControlSend("SRO_Client", "", "", "{TAB}") 
sleep(1000) 
Send($password) 
sleep(1000) 
ControlSend("SRO_Client", "", "", "{TAB}") 
sleep(1000) 
send($login) 
sleep(1000) 
ControlSend("SRO_Client", "", "", "{Enter}") 
sleep(6000) 
while PixelGetColor(254,87) <> 14402189 and PixelGetColor(491,424) <> 16710616 
  ControlSend("SRO_Client", "", "", "{Enter}") 
  sleep(6000) 
wend 
if (PixelGetColor(528,425) = 16710616) then 
  MouseMove(513,423,0) 
  MouseClick("left",513,423,1) 
  sleep(2000) 
else 
  if (PixelGetColor(254,87) = 14402189) then 
   sleep(3000) 
   If $character=1 then 
    MouseMove(325,348,0) 
    MouseClick("left",325,348,2) 
    MouseClick("left",325,348,2) 
   EndIf 
   If $character=2 then 
    MouseMove(521,362,0) 
    MouseClick("left",521,362,2) 
    MouseClick("left",521,362,2) 
   EndIf 
   If $character=3 then 
    MouseMove(704,374,0) 
    MouseClick("left",704,374,2) 
    MouseClick("left",704,374,2) 
   EndIf 
   sleep(800) 
     
    SoundPlay("C:\Windows\media\notify.wav") 
    sleep(2200) 
    MouseMove(791,710,0) 
    MouseClick("left",791,710,2) 
    Sleep(15000) 
    ControlSend("SRO_Client", "", "", "{INSERT}") 
     
     
     
  Endif 
endif 
EndFunc 
Func Pause() 
    $Paused = NOT $Paused 
While  $Paused 
        Sleep (400) 
WEnd 
EndFunc ; => Pause()

0


Вы здесь » Форум Альянса » Архив » Скрипт для AutoIt (под бота)