Jump to content
bbh_blocked_dnftl
Automation Vault

Lilshock

Members
  • Posts

    7
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Lilshock

  1. Good evening everyone.

     

    I have noticed that some players do not know how to create simple rotations for their bot. So i have made the following simple guide to help them get started.

     

    Requirements:

    Text editor such as Notepad++

    Tutorial-empty.cs file in the attachment is a clean file including markups.

    Seriously, that's the only things you need. 😇

     

    STEP1:

    You need to have a simple rotation in your mind so your bot can execute it. It will ONLY do what you tell it to do, nothing more nothing less.

    Keep your rotation simple at start, 2-3 abilities and check if they are working. From that point you can start slowly building more complex rotation to avoid getting errors and to ensure your rotation is running as intended.

    My rotation is as follows for enhancement shaman:

    1- Cast Stormstrike

    Always when possible

    2- Cast Earth Shock

    Only when i have mana reduction buff from talent 

    3- Cast Water Shield

    Only when i do not have it activated to avoid spam (If the bot keeps casting this ability, it will NEVER reach number 4)

    4- Cast Shamanistic Rage

    When health is below 70% and mana is below a certain value.

     

    Be aware that the bot will check number 1 first, if it can cast it then it will start checking again from start. if it can always cast it then it will NEVER reach number 2 to 4.

    Now that we have our planned rotation ready. We can start putting it into code.

     

    The code will consist of Four main sections

    1- Initialization

    We wont touch this

    2- CombatTick

    We will add variables and conditions to be executed during combat

    3-OutofCombatTick

    Same as 2 but for out of combat

    4-MountTick

    We wont touch

    107542154_mainsections.PNG.4725b630a5c9c8be93a463d1071556ba.PNG

    STEP2:

    We will open Tutorial-empty.cs file that you have downloaded with notepad++. You can see line numbers on your left. We will start by replacing //Variables in line 20  for combat rotations and variables with whichever variables you want to use for your class from line 45 to 50.

     

    I will be using shaman so i will need Target, Player, Mana, Health only. If i was a druid or rogue i would need Energy and Points.

     

    b4var.thumb.PNG.ad45c75449f7a9da70e399143ec5309d.PNGb4var.thumb.PNG.ad45c75449f7a9da70e399143ec5309d.PNG

     

    Please make sure you remove // and the text in brackets

     

    And you will have this 

    aftervar.thumb.PNG.263aed4859ab0a908a8008a5917a5112.PNG

     

    You can apply the same thing in out of combat section stuff such as buffs heals

     

    STEP3:

    Now that we have completed our variables, it is time to set the conditions for bot to follow.

    The format will be as follows

                if (Condition1 && Condition2)
                {
                    Do 1;

                    Do 2;
                    return true;
                }

    in my case i want to check if my character is NOT casting and cast Stormstrike

    if that is true then it should cast Stormstrike.

     

                if (!Player.IsCasting && WoW.CanCast("Stormstrike"))
                {
                    WoW.Cast("Stormstrike");
                    return true;
                }

    2123170115_Completecode.thumb.PNG.7dcddc3cb17c23f8dfe0628fc560be28.PNG

     

    I have also added the rest of the rotation that i wrote in STEP1

    You will see that when i loaded the rotation i got an error in terminal as below

    Error.PNG.56e2f7a7e5debbea0f0b0722f1f8a12e.PNG

     

    the code excepted } in line 50 so i will open my code on line 50 and check

     

    errorfix1.thumb.PNG.52540f83244aa9e0b6951a0a951b79d0.PNG

     

    You can see the red brackets closing here, the bracket in line 17 is open so i must add another bracket to close it

     

    443358526_errorfix2.thumb.PNG.ce726c8415b33de2b5f4504f24ace608.PNG

     

    After fixing the above. i also got a second error while loading

     

    Error2.PNG.5aba02ceb3aac8257db40da7e507871e.PNG

     

    You can see that CombatTick() is missing a return value.

    Clearly in line 50 it is missing a return false at the end of the tick.

     

    1978178609_error2fix1.PNG.12496d1917a4b57b1de4ef414d1a466d.PNG

     

    And now after loading the rotation after fixing all your errors you will get the following message

    Success.PNG.309a708e747292cc85e813f155a81f63.PNG

     

     

    Congratulations on completing your rotation

     

    Notes:-

    1- I have fixed the file from errors i had so you won't have them

    2- When you want to close WEPW to load new rotation or profile, ALWAYS close the application before the terminal so you don't get errors when logging again.

    3- Refer to Combat-API by MrFade

    4- I will update this rotation later on to include trinkets, items, weapon enchantments and multiple enemy aoe.

     

     

    Tutorial.cs Tutorial-Empty.cs

    • Like 2
×
×
  • Create New...