Jump to content

Explv

Scripter II
  • Posts

    2313
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    100%

Everything posted by Explv

  1. I made a little class that will hopefully deal with this ( not properly tested ) import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import java.util.Random; public class ClanChatter{ private Script script; public ClanChatter(Script script){ this.script = script; } public boolean notInClanChat(){ RS2Widget notInChat = script.getWidgets().getWidgetContainingText("Not in chat"); return (notInChat != null && notInChat.isVisible()); } public void openClanChatTab(){ script.getTabs().open(Tab.CLANCHAT); } public boolean isClanChatTabOpen(){ return Tab.CLANCHAT.isOpen(script.getBot()); } public boolean isInClanChat(){ RS2Widget talkingIn = script.getWidgets().getWidgetContainingText("Talking in:"); return (talkingIn != null && talkingIn.isVisible() && !talkingIn.getMessage().contains("Not in chat")); } public void joinClanChat(String name){ //RS2Widget enterName = getWidgets().getWidgetContainingText("Enter the player name whose channel you wish to join:"); RS2Widget enterName = script.getWidgets().get(162, 32); RS2Widget joinChat = script.getWidgets().getWidgetContainingText("Join Chat"); if (enterName != null && enterName.isVisible()){ script.getKeyboard().typeString(name); sleep(4000, 5000); } else if (joinChat != null && joinChat.isVisible()) clickOnWidget(joinChat); } public void leaveClanChat(){ RS2Widget leaveWidget = script.getWidgets().getWidgetContainingText("Leave Chat"); if (leaveWidget != null && leaveWidget.isVisible()) clickOnWidget(leaveWidget); } public boolean isInClan(String name){ RS2Widget talkingIn = script.getWidgets().getWidgetContainingText("Talking in:"); return talkingIn.getMessage().contains(name); } public boolean isOwner(String name){ RS2Widget owner = script.getWidgets().getWidgetContainingText("Owner:"); return owner.getMessage().contains(name); } public void talkInClanChat(String output){ script.getKeyboard().typeString(String.format("/%s", output)); sleep(1500, 2000); } private void clickOnWidget(RS2Widget widget){ widget.hover(); script.getMouse().click(false); sleep(1500, 2000); } private void sleep(int min, int max){ try{ script.sleep(new Random().nextInt(max-min) + min); } catch(Exception e){ script.log(e); } } }
  2. That's strange, it's worked for me every time. I'm sure there's still some bugs that need fixing in small places. I'm currently working on some new features, but will take a look at that straight after. Thanks for letting me know
  3. I think Tutorial Island is generally a banning hotspot. But don't worry i'm working on some more antiban stuff as we speak, update will be later today. Hopefully will improve
  4. Put it into the OSBot/Scripts folder, then reload OSBot
  5. Weird, I'll have to work on some nice antiban features
  6. Thank you I know you did! I used Divine Utility a lot, it's a great tool I made this so that I could add my own features that I thought would be useful
  7. Thank you I am willing to take this down if / when you insist
  8. I have changed it to used configs, but am using the Tutorial Island NPCs as a fail safe will try out your genius progress bar idea Just updated! Should be more reliable now, and the code underneath is certainly sexier, not that you can see it
  9. I know, it pains me how much simpler it is with configs . I'm updating it now, will release later today Yeah, there is a dubious rule about uploading free version of premium SDN scripts. This has already been taken down once, but I have been given permission to re-upload ( potenitally temporarily ). So here's hoping it stays!
  10. I actually uploaded this a few days ago, and it got taken down by a moderator, and they gave me some tasty warning points. I messaged them, and they said they weren't 100% sure why this rule is implemented and said I should re-upload, and they'll deal with it if anyone else complains Thank you for the tip though!
  11. Oh for real? Edit: It still works, but I will take a look into the configs, and hopefully produce some cleaner code for v 1.1. Thanks a lot Edit 2: God damn it's so much simpler with configs Edit 3: Re wrote all the code to use configs, its so much cleaner, and seems more reliable! Thanks again!
  12. - Solves the Tutorial Island from start to finish - Completes in 7 minutes - Generates a random character each time - Can be started from any point - Turns off music and sounds ............................................................................. Download Link: https://github.com/Explv/Tutorial-Island/releases/latest
  13. Thank you for your feedback There were a few reasons why I made this: - Divine utility only lets you make a Position[], i like to have Lists sometimes too - When creating an area with Divine utility it maps the tiles once you have clicked, but doesn't display the area whilst you are moving the mouse, I thought it would be easier to see what you are doing if it does this. - I plan on adding some fancier features in the future. But I did just add a copy to clipboard button, I don't know if you saw that? The content is put into a text box, it just has user input disabled, as any changes made to that code, wont have an affect on the displayed areas ( for now ). I will implement that soon
  14. Explv's Location Assistant A new Path and Area visualiser with code generator to make your life easier Output code is editable! Copy and paste your existing paths and areas, or modify generated code and see your changes live. Download Link: Now on the SDN. ( Feedback, requests and bug reports are all welcome! ) Supports both path and area creation: And various output types:
  15. Thanks a lot! I've got it: if ( position.isOnMiniMap(getBot()) ){ MiniMapTileDestination miniMapTileDestination = new MiniMapTileDestination(getBot(), position); g.fill(miniMapTileDestination.getBoundingBox().getBounds2D()); }
  16. Struggling to figure this out, I know how to paint a tile on screen, but I am not sure how to paint the same position on the mini map. Can anyone help with this? Thanks
  17. Something like this maybe? public class BonesToPeaches{ private Script script; private static final int peachId = XXXX; private static final int bonesId = 526; private static final int bonesToPeachesTabId = 8015; public BonesToPeaches(Script script){ this.script = script; } public void convertBonesToPeaches(){ if ( hasTabRequirements() && hasTab() && !playerIsBusy() ){ useTab(); } else if ( !hasScriptRequirements() ) { script.stop(); } } private boolean playerIsBusy(){ return script.myPlayer().isAnimating() | script.myPlayer().isMoving(); } private void useTab(){ script.getInventory().getItem(bonesToPeachesTabId).interact() } private boolean hasTab(){ return script.getInventory().contains(bonesToPeachesTabId); } private boolean hasTabRequirements(){ return !script.getInventory().contains(peachId) && script.getInventory().contains(bonesId); } private boolean hasScriptRequirements(){ return script.getInventory().contains(peachId) && script.getInventory().contains(bonesId) && hasTab(); } }
×
×
  • Create New...