Jump to content

jca

Members
  • Posts

    391
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Posts posted by jca

  1. 1 hour ago, liverare said:

    Just to clarify:

    • You've built your own login event handler that is ran onStart
    • This event is set to asynchronous with a timeout of 5000ms
    • If you fail to login, the script should stop
    • If you successfully login, the script should proceed to the onLoop
    • The onLoop firstly checks to make sure you're logged in

     

    If I've got this correct, then I don't think this is the right approach, because the onLoop will be called once onStart has been executed. You could block the onStart to delay the loop, but I would advise against it because onStart is only called once, and if there's a problem in its execution, the entire script would have to be restarted. Instead, I would handle all this within the loop; you can use a combination of boolean checks and timestamps to see where you are and where you should be:
     

    onLoop

    IF logged in

       DO stuff

    ELSE IF we have entered in our login details

       IF we have clicked the login button

          IF 5 seconds have passed

             DO stop script

      ELSE

          DO click login

    ELSE

       enter in login information

    Thanks for the reply... yeah the event is non blocking. The tricky part is I swap login details so the login event also listens to that. 

    I actually switched to your approach to test it and it is flawless now. Good to have confirmation of my thinking though! 

  2. 4 hours ago, Glaciation96 said:

    Cheers man! very helpful. I'll definitely look into that. Trying to successfully achieve this check through multithreading has been a rocky road lol, but really wanna understand/learn this.

     

    EDIT: Damn, I'm not getting any results for exchangeContext(). Is there another term for this method I can search up instead? 

    Check the API docs for the ref to exchangeContext() or do a quick Google search, there’s a lot of info around. 

    I’ve updated my original answer to demonstrate the call - I wrote it too quickly before and made a mistake, sorry! The code should work now. 

    • Like 1
  3. 8 hours ago, Glaciation96 said:

    Brilliant! I never would have figured that out myself... Just one class in a script can extend Script? I do wonder how people would just know this... Probably a principle for when you extend anything then?

    But that means I won't be able to use methods such as myPlayer().isAnimating() and the like from within my second class. Guess I've got to call all of that from inside my first class. Thanks! And yes, bad habit, it's good practice to keep checking my code frequently.

    That's why you've got handy methods like exchangeContext(). Basically you can extend MethodProvider from your second class then when you initialise it from your main class run secondClass.exchangeContext(getBot()); or alternatively pass the bot instance (getBot()) to your second class from the main class and run the exchangeContext(bot) method in the second class' constructor. 

    • Like 1
  4. 16 hours ago, Barrage Gaming said:

    That helps tremendously. This is the information i was looking for. Thank you so much. 

    How would i be able to get residential Proxies? Or a rotating one?
    What should i look for? I just want to make sure i look up the right thing. 

    I googled residential proxy, and it seemed the only things coming up were the dedicated servers, what you said would be from a data center. 
    I also see people speaking about running bot farms from local sources? IE libraries or other public computers?
    Do you have any knowledge/input on that? 

     

     

    Finding good proxy (residential and data centre) suppliers is difficult, that’s the bit where you need to do your own research. 

  5. This isn’t really a bug more of a question about how this could happen. 

    For example - I have a script, at the start of the loop there’s a function that checks if the account is logged in. 

    I have a login handler event that I execute in my onStart, in the constructor I setAsync(). In the  execute() method I return 5000; if the account is logged in, if not I log the account in without pausing the script executor (as the loop is checking the opposite condition).

    9/10 this login handler runs without interupping the main thread. Occasionaly it runs, the account logs in but the onLoop running on the main thread stops. 

    No errors in the log, nothing. Anyone ever experienced this before?

  6. Experiment, don't give up and find your own solutions. It takes time and energy to build the process. If you're burning accounts automate everything, if you're doing P2P then it's slightly easier but more downside as you have to get your bond cost back. 

    Learn to write code. Or you're going to have a pay a lot for private scripts. 

    • Like 1
  7. 29 minutes ago, Shmeekz said:

    yeah I use a rotating proxy too, then I do tutorial island on datacenter proxy and do hundreds with 5 datacenter proxies, they all get banned

     

    do you think if I use residential IP to actually do tut island  they wont be banned?

    You have to use residential, there's no other way. 

  8. I guess it would depend in each situation. Installing a keylogger on someones computer would be different to getting their login details with a form on a website. Either way it’s a dumb thing to do. 

  9. 8 hours ago, fcknbobfrank said:

     

    No need for a variable in the gui,  however a random 5-15 would be nicer than static 5.

    i think one of the most obvious bot things in this game is how quickly a bot reacts to a stimulus, you can tell pretty much all the fishing bots because as soon as a spot moves a huuuuge train of bots move too, real people are quite a bit slower

    thanks for the quick response and the current change, sorry i didn't respond sooner

    edit:
    ran the script a bit, on full inventory it  just stopped and spammed 

    
    [INFO][Bot #1][10/25 09:42:23 AM]: [Ljava.lang.StackTraceElement;@287894
    [INFO][Bot #1][10/25 09:42:24 AM]: [Ljava.lang.StackTraceElement;@1082e1b
    [INFO][Bot #1][10/25 09:42:24 AM]: [Ljava.lang.StackTraceElement;@1f2afdf
    [INFO][Bot #1][10/25 09:42:24 AM]: [Ljava.lang.StackTraceElement;@138a7f0
    [INFO][Bot #1][10/25 09:42:25 AM]: [Ljava.lang.StackTraceElement;@787db
    [INFO][Bot #1][10/25 09:42:25 AM]: [Ljava.lang.StackTraceElement;@650736

     

    That’s the thing about this, even without the custom delay it has a delay long enough to not react immediately. But now it has custom which works for all cases (none and longer). I would always fish on a 5 secs action timer. 

    As far as the bug - what were you fishing and where? I can look into it. 

     

×
×
  • Create New...