This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
permat = 0 | |
katasandi = "Abracadabra" | |
while true: | |
hero.moveRight() | |
hero.moveUp(2) | |
enemy = hero.findNearestEnemy() | |
if enemy: hero.attack (enemy) | |
if enemy: hero.attack (enemy) | |
hero.moveLeft() | |
hero.moveUp(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Build traps on the path when the hero sees a munchkin! | |
while(true) { | |
hero.moveXY(41, 20); | |
var enemy = hero.findNearestEnemy(); | |
if(enemy) { | |
// Build a "fire-trap" at the Red X (41, 24) | |
hero.buildXY("fire-trap", 41, 24); | |
} | |
// Add an else below to move back to the clearing | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loop { | |
hero.shield(); | |
if (hero.isReady ("cleave")) { | |
hero.findNearestEnemy(); | |
hero.cleave(enemy); | |
} | |
else { | |
var enemy = hero.findNearestEnemy(); | |
hero.attack(enemy); | |
hero.attack(enemy); |