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

**URL:** https://discourse.codecombat.com/t/lua-code-patch-for-forest-short-sighted-burl-posted-intro-overview-and-default-code/9421
**Category:** Artisan
**Created:** [October 22, 2016, 1:02am UTC](https://discourse.codecombat.com/t/lua-code-patch-for-forest-short-sighted-burl-posted-intro-overview-and-default-code/9421 "2016-10-22T01:02:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Harry\_the\_Wanderer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/harry_the_wanderer/32/5369_2.png) [@Harry\_the\_Wanderer](https://discourse.codecombat.com/u/Harry_the_Wanderer)
#### Post date: [October 22, 2016, 1:02am UTC](https://discourse.codecombat.com/t/lua-code-patch-for-forest-short-sighted-burl-posted-intro-overview-and-default-code/9421/1 "2016-10-22T01:02:37Z")

</div>

**_Default code for LUA - - Copy-Paste into the editor to start_**

* * *

```python
-- 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:

```python
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._**
