Skip to content

Drone Module

The drone object provides deep access to the world around your robot. Use these properties to build efficient, data-driven farming scripts.


PropertyReturnsDescription
drone.move(dir)voidMoves one tile in the given Enum.Direction.
drone.getPosition()num, numReturns the current X and Z coordinates.
drone.getPositionX()numReturns only the current X position.
drone.getPositionZ()numReturns only the current Z position.

These properties look at ground-based crops (like Wheat, Potatoes, or Corn) beneath the drone.

PropertyReturnsDescription
drone.getPlant()stringThe name of the plant below (e.g., “Wheat”).
drone.getPlantPercent()numberGrowth percentage from 0 to 100.
drone.getPlantWeight()numberThe current weight (kg) of the plant.
drone.canCrop()booleantrue if the plant is 100% grown.
lau-compiler.exe
varol name = drone.getPlant
varol 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

These properties are used for fruit-bearing plants (like Apple trees or Blueberry bushes).

PropertyReturnsDescription
drone.getFruit()stringThe name of the fruit on the plant.
drone.getFruitPercent()numberGrowth percentage of the fruit (0-100).
drone.getFruitWeight()numberThe current weight (kg) of the fruit.
drone.getPlantHasFruit()booleantrue if the plant below is a fruit-bearer.
drone.canHarvest()booleantrue if the fruit is at 100% growth.

PropertyReturnsDescription
drone.plant(seed)voidPlants the specified Enum.Seed.
drone.crop()voidClears the tile (removes weeds or harvests ground crops).
drone.harvest()voidPicks fruit without destroying the plant.
drone.useItem(item)voidUses an item (like a watering can) on the tile.
drone.doFlip()voidPerforms a backflip animation.

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)
end
end

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