begin script siegeStuff
Siege[5]
Pos = marker at {1162,1220}
oWall =0
Cnt = 0
Rand = 0
start
begin loop
Rand = number from 1 to 6
if Rand == 1
oWall = get wall segment nearest {1128,1170} radius 50
elsif Rand == 2
oWall = get wall segment nearest {1194,1173} radius 50
elsif Rand == 3
oWall = get wall segment nearest {1130,1123} radius 50
elsif Rand == 4
oWall = get wall segment nearest {1200,1127} radius 50
elsif Rand == 5
oWall = get wall segment nearest {1230,1176} radius 50
elsif Rand == 6
oWall = get wall segment nearest {1093,1185} radius 50
end if
if Cnt >= 0 and Siege[0] not exists
if Cnt > 8
Siege[0] = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_10 belonging to Town[1] at {1166,11,1650}
else
Siege[0] = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_2 belonging to Town[1] at {1166,11,1650}
end if
add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {Pos} to siege weapon Siege[0] action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using oWall to siege weapon Siege[0] action queue
enable siege weapon Siege[0] auto attack
Cnt++
end if
if Cnt >= 2 and Siege[1] not exists
if Cnt > 12
Siege[1] = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_10 belonging to Town[1] at {1190,11,1650}
else
Siege[1] = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_4 belonging to Town[1] at {1190,11,1650}
end if
add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {Pos}+{15,0} to siege weapon Siege[1] action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using oWall to siege weapon Siege[1] action queue
enable siege weapon Siege[1] auto attack
Cnt++
end if
if Cnt >= 4 and Siege[2] not exists
if Cnt > 16
Siege[2] = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_10 belonging to Town[1] at {1175,11,1650}
else
Siege[2] = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_6 belonging to Town[1] at {1175,11,1650}
end if
add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {Pos}+{-15,0} to siege weapon Siege[2] action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using oWall to siege weapon Siege[2] action queue
enable siege weapon Siege[2] auto attack
Cnt++
end if
/* if Cnt >= 6 and Siege[3] not exists
Siege[3] = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_8 belonging to Town[1] at {1160,11,1650}
add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {Pos}+{-10,0} to siege weapon Siege[5] action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using oWall to siege weapon Siege[3] action queue
enable siege weapon Siege[3] auto attack
Cnt++
end if
if Cnt >= 8 and Siege[4] not exists
Siege[4] = create siege weapon SIEGE_BALANCE_TYPE_CATAPULT_LEVEL_10 belonging to Town[1] at {1145,11,1650}
add action SIEGEWEAPON_AGENDA_ACTION_MOVE_TO_POS using {Pos}+{-20,0} to siege weapon Siege[4] action queue
add action SIEGEWEAPON_AGENDA_ACTION_ATTACK_THING using oWall to siege weapon Siege[4] action queue
enable siege weapon Siege[4] auto attack
Cnt++
end if*/
end loop
end script siegeStuff
begin script platoonStuff
Melee[3]
Ranged[3]
Inc[3]
Pos = marker at {1162,1220}
Spawn = marker at {1166,11,1650}
Num = 0
Cnt = 0
start
Inc[0] = 1
Inc[1] = 1
Inc[2] = 1
begin loop
if Melee[0] not exists or Ranged[0] not exists
delete Melee[0]
delete Ranged[0]
Num = 20 + (Inc[0] * 5)
Melee[0] = create platoon PLATOON_INFO_AZTEC_MELEE_1 at {Spawn}+{0,-25} with Num men and 0 women
Ranged[0] = create platoon PLATOON_INFO_AZTEC_RANGED_1 at {Spawn} with Num/2 men and 0 women
set Melee[0] player 1
set Ranged[0] player 1
Cnt = 1
force while Cnt < Inc[0]
increment platoon Melee[0] experience
increment platoon Ranged[0] experience
Cnt++
end while
wait 1 second
add action PLATOON_AGENDA_ACTION_LINK_TO_ARMY_MEMBER using Melee[0] to Ranged[0] action queue
wait 1 second
add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Pos} to Melee[0] action queue
add action PLATOON_AGENDA_ACTION_ATTACK_ANY_ENEMY_IN_AREA using {Pos} to Melee[0] action queue
Inc[0]++
end if
if (Melee[1] not exists or Ranged[1] not exists) and Inc[0] > 2
delete Melee[1]
delete Ranged[1]
Num = 20 + (Inc[1] * 5)
Melee[1] = create platoon PLATOON_INFO_AZTEC_MELEE_1 at {Spawn}+{30,-25} with Num men and 0 women
Ranged[1] = create platoon PLATOON_INFO_AZTEC_RANGED_1 at {Spawn}+{30,0} with Num/2 men and 0 women
set Melee[1] player 1
set Ranged[1] player 1
Cnt = 1
force while Cnt < Inc[1]
increment platoon Melee[1] experience
increment platoon Ranged[1] experience
Cnt++
end while
wait 1 second
add action PLATOON_AGENDA_ACTION_LINK_TO_ARMY_MEMBER using Melee[1] to Ranged[1] action queue
wait 1 second
add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Pos}+{30,0} to Melee[1] action queue
add action PLATOON_AGENDA_ACTION_ATTACK_ANY_ENEMY_IN_AREA using {Pos}+{30,0} to Melee[1] action queue
Inc[1]++
end if
if (Melee[2] not exists or Ranged[2] not exists) and (Inc[0] > 3 or Inc[1] > 2)
delete Melee[2]
delete Ranged[2]
Num = 20 + (Inc[2] * 5)
Melee[2] = create platoon PLATOON_INFO_AZTEC_MELEE_1 at {Spawn}+{-30,-25} with Num men and 0 women
Ranged[2] = create platoon PLATOON_INFO_AZTEC_RANGED_1 at {Spawn}+{-30,0} with Num/2 men and 0 women
set Melee[2] player 1
set Ranged[2] player 1
Cnt = 1
force while Cnt < Inc[2]
increment platoon Melee[2] experience
increment platoon Ranged[2] experience
Cnt++
end while
wait 1 second
add action PLATOON_AGENDA_ACTION_LINK_TO_ARMY_MEMBER using Melee[2] to Ranged[2] action queue
wait 1 second
add action PLATOON_AGENDA_ACTION_MOVE_TO_POS_AGGRESSIVE using {Pos}+{-30,0} to Melee[2] action queue
add action PLATOON_AGENDA_ACTION_ATTACK_VILLAGER_AND_THOSE_IN_AREA using {Pos}+{-30,0} to Melee[2] action queue
Inc[2]++
end if
end loop
end script platoonStuff