Advertisement
LordFuton

Untitled

Apr 3rd, 2023
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. EditToggle("ModFly" , true)
  2.  
  3. id = 102 -id plat sak karepmu
  4. delay_put = 150
  5. delay_path = 150
  6.  
  7. local function HookVariant(var)
  8. if var.v1 == "OnDialogRequest" then
  9. return true
  10. end
  11. end
  12. AddHook(HookVariant , "OnVariant")
  13.  
  14. function put(x,y)
  15. pkt = {}
  16. pkt.type = 3
  17. pkt.value = id
  18. pkt.x = GetLocal().posX
  19. pkt.y = GetLocal().posY
  20. pkt.px = x
  21. pkt.py = y
  22. SendPacketRaw(false , pkt)
  23. end
  24.  
  25. function inv(itemid)
  26. for _, item in pairs(GetInventory()) do
  27. if item.id == itemid then
  28. return item.amount
  29. end
  30. end
  31. return 0
  32. end
  33.  
  34. function ojokelewatplat()
  35. if inv(id) < 1 then
  36. Sleep(1000)
  37. SendPacket (2,"action|dialog_return\ndialog_name|item_search\n"..id.."|1")
  38. Sleep(150)
  39. end
  40. if GetTile(GetLocal().posX//32 , GetLocal().posY//32 - 1).fg == 0 then
  41. put(GetLocal().posX//32 , GetLocal().posY//32 - 1)
  42. Sleep(delay_put)
  43. end
  44. if GetTile(GetLocal().posX//32 , GetLocal().posY//32 + 1).fg == 0 then
  45. put(GetLocal().posX//32 , GetLocal().posY//32 + 1)
  46. Sleep(delay_put)
  47. end
  48. end
  49.  
  50. function ojokelewatpathe(x , y)
  51. if GetTile(GetLocal().posX//32 , GetLocal().posY//32 - 1).fg == id and GetTile(GetLocal().posX//32 , GetLocal().posY//32 + 1).fg == id then
  52. FindPath(x , y)
  53. Sleep(delay_path)
  54. end
  55. end
  56.  
  57. function p1()
  58. while GetLocal().posX//32 < 198 do
  59. ojokelewatplat()
  60. Sleep(10)
  61. ojokelewatpathe(GetLocal().posX//32 + 1 , GetLocal().posY//32)
  62. Sleep(10)
  63. end
  64. if GetLocal().posX//32 == 198 then
  65. ojokelewatplat((
  66. Sleep(350)
  67. FindPath(GetLocal().posX//32 , GetLocal().posY//32 - 4 , 100)
  68. Sleep(50)
  69. end
  70. end
  71.  
  72. function p2()
  73. while GetLocal().posX//32 > 1 do
  74. ojokelewatplat()
  75. Sleep(10)
  76. ojokelewatpathe(GetLocal().posX//32 - 1 , GetLocal().posY//32)
  77. Sleep(10)
  78. end
  79. if GetLocal().posX//32 == 1 then
  80. ojokelewatplat()
  81. Sleep(350)
  82. FindPath(GetLocal().posX//32 , GetLocal().posY//32 - 4 , 100)
  83. Sleep(50)
  84. end
  85. end
  86.  
  87. while true do
  88. p1()
  89. Sleep(50)
  90. p2()
  91. Sleep(50)
  92. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement