• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Frostbite for oGasai 2.0.17 - Level Bot
#1
Frostbite - a level bot rotation for frost mages using oGasai 2.0.17

Since the scripts is very long you have to copy the whole "text" and crtl-v in the rotation oGasai UI.

It's recommended to choose talents such as Frostbite, Ice Shards, Imroved Frost Nova and Shatter for maximum potential.

Frostbite 1.7
  • Stuck timeout added, logs out after a set amount of time if we don't move longer than 20 yards.
  • Option to skip pulling certain type of creatures
  • Option to delete grey items for maximum experience gain before bags are full (less gold though)
  • Small change to the draw monster info on screen
  • My own function for fetching new targets
  • Fixed logic issues, now it runs a bit smoother and polymorph adds and switch target better
    I know people added stuff to my older versions, I havn't looked or added that, so you have to add it yourself if you want too. Have fun!

Frostbite 1.6
  • Added a stop timer, default is set to 120 minutes, can be turned off and/or changed
  • Now loots before we drink/eat if no enemies are within 30 yards
  • Fixed some formating in the code
Frostbite 1.5
  • New visuals text data of ourselves, targets and players (widescreen is not supported), see pic: https://s11.postimg.org/k8mbek0w3/frostbite.jpg
  • Fixed conjure logic for low level, no more pausing when spells not learned yet
  • Uses Cold Snap for another Ice Barrier if needed (Mana shield drains too much mana Smile)
  • Fixed bug: not using frost armor
  • Fixed bug: low level without frost nova spell yet stopped casting
  • Added vendoring, also auto repairs all items if possible
  • Added mana gem to the conjure and combat function, thanks to Whaaa (Though, I added a cool down timer for it aswell as some different logic.)
Frostbite 1.4
  • Fixed checks: when to use Ice Barrier
Frostbite 1.3
  • Added Ice Armor Buff
  • Added Mount support, see settings variables
  • Added Ice Block when low HP to regain CDs / mana
  • Now "Targets" the mob to be pulled as soon as it is in  pull range
Frostbite 1.2
  • Added pull range to the settings variables
  • Change some targeting logic (fixed target buff after buffing 2017-03-11)
  • Changed conditions for using Mana Shield
Frostbite 1.1
  • Updated some logic
  • Improved Polymorph add checks (when more than 2 adds pulled)
  • Now instantly attacks the polymorphed target if it's the only one left
  • Added wait timer to the Conjure function to avoid multiple casts

Frostbite 1.0
  • Utilizes Frost Nova and Frostbite debuffs (move's away from frozen targets)
  • Casts Polymorph on detected  adds
  • Use spells such as: Ice Barrier, Evocation, Mana Shield
  • Status text on screen, HP/Mana/Target Hp/Script Status (DrawText())
  • Paranoid option, pauses the script when we are out of combat if players are within a certain range (disabled by default, but very good for rogues if you stealth as well during the pause)
  • Some functionalities are reused from DarkLinux's Mage rotation, e.g. Conjuring drinks/food


Attached Files Thumbnail(s)
   

.lua   Frostbite 1.6 formated.lua (Size: 30.75 KB / Downloads: 1,191)
.lua   Frostbite 1.5 formated.lua (Size: 28.84 KB / Downloads: 648)
.lua   Frostbite 1.5.lua (Size: 26.61 KB / Downloads: 678)
.lua   Frostbite 1.7.lua (Size: 34.87 KB / Downloads: 968)
  Reply
#2
AWesome dude keep it up!
  Reply
#3
Just finished reading code and this is some nice work, played for 5min with no errors, enough to know this is some fine work. Thanks for sharing awesome job really brings the bot to life.
  Reply
#4
Beautifully writtten code!

The Frost Nova step back and Sheep adds itself is legendary. 

Easily the best rotation on the site. Thanks for sharing!

One thing however, you missed Ice Armor. Here's the code I used instead:

Code:
if (HasSpell('Ice Armor') and HasBuff(localObj, 'Ice Armor') == 0) then
   __, __, __, __, Cost, __, __ = GetSpellInfoX('Ice Armor');
   if (IsInCombat() == 0 and localManaVal > Cost) then
       if (Buff('Ice Armor', localObj)) then SetWaitTimer(2); return; end
   end
elseif (HasSpell('Frost Armor') and HasBuff(localObj, 'Frost Armor') == 0 and HasBuff(localObj, 'Ice Armor') == 0) then
   __, __, __, __, Cost, __, __ = GetSpellInfoX('Frost Armor');
   if (IsInCombat() == 0 and localManaVal > Cost) then
       if (Buff('Frost Armor', localObj)) then SetWaitTimer(2); return; end
    end
end
  Reply
#5
(03-11-2017, 06:51 AM)whaaa Wrote: Beautifully writtten code!

The Frost Nova step back and Sheep adds itself is legendary. 

Easily the best rotation on the site. Thanks for sharing!

One thing however, you missed Ice Armor. Here's the code I used instead:

Code:
if (HasSpell('Ice Armor') and HasBuff(localObj, 'Ice Armor') == 0) then
   __, __, __, __, Cost, __, __ = GetSpellInfoX('Ice Armor');
   if (IsInCombat() == 0 and localManaVal > Cost) then
       if (Buff('Ice Armor', localObj)) then SetWaitTimer(2); return; end
   end
elseif (HasSpell('Frost Armor') and HasBuff(localObj, 'Frost Armor') == 0 and HasBuff(localObj, 'Ice Armor') == 0) then
   __, __, __, __, Cost, __, __ = GetSpellInfoX('Frost Armor');
   if (IsInCombat() == 0 and localManaVal > Cost) then
       if (Buff('Frost Armor', localObj)) then SetWaitTimer(2); return; end
   end
end

Thanks! I know I missed Ice armor, my mage just hit that level yesterday. Thanks for sharing!
  Reply
#6
Thanks alot for this rotation, working very nice!

I only have one input / suggestion for this rotation:
If the Ice Barrier goes down, the bot will stop attacking (and taking alot of damage) until the Ice Barrier is back on cooldown, it would be nice if it would just continue to cast spells, or cast a Mana Shield untill it can pop another Ice Barrier Smile

Cheers!
  Reply
#7
(03-14-2017, 07:59 PM)Bloodbane91 Wrote: Thanks alot for this rotation, working very nice!

I only have one input / suggestion for this rotation:
If the Ice Barrier goes down, the bot will stop attacking (and taking alot of damage) until the Ice Barrier is back on cooldown, it would be nice if it would just continue to cast spells, or cast a Mana Shield untill it can pop another Ice Barrier Smile

Cheers!

Oh did not notice that... Thanks!
  Reply
#8
Awesome update! 

There's an issue with the bot pulling a mob and then changing targets to pull another nearby mob.

Here's how I fixed:

line 112
Code:
function Oponer(targetObj, localHealth, localMana, bot_, alreadyPulled) 

line 130+
Code:
if (not alreadyPulled) then
    if (HasSpell("Frostbolt") == 1) then
        if (Cast('Frostbolt', targetObj)) then return; end
    else
        if (Cast('Fireball', targetObj)) then return; end
    end
end


line 416+
Code:
alreadyPulled = false;
Oponer(targetObj, localHealth, localMana, bot_, alreadyPulled); 
alreadyPulled = true;
  Reply
#9
Yeah it only does that if another mob walks closer to you than your current target before you hit combat Smile Ive seen it happen too but once you got polymorph its not a big deal. I can add a fix or your fix later Tongue
  Reply
#10
Yea, no big deal - just helping you perfect the rotation.

Mana Gems:

Under Line #224 (Make Room)
Code:
-- Conjure Mana Gem
if (HasItem('Mana Ruby') == 0 and
HasItem('Mana Citrine') == 0 and
HasItem('Mana Jade') == 0 and
HasItem('Mana Agate') == 0) then
    _, _, _, _, RubyCost, _, _ = GetSpellInfoX('Conjure Mana Ruby');
    _, _, _, _, CitrineCost, _, _ = GetSpellInfoX('Conjure Mana Citrine');
    _, _, _, _, JadeCost, _, _ = GetSpellInfoX('Conjure Mana Jade');
    _, _, _, _, AgateCost, _, _ = GetSpellInfoX('Conjure Mana Agate');
        
    if (RubyCost ~= nil and localManaVal > RubyCost) then
        CastSpellByName('Conjure Mana Ruby');
        SetWaitTimer(5);
        return true;
    elseif (CitrineCost ~= nil and localManaVal > CitrineCost) then
        CastSpellByName('Conjure Mana Citrine');
        SetWaitTimer(5);
        return true;
    elseif (JadeCost ~= nil and localManaVal > JadeCost) then
        CastSpellByName('Conjure Mana Jade');
        SetWaitTimer(5);
        return true;
    elseif (AgateCost ~= nil and localManaVal > AgateCost) then
        CastSpellByName('Conjure Mana Agate');
        SetWaitTimer(5);
        return true;
    end
end
(HasSpell didn't work for some reason, so I made a workaround.)


Line #169
Code:
-- Use Mana Gem
if (localMana < 15) then
    if (HasItem('Mana Ruby') == 1) then
        UseItem('Mana Ruby');
        return;
    elseif (HasItem('Mana Citrine') == 1) then
        UseItem('Mana Citrine');
        return;
    elseif (HasItem('Mana Jade') == 1) then
        UseItem('Mana Jade');
        return;
    elseif (HasItem('Mana Agate') == 1) then
        UseItem('Mana Agate');
        return;
    end
end
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)