here’s my code:
hero.cast("time-travel", hero)
hero.cast("regen", hero)
hero.cast("summon-robobomb")
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.moveXY(84,11)
enemy = hero.findNearestEnemy()
if enemy:
hero.cast("poison-cloud", enemy)
hero.cast("summon-burl")
hero.cast("summon-robobomb")
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.moveXY(85,58)
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.moveXY(82, 39)
hero.cast("grow", hero)
hero.cast("regen", hero)
hero.cast("summon-yeti")
hero.cast("summon-robobomb")
hero.cast("summon-yeti")
hero.cast("summon-burl")
hero.cast("time-travel", hero)
hero.moveXY(120,33)
hero.cast("summon-robobomb")
hero.cast("summon-yeti")
hero.moveXY(90, 30)
hero.cast("regen",hero)
hero.moveXY(120,33)
hero.cast("grow", hero)
hero.cast("time-travel", hero)
hero.cast("summon-robobomb")
hero.moveXY(90,30)
hero.cast("regen", hero)
hero.cast("regen", hero)
hero.moveXY(110,30)
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.cast("summon-robobomb")
hero.cast("summon-yeti")
hero.cast("summon-burl")
hero.moveXY(170,31)
hero.moveXY(188,13)
hero.moveXY(262, 31)
hero.cast("summon-burl")
hero.cast("summon-robobomb")
enemy = hero.findNearestEnemy()
if enemy:
hero.cast("chain-lightning",enemy)
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.cast("summon-burl")
enemy = hero.findNearestEnemy()
hero.cast("summon-robobomb")
hero.cast("regen", hero)
hero.cast("grow", hero)
hero.cast("summon-yeti")
hero.cast("summon-burl")
hero.cast("regen", hero)
hero.cast("summon-robobomb")
enemy = hero.findNearestEnemy()
if enemy:
hero.cast("dispel", enemy)
hero.cast("regen", hero)
hero.cast("summon-robobomb")
hero.cast("regen", hero)
hero.cast("summon-robobomb")
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.cast("grow",hero)
hero.moveXY(301, 28)
hero.cast("regen", hero)
hero.cast("summon-burl")
hero.moveXY(269, 58)
hero.cast("time-warp", hero)
hero.cast("summon-burl")
hero.cast("grow", hero)
Hmm, interesting code. Why do you not use while true?
1 Like
didn’t think of that i’ll try it
Also if you use while true, you can do this:
if hero.canCast("summon-burl"):
hero.cast("summon-burl)
And you will summon burls every time the cooldwn is ready. You can also do that with other spells.
1 Like
okay could you just wait a minute while i try that
so i tryed but i got blown up by my robobomb
oh and here is my code now
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("summon-yeti")
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.moveXY(84,11)
enemy = hero.findNearestEnemy()
if enemy:
hero.cast("poison-cloud", enemy)
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("summon-robobomb")
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.moveXY(85,58)
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.moveXY(82, 39)
hero.cast("grow", hero)
hero.cast("regen", hero)
hero.cast("summon-yeti")
hero.cast("summon-robobomb")
hero.cast("summon-yeti")
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("time-travel", hero)
hero.moveXY(120,33)
hero.cast("summon-robobomb")
hero.cast("summon-yeti")
hero.moveXY(90, 30)
hero.cast("regen",hero)
hero.moveXY(120,33)
hero.cast("grow", hero)
hero.cast("time-travel", hero)
hero.cast("summon-robobomb")
hero.moveXY(90,30)
hero.cast("regen", hero)
hero.cast("regen", hero)
hero.moveXY(110,30)
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.cast("summon-robobomb")
hero.cast("summon-yeti")
hero.cast("summon-burl")
hero.moveXY(170,31)
hero.moveXY(188,13)
hero.moveXY(262, 31)
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("summon-robobomb")
enemy = hero.findNearestEnemy()
if enemy:
hero.cast("chain-lightning",enemy)
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("summon-yeti")
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
enemy = hero.findNearestEnemy()
hero.cast("summon-robobomb")
hero.cast("regen", hero)
hero.cast("grow", hero)
hero.cast("summon-yeti")
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("regen", hero)
hero.cast("summon-robobomb")
enemy = hero.findNearestEnemy()
if enemy:
hero.cast("dispel", enemy)
hero.cast("regen", hero)
hero.cast("summon-robobomb")
hero.cast("regen", hero)
hero.cast("summon-robobomb")
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.cast("grow",hero)
hero.moveXY(301, 28)
hero.cast("regen", hero)
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.moveXY(269, 58)
hero.cast("time-warp", hero)
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
hero.cast("grow", hero)
Try to put all that in the while true. Also, you can do the if hero.canCast only one time. So if you wanna summon burl you write the if hero.canCast only one time in while true. same with other spells
1 Like
actualy wait a sec how will i do movexy
Well you can put it before the loop. However, if you want to move in the while true loop you can try to use flags maybe?
1 Like
ok i’ll see what i can do
hi i’m going to take a five to ten minute brake and then i’ll come back bye
i’m back and here is my code now
while True:
if hero.isReady("summon-robobomb"):
hero.cast("summon-robobomb")
flag = hero.findFlag("green")
if flag :
hero.moveXY(flag.pos.x,flag.pos.y)
if hero.isReady("summon-yeti"):
hero.cast("summon-yeti")
flag = hero.findFlag("green")
if flag:
hero.moveXY(flag.pos.x,flag.pos.y)
if hero.isReady("summon-burl"):
hero.cast("summon-burl")
flag = hero.findFlag("green")
if flag :
hero.moveXY(flag.pos.x,flag.pos.y)
ok i think i’ve solved it
Congratulations on solving the level! 
3 Likes