[Adventurer] Dangerous Key

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 Likes

Fun, took me a bit to figure out.

1 Like

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

1 Like

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?

1 Like

2 solutions:

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

Three - you can position :wink:

1 Like

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

1 Like

completed the level without issue

added LUA patch

1 Like

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

1 Like

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

1 Like

Hm. Interesting. Could you post your code?

1 Like