Hello everyone,
I do not know what is happening!!
# Read the message on the sign to determine which units to summon and where to place them.
# Check the guide for instructions on interpreting the orders.
sign = hero.findByType("sign")[0]
message = sign.message
# Tip: parse the sign, then summon the units, then send each unit to the right position.
split_strings = []
n = 5
for index in range(0, len(message), n):
split_strings.append(message[index : index + n])
while True:
friends = hero.findFriends()
for i in range(10):
for friend in friends:
if split_strings[i][0] == 'p':
hero.summon('peasant')
if friend.type == 'peasant':
number10 = int(split_strings[i][1])*10 + int(split_strings[i][2])
number11 = int(split_strings[i][3])*10 + int(split_strings[i][4])
hero.command(friend, 'move', {'x':number10, 'y': number11})
elif split_strings[i][0] == 's':
if friend.type == 'soldier':
number10 = int(split_strings[i][1])*10 + int(split_strings[i][2])
number11 = int(split_strings[i][3])*10 + int(split_strings[i][4])
hero.command(friend, 'move', {'x':number10, 'y': number11})
elif split_strings[i][0] == 'P':
hero.summon('paladin')
if friend.type == 'paladin':
number10 = int(split_strings[i][1])*10 + int(split_strings[i][2])
number11 = int(split_strings[i][3])*10 + int(split_strings[i][4])
hero.command(friend, 'move', {'x':number10, 'y': number11})
elif split_strings[i][0] == 'g':
hero.summon('griffin-rider')
if friend.type == 'griffin-rider':
number10 = int(split_strings[i][1])*10 + int(split_strings[i][2])
number11 = int(split_strings[i][3])*10 + int(split_strings[i][4])
hero.command(friend, 'move', {'x':number10, 'y': number11})
elif split_strings[i][0] == 'a':
hero.summon('archer')
if friend.type == 'archer':
number10 = int(split_strings[i][1])*10 + int (split_strings[i][2])
number11 = int(split_strings[i][3])*10 + int(split_strings[i][4])
hero.command(friend, 'move', {'x':number10, 'y': number11})
elif split_strings[i][0] == 'A':
if friend.type == 'artillery':
number10 = int(split_strings[i][1])*10 + int (split_strings[i][2])
number11 = int(split_strings[i][3])*10 + int(split_strings[i][4])
hero.command(friend, 'move', {'x':number10, 'y': number11})
pLeAsE hELp mE