![](/uploads/1/2/5/6/125662660/705579255.jpeg)
# Use object literals to walk the safe path and collect the gems. # You cannot use moveXY on this level! Use move to get around. Gems = @ findItemswhile @pos.
The best place to get cheats, codes, cheat codes, walkthrough, guide, FAQ, unlockables, tricks, and secrets for PC.
# Gather coins to summon soldiers and have them attack the enemy. Loop # Move to the nearest coin. # Use move instead of moveXY so you can command constantly.
# @say 'I need coins!' Coin = @ findNearest( @ findItems)@ move coin. Pos # If you have funds for a soldier, summon one. If @gold @ costOf( 'soldier ')@ summon 'soldier ' # @say 'I should summon something here!' Enemy = @ findNearest( @ findEnemies)if enemy# Loop over all your soldiers and order them to attack.
Soldiers = @ findFriendssoldierIndex = 0 while soldierIndex. Loop # Collect gold.
Coin = @ findNearest( @ findItems)@ move coin. Pos # If you have enough gold, summon a soldier. If @gold @ costOf( 'soldier ')@ summon 'soldier ' # Use a for-loop to command each soldier.
Friends = @ findFriends# For-loops have 3 parts, separated by semicolons. # for(initialization; condition; expression) # Initialization is done at the start of the first loop. # The loops continue while condition is true.
FriendIndex = 0 while friendIndex. # Protect the cage. # Put a soldier at each X. Points = points 0 = x: 33 y: 42points 1 = x: 47 y: 42points 2 = x: 33 y: 26points 3 = x: 47 y: 26 # 1. Collect 80 gold. # Collect 80 gold while @gold.
# Command your troops to move east and attack any ogres they see. # Use for-loops and findFriends. # You can use findNearestEnemy on your soldiers to get their nearest enemy instead of yours. Friends = @ findFriendsj = 0 loop i = 0 while i 1 then 1 else 0 @ command friend, 'move ',x: friend. X + stepy: friend.
Yi j if j 500 break. Using 'bash', 'cleave'function summonSoldierif self. Gold = self: costOf( 'soldier ') thenself: summon( 'soldier ')endendfunction commandSoldierslocal f = self: findFriendsfor i = 1, #f dolocal e = fi: findNearest(fi: findEnemies)if e thenself: command(fi, 'attack ', e)endendendloopsummonSoldiercommandSoldierslocal e = self: findNearest( self: findEnemies)local i = self: findNearest( self: findItems)local f = self: findFlagif f thenself: pickUpFlag(f)elseif e and i thenlocal de = self: distanceTo(e)local di = self: distanceTo(i)if de. # Fight your way into the Inner Sanctum of the ogre chieftain, and kill her.# Fight your way into the Inner Sanctum of the ogre chieftain, and kill her.def lowestHealthPaladin:lowestHealth = 99999lowestFriend = Nonefriends = self. FindFriendsfor friend in friends:if friend.
Type!= 'paladin':continueif friend. # Ogres mined the field to protect their Chieftain.# But we can use the 'domino' effect get our target.# The scout has prepared the map of the minefield.# All mines are placed the same distance apart.# The map is an array of strings, where 'x' is a mine and '.' Is nothing.# The first row in the array is the row nearest to the hero.# The map and helpful constants are listed below.fieldMap = hero. FindFriends 0. GetMapmine = 'x'empty = '.' MineDistance = 5firstXPos = 15firstYPos = 40# Find which starting mine connects to the ogre Chieftain.resultColumn = 22 # ∆ Change this to your actual result!hero.
Say( 'I think it's column number: ' + resultColumn)hero. MoveXY( resultColumn. mineDistance + firstXPos, firstYPos). # Ogres have taken some peasants hostage!# Your scouts have given you the intel required to lay an ambush.# this.grid holds an array of arrays.# Inside these sub-arrays, 0 is a peasant and 1 is an ogre!# Use this information to setup fire-traps to defeat the convoy.# First, remember the containing array is just an array!# Iterate over all the elements of this array.for i in range( len( hero.
![Code Code](/uploads/1/2/5/6/125662660/508083319.jpg)
Grid)):row = hero. Grid i# Now, row is just another array!# Iterate over all the tiles in this array:for j in range( len( row)):# Do a check to see if the tile of row i at j is 1.#self.buildXY('fire-trap', 36 + 6. j, 20 + 6. i)if row j 1:hero. BuildXY( 'fire-trap', 36 + 6.
j, 20 + 6. Talking tom pool puzzle game mod apk. i)# Finally, retreat back to cover.hero.
MoveXY( 29, 55). # Incoming Ogre Brawlers!# Make use of a commandeered Robot Walker to dispatch these foul enemies.# The Robot Walker requires commands in the form of a string:# In the first part of the string, you must say the enemy's health as Ternary.# The second part of the string should be the enemy's type as Binary.def toTernary( number):# Start with an empty string.string = '# Then, while the number isn't zero:while number!= 0:# We grab the remainder of our number.remainder = number% 3# This is our iterator method. 'number' decrements here.number = ( number - remainder) / 3# Append the string to the remainder.string = remainder + string# Finally, we want to return our constructed string.return stringdef toBinary( number):string = '# Go through the steps again:while number!= 0:# Get the remainder, decrement the number, append the string.remainder = number% 2number = ( number - remainder) / 2string = remainder + string# Remeber that binary is another way of saying '2'!return stringwhile True:enemies = hero.
FindEnemiesdangerous = findMostDangerous( enemies)if dangerous:# The way the robot takes commands is in the form of:# ternary(enemyHealth) + ' ' + binary(enemyType)hero. Say( toTernary( dangerous. Health) + ' ' + toBinary( dangerous. Type))# In this level the Ogre Brawlers are more powerful if they have more health.def findMostDangerous( enemies):mostDangerous = NonemostHealth = 0for i in range( len( enemies)):enemy = enemies iif enemy. Health mostHealth:mostDangerous = enemymostHealth = enemy. Healthreturn mostDangerous.
![](/uploads/1/2/5/6/125662660/705579255.jpeg)