SHARE
TWEET

Rifbot Runemaker

w9s66v09c8x5o1fl3p0 Jan 11th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     Script Name:        Runemaker
  3.     Description:        Making runes or cast spell in game. Checking for no blank runes.
  4.     Author:             Ascer - example
  5. ]]
  6.  
  7. local MAIN_DELAY = {400, 1700}  -- delay in milisecond random actions
  8. local MANA_ABOVE = 80           -- MANA POINTS above this cast spell
  9. local SPELL = "adura vita"      -- spell to cast
  10.  
  11. local NO_BLANKS = {             -- when no blank runes:
  12.     castSpell = true,           -- cast spell: true/false
  13.     spell = "exura",            -- spell to cast
  14.     logout = false              -- logout true/false
  15. }
  16.  
  17. -- DONT'T EDIT BELOW THIS LINE
  18.  
  19. Module.New("Runemaker", function (mod)
  20.     if Self.Mana() >= MANA_ABOVE then
  21.         if string.instr(Proxy.ErrorGetLastMessage(), "magic item to cast") then
  22.             if NO_BLANKS.logout then
  23.                 Self.Logout()
  24.                 Rifbot.ConsoleWrite("[" .. os.date("%X") .. "] logged due a no more blank runes") -- set message to Rifbot Console.
  25.             else
  26.                 if NO_BLANKS.castSpell then
  27.                     Self.CastSpell(NO_BLANKS.spell)
  28.                 end
  29.             end
  30.             Proxy.ErrorClearMessage() -- we need to clear message manually.    
  31.         else
  32.             Self.CastSpell(SPELL)
  33.         end        
  34.     end        
  35.     mod:Delay(MAIN_DELAY[1], MAIN_DELAY[2]) -- set random delay
  36. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top