Need help sendKey function

Forum Forums Grids and Presets Need help sendKey function

This topic contains 5 replies, has 3 voices, and was last updated by  henlo 3 years, 4 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31950

    henlo
    Participant
    0

    Hey im trying to write a script that turns in white scrips. Im using F12 to target the furthest npc and deliver the collectables. After that i want to spend the scrips by pressing num4 to switch to the npc next to the appraiser. For some reason the target swapping with num4 is super inconsistent(it only works like 1 out of 4 times). I tried changing the keybind, several different delay timers and switching window modes, but I get the same result. All the other keys are working fine but the swap doesnt work, any ideas what i can do?

    #31954
    Lyfox
    Lyfox
    Participant
    0

    NPC switching with Num keys depends on characters and minions around you. If theres a puppy standing between you and the next NPC it will target the puppy first. Perhaps you can exclude players and minions with target filtering but ive never tried it myself so not sure it will work.

    #31993

    henlo
    Participant
    0

    Thats not the problem, I can easily disable other player/pet names. The problem is that the switch itself isnt working. It basically does nothing, when it runs e.g. “key(num4)”. No swap done plus its like i said really inconsistent working 1 out of 4 times

    #31998
    Lyfox
    Lyfox
    Participant
    0

    Ah i see. Then its probably because its not being registered without holding. Some actions must be held for at least one frame to trigger and sendKey() doesnt do any holding. Try holdKey() instead: holdKey(num4, 0.2)

    #31999

    derm
    Participant
    0

    I’m not 100% sure this works in your case but you can set a hotkey to target your Focus. If you set the Exchange NPC in your Focus and it doesnt reset inbetween runs you could use that. It does mean you would need to set the focus target at the start of each run tho.

    Alternatively i’ve used the NPCs in Eulmore and made 2 waypoints in a position where each of the NPC is clearly closest. Then you use waypoint(x) inbetween the turnin and exchange and just target the NPCs using F12.

    Actually i thought i can just attach my turn in scenario (its yellow scrips tho) and the edited Eulmore grid. Heres a paste if you just want to look it over: https://paste2.org/fd2jN5DD
    Maybe you can find something useful in there, i wouldn’t recommend running it though since i haven’t used it in ages. Can’t guarantee it still works.

    • This reply was modified 3 years, 4 months ago by  derm.
    Attachments:
    You must be logged in to view attached files.
    #32007

    henlo
    Participant
    0

    Ah i see. Then its probably because its not being registered without holding. Some actions must be held for at least one frame to trigger and sendKey() doesnt do any holding. Try holdKey() instead: holdKey(num4, 0.2)

    holdKey is working. Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.