w9s66v09c8x5o1fl3p0

Rifbot Anti Push

Jan 11th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. --[[
  2.     Script Name:        Anti Push
  3.     Description:        Drop shit under yourself. Required Rifbot v1.31
  4.     Author:             Ascer - example
  5. ]]
  6.  
  7. local DROP_DELAY = {1000, 2000}          -- loop reading module
  8. local TRASH = {3031, 3147, 3507}     -- trash items, gold, blank rune, label
  9.  
  10. -- DONT'T EDIT BELOW THIS LINE
  11.  
  12. local dropTime, dropDelay = 0, 0
  13.  
  14. Module.New("Anti Push", function ()
  15.     if os.clock() - dropTime > dropDelay then -- check for delay
  16.         local item = Container.FindItem(TRASH) -- search item in container
  17.         if item ~= false then
  18.             local pos = Self.Position()
  19.             Container.MoveItemToGround(item.index, item.slot, pos.x, pos.y, pos.z, item.id, 1) -- move first found item from TRASH list with quantity 1
  20.             dropTime = os.clock()
  21.             dropDelay = math.random(DROP_DELAY[1], DROP_DELAY[2])/1000 -- set new delay
  22.         end
  23.     end    
  24. end)
Add Comment
Please, Sign In to add comment