Rotasi - Lua 1
Rotasi - Lua 1
Rotasi - Lua 1
blockid = 442
hit = 5
posId = 554
posIds = 340
harga = 2000
gbc = 242
trash = {
7162,
7164,
5024,
5026,
5028,
5032,
5034,
5036,
5038,
5040,
5042,
5044,
}
function cuan()
if findItem(112) > harga then
sendPacket(2,"action|buy\nitem|valentines")
sleep(3000)
end
end
function posisiPnb()
for i, tile in ipairs(getTiles()) do
if tile.fg == posId or tile.bg == posId then
findPath(tile.x,tile.y)
collectSet(true,4)
say("gas nguli")
end
end
end
function posisidrop()
for i, tile in ipairs(getTiles()) do
if tile.fg == posIds or tile.bg == posIds then
findPath(tile.x,tile.y)
drop(seedid)
drop(5030)
sleep(1000)
drop(gbc)
sleep(1000)
say("save")
end
end
end
function pnb()
while findItem(blockid) > 0 do
place(blockid,-1,0)
sleep(150)
for i = 0,hit,1 do
punch(-1,0)
sleep(200)
end
end
end
function clearBP()
for _,i in ipairs(trash) do
if findItem(i) > 0 then
local tresh = findItem(i)
sendPacket(2, "action|trash\n|itemID|".. i)
sendPacket(2, "action|dialog_return\ndialog_name|trash_item\
nitemID|" .. i .. "|\ncount|" .. tresh)
sleep(1000)
tresh = nil
end
end
end
function unready()
count = 0
for _, tile in pairs(getTiles()) do
if tile.fg == seedid and not tile.ready then
count = count + 1
end
end
return count
end
while true do
say("Autorotasi")
move(2,0)
sleep(200)
posisiPnb()
sleep(200)
pnb()
sleep(200)
cuan(1000)
sleep(1000)
clearBP()
sleep(200)
posisidrop()
sleep(200)
unready(seedid)
sleep(200)
end