Advertisement
Cavitt

Auto Area Attacker

Jan 8th, 2012
1,453
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1. dofile("SyntaxLuaLib.lua")
  2.  
  3. local info = [[
  4. Name: Auto Area Attack
  5. Description: Executes area spells on certain conditions
  6. Author: Cavitt Glover (Syntax)
  7. Version: 2.0.10 (updated 02.07.2012)]]
  8.  
  9. local config = {
  10.     attacks = {
  11.         --[[
  12.         spells should be prioritized from top to bottom, eg: exori gran will be attempted before exori or exori mas.
  13.        
  14.         players:
  15.             true = the area will include players in the threshold
  16.             false = the area will only count the monsters in the area
  17.        
  18.         aggressive:
  19.             0 = attack triggers when no players are in the area.
  20.             1 = attack triggers when only war enemies and skulled players, noone else.
  21.             2 = attack triggers when innocents are in the area but not when friendlies are.
  22.             3 = attack triggers when friendlies are in the area but not when innocents are.
  23.             4 = attack triggers without any regards to players in the area.
  24.         ]]
  25.         --{words="exori gran", threshold=5, mana=50, radius=1, aggressive=0, players=false},
  26.         {words="exori", threshold=2, mana=30, radius=1, aggressive=0, players=false},
  27.         --{words="exori mas", threshold =7, mana=80, radius=4, aggressive=0, players=false}
  28.     }
  29. }
  30.  
  31. local function think()
  32.     for _, info in ipairs(config.attacks)do
  33.         local amount = areaTargetAmount(info.radius, info.aggressive, info.players)
  34.         if(amount)then
  35.             if(amount >= info.threshold)then
  36.                 cast(info.words, info.mana)
  37.             end
  38.         end
  39.     end
  40. end
  41.  
  42. print(info)
  43. wait(5000)
  44. while (true) do
  45.     think()
  46.     wait(500)
  47. end
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement