Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EditToggle("ModFly" , true)
- id = 102 -id plat sak karepmu
- delay_put = 150
- delay_path = 150
- local function HookVariant(var)
- if var.v1 == "OnDialogRequest" then
- return true
- end
- end
- AddHook(HookVariant , "OnVariant")
- function put(x,y)
- pkt = {}
- pkt.type = 3
- pkt.value = id
- pkt.x = GetLocal().posX
- pkt.y = GetLocal().posY
- pkt.px = x
- pkt.py = y
- SendPacketRaw(false , pkt)
- end
- function inv(itemid)
- for _, item in pairs(GetInventory()) do
- if item.id == itemid then
- return item.amount
- end
- end
- return 0
- end
- function ojokelewatplat()
- if inv(id) < 1 then
- Sleep(1000)
- SendPacket (2,"action|dialog_return\ndialog_name|item_search\n"..id.."|1")
- Sleep(150)
- end
- if GetTile(GetLocal().posX//32 , GetLocal().posY//32 - 1).fg == 0 then
- put(GetLocal().posX//32 , GetLocal().posY//32 - 1)
- Sleep(delay_put)
- end
- if GetTile(GetLocal().posX//32 , GetLocal().posY//32 + 1).fg == 0 then
- put(GetLocal().posX//32 , GetLocal().posY//32 + 1)
- Sleep(delay_put)
- end
- end
- function ojokelewatpathe(x , y)
- if GetTile(GetLocal().posX//32 , GetLocal().posY//32 - 1).fg == id and GetTile(GetLocal().posX//32 , GetLocal().posY//32 + 1).fg == id then
- FindPath(x , y)
- Sleep(delay_path)
- end
- end
- function p1()
- while GetLocal().posX//32 < 198 do
- ojokelewatplat()
- Sleep(10)
- ojokelewatpathe(GetLocal().posX//32 + 1 , GetLocal().posY//32)
- Sleep(10)
- end
- if GetLocal().posX//32 == 198 then
- ojokelewatplat((
- Sleep(350)
- FindPath(GetLocal().posX//32 , GetLocal().posY//32 - 4 , 100)
- Sleep(50)
- end
- end
- function p2()
- while GetLocal().posX//32 > 1 do
- ojokelewatplat()
- Sleep(10)
- ojokelewatpathe(GetLocal().posX//32 - 1 , GetLocal().posY//32)
- Sleep(10)
- end
- if GetLocal().posX//32 == 1 then
- ojokelewatplat()
- Sleep(350)
- FindPath(GetLocal().posX//32 , GetLocal().posY//32 - 4 , 100)
- Sleep(50)
- end
- end
- while true do
- p1()
- Sleep(50)
- p2()
- Sleep(50)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement