-
Posts
157 -
Joined
-
Last visited
-
Feedback
0%
Posts posted by roguehippo
-
-
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
-
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"
-
just came here to say gratz on the release juggles, you are an insperation!
- 1
-
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
-
Why Script and not Bot?
Bot getMethods() returns MethodProvider
is Bot a type? how do i use it to get the method i need? sorry i havent used it before
-
Just a shot outta the dark... but are you initializing your GUI before the player is logged in?
umm i think the player is ussually logged in but this happens no matter what
I had the same issue when making my script.
Read this thread
http://osbot.org/forum/topic/104466-grabbing-myplayers-start-area-with-gui/
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()?
-
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. -
uploading it to imgur instead of from file form seems to have done the trick thanks
-
when i try to change my profile picture it wont let me i find the jpg but nothing ever pops up
-
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
-
I am creating a fighting script that i hope to release soon and want to know what way to code my gui.
-
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 workingMethodProvider m;public Gui(MethodProvider m){this.m = m;} -
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
-
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
-
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.
-
i forgot about onPaint... i havent coded in like all summer. my b
public class GodWarsDungeon extends Script { private Position position = new Position(0,0,0); // obviously have the correct co-ordinates //in your onPaint do this @[member='Override'] public void onPaint(Graphics2D g) { g.draw(position.getPolygon(bot)); }
The reason why graphics did not resolve was because by default your onPaint(Graphics2D g) is set at g so you can change that to whatever you want :P (the g part)
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);}}} -
i have no idea
graphics.draw(position.getPolygon(bot))
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?
-
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 workingMethodProvider m;public Gui(MethodProvider m){this.m = m;} -
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.
-
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.
-
I usually spam the Scripting Help topics faster than this, the isUnderAttack() and isFighting() methods are a bit vague in my opinion and they aren't exacly what scripters expect, same for getInteracting() as when you stop interacting you are still in combat. There is, however, a more reliable method, namely Character#getCombatTime(). You will have to work with client cycles instead of raw time and instead verify for a given diference in client cycles since last hitsplat which determines if a given Character (don't forget Player extends Character, not only NPC). I know this works for ranged and melee which always yield a hitsplat onhit therefore updating the combat time of that Character instance. For magic however (range too if you want maximum accuracy), you can rely on the Projectiles class. If a projectile is sent from a Character, means that Character is definately attacking someone and their target is locked in combat.
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!
-
-
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.
- 1
-
I was bored
wow! thank you explv! you are as helpful as ever
Definition of Area not working?
in Scripting Help
Posted
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.