LUA code patch for - Forest - Short-sighted Burl - posted intro/ overview / and default code

Default code for LUA - - Copy-Paste into the editor to start


-- Collect coins and run lest the burl will find you.

-- Write the function "checkTakeRun" with one parameter.
-- If the item exists, take it.
-- Move to the start point (the green mark) whether the item or no.


-- Dont change this code.
while true do
    hero:moveXY(16, 56)
    local item = hero:findNearestItem()
    checkTakeRun(item)
    hero:moveXY(64, 56)
    local item = hero:findNearestItem()
    checkTakeRun(item)
end

Overview for LUA


If you have problems with this level, then maybe you need to return and play to previous levels about the functions.
If you forget how to define a function, then look at this example:

local checkSomething = function(something)
    hero:say("I'm in the function!")
    -- Check something.
    
end

Please feel free to use this to help you with the level until the patch is applied.