Post by northrunner on Mar 7, 2019 14:46:32 GMT
Hello
As I am not very good at scripting, I am trying to use this snap and play script tp make something working for my game but I am having some issue. I have 2 question
The script begin with this 2 commande, which are the most important
The problem is the script has several command(line), it is important to join and then enter ASAP if i am too late to press these 2 boutton the lobby will be full.
Question 1:
Is there a way to.. once program detect and click "join the game" to add a wait that i can modify until i find the perfect timing to then "enter the lobby" because usually it takes 1 or 2 cycle of the script to detect and enter the lobby. Sorry if i am not clear.
Even better is it possible to loop these 2 command easily and then exit the lop and continue to the rest of the script after the program detect the screen after "enter the game"
Question 2:
I still struggle to deal with this, once the game start I need to send units to battle field but depending on the map sometime it doesn't work I tried something like this:
Usually, it will try the first one but skip the rest of the entry so for this exemple, if cannot use middle row, the script will just send no units at all. Any trick to fix this?
Even better, is it possible to use the drag and drop instead? I know there is drag and drop option in the snag and play script but it doesnt work for me because for the target 2 it scan for a picture. I would need to
drag from a specific picture but drop to a specific location, not picture, because if the map change the drop will not work.
So if it is possible for these 3 entry I would like to do 3 drag and drop, if middle left not work, it will try to draganddrop to far left and if not work to middle.
I hope I am clear XD..
thank you very much !
For information, I use samsung s7 and currently using pro version of the app and here the full script as for now i still make change everyday as its not working very well lol:
As I am not very good at scripting, I am trying to use this snap and play script tp make something working for my game but I am having some issue. I have 2 question
The script begin with this 2 commande, which are the most important
------ Join the game -----
touchList[index] = {target = "join.png", region = Region(902, 106, 150, 150), id = "join", action = 'click'}
index = index + 1
------ Enter the lobby -----
touchList[index] = {target = "enter.png", region = Region(474, 1727, 150, 150), id = "enter", action = 'click'}
index = index + 1
The problem is the script has several command(line), it is important to join and then enter ASAP if i am too late to press these 2 boutton the lobby will be full.
Question 1:
Is there a way to.. once program detect and click "join the game" to add a wait that i can modify until i find the perfect timing to then "enter the lobby" because usually it takes 1 or 2 cycle of the script to detect and enter the lobby. Sorry if i am not clear.
Even better is it possible to loop these 2 command easily and then exit the lop and continue to the rest of the script after the program detect the screen after "enter the game"
Question 2:
I still struggle to deal with this, once the game start I need to send units to battle field but depending on the map sometime it doesn't work I tried something like this:
------ Middle Left row -----
touchList[index] = {target = "ML.png", region = Region(325, 1529, 150, 150), id = "ML", action = 'click(Location(376, 1100))'}
index = index + 1
------ Far left row -----
touchList[index] = {target = "FR.png", region = Region(325, 1546, 150, 150), id = "FR", action = 'click(Location(210, 1100))'}
index = index + 1
------ Middle Row -----
touchList[index] = {target = "M.png", region = Region(306, 1574, 150, 150), id = "M", action =
'click(Location(533, 1087))'}
index = index + 1
Usually, it will try the first one but skip the rest of the entry so for this exemple, if cannot use middle row, the script will just send no units at all. Any trick to fix this?
Even better, is it possible to use the drag and drop instead? I know there is drag and drop option in the snag and play script but it doesnt work for me because for the target 2 it scan for a picture. I would need to
drag from a specific picture but drop to a specific location, not picture, because if the map change the drop will not work.
So if it is possible for these 3 entry I would like to do 3 drag and drop, if middle left not work, it will try to draganddrop to far left and if not work to middle.
I hope I am clear XD..
thank you very much !
For information, I use samsung s7 and currently using pro version of the app and here the full script as for now i still make change everyday as its not working very well lol:
------ Join the game -----
touchList[index] = {target = "join.png", region = Region(902, 106, 150, 150), id = "join", action = 'click'}
index = index + 1
------ Enter the lobby -----
touchList[index] = {target = "enter.png", region = Region(474, 1727, 150, 150), id = "enter", action = 'click'}
index = index + 1
------ Middle Left row -----
touchList[index] = {target = "ML.png", region = Region(325, 1529, 150, 150), id = "ML", action = 'click(Location(376, 1100))'}
index = index + 1
------ Far left row -----
touchList[index] = {target = "FR.png", region = Region(325, 1546, 150, 150), id = "FR", action = 'click(Location(210, 1100))'}
index = index + 1
------ Join the game -----
touchList[index] = {target = "join.png", region = Region(902, 106, 150, 150), id = "join", action = 'click'}
index = index + 1
------ Middle Row -----
touchList[index] = {target = "M.png", region = Region(306, 1574, 150, 150), id = "M", action =
'click(Location(533, 1087))'}
index = index + 1
------ Enter the lobby -----
touchList[index] = {target = "enter.png", region = Region(474, 1727, 150, 150), id = "enter", action = 'click'}
index = index + 1
------ Far right row -----
touchList[index] = {target = "FL.png", region = Region(320, 1577, 150, 150), id = "FL", action = 'click(Location(836, 1091))'}
index = index + 1
------ Press on the unit because i don't drag and drop need to press the unit to be able to send it with like example Middle row-----
touchList[index] = {target = "pressUnit.png", region = Region(303, 1616, 150, 150), id = "pressUnit", action = 'click'}
index = index + 1
------ Join the game -----
touchList[index] = {target = "join.png", region = Region(902, 106, 150, 150), id = "join", action = 'click'}
index = index + 1
------ Win window -----
touchList[index] = {target = "win.png", region = Region(722, 247, 150, 150), id = "win", action = 'click'}
index = index + 1
------ Loot window -----
touchList[index] = {target = "loot.png", region = Region(669, 87, 150, 150), id = "loot", action = 'click'}
index = index + 1
------ Enter the lobby -----
touchList[index] = {target = "enter.png", region = Region(474, 1727, 150, 150), id = "enter", action = 'click'}
index = index + 1
------ End window -----
touchList[index] = {target = "okEND.png", region = Region(536, 1744, 150, 150), id = "okEND", action = 'click'}
index = index + 1
------ disconnect window -----
touchList[index] = {target = "disconnect.png", region = Region(458, 1055, 150, 150), id = "disconnect ", action = 'click'}
index = index + 1