0% found this document useful (0 votes)
25 views1 page

Auto Plant Script for Chandelier

This script automates the planting of a specified block (chandelier) in a game environment. It checks the player's inventory for seeds and places them on suitable tiles with a defined delay. The script continuously runs until the seeds are depleted, logging actions to the console.

Uploaded by

vlleph3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views1 page

Auto Plant Script for Chandelier

This script automates the planting of a specified block (chandelier) in a game environment. It checks the player's inventory for seeds and places them on suitable tiles with a defined delay. The script continuously runs until the seeds are depleted, logging actions to the console.

Uploaded by

vlleph3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

namablocknya = "chandelier" -- Nama block yang ingin ditanam

delay = 10 -- Delay super cepat! Boleh 0~10, jangan terlalu tinggi

blockid = FindItemID(namablocknya)
seedid = blockid + 1

function inv(itemid)
for _, item in pairs(GetInventory()) do
if [Link] == itemid then return [Link] end
end
return 0
end

function placeSeed(x, y)
local pkt = {
type = 3,
px = x,
py = y,
x = x * 32,
y = y * 32,
value = seedid
}
SendPacketRaw(false, pkt)
end

function fastPlant()
for _, tile in pairs(GetTiles()) do
if [Link] == 0 then
local below = GetTile(tile.x, tile.y + 1)
if below and [Link] ~= 0 and [Link] % 2 == 0 then
if inv(seedid) > 0 then
placeSeed(tile.x, tile.y)
Sleep(delay)
else
break
end
end
end
end
end

function main()
while true do
if inv(seedid) > 0 then
fastPlant()
else
LogToConsole("`4Habis seed.")
break
end
end
end

-- Tampilkan info saat script dieksekusi


LogToConsole("`2SCRIPT AUTO PLANT BY `4@DirganR")
LogToConsole("`2[AutoPlant] Mulai menanam " .. namablocknya .. " (ID: " ..
seedid .. ")")

main()

You might also like