Results 1 to 17 of 17

Thread: Python wrapped bot client

  1. #1
    Join Date
    Jun 2017
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Python wrapped bot client

    Hey all,

    After a couple years of using Simba, getting pretty fed up writing Lape, and now with some spare time I've decided to move all my dev to Python.

    I've already forked and fixed up a couple bugs in SMART as well as updated the Python bindings, but I'll be looking to translate a handful of more complicated functions (from SRL and Aerolib) over to Python. Initially I was going to just do it as a personal thing and screw most standards but SMART is already written in a nice cross compatible manor so if there is enough interest I could systematically translate those two libs and set up a more robust Python wrapper.

    The end goal would be allowing users to write scipts fully in Pythonic syntax with a couple imports and the same functions we're all used to.

    My main motivation for this was to break away from Lape syntax, the gruesome editor, and allow for a more expandable ecosystem. Once in python you could write meta libraries to manage multiple bots including when they run, what they run, even allowing for more complicated things like alternating scripts on one account (including moving to and from training areas).

    I'm just trying to gauge interest: if people want this I'll start and set up the github orgs and stuff required to allow other people to help, else I'll just do it quick and dirty but still link a github repo here.
    Last edited by Caccavale; 06-17-2017 at 09:19 PM. Reason: Wording

  2. #2
    Join Date
    Jun 2017
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Saving this for dev notes if this takes off.

  3. #3
    Join Date
    Apr 2016
    Location
    New Zealand
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    If you haven't seen this thread: https://villavu.com/forum/showthread.php?t=117590

    Post your stuff man, lots of people would probably like to take a look.

  4. #4
    Join Date
    Mar 2017
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Please post it there, I've loved Python for years now and am just checking out SRL, the barrier to entry for me would be far lower if I could write in Python instead. Let me know if there's any parts that you could use help with/general code review.

  5. #5
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Simba + Python has always sparked interest here on SRL, post the Github repo and I'm sure it'll spark some great discussions

  6. #6
    Join Date
    Jun 2017
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Oh awesome. The infrastructures built out already, now just to translate the ~3k lines of SRL-OSR to Python before its really useful.

    The code is on my github:
    username: caccavale
    repository: Joka
    github.com/caccavale/Joka

    Unfortunately I can't actually link it yet due to not having posted 5 times.
    Once I get a little more underway I'll put up a permanent thread for this. Any recommendations where on the forum that should go?
    My priorities as of now are to break away from having a static copied version of SMART and to check that I haven't broken windows compatibility yet.

    Edit: Worth saying that I mostly find OSRS interesting so those are the libraries I'll be porting over first.
    Last edited by Caccavale; 06-21-2017 at 10:15 PM.

  7. #7
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by Caccavale View Post
    Oh awesome. The infrastructures built out already, now just to translate the ~3k lines of SRL-OSR to Python before its really useful.

    The code is on my github:
    username: caccavale
    repository: Joka
    github.com/caccavale/Joka

    Unfortunately I can't actually link it yet due to not having posted 5 times.
    Once I get a little more underway I'll put up a permanent thread for this. Any recommendations where on the forum that should go?
    My priorities as of now are to break away from having a static copied version of SMART and to check that I haven't broken windows compatibility yet.

    Edit: Worth saying that I mostly find OSRS interesting so those are the libraries I'll be porting over first.
    Would we be able to use python libraries in the scripts? This would be the biggest advantage for me.

    I can help port over the SRL-OSRS code to Python if you like. I'll start that now actually.

    How do you intend to represent SRL data types? A lot of them (IE TpointArray) are really just Lists of Tuples in Python.

  8. #8
    Join Date
    Jun 2017
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Le_don View Post
    Would we be able to use python libraries in the scripts? This would be the biggest advantage for me.

    I can help port over the SRL-OSRS code to Python if you like.
    Yeah so thats the real goal. You'd have access to a roughly equivocal version of SRL-OSRS, and any python libraries / modules you imported.

    Right now I'm still building out how the SRL type libraries will be loaded: done a lot of flip flopping on the methodology to meet some goals I'd like. As soon as I finalize how it'll load stuff like SRL, I'll put up a project thread and give some instructions on how people can help translate stuff over.

  9. #9
    Join Date
    Feb 2012
    Location
    Portugal
    Posts
    91
    Mentioned
    3 Post(s)
    Quoted
    41 Post(s)

    Default

    I think @Bonsai tried to do this already. Not sure what happened to it tho
    https://villavu.com/forum/showthread.php?p=1357765

  10. #10
    Join Date
    Mar 2017
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Any updates on this? I'd be happy to help if you had some amount of work that you were able to chunk off.

  11. #11
    Join Date
    Jun 2017
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Sorry! I spent the weekend arguing with people and software about SMART. I ended up decided that SMART need to go.

    I've written an X11 display server wrapper and window manager in python: you can run any runescape client in it. Once I implement mouse and KB emulation it will appear to whatever client you're running that it's being manipulated by hardware peripherals. I'm writing, cleaning up and publishing that code first, then I'll implement it in Joka.

    It should completely remove any argument about client detection for our project (except maybe client meta data but we'll work on that). I'll be building this around being fully functional with the official client to avoid any other spooky rumors of bot detection. You could of course run another botting client within the sandbox I made but thats kind of like wearing a condom on your nuts and expecting it to keep you safe. Expect lots of internal debate if you want to work on this: measure twice cut once.

    I should make a post elsewhere in the forum about these two projects but I'm not one for forums and would hate to have two more places to respond to. I'm on the discord though, very active there. Username was Ook but I'll change it to caccavale tonight. I 100% want to segment it off but that won't start until I've fleshed out the core stuff -- or at least the design decisions behind them.

    Keep watching this thread, though. I'll update within the next two days.

  12. #12
    Join Date
    May 2012
    Posts
    499
    Mentioned
    23 Post(s)
    Quoted
    228 Post(s)

    Default

    Quote Originally Posted by Caccavale View Post
    Sorry! I spent the weekend arguing with people and software about SMART. I ended up decided that SMART need to go.

    I've written an X11 display server wrapper and window manager in python: you can run any runescape client in it. Once I implement mouse and KB emulation it will appear to whatever client you're running that it's being manipulated by hardware peripherals. I'm writing, cleaning up and publishing that code first, then I'll implement it in Joka.

    It should completely remove any argument about client detection for our project (except maybe client meta data but we'll work on that). I'll be building this around being fully functional with the official client to avoid any other spooky rumors of bot detection. You could of course run another botting client within the sandbox I made but thats kind of like wearing a condom on your nuts and expecting it to keep you safe. Expect lots of internal debate if you want to work on this: measure twice cut once.

    I should make a post elsewhere in the forum about these two projects but I'm not one for forums and would hate to have two more places to respond to. I'm on the discord though, very active there. Username was Ook but I'll change it to caccavale tonight. I 100% want to segment it off but that won't start until I've fleshed out the core stuff -- or at least the design decisions behind them.

    Keep watching this thread, though. I'll update within the next two days.
    Might be able to change your username on here though..
    Gl on the wrapper, would it also allow for RS3/NXT?

  13. #13
    Join Date
    Jun 2017
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Thomas View Post
    Might be able to change your username on here though..
    Gl on the wrapper, would it also allow for RS3/NXT?
    Yep. Any application.

  14. #14
    Join Date
    Mar 2017
    Posts
    32
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by Caccavale View Post
    Sorry! I spent the weekend arguing with people and software about SMART. I ended up decided that SMART need to go.

    I've written an X11 display server wrapper and window manager in python: you can run any runescape client in it. Once I implement mouse and KB emulation it will appear to whatever client you're running that it's being manipulated by hardware peripherals. I'm writing, cleaning up and publishing that code first, then I'll implement it in Joka.

    It should completely remove any argument about client detection for our project (except maybe client meta data but we'll work on that). I'll be building this around being fully functional with the official client to avoid any other spooky rumors of bot detection. You could of course run another botting client within the sandbox I made but thats kind of like wearing a condom on your nuts and expecting it to keep you safe. Expect lots of internal debate if you want to work on this: measure twice cut once.

    I should make a post elsewhere in the forum about these two projects but I'm not one for forums and would hate to have two more places to respond to. I'm on the discord though, very active there. Username was Ook but I'll change it to caccavale tonight. I 100% want to segment it off but that won't start until I've fleshed out the core stuff -- or at least the design decisions behind them.

    Keep watching this thread, though. I'll update within the next two days.
    So this wouldn't set off the hardware mouse flag?

  15. #15
    Join Date
    Jun 2017
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Not sure what you mean by hardware mouse flag, and I'm still working on the implementation of it but the goal is to have something that at the application layer is indiscernible from a real mouse.

    Implementation wise I'm not sure if I'll be writing to device files, injecting events into the XServer (not sure if this works?) or Xinput/ some other userspace mouse driver.

  16. #16
    Join Date
    Mar 2017
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Is there anything wrong with Pyautogui? Can't post a link as I don't have enough posts yet but a google search should show it pretty quickly.

  17. #17
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Quote Originally Posted by ebbitten View Post
    Is there anything wrong with Pyautogui? Can't post a link as I don't have enough posts yet but a google search should show it pretty quickly.
    PyAutoGUI offers nearly nothing more than basic mouse and keyboard control; very simple to recreate. It's not even remotely close to Simba, not really sure why it's even mentioned
    Last edited by slacky; 07-26-2017 at 10:20 PM.
    !No priv. messages please

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •