-- AKTIFKAN AUTO COLLECT 1 TILE DI KIRI
namablock = "Pepper Tree" -- set nama block
hitcounts = 4 -- set the hitcount
delay = 200 -- delay plant , harvest
delaybreak = 100 -- delay pnb
namablocksampah = "Aurora" -- ganti nama block sampah yang mau ditrash
namaessencesampah = "Earth Essence" -- ganti nama essence yang mau ditrash
-- ABAIKAN YANG BAWAH
block = FindItemID(namablock)
seedid = block + 1
trashslot1 = FindItemID(namaessencesampah)
trashslot2 = FindItemID(namablocksampah)
PosPnb = block + 1
name = (GetLocal().name:gsub("`.",''))
function drop() SendPacket(2,"action|drop\n|itemID|"..seedid) end function
inv(itemid) for _,item in pairs(GetInventory()) do if [Link]==itemid then return
[Link] end end return 0 end function trash(trashing) SendPacket(2,"action|
trash\n|itemID|"..trashing.."") SendPacket(2,"action|dialog_return\ndialog_name|
trash_item\nitemID|"..trashing.."|\ncount|180") end function plants(x,y) pkt={}
[Link]=x [Link]=y pkt.x=x*32 pkt.y=y*32 [Link]=3 [Link]=seedid
SendPacketRaw(false,pkt) end function place(x,y,itemID) pkt={}
pkt.x=GetLocal().posX pkt.y=GetLocal().posY [Link]=x [Link]=y [Link]=3
[Link]=itemID SendPacketRaw(false,pkt) Sleep(delaybreak) end function
punchs(x,y) pkt={} pkt.x=GetLocal().posX pkt.y=GetLocal().posY [Link]=x [Link]=y
[Link]=3 [Link]=18 SendPacketRaw(false,pkt) Sleep(delaybreak) end function
log(txt) LogToConsole("`0[`cRhy Universe`0]`2 "..txt) end function pnb() while
inv(block)>10 do place([Link](GetLocal().posX/32-
1),[Link](GetLocal().posY/32),block) for i=1,hitcounts do
punchs([Link](GetLocal().posX/32-1),[Link](GetLocal().posY/32)) end end end
function baris() FindPath(4,2) Sleep(300) end function punch(x,y) local packet={}
[Link]=[Link](GetLocal().posX/32)+x
[Link]=[Link](GetLocal().posY/32)+y [Link]=3 [Link]=18
packet.x=GetLocal().posX packet.y=GetLocal().posY SendPacketRaw(false,packet) end
function harvest(itemid) for _,tile in pairs(GetTiles()) do
if([Link]==itemid)and([Link]==true)and inv(block)<=180 then Sleep(500)
FindPath(tile.x,tile.y) Sleep(delay)
punchs([Link](GetLocal().posX/32),[Link](GetLocal().posY/32)) end end end
function plant() for _,tile in pairs(GetTiles()) do if [Link]==0 and
GetTile(tile.x,tile.y+1).fg~=0 and GetTile(tile.x,tile.y+1).fg%2==0 then if
inv(seedid)>0 then Sleep(delay) FindPath(tile.x,tile.y) Sleep(delay)
plants([Link](GetLocal().posX/32),[Link](GetLocal().posY/32)) end end end
end function main() if inv(trashslot1)>=180 then trash(trashslot1) elseif
inv(trashslot2)>=180 then trash(trashslot2) elseif inv(seedid)>=190 then Sleep(300)
Sleep(300) drop() elseif inv(block)>10 then Sleep(500) baris() Sleep(500) pnb()
plant() elseif inv(block)<=10 then harvest(seedid) end end function AvoidError() if
pcall(function() main() end)==false then Sleep(100) AvoidError() end Sleep(100)
AvoidError() end log("Starting Rotation Farm") log("`9Set Block to "..namablock.."
and "..block.." itemid") log("Set Trash Item to "..namablocksampah.." and
"..namaessencesampah) var={} var.v1="OnTextOverlay" var.v2="Rotasi by Rhy Universe"
SendVariant(var) AvoidError()