← Back to team overview

sikuli-driver team mailing list archive

[Question #223397]: sikuli help for a computer illiterate father

 

New question #223397 on Sikuli:
https://answers.launchpad.net/sikuli/+question/223397

Hello I'm trying to make a automated player bot thing for a flash monopoly type game for my son, 
I promised to help him get some items on it, but just don't have the time,
 it is such a repetitive task which i cannot stand.

So the objective is to roll the dice into the shop and buy some item,
i downloaded sikuli's and gave it ago
i counted there is a total of only 8 different types of buildings in the game 
1 being the shop

so i used all 

1if exist(<dice img>,0)click(<dice img>)
2if exist(<random building 1 img>,0): click(<close button>)
3if exist(<random building 2 img>,0): click(<close button>)
4if exist(<random building 3 img>,0): click(<close button>)
5if exist(<random building 4 img>,0): click(<close button>)
6if exist(<random building 5 img>,0): click(<close button>)
7if exist(<random building 6 img>,0): click(<close button>)
8if exist(<random building 7 img>,0): click(<close button>)
9if exist(<the particular item he wants img>,0): wait 44000               - i want the script to just wait or stop if it happens to find it 
10if exist(<shop img>,0): click(<close button>)


Well, as u guys can tell i'm horrible at doing this but i did get it to work (surpised me too)
however there is one major issue, the dice would only ever work once and close what ever building it lands on,
I just cannot figure out how to loop action 1-10 and make it go in a giant loop.
I actually have done 4 hours of forum searching (getting results like while method, range) but everyone is just using technicality i cannot understand and it was just way too complicated.

I'd really like to to get some feedback on how the loop should be done, if possible please explain in very easy language. 
Lastly i'm not native english speaker, so please have some patience with me too.

Any help would be greatly appreciated.
 

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.