02-10-2015, 09:16 AM
(This post was last modified: 02-10-2015, 09:30 AM by Andrei1801.)
Hey guys, I will post here an algorithm suggestion in pseudocode, I don't know much about AutoIT. I got the idea while reading aras' suggestion .
This algorithm is meant for a shot at conserving troops while trophy pushing.
sample sniping algorithm:
Basically what this would do is try to kill a townhall sitting in the corner with only 15 archers positioned right on the corner of the map so that teslas don't react. If it fails, it deploys all remaining troops around the townhall to try and kill teslas and other traps.
The downside is that it only works if townhall is in the corner and it may take hundreds of skips to find one in crystal league, but at least it tries to skip troop training time.
This algorithm is meant for a shot at conserving troops while trophy pushing.
Code:
if TH = top corner
then use snipe_algorithm1
elseif TH = left corner
then use snipe_algorithm2
elseif TH = right corner
then use snipe_algorithm3
endif
sample sniping algorithm:
Code:
Deploy 15 archers on the edge of the map
sleep 5000
while !1star and goldchange
sleep 500 ; waits for 1 star or gold unchanged (archers dead)
if 1star then surrender and restart bot
elseif !goldchange then exitloop
Deploy all troops around the townhall
while !1star
sleep 500 ; waits for 1 star
if 1star or timeout then surrender and restart bot
Basically what this would do is try to kill a townhall sitting in the corner with only 15 archers positioned right on the corner of the map so that teslas don't react. If it fails, it deploys all remaining troops around the townhall to try and kill teslas and other traps.
The downside is that it only works if townhall is in the corner and it may take hundreds of skips to find one in crystal league, but at least it tries to skip troop training time.