Drone Module
The drone object provides deep access to the world around your robot. Use these properties to build efficient, data-driven farming scripts.
🛰️ Movement & Position
Section titled “🛰️ Movement & Position”| Property | Returns | Description |
|---|---|---|
drone.move(dir) | void | Moves one tile in the given Enum.Direction. |
drone.getPosition() | num, num | Returns the current X and Z coordinates. |
drone.getPositionX() | num | Returns only the current X position. |
drone.getPositionZ() | num | Returns only the current Z position. |
🌿 Ground Plant Sensors
Section titled “🌿 Ground Plant Sensors”These properties look at ground-based crops (like Wheat, Potatoes, or Corn) beneath the drone.
| Property | Returns | Description |
|---|---|---|
drone.getPlant() | string | The name of the plant below (e.g., “Wheat”). |
drone.getPlantPercent() | number | Growth percentage from 0 to 100. |
drone.getPlantWeight() | number | The current weight (kg) of the plant. |
drone.canCrop() | boolean | true if the plant is 100% grown. |
lau-compiler.exe
varol name = drone.getPlantvarol progress = drone.getPlantPercent()varol weight = drone.getPlantWeight()
print("Scanning: " + name)print("Growth: " + progress + "%")print("Weight: " + weight + "kg")OUTPUT:
Scanning: Wheat
Growth: 85%
Weight: 1.2kg
🍎 Fruit & Tree Sensors
Section titled “🍎 Fruit & Tree Sensors”These properties are used for fruit-bearing plants (like Apple trees or Blueberry bushes).
| Property | Returns | Description |
|---|---|---|
drone.getFruit() | string | The name of the fruit on the plant. |
drone.getFruitPercent() | number | Growth percentage of the fruit (0-100). |
drone.getFruitWeight() | number | The current weight (kg) of the fruit. |
drone.getPlantHasFruit() | boolean | true if the plant below is a fruit-bearer. |
drone.canHarvest() | boolean | true if the fruit is at 100% growth. |
🚜 Actions & Inventory
Section titled “🚜 Actions & Inventory”| Property | Returns | Description |
|---|---|---|
drone.plant(seed) | void | Plants the specified Enum.Seed. |
drone.crop() | void | Clears the tile (removes weeds or harvests ground crops). |
drone.harvest() | void | Picks fruit without destroying the plant. |
drone.useItem(item) | void | Uses an item (like a watering can) on the tile. |
drone.doFlip() | void | Performs a backflip animation. |
💡 Advanced Automation Examples
Section titled “💡 Advanced Automation Examples”1. The “Small Remover” Harvester
Section titled “1. The “Small Remover” Harvester”Wait until a plant reaches a specific weight before harvesting to maximize profits.
while true do if drone.getPlantWeight < 1.5 then drone.crop() drone.plant(Enum.Seed.Wheat) endend2. Multi-Functional Tool Usage
Section titled “2. Multi-Functional Tool Usage”Check if a tile needs water or fertilizer before moving on.
if drone.getPlantPercent < 50 then drone.useItem("Watering_Can") print("Watered the " + drone.getPlant())end