Author Topic: Question  (Read 4489 times)

0 Members and 1 Guest are viewing this topic.

Teo.B

  • Зашел в гости
  • *
  • Posts: 15
    • View Profile
Question
« on: July 30, 2017, 09:41:37 PM »
Hello,With which command I can find a color;

Teo.B

  • Зашел в гости
  • *
  • Posts: 15
    • View Profile
Re: Question
« Reply #1 on: July 30, 2017, 10:31:34 PM »
I just want you to help me see the blue color of this name and then when I click on it so it says nearest station.With which command I can do it

Qwerry

  • Активный участник
  • ***
  • Posts: 117
    • View Profile
Re: Question
« Reply #2 on: July 30, 2017, 10:45:29 PM »
I just want you to help me see the blue color of this name and then when I click on it so it says nearest station.With which command I can do it
Hello!Do you need somthing like this?
Code: (clickermann) [Select]
GETSCREEN
IF_PIXEL_IN(x1,y1, x2,y2, 2231811) //x1,y1, x2,y2 -coordinates of left upper and lower right corner of the square, where can the needed blue appear, 2231811  means color number.
   LCLICK($_return1, $_return2) // click on that  blue pixel
   WAITMS(100)
END_IF
To find right coords&color number use Alt+Q.
(http://crapware.aidf.org/forum/index.php?topic=2687.0)
« Last Edit: July 30, 2017, 10:53:18 PM by Qwerry »

Teo.B

  • Зашел в гости
  • *
  • Posts: 15
    • View Profile
Re: Question
« Reply #3 on: July 30, 2017, 11:01:49 PM »
Maybe,but i dont know the orders,becouse i play 1 game from ships i need if my ship watch that color blue not the name only color,next to put nearest station only this,but i dont know how to  make it my friend)) i will try it

Qwerry

  • Активный участник
  • ***
  • Posts: 117
    • View Profile
Re: Question
« Reply #4 on: July 31, 2017, 12:19:11 AM »
Maybe,but i dont know the orders,becouse i play 1 game from ships i need if my ship watch that color blue not the name only color,next to put nearest station only this,but i dont know how to  make it my friend)) i will try it
I gave just an order (example) - so at least you'd better write the comand HALT at the end (it'll stop script). And you should write by yourself the steps, how (where click) to get to the station. You know, this shot and explanation is not enough.
[spoiler]If there's any problem,  you can put fullscreen here (better ".bmp" format). Maybe with a hidden nickname, if you're worry about privacy. And draw on it arrows and sign like this "1 - when the blue appears here","2 - click here", "3 - and click here". And  I'll try to help.

And, honestly I don't know, but this blue colour doesn't seems to be very unique. So script can find another element of gameplay (especially if the place to find the blue is big).[/spoiler]

If you'd like to learn about all the orders/commands of clickermann, the explanations and examples for are written in file "Help.chm" in Russian. Google translater can help.

Teo.B

  • Зашел в гости
  • *
  • Posts: 15
    • View Profile
Re: Question
« Reply #5 on: July 31, 2017, 02:34:04 PM »
okay,thank you i did it !!!!

Teo.B

  • Зашел в гости
  • *
  • Posts: 15
    • View Profile
Re: Question
« Reply #6 on: July 31, 2017, 08:16:51 PM »
Hello!! witch what order can i go on morlach every 2 hours ? only to put 1 click on morlach?

Teo.B

  • Зашел в гости
  • *
  • Posts: 15
    • View Profile
Re: Question
« Reply #7 on: August 01, 2017, 02:24:11 AM »
Guys,can you help me on this please?

Qwerry

  • Активный участник
  • ***
  • Posts: 117
    • View Profile
Re: Question
« Reply #8 on: August 01, 2017, 03:49:22 AM »
Hello!! witch what order can i go on morlach every 2 hours ? only to put 1 click on morlach?

If morlach is always there, you can choose one of these ways:
1. Thread or cycle with LClick(x,y) and  WAIT(7200).
Code: (clickermann) [Select]
THREAD(morlach, 1)
LClick(x,y)
WAIT(7200) //2*60*60 (seconds) 
END_THREAD
Usually Clickermann execute script line by line, but with the stream(THREAD) it  executes several orders at once.
2.  Or [spoiler]
Code: (clickermann) [Select]
THREAD(morlach,1)
If($time< $_time_t)
LClick(x,y) // go on morlach
$time=  $_time_t+7200
Else
Wait (60)//or more
End_if
END_THREAD
[/spoiler]
3. Another way -  go on morlach at for example 08.03,10.03, 12.03 ets. ("$_time_h" and "$_time_m"  means hour and minute on your PC)
[spoiler]
Code: (clickermann) [Select]
THREAD(morlach, 1)
If($time_hours=0)     //it'll set time for first morlach
   $time_hours=8
   $time_min=3
End_if   
   If($_time_h=$time_hours)
      If($_time_m=$time_min)
         LClick(x,y)
         $time_hours=$time_hours+2   //
      Else
         WAIT(60)
      End_if
   Else
      WAIT(180)
   End_if
END_THREAD
[/spoiler]

If morlach moves, you'd better make a picture of it to find.

Code: [Select]
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "file.bmp", -1, 100) //"-1" means no background (green is usually used if background is needed). 100 - % of coincidence, you can reduce it.
   LCLICK($_return1, $_return2)
   WAITMS(100)
END_IF
« Last Edit: August 01, 2017, 03:55:12 AM by Qwerry »

Teo.B

  • Зашел в гости
  • *
  • Posts: 15
    • View Profile
Re: Question
« Reply #9 on: August 01, 2017, 04:38:05 AM »
i cant understand what the file says,and what do i have to do

Qwerry

  • Активный участник
  • ***
  • Posts: 117
    • View Profile
Re: Question
« Reply #10 on: August 01, 2017, 03:48:52 PM »
If morlach is not always on the same place, to click on it you need to find it first.
Command IF_PICTURE_IN is searching the picture on your screen (actually on a screenshot in buffer, but doesn't matter). Make a screenshot of game (save as ".bmp" format, not ".jpg") and cut down a piece with morlach_name from it. Save it in script's folder. That makes your script understed "how does morlach looks like" to click on it. So "Morlach_file.bmp" (or file_name you like) is the picture, which will be searched. 

read more about IF_PICTURE_IN (that's from ClickermannHelp)

Teo.B

  • Зашел в гости
  • *
  • Posts: 15
    • View Profile
Re: Question
« Reply #11 on: August 01, 2017, 07:03:12 PM »
I did it but i do not know how to put it that says file.bmp
i make my photo bmp to understand it but how to put on file.bmp?

Qwerry

  • Активный участник
  • ***
  • Posts: 117
    • View Profile
Re: Question
« Reply #12 on: August 01, 2017, 11:06:20 PM »
Imagine your picture is saved as "Morlach" in script's folder. So instead of just_a_click in code will be lines:

Code: (clickermann) [Select]
GETSCREEN
IF_PICTURE_IN (0,0, $_xmax,$_ymax, "Morlach.bmp", 65280, 98) //65280 - green used as backgraund
   LCLICK($_return1, $_return2+30)//(y+30) - click not on the name but a little lower, on the red round
   WAITMS(100)
Print("Morlach is found")
Else
Print("Can't find Morlach")
END_IF

I put same lines for log. That'll help you to check work of script. http://prntscr.com/g342qe

My "morlach.bmp" just an example of how to make a background. Once used ".jpg"-format  has optimized(=changed) colors, so it won't work on real.

Bonus: Here is code to make screens in ".bmp" format. Click on left upper corner (press shift), lower right corner (press shift). Choose colormode (0 if don't need it). Check a folder in which this script was saved (there will be a new folder "Screens"  inside with new ".bmp" pictures). Always keep Log opened to see what to do next.
[spoiler]
Code: (clickermann) [Select]
Print("1) Click and press shift")
While(iskeydown(#shift)=0)
   IF(iskeydown(1)=1)
      $x1=$_xmouse
      $y1=$_ymouse
      Print($x1, " - ", $y1)
   END_IF
   WAITMS(100)
END_CYC
Print("1 - ", $x1, " - ", $y1)
Waitms(300)
Print("2) Click and press shift")
While(iskeydown(#shift)=0)
   IF(iskeydown(1)=1)
      $x2=$_xmouse
      $y2=$_ymouse
      Print($x2, " - ", $y2)
   END_IF
   WAITMS(100)
END_CYC
Print("2 - ", $x2, " - ", $y2)
GETSCREEN
$var = RADIOBOX("choose colormode", "0", "6", "7", "8")
SWITCH($var)
CASE(1)   
CASE(2)
   Colormode(6)
CASE(3)
   Colormode(7)
CASE(4)
   Colormode(8)
END_SWITCH
SCREENSHOTEX($x1,$y1, $x2,$y2, "Image_", 0)
Print("Save Picture in Screens")
halt
[/spoiler]