Jump to content

Explv

Scripter II
  • Posts

    2315
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    100%

Everything posted by Explv

  1. @Evade > What is the best language to start with? Best first language is fairly subjective, and I don't really think there is a "best" first language. I would probably recommend starting with Python, just because the syntax is much simpler than other languages. I personally started with Java, the learning curve is, in my opinion, steeper than Python, but it isn't ridiculously difficult or anything. > If you do it as a job are you free lancing or do you work for a company? I'm working for a company, most people do at the start. You need to gain experience in the field before people will trust you as a freelancer. You can gain that experience by working for a company, or by having a significant portfolio of projects that you can show potential clients. > Do you have any general tips for someone looking into programming? Just keep putting in time. Programming itself is not particularly difficult, it just takes a long time to get good at, the same with any other skill. I think the general rule is 10,000 hours to master something right? Pretty much everything you need to know about programming can be found online, either in documentation, on blog posts, tutorial websites or StackOverflow etc. Just learn how to efficiently Google what you want to know, and you can easily answer all your questions. Once you have the fundamentals down, just start building stuff. The best way to learn is by trying to build something, getting stuck, finding the answer, repeat. Eventually you'll find that you start to get stuck less. Don't just stick to one thing, explore building web apps, mobile apps, desktop apps etc. etc. If you enjoy it, then think about taking formal education in Computer Science or Software Engineering. There is more to creating software than just programming, there's a lot to learn, so doing a formal course can be helpful.
  2. You don't need to download the source code, you can just go to the website: https://explv.github.io/
  3. Look at the API. https://osbot.org/api/org/osbot/rs07/api/Dialogues.html I would recommend using an IDE that handles imports for you.
  4. The MethodProvider class has a bunch of variables in it such as inventory, bank, etc. Your main class that extends Script (which extends MethodProvider) will have these variables set automatically when it is initialized, which is why you can access the OSBot API from onStart() or onLoop() without doing anything. However, when you create a class that extends MethodProvider and initialize it, those variables will not be automatically set. So you need to exchange the context (by calling exchangeContext(Bot bot)) between your instance that does have those variables set, and your other instance that does not. " public MethodProvider exchangeContext(Bot bot) Deprecated. For internal use only. This class and method can be used to create extensions to the API with full direct access to the OSBot 2 API within your extensions. If you create your own extensions you extend the API class or MethodProvider and if you want to provide the existing API components to your own extensions you override this method with a call to this method first by calling super.exchangeContext(bot) followed by the initialization of your own components on which you call this method on. Specified by: exchangeContext in class AbstractMethodProvider<Bot> Parameters: bot - The Bot instance. Returns: The instance of this API extension."
  5. Everything working for you now?
  6. Explv

    Explv's Walker

    Changes were released, let me know if you notice any more freezing. Edit: some changes have been released, some are still pending
  7. Will take a look at these issues asap Thanks
  8. Make sure the positions you are using are walkable, I just web walked from GE to the rune shop & back with no issues.
  9. Explv

    Explv's Walker

    Made some changes that will hopefully prevent freezing, will let you know when released
  10. Delete yourself
  11. Yeah fair enough, you don't need those for loops though, you can create a LinkedList<Position> like so: public static final LinkedList<Position> HILLS_PATH = new LinkedList<>( Arrays.asList( new Position(1, 2, 0), new Position(2, 3, 0) ) );
  12. The default min distance threshold is 3, and the default mini map distance threshold is 5 so I don't think he really needs to change those values. Also mini map distance threshold does not affect whether the player walks to the same position or not: "This method sets the property of this walking event that determines whether the next position you're walking to in the path from A to B will be walked to by using the mini map or the main screen. The next location you're walking to is not necessarily the destination of this event, but the next clickable position in the path from A to B. If the distance to the next clickable position is equal or higher than the mini map distance threshold, this event will walk using the mini map. If not, it will use the main screen. The default value of this property is 5." This is correct, can be simplified a little though (and you shouldn't create the LinkedList every time you want to walk) public static final Area HILLS_AREA = new Area(1, 2, 3, 4); public static final LinkedList<Position> HILLS_PATH = new LinkedList<>( Arrays.asList( new Position(1, 2, 0), new Position(2, 3, 0) ) ); public final void someMethod() { WalkingEvent walkingEvent = new WalkingEvent(); walkingEvent.setPath(HILLS_PATH); walkingEvent.setBreakCondition(new Condition() { return HILLS_AREA.contains(myPosition()); }); execute(walkingEvent); } If you don't need to use setBreakCondition or any of the other functions though, then this will do: private static final List<Position> HILLS_PATH = Arrays.asList(new Position(1, 2, 0), new Position(2, 3, 0)); public final void someMethod() { getWalking().walkPath(HILLS_PATH); }
  13. @RagBoys III Looks like the widget text and interaction text are incorrect, it should be "Hard leather" not "Hard Leather", and "Tan All" not "Tan all", the case matters.
  14. Thank you @ThatGamerBlue for adding some labels to the map https://github.com/Explttv/Explv.github.io/pull/3 Much appreciated!
  15. Updated to latest map revision
  16. isSlotVisible takes two different slots as parameters, the tab slot and the absolute slot https://osbot.org/api/org/osbot/rs07/api/Bank.html#isSlotVisible-org.osbot.rs07.Bot-int-int- Right now you are passing absolute slot for both of the parameters, which is incorrect. I don't think there is a public method in the API to get the tab slot, there is a private one though. You can try the following code: public boolean isVisible(int itemID) { return getBank().isSlotVisible(bot, getTabSlot(itemID), getBank().getSlot(itemID)); } private int getTabSlot(final int itemId) { int tabForItem = getBank().getTabForItem(itemId); if (tabForItem == -1) { return -1; } Item[] itemsInTab = getBank().getItemsInTab(tabForItem); for(int i = 0; i < itemsInTab.length; i++) { if(itemsInTab[i] != null && itemsInTab[i].getId() == itemId) { return i; } } return -1; }
  17. (☭ ͜ʖ ☭)
  18. Yeah, I guess they changed the boot message. I may be able to work some magic to call onStop. As a temporary workaround, if it's your own script, you could probably add something like Runtime.getRuntime().addShutdownHook(new Thread(() -> onStop())) to your onStart(). If you want to make changes you can just create a pull request and i'll take a look at it Will take a look
  19. Explv

    Explv's Walker

    Web walking does not support paths from and to every position on the map. If this issue occurs, you're probably standing in an unsupported location, or trying to walk to an unsupported location, and need to move your character somewhere else / select a different destination.
  20. Peace out
  21. Then why not post on their forum? Yes there are websites which you could use to lookup the name from ID for example http://www.itemdb.biz/ (may not support all items though) Not going to spoonfeed you a snippet to do it either
  22. ItemDefinition def = ItemDefinition.forId(id); if (def != null) { String name = def.getName(); } https://osbot.org/api/org/osbot/rs07/api/def/ItemDefinition.html#forId-int-
  23. IntelliJ built-in GUI builder is fine. Best way to do it is writing the code yourself though.
  24. NP, you can keep the 10m lol.
×
×
  • Create New...