How to make advanced scripts - thought process framework with example menu

User Tag List

Results 1 to 14 of 14
  1. #1
    EthEth's Avatar Active Member
    Reputation
    58
    Join Date
    Aug 2016
    Posts
    86
    Thanks G/R
    61/45
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make advanced scripts - thought process framework with example

    Because the question of creating advanced AHK triggers is returning one, I would like to present you with general framework that should help you better understand the process of creating good scripts. In example I use GameHelper (GameHelper: A light version of PoeHUD/Exile-Api), but it can be applied to other great tools and outside of PoE (or even gaming).

    In general, you need to think about:
    1. What and how often do you want to trigger?
    2. What do I need to use skill/flask?
    3. When you don't want to trigger?
    4. When you want to trigger?


    I will explain this using the following example:
    I am Ranger, and I would like to keep my ballista totem up when I am fighting Rares and Uniques.

    1. What and how often do you want to trigger
    • Ballista Totem up to my totems cap (which is 4)
    • I don't want to spam it, so I should add some delay between casts


    2. What do I need to use skill/flask
    • Skill has to be usable (ofc!)
    • I need to have mana to cast all four


    3. When you don't want to trigger
    • When there are no enemies or there is only small pack of Normal / Magic monsters
    • When I'm running (because I am repositioning to avoid something or looting and cast "stun" me)
    • When I have all totems alive already
    • When I have low mana (I don't want to be unable to attack because I've used all mana for this casts)


    4. When you want to trigger
    • When there arer Rare and/or Unique enemy
    • When I am actively attacking


    Ok, now we have more specific description of what I need to script. Let's turn them into more technical "conditions".

    1. What and how often do you want to trigger
    We want to create and keep up to 4 totems. This will also cover condition from section 3. (don't cast when I have all totems up). This condition would look like:
    DeployedObjectsCount[5] < 4 (we use Deployed Object Count Condition)
    How do I know what ID (here: 5) my totems have?
    Core -> Misc Tools -> Data Visualisation
    Then: States -> InGameStateObject -> CurrentAreaInstance->Player->Components->Actor -> Deployed Objects

    We don't want to spam, co we set cooldown to something comfortable and human-like - 0.222 should be ok.


    2. What do I need to use skill/flask
    Skill needs to be usable, so we use IS_SKILL_USABLE condition
    Condition would look like: PlayerSkillIsUseable.Contains("ArtilleryBallista")
    We need mana to cover all casts (and - looking at what we wrote in section 3. - also to keep on attacking).
    We will use VITALS condition:
    PlayerVitals.MANA.CURRENT >= 44
    I should cover all 4 totem casts and some attack time untill kills / regen / flasks let us recover mana.


    3. When you don't want to trigger
    We don't want to waste time for small packs. But, later on (section 4.) we have condition that we want to attack when unique/rare is near. There is no need to create two conditions here, in fact - they both describe similar state.
    After adjusting how big is our detection circle (see Core tab, nearby monsters counter), we will use nearby_consters_counter.
    Result should look like:
    MonsterCount(MonsterRarity.AtLeastRare, MonsterNearbyZones.OuterCircle) > 0
    To be safe, we will add here Component with wait time of around 0.232s (we will require to see Rare/Unique monster for at least this time to trigger; this will be more human-like).

    We don't want to cast when running, this is something opposite to condition for using Quicksilver flask:
    !PlayerAnimation.Equals(Animation.Run)
    Mind "!" which means "not" or "negate".
    We will add component that we stop running for around 0.500s - this will prevent us from casting when we fight, dodge and loot while attacking.

    Rest of conditions was covered in previous sections.


    4. When you want to trigger
    Presence of Rare/Unique was covered in section 3.

    What active attack means? In this case, it would mean keeping main attack button pressed for some time.
    We will use ON_KEY_PRESS_FOR_ACTION condition and connect it to our main attack button. We also need to add time component - how long button needs to be pressed to count for ongoing attack? Let's make it around 1.5s. Condition will look like:
    IsKeyPressedForAction(VK.RBUTTON)

    We covered all conditions. To sum it up (without delays added):
    Use KEY_T with cooldown 0.222 when:
    PlayerSkillIsUseable.Contains("ArtilleryBallista")
    MonsterCount(MonsterRarity.AtLeastRare, MonsterNearbyZones.OuterCircle) > 0
    IsKeyPressedForAction(VK.RBUTTON)
    PlayerVitals.MANA.CURRENT >= 66
    DeployedObjectsCount[5] < 4
    !PlayerAnimation.Equals(Animation.Run)


    I wish you good luck Exiles! Let me know if this framework helped you with creating better automation scripts

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    FAQ


    How to use tinctures?
    As for now (Aug 2024) Tinctures are buffs that come with mana-burn de-buff in form of stacks gained every 0,5s. When you get to 0 mana, tuncture will drop off and you will need time to re-use it.

    Active tincure is visible as buff, for example: tincture_oakbranch. But also, it applies Mana Burn debuff, visible as: tincture_mana_burn. This debuff has charges.

    I case of Game-Helper, You can check this in Data Visualisation (Core tab -> States dropdown -> InGameStateObject -> CurrentAreaInstance->Player->Components->Status Effects).

    Conditions would look like:
    !PlayerBuffs.Has("tincture_oakbranch") -> because we want to activate it when it is not on
    MonsterCount(MonsterRarity.AtLeastRare, MonsterNearbyZones.InnerCircle) > 0 -> because we want to have it only when there is someone important to hit

    You will also need to add cooldown / wait timers to avoid spamming tincture when it is on cooldown.
    Last edited by EthEth; 08-16-2024 at 03:49 AM. Reason: Add FAQ: tincture use

    How to make advanced scripts - thought process framework with example
  2. Thanks Glitter2770, kenneth942, kromatikal, CeliborCrash, poeking99 (5 members gave Thanks to EthEth for this useful post)
  3. #2
    ilikejbl's Avatar Member
    Reputation
    1
    Join Date
    Jan 2024
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want to make one macro for autohotkey trigger on gamehelper

    aura name is Zealotry, if this aura turn off that i want to turn on automatically with macro
    How can i do that?

    aura1.jpg

    when i press W key that turn on and make curcle display
    Some time this aura turn off remove curcle
    that have trigger or not

    Please advice for me.
    Last edited by ilikejbl; 08-06-2024 at 10:01 AM.

  4. #3
    GameHelper's Avatar ★ Elder ★ CoreCoins Purchaser
    Reputation
    2588
    Join Date
    Jun 2015
    Posts
    3,131
    Thanks G/R
    464/2326
    Trade Feedback
    0 (0%)
    Mentioned
    71 Post(s)
    Tagged
    1 Thread(s)
    thanks, i have linked this thread in my GH post. let's move all these questions/answers here so people can search without going through 5000 pages of text.
    If I did not reply to you, it mean the question you are asking is stupid.

  5. Thanks EthEth (1 members gave Thanks to GameHelper for this useful post)
  6. #4
    ilikejbl's Avatar Member
    Reputation
    1
    Join Date
    Jan 2024
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your tools are helping me a lot
    Thanks as always.

  7. #5
    ilikejbl's Avatar Member
    Reputation
    1
    Join Date
    Jan 2024
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by GameHelper View Post
    thanks, i have linked this thread in my GH post. let's move all these questions/answers here so people can search without going through 5000 pages of text.
    Your tools are helping me a lot
    Thanks as always.

  8. #6
    EthEth's Avatar Active Member
    Reputation
    58
    Join Date
    Aug 2016
    Posts
    86
    Thanks G/R
    61/45
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by GameHelper View Post
    thanks, i have linked this thread in my GH post. let's move all these questions/answers here so people can search without going through 5000 pages of text.
    Thank you! I will try to gather the most popular questions from the main GH thread when I get more time.

  9. #7
    tab1ta0000's Avatar Member
    Reputation
    1
    Join Date
    Jan 2018
    Posts
    9
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    srsly i need help with my 2 Tinctures on Num 2 & 3, i just want to trigger once using Vaal LS on Rares & Bosses please help me

  10. #8
    abnersajr's Avatar Member
    Reputation
    1
    Join Date
    Jan 2018
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried to identify but I couldn't find any specific animation for opening strongboxes. There is any condition which would be possible to trigger a skill when opening a strongbox?

  11. #9
    jusikapide's Avatar Member
    Reputation
    2
    Join Date
    Apr 2022
    Posts
    19
    Thanks G/R
    46/1
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is there a status effect for how many Skeletons I have currently summoned? I'd like it to auto re-cast them whenever they die.. I found player buffs but it is not in there

  12. #10
    itolol's Avatar Member
    Reputation
    1
    Join Date
    Aug 2024
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As I understand it, auto pumping of gems is not provided for?
    Last edited by itolol; 08-29-2024 at 04:15 AM.

  13. #11
    EthEth's Avatar Active Member
    Reputation
    58
    Join Date
    Aug 2016
    Posts
    86
    Thanks G/R
    61/45
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by abnersajr View Post
    I tried to identify but I couldn't find any specific animation for opening strongboxes. There is any condition which would be possible to trigger a skill when opening a strongbox?
    I don't know if there is a possible trigger for skill use on opening strongboxes. My approach would be: play smarter or trigger when stationary and there are X monsters around. But the latter is too general condition to be usable.

    Originally Posted by itolol View Post
    As I understand it, auto pumping of gems is not provided for?
    1. Wrong post - this one describes approach to automation
    2. If you are asking about GameHelper - no, GH does not auto-level up gems, try ExileAPI / PoeHelper

    Originally Posted by jusikapide View Post
    Is there a status effect for how many Skeletons I have currently summoned? I'd like it to auto re-cast them whenever they die.. I found player buffs but it is not in there
    In general - minions, totems, traps, mines, etc... are not buffs on character, but objects deployed by player. Each type of minion/totem is a separate "object" that you need to count. In case of GameHelper you need to use DEPLOYED_OBJECTS_COUNT condition. In example from the main post I wrote about balista totems - I included explanation how to find how many totems you have and how to set up the script. You should follow simmilar path and get something like this: DeployedObjectsCount[X] < 8, where X is object type coresponding to Sceletons.

  14. #12
    reciwoc101's Avatar Member
    Reputation
    1
    Join Date
    Jul 2023
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On GameHelper I'm trying to get cyclone to activate if an enemy comes in range but it's channeled. Is there any way to continuously use a skill? It seems to just quickly press the associated key.

  15. #13
    ragingdemon's Avatar Member
    Reputation
    1
    Join Date
    Jul 2018
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any idea how to release channeling skills at an specific stage? I'm using the condition PlayerBuffs.Has("snipe_stacks") and using cooldown to get to 2 stages so i can release 2 skills. The snipe_stacks buff has the stages attribute, is there a way to use it in a condition? something like stages > 1 -> press button.

  16. #14
    stacked's Avatar Member
    Reputation
    2
    Join Date
    Jan 2016
    Posts
    41
    Thanks G/R
    3/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyway to do something for Plague Bearer?

Similar Threads

  1. Replies: 27
    Last Post: 08-18-2012, 08:34 AM
  2. [Leet Guide] How to Make and script your own custom instance
    By mager1794 in forum WoW EMU Guides & Tutorials
    Replies: 33
    Last Post: 07-05-2008, 06:43 PM
  3. How-to Make Your Own Basic AntiAFK Bot With AutoIt
    By Toxik the Spammer in forum World of Warcraft Bots and Programs
    Replies: 13
    Last Post: 05-23-2008, 12:39 PM
  4. How to make custom items for your server! WITH PICS! [Noob friendly]
    By ',-Jurkey-,' in forum WoW EMU Guides & Tutorials
    Replies: 7
    Last Post: 03-29-2008, 09:54 AM
  5. How to make lua scripted portals
    By *Alexz* in forum WoW EMU Guides & Tutorials
    Replies: 9
    Last Post: 02-18-2008, 06:05 PM
All times are GMT -5. The time now is 02:26 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search