Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Meanwhile at the config file ...
- ------------------------------------------------------------------------------------------------
- -- [[ T O O L S ]] --
- ------------------------------------------------------------------------------------------------
- DropVial = true -- Drop vials if cap is lower than minCap?
- DropGold = true -- Drop 100 gold coins if cap is lower than minCap?
- ------------------------------------------------------------------------------------------------
- RingEquiper = true -- Equip rings upon conditions?
- -- Conditions :
- StealthEquiper = true -- Equips stealth ring if creature is nearby?
- NormalRing = 'crystal ring' -- Normal ring to swtich to (necessary)
- StealthCondition[1] = {creatures = {'Cyclops Smith','Cyclops Drone','Cyclops'}, count = 1}
- -- StealthCondition[2] = {creatures = {'Cyclops','Cyclops Smith', 'Cyclops Drone'}, count = 3}
- NormalEquiper = true -- Equips a ring if you have it
- Ring[1] = 'life ring' -- Ring to equip, priority 1>2>3, etc
- ------------------------------------------------------------------------------------------------
- ScreenShots = true
- ------------------------------------------------------------------------------------------------
- -- Back to the LIBRARY!
- ------------------------------------------------- Modules -----------------------------------------
- softBoots = Module.New('equip softs', function(module)
- if Self.ItemCount(normalBoots)>0 and Self.ItemCount(6529)>0 then
- if (Self.isInPz() or Self.ManaPercent() >= Mana_To_Equip) and (Self.Feet().id ~= normalBoots) then
- Self.Equip(normalBoots, "feet")
- elseif (Self.ManaPercent() <= Mana_To_Equip) and (Self.Feet().id ~= 6529) then
- Self.Equip(6529, "feet")
- end
- end
- module:Delay(1000)
- end,false)
- dropVial = Module.New("drop vials", function(module)
- if ((Self.Cap() < minCap) and (Self.Flasks() > 0)) then
- Self.DropFlasks(Self.Position().x, Self.Position().y, Self.Position().z)
- module:Delay(10000,16000)
- end
- module:Delay(1000)
- end,false)
- dropGold = Module.New('drop gold', function(module)
- if (Self.ItemCount(3031) > 100) and (Self.Cap() < minCap) then
- Self.DropItem(Self.Position().x, Self.Position().y, Self.Position().z, 3031)
- module:Delay(60000)
- end
- end,false)
- eqManager = Module.New("EQ Manager.V2", function(module)
- local t = nil
- local slt = nil
- local cnt = nil
- if not(moduleStop) then
- if Self.Shield().id ~= 0
- then t,slt,cnt = (Self.Weapon().count),"weapon",7
- else t,slt,cnt = (Self.Ammo().count),"ammo",35
- end
- if (t < cnt and Self.TargetID() == 0)
- or (Self.TargetID() ~= 0 and t<2)
- then Self.Equip(ammo, slt, 100)
- module:Delay(600)
- end
- end
- module:Delay(800)
- end,false)
- Module.New('safe module',function(module)
- if Self.isInPz() then
- moduleStop = true
- HUDUpdateStart = false
- else
- moduleStop = false
- HUDUpdateStart = true
- end
- module:Delay(1000)
- end)
- spellCaster = Module.New('auto_attack', function(module)
- for _, data in ipairs(Attacks) do
- if (not PvPSafe) or (Self.isAreaPvPSafe(data.padding,true,true)) then
- if data.needTarget then
- local target = Creature.New(Self.TargetID())
- if (data.creatures and table.find(data.creatures, target:Name(), false)) or (not data.creatures) then
- if target:DistanceFromSelf() <= data.range and Self.CanCastSpell(data.words) then
- Self.Say(data.words)
- end
- end
- else
- local count, mob = 0, Self.GetTargets(data.range)
- if data.creatures then
- for i = 1, #mob do
- if mob[i]:isOnScreen() and table.find(data.creatures, mob[i]:Name():lower(), false) then
- count = count + 1
- end
- end
- else
- count = #mob
- end
- if count >= data.count and Self.CanCastSpell(data.words) then
- Self.Say(data.words)
- end
- end
- end
- end
- end,false)
- -- no workerino :<
- ringEquiper = Module.New('ring equiper',function(module)
- local equipStealth
- local count = 0
- local mob = Self.GetTargets(6)
- local data = StealthCondition
- for i=1, #data do
- for y = 1, #mob do
- if mob[y]:isOnScreen(false) and table.find(data[i].creatures, mob[y]:Name(), false) then
- count = count + 1
- if count >= data[i].count then
- equipStealth = true
- break
- end
- end
- end
- if equipStealth then
- break
- end
- end
- if ((Self.ItemCount(3049)>0) or (Self.ItemCount(3086)> 0)) then
- if equipStealth and Self.Ring().id ~= 3086 then
- Alpha.RingEquip(3049,'ring')
- module:Delay(400)
- elseif Self.Ring().id == 3086 and (not equipStealth) and (Self.ItemCount(normalRing) > 0) then
- Alpha.RingEquip(normalRing,'ring')
- module:Delay(400)
- end
- elseif (Self.Ring().id == 0 or Self.Ring().id == normalRing) and (NormalEquiper) then
- local Ringz = Ring
- for l=1, #Ringz do
- local idz = Item.GetID(Ringz[l])
- if Self.ItemCount(idz) > 0 then
- Alpha.RingEquip(idz,'ring')
- module:Delay(400)
- break
- end
- end
- end
- module:Delay(400)
- end , false)
- potionSorter = Module.New("Sort Supplies",function(module)
- local items = {HP, MP}
- local bp1 = Container(0)
- for spot, item in bp1:iItems() do
- if (table.contains(items, item.id)) then
- bp1:MoveItemToContainer(spot, Container.New(pBp):Index())
- break
- end
- end
- module:Delay(800)
- end,false)
- screenShots = Module.New('ScreenShot', function(module)
- local l = Self.Level()
- local h = Self.MaxHealth()
- module:Delay(1000)
- if Self.Level() > l then
- screenshot(Self.Name() .. " " .. os.date("%X") .. " Level : " .. Self.Level())
- log:SendOrangeMessage('System','You Advanced from level '..l..' to level '..Self.Level())
- end
- if h < 1 then
- screenshot(Self.Name() .. " " .. os.date("%X") .. "Death at : " .. Self.Level())
- end
- module:Delay(1000)
- end,false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement