Jump to content

Vilius

Scripter II
  • Posts

    1495
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    100%

Everything posted by Vilius

  1. Vilius

    Fishing spot

    NPC spot = getNpcs().closest("Fishing spot"); Position pos = new Position(x,y,z); if(!spot.getPosition().equals(pos)){ //do stuff }
  2. Mmmm.... Seems like Ace has never heard of layout managers But to fix that try changing your screens resolution if you are using like a 4k monitor, that usually fixes it.
  3. Paste with comments to explain things. //we check if our inventory is full and we are in bank area. if (getInventory().isFull() && Banks.VARROCK_WEST.contains(myPlayer())) { //We are in the bank are, doing banking. //check if bank is open if(getBank().isOpen()){ //Bank open, we are depositing it getBank().depositAll(); }else{ //if bank is closed, open it. getBank().open(); } }else{ //We are walking to the bank area, because we are not in it. getWalking().webWalk(Banks.VARROCK_WEST); } Raw paste: Good luck
  4. What are your plans for it? :p
  5. This will withdraw a specific numbergetBank().withdraw("item", 5); This will withdraw all getBank().withdrawAll("item");
  6. Check your errors, if you have an x on your project or anywhere else in the code for that matter, look into it.
  7. Max 180x180px, an upload via url with a direct link.
  8. RuneScape has multiple entity types NPC's Objects GroundItems Determining which one to use is way simpler than people think. NPC's will have yellow name tags in game Objects will have blue name tags in game GroundItems will have orange name tags in game Now when it comes to declaring variables what should we use? For NPC's we would use the NPC class. Our code should look like this NPC npc = ... For Objects we would use the RS2Object class. Our Code should look like this RS2Object object = ... For GroundItems we would use the GroundItem class. Our code should look like this GroundItem item = ... Why would we shy away from using Entity class to define any entity from the game? Well simply put Entity is just an interface and it might not contain things needed to any specific Entity implementing classes. Like RS2Object will have getType() method but Entity will not. The main place to use Entity class is when we are passing it to a parameter of a method and making your own lets say interacting methods. We would use Entity in our parameter to make it accept any Entity type. public void interactCustom(Entity entity, String action){ if(entity.isVisible()) entity.interact(action); else getCamera().toEntity(entity); } Of course again there will come limitations, which are when you are making a method for getting the type of an Object and logging it. Having our code look like this will not work and give us an error. public void getTypeAndLog(Entity entity){ log("[Debug] objects type: " + entity.getType(); } So passing Entity to our parameter wouldn't give us the method getType() which RS2Object has, so we would need to have RS2Object in our parameter So we would need to have RS2Object in our parameter. And our code will work if he have it look like this public void getTypeAndLog(RS2Object object){ log("[Debug] objects type: " + object.getType(); } I hope this guide helped you understand the types of Entities and how to use them correctly
  9. And you said oop is useless ;)
  10. he said he wants to edit it, read the post pls
  11. You know that is harassment, do you?
  12. Look at local script section
  13. I'm just guessing that you dont have your ScripManifest @ScriptManifest ... class test extends Script{ } You will need to import it and add the methods. And post your code, people are glad to help others, no shame in what you have. We will give you tips etc.
  14. In that case... You firstly need to remove the auto log in event and then just register a new one when you need it.
  15. You cannot disable it and put it on the sdn, custom log in methods are prohibited as Alek said sometime before :P
  16. Thank you very much, exactly what I needed. Code for those who need it: private boolean isPointOnScreen(Entity e) { if (e != null) { ArrayList<Polygon> poly = GraphicUtilities.getModelMeshTriangles(bot, e.getGridX(), e.getGridY(), e.getZ(), e.getModel()); for (Polygon p : poly) { if (GraphicUtilities.MAIN_SCREEN_CLIP.contains(p.getBounds())) { return true; } } } return false; }
  17. So I want to get the visible points of an object, because sometimes doing isVisible() returns false although some points of an object are visible. I tried looking into the Model class of the api but didn't find anything useful to me. EDIT: I was guessing I could do something with getRasterizedPoints(), but the api doesn't tell what it really does
  18. Buying 10m 07gp via paypal post prices below and contact information
  19. I mean, osbot meetup but no speaking bout osbot/rs/gold farming
×
×
  • Create New...