I'm writing a game bot for 2moons. I'm almost done. It uses a HP pot when health is low, it uses a MP pot when MP is low, it summons pet when pet's hp is low, it will attack the target the pet is attacking, and it loots the drops on the ground. This is the last thing I want to do to complete this.
There are 3 squares on screen that you place your HP pots and MP pots in. I'm trying to figure a way that when it does not see the HP pot (because there is none) it does some other actions that basically teleport you home.
The HP pot icon is about 10 pixels wide and 20 pixels high. The center of the icon is 18,989 (1280x1024 32bit).
I mean this seems pretty cut and dry to me. Color not there then do this.
There are 3 squares on screen that you place your HP pots and MP pots in. I'm trying to figure a way that when it does not see the HP pot (because there is none) it does some other actions that basically teleport you home.
Code:
;No HP Pots = TP
$coord = PixelSearch (17, 988, 18, 989, 0xBD616D, 1);HP slot empty?
If @error then
ControlSend("2Moons","","","{i}"); Open inventory
sleep(1000)
MouseClick ("right", 713, 510, 1, 0); Right click TP scroll
Call("Terminate")
endif
I mean this seems pretty cut and dry to me. Color not there then do this.