Code review and Injection

Hey there,

I have two questions/issues:

  1. For my plugin, I want to level up the mastery once. Tried with injecting, for that I recorded
    the opcode and data for upgrading masteries with xPacketTool, however, it’s not working. Tried the code snipped from Not detected buff trigger by "then inject" condition - #12 by JellyBitz and tested with all EU masteries, but still same result. So, I’m assuming, it’s blocked by the software? Why is it not possible to inject mastery level up packet? @Ryan
    There is no “then” condition for in the conditions tab, so my only option, which I can think of is, to create a separate profile with 0 gap and start the bot, change back to original profile, delete that profile and stop the bot. Which, is messy. I also don’t want to start the bot until I’m finished with my routine, but using the auto level up with gap 0 requires starting the bot.

  2. I’m doing several code injections in my routine and I want to have a delay (that doesn’t block the GUI thread, or ingame) or wait for the previous task to finish. Currently, I’m using the Timer function from the threading library, but the solution is meh.

Timer(2, inject_joymax, [args]).start()
Timer(4, inject_joymax, [args]).start()
Timer(6, inject_joymax, [args]).start()
Timer(8, inject_joymax, [args]).start()
Timer(10, inject_joymax, [args]).start()

Doing the same at another position:

stop_bot()
use_return_scroll()
Timer(45, my_full_routine, ()).start() (30s return scroll duration + 15s buffer)
Timer(105, use_return_scroll, ()).start() (above routine is executed 4x => 40s + 20s buffer
Timer(150, start_bot, ()).start() (30s return scroll duration + 15s buffer)

You get the idea…
Any suggestions, on how to do it better? I mean it works for now, but I don’t like the hardcoded intervals, since with higher ping, all those injections would taker longer time and it would mess up the whole routine.

  1. Yes. There’s an exploit for that opcode on vSRO so it’s blocked.
  2. You could change it to do the next function after you receive a packet confirming that it did teleport.
1 Like
  1. Is there any other option I could do, besides the one mentioned with profile changing via plugin?
  2. How would I achieve that? For the opcode and data of the packet, I probably can just listen to server packets from xPacketTool and then listen to that with handle_joymax. Based on some additional booleans I would trigger my routine? What did you had in mind?