Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • morten1ela

    VIP
    • Posts

      10
    • Joined

    • Last visited

    About morten1ela

    Recent Profile Visitors

    731 profile views

    morten1ela's Achievements

    1. Oh wow I didn't know that. I don't plan on ever releasing my scripts to the SDN (partially because I suck at coding), so I guess I won't have to deal with that.
    2. I strongly dislike grabbing an image from the internet rather than just plopping it in your source directory and grabbing it as such: private Image getIconImage(String iconPath){ try{ return ImageIO.read(getClass().getResourceAsStream(iconPath)); } catch (IOException e) { e.printStackTrace(); } return null; } Is there any reason not to do this? I've seen many snippets where the image is grabbed from a URL. Just curious as to why.
    3. While it seems you've gotten it to work, I'd suggest forgoing the whole custom SlashNode class thing. All you really need to do is this: EntranceWebNode c1_s = new EntranceWebNode(cave1_start, "Cave entrance", "Enter"); cave1_start is the Tile, "Cave entrance" is the entityName, "Enter" is the action. To adapt this to your case: private static final Tile web_tile = new Tile(3210, 9898, 0); EntranceWebNode web = new EntranceWebNode(web_tile, "Web", "Slash"); You can then make the connections. I'm also not a fan of how you're hard coding the connection between your custom path to the global nodes. Here's an example of how I've done it: p6.getEnd().addDualConnections(WebFinder.getWebFinder().getNearestGlobal(p6.getEnd().getTile(), 10)); Since you only have one node, you can specify the tile in getNearestGlobal to be a tile close to the global node you want. This way, if the nodes numbering ever changes, you won't have to go in and change it manually. To adapt this to your case (these are the real tiles I grabbed from Expliv's Map): private static final Tile north_tile = new Tile(3210, 9903, 0); private static final Tile south_tile = new Tile(3210, 9894, 0); web.addDualConnections(WebFinder.getWebFinder().getNearestGlobal(north_tile, 10)); web.addDualConnections(WebFinder.getWebFinder().getNearestGlobal(south_tile, 10)); Finally, add the node: WebFinder.getWebFinder().addWebNode(web); Last comments: You can add the web nodes in onStart(). I'm not sure why you'd want to add them at the leaf instead of onStart().
    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.