Advertisement
ppgab

titties mcswag

May 9th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.49 KB | None | 0 0
  1. -- Meanwhile at the config file ...
  2.  
  3. ------------------------------------------------------------------------------------------------
  4. --                                  [[  T O O L S  ]]                                         --
  5. ------------------------------------------------------------------------------------------------
  6. DropVial    =   true            -- Drop vials if cap is lower than minCap?
  7. DropGold    =   true            -- Drop 100 gold coins if cap is lower than minCap?
  8. ------------------------------------------------------------------------------------------------
  9. RingEquiper =   true            -- Equip rings upon conditions?
  10. --  Conditions :      
  11.     StealthEquiper = true                -- Equips stealth ring if creature is nearby?
  12.         NormalRing = 'crystal ring'      -- Normal ring to swtich to (necessary)
  13.         StealthCondition[1] = {creatures = {'Cyclops Smith','Cyclops Drone','Cyclops'}, count = 1}
  14.        -- StealthCondition[2] = {creatures = {'Cyclops','Cyclops Smith', 'Cyclops Drone'}, count = 3}
  15.  
  16.     NormalEquiper = true                -- Equips a ring if you have it
  17.         Ring[1] = 'life ring'           -- Ring to equip, priority 1>2>3, etc
  18. ------------------------------------------------------------------------------------------------
  19. ScreenShots =   true                   
  20. ------------------------------------------------------------------------------------------------
  21.  
  22.  
  23. -- Back to the LIBRARY!
  24.  
  25. ------------------------------------------------- Modules -----------------------------------------
  26.  
  27. softBoots = Module.New('equip softs', function(module)
  28.         if Self.ItemCount(normalBoots)>0 and Self.ItemCount(6529)>0 then
  29.             if (Self.isInPz() or Self.ManaPercent() >= Mana_To_Equip) and (Self.Feet().id ~= normalBoots) then
  30.                     Self.Equip(normalBoots, "feet")
  31.             elseif (Self.ManaPercent() <= Mana_To_Equip) and (Self.Feet().id ~= 6529) then
  32.                     Self.Equip(6529, "feet")
  33.             end
  34.         end
  35.         module:Delay(1000)
  36.     end,false)
  37.  
  38. dropVial = Module.New("drop vials", function(module)
  39.         if ((Self.Cap() < minCap) and (Self.Flasks() > 0)) then
  40.             Self.DropFlasks(Self.Position().x, Self.Position().y, Self.Position().z)
  41.             module:Delay(10000,16000)
  42.         end
  43.         module:Delay(1000)
  44.         end,false)
  45.  
  46. dropGold = Module.New('drop gold', function(module)
  47.         if (Self.ItemCount(3031) > 100) and (Self.Cap() < minCap) then
  48.             Self.DropItem(Self.Position().x, Self.Position().y, Self.Position().z, 3031)
  49.             module:Delay(60000)
  50.         end
  51.     end,false)
  52.  
  53.  
  54. eqManager = Module.New("EQ Manager.V2", function(module)
  55.     local t = nil
  56.     local slt = nil
  57.     local cnt = nil
  58.     if not(moduleStop) then
  59.         if Self.Shield().id ~= 0
  60.             then t,slt,cnt = (Self.Weapon().count),"weapon",7
  61.         else t,slt,cnt = (Self.Ammo().count),"ammo",35
  62.         end
  63.        
  64.         if (t < cnt and Self.TargetID() == 0)
  65.         or (Self.TargetID() ~= 0 and t<2)
  66.             then Self.Equip(ammo, slt, 100)
  67.                  module:Delay(600)
  68.         end
  69.     end
  70.     module:Delay(800)
  71. end,false)
  72.  
  73. Module.New('safe module',function(module)
  74.     if Self.isInPz() then
  75.         moduleStop = true
  76.         HUDUpdateStart = false
  77.     else
  78.         moduleStop = false
  79.         HUDUpdateStart = true
  80.     end
  81.     module:Delay(1000)
  82. end)
  83.  
  84. spellCaster = Module.New('auto_attack', function(module)
  85.     for _, data in ipairs(Attacks) do
  86.         if (not PvPSafe) or (Self.isAreaPvPSafe(data.padding,true,true)) then
  87.             if data.needTarget then
  88.                 local target = Creature.New(Self.TargetID())
  89.                 if (data.creatures and table.find(data.creatures, target:Name(), false)) or (not data.creatures) then
  90.                     if target:DistanceFromSelf() <= data.range and Self.CanCastSpell(data.words) then
  91.                         Self.Say(data.words)
  92.                     end
  93.                 end
  94.             else
  95.                 local count, mob = 0, Self.GetTargets(data.range)
  96.                 if data.creatures then
  97.                     for i = 1, #mob do
  98.                         if mob[i]:isOnScreen() and table.find(data.creatures, mob[i]:Name():lower(), false) then
  99.                             count = count + 1
  100.                         end
  101.                     end
  102.                 else
  103.                     count = #mob
  104.                 end
  105.                 if count >= data.count and Self.CanCastSpell(data.words) then
  106.                     Self.Say(data.words)
  107.                 end
  108.             end
  109.         end
  110.     end
  111. end,false)
  112.  
  113. -- no workerino :<
  114. ringEquiper = Module.New('ring equiper',function(module)
  115.     local equipStealth
  116.     local count = 0
  117.     local mob = Self.GetTargets(6)
  118.     local data = StealthCondition
  119.         for i=1, #data do
  120.             for y = 1, #mob do
  121.                 if mob[y]:isOnScreen(false) and table.find(data[i].creatures, mob[y]:Name(), false) then
  122.                     count = count + 1              
  123.                     if count >= data[i].count then
  124.                         equipStealth = true
  125.                     break
  126.                     end
  127.                 end
  128.             end
  129.             if equipStealth then
  130.             break
  131.             end
  132.         end
  133.    
  134.     if ((Self.ItemCount(3049)>0) or (Self.ItemCount(3086)> 0)) then
  135.         if equipStealth and Self.Ring().id ~= 3086 then
  136.             Alpha.RingEquip(3049,'ring')
  137.             module:Delay(400)
  138.         elseif Self.Ring().id == 3086 and (not equipStealth) and (Self.ItemCount(normalRing) > 0) then
  139.             Alpha.RingEquip(normalRing,'ring')
  140.             module:Delay(400)
  141.         end
  142.     elseif (Self.Ring().id == 0 or Self.Ring().id == normalRing) and (NormalEquiper) then
  143.         local Ringz = Ring
  144.         for l=1, #Ringz do
  145.         local idz = Item.GetID(Ringz[l])
  146.             if Self.ItemCount(idz) > 0 then
  147.             Alpha.RingEquip(idz,'ring')
  148.             module:Delay(400)
  149.             break
  150.             end
  151.         end
  152.     end
  153.     module:Delay(400)
  154. end , false)
  155.  
  156.  
  157. potionSorter = Module.New("Sort Supplies",function(module)
  158. local items = {HP, MP}
  159. local bp1 = Container(0)
  160.     for spot, item in bp1:iItems() do
  161.         if (table.contains(items, item.id)) then
  162.             bp1:MoveItemToContainer(spot, Container.New(pBp):Index())
  163.             break
  164.         end
  165.     end
  166. module:Delay(800)
  167. end,false)
  168.  
  169. screenShots = Module.New('ScreenShot', function(module)
  170.     local l = Self.Level()
  171.     local h = Self.MaxHealth()
  172.     module:Delay(1000)
  173.     if Self.Level() > l then
  174.         screenshot(Self.Name() .. " " .. os.date("%X") .. " Level : " .. Self.Level())
  175.         log:SendOrangeMessage('System','You Advanced from level '..l..' to level '..Self.Level())
  176.     end
  177.     if h < 1 then
  178.         screenshot(Self.Name() .. " " .. os.date("%X") .. "Death at : " .. Self.Level())
  179.     end
  180.     module:Delay(1000)
  181. end,false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement