🥴 Farm Rotation v2
info
Primary Feature: bot akan auto scan world yang belum ready! alternatif dari website
ini sama seperti v1 bedanya hanya di script OnCall nya, disini menggunakan command world database untuk ngecek apakah sudah ada 1200 tree yang ready di world tersebut, jika bot sebelumnya belum pernah join ke world nanti akan otomatis mulai farming dan update jumlah tree di world
# OnCall (script 1) - primary​
execute any-true [{event.data.id}!="rotation",{event.data.caller}!={bot.name}] terminate
condition [{var.bot.working}="false",{var.bot.working}="null"] continue[] terminate[] true
var "bot.working" store text "true"
var "storageLocation" store text "Door"
var "storageSeed" store text "MYWORLD|ID;MAKSIMAL SEED;LOKASI DROP"
var "farmingItem" store text "Pepper Tree"
var "storageLock" store text "LOKASI DROP"
var "storageLockWorld" store text "MYWORLD|ID"
execute as "{script.bots.0}" var "bot.world" store list ["MYWORLD|ID"]
execute as "{script.bots.1}" var "bot.world" store list ["MYWORLD|ID"]
execute if-true [{var.bot.world}="null"] var "bot.working" store text "false"
execute if-true [{var.bot.world}="null"] terminate
loop "{var.bot.world}"
# ini yang cek apakah sudah ada 1200 tree yang ready di world tersebut
world db is-ready 1200 "{var.loop.value}"
execute if-true [{var.returnValue.isSuccess}="false"] loop continue
go "{var.loop.value}" await
execute if-true [{var.loop.value}!~{bot.world.name}] var "bot.working" store text "false"
execute if-true [{var.loop.value}!~{bot.world.name}] goto end
# farming
job schedule [name="world_farming",start_world="{var.loop.value}",item="{var.farmingItem}",storage_location="{var.storageLocation}",type="FARMING",save_world="true"]
job wait "world_farming"
var "bot.cancelReason" store text "{var.returnValue.cancelReason}"
execute if-true [{var.bot.cancelReason}="bot disconnected"] var "bot.working" store text "false"
execute if-true [{var.bot.cancelReason}="bot disconnected"] terminate
# move item
job schedule [name="move_item",start_world="{var.loop.value}",worlds="SOURCE;{var.farmingItem} Seed;{var.loop.value},TARGET;{var.farmingItem} Seed;{var.storageSeed}"]
job wait "move_item"
var "bot.cancelReason" store text "{var.returnValue.cancelReason}"
execute if-true [{var.bot.cancelReason}="bot disconnected"] var "bot.working" store text "false"
execute if-true [{var.bot.cancelReason}="bot disconnected"] terminate
# buy lock
job schedule [name="buy_lock",start_world="{var.storageLockWorld}",pack="true",storage="{var.storageLock}"]
job wait "buy_lock"
var "bot.cancelReason" store text "{var.returnValue.cancelReason}"
execute if-true [{var.bot.cancelReason}="bot disconnected"] var "bot.working" store text "false"
execute if-true [{var.bot.cancelReason}="bot disconnected"] terminate
go "EXIT"
# end, ada wait untuk kasi jeda sedikit
print "selesai farming, move seed, dan buy lock dari world {var.loop.value}"
wait 60
loop end