Jump to content

roguehippo

Members
  • Posts

    157
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by roguehippo

  1. Hello all after a bit of a break from coding to due finals and stuff I am back practicing scripting. I am trying to Define an area and it just says that "The method Area(int, int, int, int) is undefined for the type main". the exact line is just this: public Area AreaName = Area(2582,9493,2594,9484); i'm starting to wonder if the constructor for Area has been changed since i last used it. am i doing something wrong.
  2. but would getDialogues().clickContinue(); use the mouse curser to do this, i already have this implemented and i wanted to make it faster by using space bar
  3. i was just wondering what the code would be for skipping a dialogue with the space bar instead of having to click on "click here to continue"
  4. just came here to say gratz on the release juggles, you are an insperation!
  5. anyone know the ban rate on the balloon method or this script in general? can i get a trial? will be looking to buy if all works properly
  6. is Bot a type? how do i use it to get the method i need? sorry i havent used it before
  7. umm i think the player is ussually logged in but this happens no matter what ohh i think thats exactly what my problem is, i have to pass "script" in with the gui? is that as simple as just adding in the Gui(Script script) instead of gui(). How should i add the script into the gui when im calling it from onStart()?
  8. hey guys, im having a bit of a problem when it comes to accessing the players information from inside of the gui class. currently it gives me a null pointer when i use something like myPlayer().getPosition even though i have called MethodProvider m; public Gui (MethodProvider m){ this.m = m; } the exact code causing a problem is here: FightArea = m.myPlayer().getArea(Integer.parseInt(TileRadius.getText())); its just making an area with a defined radius from a textfield.
  9. uploading it to imgur instead of from file form seems to have done the trick thanks
  10. when i try to change my profile picture it wont let me i find the jpg but nothing ever pops up
  11. i was thinking that, should i just take requests on what items to put in them when the time comes but now that im implementing it, i see that for ammunition like arrows theres so many arrows and bolts, then multiply it by 3 because of poison and add more because of all the enchanted bolts it would just be easier for the player to enter whatever they are using
  12. I am creating a fighting script that i hope to release soon and want to know what way to code my gui.
  13. my gui class seems to not be able to use myPlayer().getlocation effectively because i always just get a null pointer when the code executes. this is the snippet of code JButton SetSpotButton = new JButton("Set Safe Spot"); SetSpotButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { if(CustomSpotButton.isSelected()) { SafeSpot = m.myPlayer().getPosition(); } } }); if the button is pressed and a checkbox is checked to use the method then it tries to save the tile i am standing on. also my "m" is a global in my gui so i dont know why its not working MethodProvider m; public Gui(MethodProvider m){ this.m = m; }
  14. in the gui design window i test it and it looks fine but it wont work on osbot i tried giving the object more room and making the panel bigger but it wont work is there a max height osbot lets a gui be? edit 2: ive been messing with some stuff and when changing the layout of the Food Bank panel makes different amount of boxes show up for each layout. is there a way to fix this edit 3: after removing the "eat at" label and the percent typing box it magically works. on to the next problem
  15. just got back from classes, @saiyan what do you mean by extending the panels im just a bit confused. these problems occurred after i tried to add the "eat at %" here is the code : http://pastebin.com/wSygaX3m
  16. hello, i have recently run into a problem with my gui not showing up and i cant seem to find out why. i dont really know where it is breaking because there are no errors. i was wondering if anyone has experienced this or would know what is going wrong. here is what it looks like now https://gyazo.com/dc5a3afa0fda0b0ba8488cbba0283130 here is what it is supposed to look like https://gyazo.com/1780f74135709cc60879262acd86477f and here is what it looks like in eclipse windows builder (what im using to make it all) https://gyazo.com/3be9359f67b70ee409933ee5963dc488 i havent really made too many changes to the gui code by hand so i dont know what the problem could be. sorry if my details are too vague it also stops my program from ever starting.
  17. i forgot about onPaint... i havent coded in like all summer. my b this is a function i made to color the tiles of an area. im wondering if this is going to work, the only thing im worried about is it had me automatically set g2 = null. does it have to be something else? i havent tested it yet public void drawArea() { if(gui.ShowOverlay == true ) { Graphics2D g2 = null; g2.setColor(Color.WHITE); log("drawing tiles"); for(int i = 0;i < FightArea.getPositions().size(); i++ ) { Polygon poly = FightArea.getPositions().get(i).getPolygon(bot); g2.draw(poly); } } }
  18. i have no idea hey frost, thanks for the help, but it still says that "graphics" cannot be resolved do i have to import a source into my script?
  19. what is the best way to highlight a tile. im trying to iterate through a list of positions but when i try to use g.drawPolygon (as suggested by other threads on the forum) it just gives me a red underline and sys drawpolygon is undefined. did they change how tiles are highlighted? thanks! edit for visibility of the real problem i need help with still --------------------------------------------------- my gui class seems to not be able to use myPlayer().getlocation effectively because i always just get a null pointer when the code executes. this is the snippet of code JButton SetSpotButton = new JButton("Set Safe Spot"); SetSpotButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { if(CustomSpotButton.isSelected()) { SafeSpot = m.myPlayer().getPosition(); } } }); if the button is pressed and a checkbox is checked to use the method then it tries to save the tile i am standing on. also my "m" is a global in my gui so i dont know why its not working MethodProvider m; public Gui(MethodProvider m){ this.m = m; }
  20. What the title says basically. i was wondering if it is possible to calculate the inventories value based off of ge prices of the items.
  21. To describe the problem i have right now, my bot is supposed to walk somewhere and then do an action. it works fine apart from the fact that it has to finish the webwalking event and then after stopping for a second it then does the action. What im trying to do is have it do the action around 5 - 0 tiles away from the object. i even have the webwalking event inside a while loop "while(myPlayer().distance from object is greater than 5" yet it still waits for the whole event to finish. i was wondering if it is possible to stop the event around when in a certain distance from the point it is walking to.
  22. i will definitely look into the more in depth way instead of just using underattack as you are right they are a bit vague. thanks for the responce, hopefully i can make my script as perfect as possible for the community!
  23. i dont really know if this is the right like place to put this but i think there is a problem with the webwalking in taverly dungeon because it jsut walks back and forth when trying to leave the dungeon. i attached a gif of the bot getting stuck on the map
  24. I was just wondering if there was a better way to detect if i am in combat because when using if(myPlayer().isincombat) it will detect it most of the time but if i am not getting attacked ,like if i was in a safe spot, than it doest really work that well.
×
×
  • Create New...