Code: Select all
Loop ; Checks if the item is in inventory 2nd spot
{ ; Checks if second spot is occupied
PixelSearch, px, py, 629, 251, 636, 256, 0x39414A, 0, Fast ; Searches for the color of the chat box or the craft menu in top right
if (!ErrorLevel = 0) ; If the color matches to the one above, proceed with the script
{
{
continue ; If the item is in inventory continue
sleep 10
}
}
else ; If the item is not in the inventory
{
Random, s1, 300, 500 ; Generates a value between (x, x) in miliseconds to sleep
sleep %s1% ; Sleeps for a random value between 300 - 500 as specified above
Break ; Breaks the loop if the color matched
sleep 10
}
}
Loop ; Checks if item is in inventory 1st spot
{
PixelSearch, px, py, 584, 251, 591, 261, 0x39414A, 0, Fast ; Searches for the color of the chat box or the craft menu in top right
if (!ErrorLevel = 0) ; If the color matches to the one above, proceed with the script
{
continue ; If the item is in inventory continue
sleep 10
}
else ; If the item is not in the inventory
{
Random, s1, 300, 500 ; Generates a value between (x, x) in miliseconds to sleep
sleep %s1% ; Sleeps for a random value between 300 - 500 as specified above
Break ; Breaks the loop if the color matched
sleep 10
}
}
[Mod action: Moved topic to the “Gaming” section.]