stuck in some place :(
hi guys
what i am trying to do is
First of all, this is a java game and there are specific picture colors.
it should collect wheat etc. in each map then when there is no wheat picture on map it should jump to anothermap
then again should collect wheat etc. then jump other map
again...
then jump next
again
when i come back first map (that i start collecting wheat) i need to repeat the actions over again...
sometimes when u collect wheat you levelup
to avoid error there are extra scripts inside
please help me to fix this
#Cereals images
wheat = Pattern(
wheat2 = Pattern(
#REGIONS: These help script work faster.
gamezone = Region(
ui = Region(
okbutton = Region(
closebutton = Region(
coordinate = Region(
#SETUP
waittime = 5 #this set time between harvesting
#Select harvesting items True= harvest False= dont harvest
harvestwheat = True #WHEAT
#VARIABLES
global lastroom #Variable using moving to right room. Dont edit
global currentroom #Variable using moving to right room. Dont edit
global noore #Variable using moving to right room. Dont edit
def harvest_astrub(): #Room swap module
global lastroom
global currentroom
global noore
if coordinate.
currentroom = 1
lastroom = 1
if coordinate.
currentroom = 2
if lastroom == 1:
else:
if currentroom == lastroom:
if coordinate.
currentroom = 3
if lastroom == 2:
else:
if currentroom == lastroom:
def levelup():
if okbutton.
else:
pass
def letsharvest(): #Harvest module
global noore
if harvestwheat == True:
if gamezone.
noore = 0
if harvestwheat == True:
if gamezone.
noore = 0
while ui.exists("ui.png", 0): #while this image on screen it keep looping this.
letsharvest() #Start harvest module
if closebutton.
else:
if noore == 1: #if no ore founded call room changer module.
#Choose where you are harvesting and add comment symbol (#) front of other modules.
pass
right now i am getting error on last part
while ui.exists("ui.png", 0): #while this image on screen it keep looping this.
letsharvest() #Start harvest module
if closebutton.
>>>>>>>>>> over here else:
if noore == 1: #if no ore founded call room changer module.
#Choose where you are harvesting and add comment symbol (#) front of other modules.
pass
and any how its work nothing is happen :(
plz help me guys thanks a lot
(i am at learning proses i am not expert in script thing)
i got this on net & did some tweak
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask daymond for more information if necessary.