Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

[Adventurer] Brown Noise


Hi! Here is the new level Brown Noise.

This level is a demonstration of one more advanced pet – the Brown Rat. That cute pet can be useful for rangers because it can distract enemies. You can use that pause to sneak by enemies, retreat from combat or backstab an enemy.


Nice level but how do you defeat the skeleton? Those skeleton are way stronger than usual.


Good question. I tried sword with “powerUp” ability and strongest swords. I can’t make “one powerful hit”. I’ll try the fire-trap’s. May be they will work.


fire-trap does not work too


Think how you can use the Rat. When an enemy turn with its back to you. As I wrote – that pet is useful for rangers :wink:


Oh. So bad. I don’t have ranger. Whatever I will find the way to beat them.


I have a ranger but I don’t know how to use the backstab dagger weapon.


I found a bug.
this code work for me before but now this happen

few second later

and here is my code

# Collect the treasure and escape.

# Prepare the hero and the pet.
pet.moveXY(32, 28)
hero.moveXY(10, 19)
# Distract the skeleton.
# Sneak while the skeleton is distracted.
hero.moveXY(10, 46)
# Repear this maneuver to get the treasure:
pet.moveXY(hero.pos.x, hero.pos.y)
pet.moveXY(64, 28)
hero.moveXY(48, 40)
hero.moveXY(49, 8)
hero.moveXY(72, 8)
hero.moveXY(49, 8)
# Escape from the dungeon (the red mark):
hero.moveXY(40, 56)


Your code work fine for me.
Problem can be caused by path find algorithm.

Nice level. Pet ability is interesting.

Seems like there is no isReady for pet ability?


Yep, it’s a bug in your code. Your hero is not fast, so use walls to hide from the skeleton “eyes”.

Good point. Sorry, I forgot to add to the Rat. Done.


Thank it work now.:smiley:


@Bryukh can you tell me how to use the dagger weapon please because I don’t know how to use it.


just use hero.backstab(enemy) when you are hidden or when you can hit an enemy from the back. You can use enemy.rotation and hero.rotation to check it. Or just use your eyes :slight_smile:


Ok thank for your help.:slightly_smiling_face:


With Ritic is especially simple - phaseShift + backstab or distractNoise + blink + backstab can be overpowered combos.


Thank a lot for your help. I wish I have Ritic. Is there a better way to save up gems to get Ritic?:slightly_smiling_face:


It seems for me that rat ability “distract” is a little buggy. Sometimes it works, sometimes not. Sometimes it works but I get error message

if I comment code connected to brown rat all is fine.
Even if I don`t use “distanceTo” method I still get an error message if rat code is on.


At some maps it works, rat is saying distracting words, but close enemies never react.


Could you send me some examples of code which cause that error?


оk, this one:

onSpawnRat = () =>
while true
if pet.pos.x != 47
enemy = pet.findNearestByType(“fangrider”)
if not enemy
enemy = pet.findNearestByType(“brawler”)
if not enemy
enemy = pet.findNearestByType(“ogre”)
if enemy
deltaX = Math.abs(pet.pos.x - enemy.pos.x)
deltaY = Math.abs(pet.pos.y - enemy.pos.y)
distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY)
if distance < 10
if pet.isReady(“distract”)

castStrong = () =>
enemy = hero.findNearestEnemy()
if enemy and @canCast “chain-lightning”, enemy
if enemy.type != “scout” and enemy.type != “munchkin” and enemy.type != “sand-yak” and enemy.type != “orge”
@cast “chain-lightning”, enemy

pet.on(“spawn”, onSpawnRat)

while true
#if pet.isReady(“distract”)
enemy = hero.findNearestEnemy()
if enemy and enemy.type != “sand-yak”
#while > 0
hero.attack enemy
@move {x: 90, y: 70}