Jump to content

Jarl

Scripter II
  • Posts

    58
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by Jarl

  1. No, you can still use vnc but there's no reason for you to use centos 6 especially since you haven't set up anything yet.
  2. Centos 6 is already eol and you should either reinstall centos 7 or another os. Most likely, there is a panel and you just have to click a button to install another os. Also, I don't think it's a good idea to let someone else setup your server. Who knows what they could be doing on your server...
  3. There is no way that file doesn't exist. Anyway, it's not possible to tell how you got the null pointer exception with the code you are showing us. Most likely, some part of your code isn't null checking when dealing with widgets. But it could be something else too.
  4. There are other json libraries you can use, it doesn't have to be related to pusher. No dude, I think you misunderstood. The problem is not with the pusher code. Google gson user guide and look at the instance creator section. Your problem is with how you use gson.
  5. I think you may be better off using another library which doesn't use reflection. Also, I think you need to get used to reading the errors or trying to google the errors. Tbh, I had suspected the gson library might have been the problem because a while ago, someone else had problems with gson and osbot not allowing reflection. But anyway, read: java.lang.RuntimeException: Unable to invoke no-args constructor for class com.pusher.client.channel.impl.PresenceChannelImpl$Presence. Registering an InstanceCreator with Gson for this type may fix this problem. Maybe you need to make a no-args constructor. Or maybe something else went wrong but there's no way to tell as I cannot see your code.
  6. Maybe the permissions you get are different?
  7. So, I've never used pusher but I did some quick googling. This could have happened due to two reasons: 1. Your json is not parsed as string 2. Someone mentioned having problems with async calls (unlikely to be the problem) Or maybe there's some other reason that I didn't find with my quick googling. Anyway, try logging the response/type of the response. Maybe for some reason your response is a null. Or maybe for some reason the gson library did not work. Just some quick troubleshooting. If this doesn't help, you're gonna have to wait for someone from here who has experience or ask on github.
  8. Interestingly you mention an error many times but you don't show us what the error is... I think it's possible your problem is that your artifact does not have the dependencies in it. For example, if you're using maven for your pusher dependencies, you can't just build your artifact and expect the dependencies to come with it. You might need to configure maven to build an artifact with the dependencies. But then again, you need to show us your errors.
  9. Used servers can be pretty cheap as the people who sell them tend to have many of them and just want to get rid of them asap. Sometimes, these servers are are worth their price tag if you only counted the value of the ram. It would be very difficult to build a better pc (for botting runescape) for the same price. @Nbacon Afaik only the more expensive parts like cpu/gpu would be fake. They basically change the bios or something so it appears to be the right part on your computer. I doubt there's rebranded parts, but there's many shitty chinese brands out there. They are likely made from parts that failed QC for better brands. (Basically some factory had spare capacity and decided to make some cash on the side) So if you bought some ram for example, sure they are the real deal but they are likely to spoil eventually and you don't get warranty. (There are also decent chinese brands out there that are cheaper and aren't trash, but let's not get into that)
  10. It seems having many slow cores and high ram is more beneficial for botting. I would not recommend the x3440. Xeon E5 cpus should be the best option if you want to have LOTS of bots, and more likely than not you're better off getting used prebuilts instead of building your own. Also be warned, if you buy parts from aliexpress, there could be many problems. Eg. fake cpus, unbranded parts and many more
  11. In my opinion, you wouldn't learn much from looking at the source code of this script. You can, however, learn quite a lot from looking at this guide: I did have some experience with java before trying out scripting in osbot, but reading that guide helped me get used to the osbot api. From there, it becomes smooth sailing.
  12. Actually, I was thinking osbot api requires you to know the slots of equipment to check if something is equipped. I'm quite new to osbot and I admit I only skimmed through your code quickly. I did not know the api had a method to check the slot of equips but after looking at your code again I see I'm wrong I had thought of this, but I was thinking there is not much overhead with using osbot api to find items. It may theoretically take more but it is almost negligible because you are finding 28 items at most. I don't doubt your method is good and fast. But my thought was that using osbot api is not that slow. How are you taking 150s to find 28 items? In my mind I'm thinking even if your bank is full it is not a difficult task to find 28 items, though I must admit I had not tested my bank methods with a full bank. I don't know why java takes up so much memory, maybe it's a situation of linux ate my ram. When I make new instances of classes, I can use 10+ more MBs of ram although the plain text size is small. Maybe I am just not knowledgeable enough yet. Edit: Just wanted to add on, I had made a bank method recently so I thought this might be helpful for you. You can make an array of all the bank areas and if you are not in a bank you can use a stream and webwalk to a closest bank. I thought that was a pretty good idea because you can just put it into any script.
  13. If you're getting banned so fast I think it's more likely because of your bad vpn.
  14. This seems interesting but I feel like it's a waste of memory because the api can check for many of these properties. (stackable/notable etc) I feel like this might be useful for checking equipment slots, but outside of that it's not very useful. Or am I missing something?
  15. @Camaro @NbaconThanks for your code snippets! Both are interesting approaches and I will put both to the test to see how it really interacts. Sadly, it looks like you cannot do something asynchronously throughout a script, unless you prepare extensively for it which might be too much work.
  16. It's in the settings on the right sidebar. Go to the correct tab and enable dismiss randoms.
  17. Google "gson avoid reflection" First result on stack exchange should work, but I cannot guarantee you won't run into any other issues.
  18. I did some quick googling and I think the issue is with gson using reflection. My guess is osbot won't let you use reflection, so you can try to google how to use gson without reflection.
  19. That's interesting! I guess we were both thinking of gracefully pausing webwalk to eat/high alch/whatever and then resuming the webwalk immediately after. My naive solution would have been to "sleep" the main thread and continue executing the async thread, but I couldn't find a solution for that. Thanks so much
  20. @Nbacon@TokenThanks for your responses. I was actually thinking of doing a thread while webwalking or during combat. I understand both your threads would work, but from my experience, I had the main thread and the async thread competing with each other to control the mouse to do their thing. Eventually it works out, I was worried about the weird mouse interactions and something potentially not working. Another thing I was thinking of was potentially using a thread to handle other stuff like chat (good for async since it doesn't control the mouse?) and random events (which needs the mouse). Is there a way to pause everything else instantly, when the thread "detects" something? Thanks for this. A good read, though not very useful for osbot since you would rarely need more than 1 thread. I found it useful elsewhere though. Wouldn't this be similar to pausing the thread on exit/on pause/on resume?
  21. I've been trying to do asynchronous tasks by using osbot's event and setting it as async, and using a runnable class to start a new thread. It seems to work well but I have some questions to ask. How do you pause other tasks or sleep the whole bot while on an async event/thread? Is there a proper way to do garbage collection for these async events/threads? (Seems like you can start/pause them but no proper way to "delete" them. I think this becomes a problem if you stop/start the script many times)
  22. Afaik, runecrafting is a somewhat high-risk activity, and it's even more so in F2P. I would think this script is more suitable for getting some casual runecrafting levels in to prepare a starter account, and not meant for training runecrafting for long hours. (Since that should be done in P2P) I will consider making it not required, but I highly recommend you fill in a desired level and not bot non-stop. Thanks!
  23. private static final List<Position> PATH_TO_SEWER = Arrays.asList( new Position(3246, 3433, 0), new Position(3246, 3450, 0), new Position(3238, 3457, 0) ); You can put this at the top, inside the class but outside the methods. It is not a must but it is a good idea to follow java naming conventions. Constants should be declared in capitals.
  24. No. Your positions were too spread out. You need to make the positions closer for the part where the script keeps clicking on the same tile.
  25. Based on the logic, once you deposit, your inventory isn't full anymore so you go into mining state and the bot will move to the location without closing the bank. (I think it is good practice to close the bank though, it would be a pattern if you always close the bank by clicking on minimap to walk. (But this is assuming your code works) The problem was with you not using webwalk for the mining spot. This would not work. He needs getWalking().webWalk(miningspot) to generate a path to walk on. "walk()" only works if the location is close enough. Another solution is to manually make your path with a list of positions and use walkPath. Again, the guide I linked you to is really useful and could make your script better.
×
×
  • Create New...