Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 1,281
» Latest member: smack
» Forum threads: 138
» Forum posts: 672

Full Statistics

Online Users
There are currently 43 online users.
» 0 Member(s) | 43 Guest(s)

Latest Threads
Rotation Framework
Forum: Bot Base
Last Post: xiaopao
03-06-2023, 10:48 AM
» Replies: 1
» Views: 5,502
Classic - oGasai 2.1.23 -...
Forum: Bot Base
Last Post: sonusood
10-08-2022, 04:44 PM
» Replies: 155
» Views: 282,060
Resurrecting
Forum: Support
Last Post: sonusood
10-08-2022, 04:16 PM
» Replies: 1
» Views: 3,066
Bot functions (for 2.1.7)
Forum: Script development - Lua ressources
Last Post: sonusood
10-08-2022, 03:47 PM
» Replies: 7
» Views: 15,885
how to load a script?
Forum: Support
Last Post: sonusood
10-08-2022, 03:18 PM
» Replies: 5
» Views: 9,913
Mage 1.8
Forum: Mage
Last Post: sonusood
10-08-2022, 02:29 PM
» Replies: 3
» Views: 6,405
Auto delete all grey item...
Forum: Support
Last Post: sonusood
10-08-2022, 01:54 PM
» Replies: 3
» Views: 5,977
My own: assign target fun...
Forum: Support
Last Post: sonusood
10-08-2022, 12:59 PM
» Replies: 1
» Views: 3,811
Hunter Rotation v1.5c
Forum: Hunter
Last Post: sonusood
10-08-2022, 11:59 AM
» Replies: 7
» Views: 13,770
Functions for logging out...
Forum: General
Last Post: sonusood
10-08-2022, 10:52 AM
» Replies: 2
» Views: 7,430

 
  Rotation Framework
Posted by: Schaka - 03-01-2018, 09:31 AM - Forum: Bot Base - Replies (1)

Hey guys,

I recently ported my rotation framework to Lua to see if I could do it. It was pretty challenging getting all the functional aspects right, since I am used to strongly typed languages where functions and their parameters are also types.

Either way, I want to share the framework with you guys, because I believe it'll make it much easier for the average joe to write a rotation and still have them be extensive and powerful. 

The attached files are a rogue rotation that can be used as a base for your fightclasses (inspired by Logitech's rogue, not fully tested).


Guide

Put rotation_framework.lua into your scripts folder, then add the following code to your coremenu.lua under Core Files.

Code:
-- Rotation Framework
include("scripts\\rotation_framework.lua")



The framework can execute a rotation. Each rotation consists of several steps. Each step contains the following parameters:

Quote:action - a RotationAction requiring methods Range():float and Execute():bool
priority - float, sorting order, lowest to highest
predicate - a function taking RotationAction and WoWUnit as targets, returning bool
targetFinder - a function returning a WoWUnit (can be friendly) to execute action upon - this function takes a function(WoWUnit unit):bool as an argument
force - a boolean indicating whether this can interrupt the currently casting spell
rangeCheck - a boolean indicating whether we need to check the range for this action

The interesting parameters for most rotations are the actions, which can either be created through RotationFrameWork:CreateSpell(name, [rank = optional]) or RotationFrameWork:CreateRawAction(function, range). Each step in the rotation is checked for validity and skipped automatically, if it cannot be casted/used/out of range/not in LoS, etc. The first step that can be executed stops the rotation. Each new spell you want to be casted requires another execution of the rotation. 

Each step is also evalulated against a predicate that you can define and supplies its own targeting logic. By default, this will be the target the bot selects for you. You can, however, supply another function like RotationFramework.FindPlayer (returns the player itself) or create your own function to find a target (e.g. for blind, polymorph, sap, etc).

The predicate is the most interesting part. The action itself, as well as the previously evaluated target are parsed as parameters here (s, t => spell, target). You have access to both and need to return a bool value to determine whether this action can be executed. You do NOT need to check for LoS, mana etc here, the framework will automatically check if you can cast the spell or not. 

Example code
Code:
local Me = GetLocalPlayer();
local RF = RotationFramework;

local rotation = {
    RF:CreateStep(RF:CreateSpell("Throw"), 1, function(s, t) return SchakaRogue.needsRangePull and t:GetHealthPercentage() == 100 and t:GetDistance() > 8 end),
    RF:CreateStep(RF:CreateSpell("Shoot Crossbow"), 1, function(s, t) return SchakaRogue.needsRangePull and t:GetHealthPercentage() == 100 and t:GetDistance() > 8 end),
    RF:CreateStep(RF:CreateSpell("Shoot Bow"), 1, function(s, t) return SchakaRogue.needsRangePull and t:GetHealthPercentage() == 100 and t:GetDistance() > 8 end),
    RF:CreateStep(RF:CreateSpell("Shoot Gun"), 1, function(s, t) return SchakaRogue.needsRangePull and t:GetHealthPercentage() == 100 and t:GetDistance() > 8 end),
    RF:CreateStep(RF:CreateSpell("Stealth"), 2, function(s, t) return not IsInCombat() and t:GetDistance() <= 25 end, RF.FindPlayer),
    RF:CreateStep(RF:CreateSpell("Preparation"), 3, function(s, t) return IsSpellOnCD("Evasion") and RF:GetNumberAttackingMe(10) >= 2 end, RF.FindPlayer),
    RF:CreateStep(RF:CreateSpell("Adrenaline Rush"), 4, function(s, t) return IsSpellOnCD("Evasion") and not Me:HasBuff("Evasion") and RF:GetNumberAttackingMe(10) >= 2 end, RF.FindPlayer),
    RF:CreateStep(RF:CreateSpell("Blade Flurry"), 5, function(s, t) return RF:GetNumberAttackingMe(10) >= 2 end, RF.FindPlayer),
    RF:CreateStep(RF:CreateSpell("Evasion"), 6, function(s, t) return RF:GetNumberAttackingMe(10) >= 2 end, RF.FindPlayer),
    RF:CreateStep(RF:CreateSpell("Ripose"), 7, function(s, t) return true end),
    RF:CreateStep(RF:CreateSpell("Kick"), 8, function(s, t) return t:GetMana() > 0 and t:IsCasting() end),
    RF:CreateStep(RF:CreateSpell("Hemorrhage"), 9, function(s, t) return Me:GetComboPoints() < 5 and Me:GetEnergy() >= 50 end),
    RF:CreateStep(RF:CreateSpell("Sinister Strike"), 10, function(s, t) return Me:GetComboPoints() < 5 and Me:GetEnergy() >= 50 and not HasSpell("Hemorrhage") end),
    RF:CreateStep(RF:CreateSpell("Slice and Dice"), 11, function(s, t) return Me:GetComboPoints() >= 3 and not Me:HasBuff("Slice and Dice") and (t:GetHealthPercentage() > 65 or (t:GetHealthPercentage() < 15 and Me:GetHealthPercentage() > 70 or RF:GetNumberAttackingMe() >= 2)) end),
    RF:CreateStep(RF:CreateSpell("Eviscerate"), 12, function(s, t) return (Me:GetComboPoints() > 4 and not t:HasDebuff("Cheap Shot")) or Me:GetComboPoints() >= 3 and t:GetHealthPercentage() <= 20 end),
    RF:CreateStep(RF:CreateSpell("Slice and Dice"), 13, function(s, t) return t:GetHealthPercentage() > 50 and not Me:HasBuff("Slice and Dice") and Me:GetComboPoints() >= 2 and (RF:HasMainHandEnchant() or RF:HasOffhandEnchant() or Me:HasBuff("Blade Flurry")) end),
};

RF:RunRotation(rotation);



Attached Files
.lua   rotation_framework.lua (Size: 11.02 KB / Downloads: 635)
.lua   schaka_rogue.lua (Size: 8.22 KB / Downloads: 672)

  Improved Logitech's Grinder for oGasai 2.1.x
Posted by: fr0s4 - 02-21-2018, 12:52 AM - Forum: Bot Base - Replies (1)

Improved Logitech's Grinder with more features

This is based on Logitech's Grinder from his post: Logitech's Releases for oGasai 2.1.x [01-15-2018]

Credits to Logitech, for his incredible work, which inspired me to write my own routines and scripts.
I have just hit level 60 on my first botted character, thanks to Logitechs scripts. 
On my journey to hit max level i've learned simple lua commands, and i have got more familiar with WoW's lua api. I have made some changes to Logitech's script along the way, which i deem to be good enough to share with this community.

Keep in mind, my contributions may not be optimized properly, as i have never done any scripting, or coding prior to my experiences with oGasai.

Added features:

  • Reworked the layout, to hide some stuff when not needed.
  • Added more types to skip pulling. (rares, mechanical, dragonkin ect.)
  • Added buttons to manually blacklist mobs.
  • Added blacklisting method based on name of the mob.
  • Added option to stop the bot from pulling mobs targeting other players. (AoE grinders ect.)
  • Added option to stop the bot from pulling mobs other players target. (don't steal mobs from other players before they pull.)
  • Added option to stop pulling stacked mobs, which is close enough to pull each other(multiple mobs on pull), this is working, but the bot runs into them which is bad.
  • Added support for dynamic pulling in combat routines. (automatic choose ranged/melee pull method, more info below.)
  • Added a function to return the targets aggro range. (script_grind:calculateAggroRadius(targetObj))
These features helped me a lot, as the bot was easier to control, and made less contact with other players than otherwise.

Dynamic pulling
"If we, the player, is standing at the targets location, will we aggro additional mobs?"
I've added the function
Code:
script_grind:rangedPull(targetObj)
which will return true if it is best to use ranged, instead of melee pull.
It basically checks if we can charge a mob, without aggroing surrounding mobs. If not, then we ranged pull.
It's very useful for all melee classes. There is an example of this function in the modified rogue script, found in the attachments.

Example script
The rogue script is based on Logitech's rogue combat routine. I've modded it to use thrown, and stealth appropriate to the situation. It also utilize dynamic stealth range which matches the targets aggro range for least downtime and quickest kill. I have not yet leveled a rogue, so the numbers might need tweaking. (Check the rogue script code line 249 to 291 for example code)

Todo: 
  • Figure out a way to make the bot path around aggro ranges, without looking like a bot. Makes avoiding groups of mobs easier, so it wont path through them/aggro them.
  • Figure out a way to make the bot see the difference between neutral, and aggressive mobs. It can't atm, so it range pulls mobs not necessary.
It's been fun learning, and i look forward to add more features as i finish them.
If any bugs occur, feel free to make a post below about it. I'll try to figure it out to the best extend i can.

- Have fun botting!



Attached Files Thumbnail(s)
   

.lua   script_grind_logitech.lua (Size: 37.68 KB / Downloads: 756)
.lua   script_rogue.lua (Size: 16.06 KB / Downloads: 648)

  Set speed or lock speed function
Posted by: Onixwow - 02-07-2018, 08:41 PM - Forum: Support - Replies (6)

Hey. Bot UI hava a slider to change the speed of the character. But how to use it manually inside the script / rotation? 

I need to set the required speed using the function or lock speed for all movement events. In all of the described list of features bot I not found this information.


  Logitechs feral druid - improved
Posted by: zerger - 02-07-2018, 04:37 PM - Forum: Druid - Replies (1)

I will post all fixes and additions to logitechs feral script here
http://darkenedlinux.com/ogasai/showthread.php?tid=198


micro stutter you have after pulls when you are low lvl and dont have bear form

change line 409

Code:
if (targetObj:GetDistance() > self.meeleDistance or not targetObj:IsInLineOfSight()) then
to
Code:
if (targetObj:GetDistance() > self.meeleDistance or not targetObj:IsInLineOfSight()) and HasSpell("Bear Form") then


  Nav Mesh Runner for oGasai 2.1.X
Posted by: Logitech - 01-02-2018, 12:54 AM - Forum: Bot Base - No Replies

This little project was started by Rot (see script list on Discord)
   

I've changed, removed and added some stuff:

 - Added the script to be a "mode" instead of a window (uses run/stop) so we can use draw functions
 - Decreased the lines of code for adding/loading destinations
 - Added map/continent ID to destinations which are useless since the  Map ID's aren't "ordered" , need to map them some how
 - Most destinations are Horde that Rot added, so if people use this script, feel free to share the addDestination(...) line.
   e.g.: script_runner:addDestination("Razor Hill - Durator", 323.82, -4736.34, 9.80, 1, 14);

You can only walk to destinations that are usually within one "map-zone" from your current position. Otherwise you will end up with a path of 2 nodes or no path at all.

How to install:
1. Place the script_runner.lua in \\scripts\\

2. In core\\coremenu.lua inside the isSetup if-statment add:
        -- Nav Mesh Runner by Rot, Improved by Logitech
        LoadScript("Runner", "scripts\\script_runner.lua");
        AddScriptToMode("Runner", "script_runner");

2. In the same file below the isSetup if-statement add the menu:
        script_runner:menu();

Cheers



Attached Files
.lua   script_runner.lua (Size: 9.12 KB / Downloads: 732)

  Nav Mesh Runner for oGasai 2.1.X
Posted by: Logitech - 01-02-2018, 12:54 AM - Forum: Travel - No Replies

This little project was started by Rot (see script list on Discord)
   

I've changed, removed and added some stuff:

 - Added the script to be a "mode" instead of a window (uses run/stop) so we can use draw functions
 - Decreased the lines of code for adding/loading destinations
 - Added map/continent ID to destinations which are useless since the  Map ID's aren't "ordered" , need to map them some how
 - Most destinations are Horde that Rot added, so if people use this script, feel free to share the addDestination(...) line.
   e.g.: script_runner:addDestination("Razor Hill - Durator", 323.82, -4736.34, 9.80, 1, 14);

You can only walk to destinations that are usually within one "map-zone" from your current position. Otherwise you will end up with a path of 2 nodes or no path at all.

How to install:
1. Place the script_runner.lua in \\scripts\\

2. In core\\coremenu.lua inside the isSetup if-statment add:
        -- Nav Mesh Runner by Rot, Improved by Logitech
        LoadScript("Runner", "scripts\\script_runner.lua");
        AddScriptToMode("Runner", "script_runner");

2. In the same file below the isSetup if-statement add the menu:
        script_runner:menu();

Cheers



Attached Files
.lua   script_runner.lua (Size: 9.12 KB / Downloads: 689)

  Make bot to not attack totems
Posted by: ejaboz - 12-06-2017, 07:05 PM - Forum: General - Replies (1)

Hi is there any specific script to get the character to ignore attacking totems?
I already have setPVE(1) and enemyFaction = "Horde"; -- Set to "Horde" if you play Alliance


  Cat Form grinding v0.3 (2.1.7)
Posted by: Crobeus - 12-06-2017, 11:38 AM - Forum: Druid - No Replies

preface: I've never used Lua before and didn't bother looking up documentation before copypasting this combat routine together. If you use this script and make some changes please post them here so I can see what I did wrong, it helps everyone out in the end. Also, if someone can enlighten me on how to have the bot skin mobs that would be wonderful.

With my current gear and the mobs I'm botting this setup is 100% self sufficient with 0 downtime. Most healing is done on the run with rejuv and if mana ever drops low enough it'll pop innervate which has a short 6 minute cooldown.

Current flow goes like this:

  1. Checks for and buffs Omen of Clarity/Thorns/Mark of the Wild
  2. Pops rejuv if under 80% hp, regrowth if under 65%
  3. Switches to cat if hp % is high enough or currently affected by regrowth
  4. pulls with faerie fire (feral) at 30 yards then closes distance
  5. spams claw at 40 energy or if clearcasting proccd, ferocious bite at 5 combo
  6. shifts out mid combat to regrowth if health drops under 65%, healing touch if under 40%
What I'd like to add in future versions:
  • food/drink options
  • skinning
To use cat form for movement instead of running around or mounting, make the following changes to script_grind.lua:
add the variable "isCat = true" at the top with all the others and set "use mount" to false, then find this bit of code:
Code:
        if(self.useMount and not IsMounted()) then
            self.message = "Mounting";
            if(RunMountScript()) then
                return;
            end
            return --FIX, return not working (Could be in water, need to move)
        end

and duplicate it right below with some modifications like so:
Code:
        if(self.isCat and not self.useMount) then
            self.message = "Going back to cat";
            if(not localObj:HasBuff('Cat Form')) then
                Cast('Cat Form', localObj);
            end
        end


changelog:
0.1 - initial attempt
0.2 - fixed spam shifting
0.3 - combat healing implemented



Attached Files
.lua   script_cat.lua (Size: 5.35 KB / Downloads: 665)

  New User Groups
Posted by: DarkLinux - 11-28-2017, 09:09 PM - Forum: General - No Replies

Moderator
-Help out other members of the forum and discord
-Strong leadership
-Forum + Discord title

Script Developer
-Post a good amount of scripts
-Help out other members of the forum and discord
-Forum + Discord title

Supporter
-Donate $10+
-Forum + Discord title
-Name will be added to the bot

Donation Link: http://darkenedlinux.com/ogasai/donate.php


  Classic - oGasai 2.1.23 - Grind, Follow, Gather, Fish
Posted by: Logitech - 11-26-2017, 02:33 PM - Forum: Bot Base - Replies (155)

New release for oGasai 2.1.23 (dll and injector ("loader") included)

  • New windows for the grinder's menu and combat scripts. The menus are simplified and better arranged now.
  • Fixed an annoying bug with timers that froze the bot/combat scripts when using it for the first time.
  • Mage conjuring water/food fixed, stands up now...
  • I've added some functionality, made it easier to use auto path.
  • Added auto talent picker, see script_talent.lua
  • Added gather while grinding, herb/mining
  • Improved the vendor script
  • Added a hotspot database, see scripts\\db\\hotspotDB.lua
  • Added more target creature selections.
  • Added a new more advanced unstuck script with a new .dll (2019-04-16)
Download package:
https://github.com/Logitech2k17/ogasaiClassic

Mmaps download:
https://mega.nz/#!g0U2xI4a!aoJICAY34DLvM...Xz4J3rg9dM

[Image: update.png]

Vendor:
[Image: attachment.php?aid=205]

Auto pathing enabled by default. It will create path nodes of dead valid mob's locations with 60 yards in between. Move to a hotspot and make sure to increase pull distance.

Added hotspots. Generally your start up location will be set as a hotspot. Then you can change Distance to hotspot to grind closer/further away from that hotspot.
You can also add static level-range hotspots to the hotspot database.

Simple vendor looks for the closest vendors in vendorDB.lua.
All items that you had when you started the bot will be saved to a keep list (won't be sold).

Grinder 
  • Navigation functions are located in script_nav.lua
  • Auto pathing is on by default
  • Eat, drink, mount and potion logics are located in script_helper.lua
  • The nav mesh loads automatically when you start the grinder
  • Paranoia options exists: Players within range and/or if we get targeted
  • Target selection options e.g.: Skip certain creatures and/or elites
  • Avoid elites option, can be a bit messy in some situations, but it basically just moving away if an elite is within the avoid range
  • Eat/drink/potion feature: Tries to use any food, potion or drink that you can buy from vendors or get from mages (see script_helper.lua)
  • Mount feature: Tries to mount any mount that is obtainable (see script_helper.lua), including mount with spells (warlock , paladin)
  • Blacklisting targets such as player pets and totems (called in the combat scripts)
  • Displays info about players and monster on screen (name, type, distance, level)
Follower
  • Auto accept group invite
  • Follows the leader
  • If you follow with a priest it will heal and buff the group, other classes dps for now (will add more buffs, options)
  • Use together with my combat scripts
    How to use:
    1. Choose Mode Follower 2. Choose Combat script 3. Push run
Frostbite - Mage
Basically a copy of my mage script for oGasai 2.0.17, added potion logic.
Written for frost talents, at level 40 you should get Ice Barrier e.g.: https://db.vanillagaming.org/?talent#oZZMAGco0tVo

Hidden - Rogue
Basically a copy of my rogue script for oGasai 2.0.17.
Written for combat talents, perhaps: https://db.vanillagaming.org/?talent#fbxfoxZMhEz0Vzxfo (will work with e.g. Hemo build too)
If you have the skill Riposte, put it in one of your action bars for the script to recognize when it's ready for use.

Beastmaster - Hunter
Basically a copy of my hunter script for oGasai 2.0.17, added feign death and potion logic.
Written for Beastmaster talents, perhaps: https://db.vanillagaming.org/?talent#cE0GzxgRtVVoZh
If you don't change the options put your quiver/ammo punch in your most left bag slot and pet food in the second most left bag's last slot.
See this picture below:
   

Shadowmaster - Warlock
Basically a copy of my warlock script for oGasai 2.0.17, added use of healthstone and potions.
Written for Affliction/Demonology talents, perhaps: https://db.vanillagaming.org/?talent#IE0ihMboVZ0gh0xxo

Fury - Warrior
Basically a copy of my warrior script for oGasai 2.0.17, added use of potions.
Written for Fury talents without stance dancing, perhaps: https://db.vanillagaming.org/?talent#LVG0bhbZVV0VgxoVo
If you dont change overpower action bar number, put Overpower in battlestance bar number 5:
   

Ret - Paladin
I've never played a paladin but I think I understand the rotation by checking out Zerger's basic pala script for 2.0.17.
I've added LoH, BoP, Divine Protection and potion logic. Combo logic for HoJ -> SoC -> Judgement.
Possible talent build using this rotation: https://db.vanillagaming.org/?talent#sxxubMZZVfxtbfV (Ret Aura, BoW)
Or this build: https://db.vanillagaming.org/?talent#sE0zZxhZVfctbfq (Sanctity , BoW)

Disc - Priest
Simple priest script uses: renew, shield, all heals at different thresh holds, smite, shadow word pain, mind blast and the UD damage spell.
Fears with Psychic Scream if more than one enemy attacks us. Uses the wand a lot.
Much can probably be added to this script, e.g. Shadowform logics.

Enhance - Shaman
Simple shaman script for enhancement:
Weapon Enchants: WF > Flametongue > Rockbiter | Totem: Strength of the Earth Totem > Grace of Air Totem | Healing: Lesser Healing Wave > Healing Wave
Pulls with lightning ball, attacks with Stormstrike. Uses Earth Shock when the target uses spells. Buffs with Lightning Shield.

Feral - Druid
Simple druid script for cat form. Should work from level 1-60. I've tested it from level 1-10 and on a 60 druid.
Using heals: Healing Touch, Regrowth, Rejuvenation, Buffing Mark of the Wild, Thorns, Tiger's Fury.