> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_easter/api.md).

# API

## Server side events

## On events

### On spawn

#### Example data

```lua
--Example pointData
-- 96 is ID of point
[96] = {
    ["model"] = rcore_easter_egg_05,
    ["pos"] = vec3(383.593140, -1828.449097, 27.601067),
    ["spawnTime"] = 1711301043,
    ["id"] = 96,
    },
}
```

#### Example data

```lua
AddEventHandler(triggerName("onSpawnPoint"), function(pointData)
    --Spawned point
end)
```

### On delete

#### Example data

```lua
--Example point data
pointData = {
    ["id"] = 106,
    ["pos"] = vec3(1465.088379, -1890.619873, 70.719093),
}
```

#### Example code

```lua
AddEventHandler(triggerName("onDeletePoint"), function(pointData)
    --Deleted point
end)
```

### On pickup

#### Example data

```lua
--Example pointData
-- 96 is ID of point
[96] = {
    ["model"] = "rcore_easter_egg_05",
    ["pos"] = vec3(383.593140, -1828.449097, 27.601067),
    ["spawnTime"] = 1711301043,
    ["id"] = 96,
    },
}
```

#### Example code

```lua
AddEventHandler(triggerName("onSelectPoint"), function(playerId, pointData)
    --On pickup
end)
```

## Own reward

For this to work go to config and change value to true. If you change this to true our script will not give items to player and it will call server event with playerId, point data and model data where you can find values from config.

```lua
Config.UseOwnReward = true
```

#### Example data

```lua
--Example pointData
pointData = {
    ["id"] = 96,
    ["pos"] = vec3(383.593140, -1828.449097, 27.601067),
    ["spawnTime"] = 1711301043,
    ["model"] = rcore_easter_egg_05,
}

--Example modelData
modelData = {
    ["reward"] = {
        [1] = {
            ["name"] = bread,
            ["count"] = 1,
            },
        [2] = {
            ["name"] = water,
            ["count"] = 1,
            },
        },
    ["rewardCount"] = 2,
    ["model"] = "rcore_easter_egg_05",
}
```

#### Example code

```lua
AddEventHandler(triggerName("reward"), function(playerId, pointData, modelData)

end)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.rcore.cz/paid-resources/rcore_easter/api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
