[Adventurer] Dangerous Key


#1

Desert level here: Dangerous Key

It’s an additional practice to use pets and event data when you use “hear” events.

P.S.: Leaderboard is tricky, but I think you’ll find how to “collect” a LOT of gold.

P.P.S.: The hint is in the intro message.


#2

Fun, took me a bit to figure out.


#3

# If event.speaker is the paladin:
is a bit misleading.
if event.speaker=="paladin" # is not the solution …


#4

var paladin = pet.findNearestByType("paladin");

it’s a first line in the function.
Also there were three levels about event.speaker before that.

if event.speaker=="paladin" # is not the solution ... because speaker is a thang, not a string. Why it should be a type?


#5

2 solutions:

if event.speaker.type=="paladin":
if event.speaker==paladin:

#6

Three - you can position :wink:


#7

Four:
if event.speaker.maxHealth==600:


#8

completed the level without issue

added LUA patch


#9

Thanks, Harry! Patched, merged and saved :slight_smile:


#10

I need help my pet goes to the correct key but it just flys over the key bounce off the wall.


#11

Hm. Interesting. Could you post your code?