-
Notifications
You must be signed in to change notification settings - Fork 0
/
MedalHunter.ns
34 lines (29 loc) · 1.38 KB
/
MedalHunter.ns
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//**********************************
//Basic Medal Hunting using the cap/release method. Simply enter the valley
//Coordinates, hero string and number of waves. You shouldn't have to ever modify the MODIFIER variable
//But it is there in times when evony decides to be a bitch :D
//**********************************
//Fill in values below to cap and release a valley. used for medal farming.
VALC = "xxx,yyy" //Coordinates of valley
HERO = "any" //Hero string for attack
WAVES = 7 //Number of waves to have at a time.
//------------STOP EDITING------------
TROOPS = ["a:50","a:100","a:200","w:1,s:1,p:1,sw:1,a:400,wo:1","w:1,s:1,p:1,sw:1,c:1,a:800,wo:1","w:1,s:1,p:1,sw:1,c:1,a:1600,wo:1","w:1,s:1,p:1,sw:1,c:1,a:3200,wo:1","wo:1,w:1,s:1,p:1,sw:1,a:10000,c:1,b:1","wo:1,w:1,s:1,p:1,sw:1,a:15000,c:1,b:10","wo:1,w:1,s:1,p:1,sw:1,a:32000,c:1,b:150"]
label gettroops
lev = GetLevel(GetFieldId(VALC)
TRP = TROOPS[lev-1]
if (TRP == null) goto gettroops
echo "Troops are: " + TRP
journeyTime = city.getTravelTime(city.fieldId, GetFieldId(VALC), GetTroops(TRP), 5)
waittime = round( journeyTime * 2 / WAVES + 2) + 3
label doIt
if m_context.maintenanceStart goto maintWait
execute "abandon " + VALC
execute "attack " + VALC + " " + HERO + " " + TRP
execute "sleep " + waittime
loop doIt
label maintWait
if (lev < 10) execute "abandon " + VALC
sleep 180
if (m_context.maintenanceStart) loop maintWait
goto gettroops