Everything posted by roguehippo
-
Better way to detect when in combat?
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.
-
How to tell if there are none of a certain item in an area?
wow! thank you explv! you are as helpful as ever
-
How to tell if there are none of a certain item in an area?
i basically just need to know how to return a true if there are no "Logs" (or whatever item) in a given area. or if it would be easier if there are just no grounditems in an area at all, but this may cause future problems.
-
Getting information about myPlayer from the gui class
i dont quite understand what you mean by passing around a reference to the script class. how would i reference it? and are you talking about my main class?
-
Getting information about myPlayer from the gui class
Basically, what the title says. I was wondering how i am supposed to get live data like myPlayer().getPosition from a different class than main like from a gui. thanks
-
how to use an arraylist.
Im posting here just so anyone else that has this problem can hopefully find the answer. After looking on many forums i found out the problem was actually due to an import mistake. i accidently imported like java.awt.List instead of java.util.List. -___-
-
how to use an arraylist.
i guess something else is wrong because im still getting null pointers when i do anything with the grounditem
-
how to use an arraylist.
thanks so much for getting back to me i didnt know that initializing it in this specific way was necesarry or even made a difference. is it easy to explain why this makes a difference? (i just want to make my future coding as good as possible)
-
how to use an arraylist.
here is the code for my gui. http://pastebin.com/HUNyAuFY the adding of the strings when the loot button is pressed is at line 281. here is my main code. http://pastebin.com/HsuELXZi the looting functions are at the bottom thanks
-
how to use an arraylist.
Hello forums, just a note before i start, i try to look up the answers for my questions on google before i come here to ask, and ive been trying for hours to get this to work to no avial. anyways, i have an arrayList of strings for a loot list (or atleast i think i do, every time i try to log the contents i just get a null pointer). anyways. im trying to turn the arraylist into an array so i can use it to find the closest ground item. here is my current function to determine if i should loot a stackable item. http://pastebin.com/rgxNpPbf the arraylist is transfered from an arraylist from the gui using this.(which is called in onStart() ) if(gui.UseLooting) { log("setting looting shit"); UseLooting = true; LootListStackable = gui.StackableLootList; LootListNotStackable = gui.NonStackableLootList; log("DISPLAYING LISTS"); // log(gui.StackableLootList.size()); //log(LootListStackable.size()); commented out because they both caused null pointers } the arraylists are declared in the gui like so public ArrayList<String> StackableLootList; and contents are added to the list in the gui when a button is pushed like so StackableLootList.add(LootToAdd.getText()); i literally have no idea why i get a null pointer whenever i try to do anything with the array lists in my main code. please help
-
Best way to get info from gui?
thank you everyone, i didnt know that i could use action listoners for the exact thing i was trying to do.
-
Best way to get info from gui?
hello, i was wondering what the best ways to get info (like if a checkbox is checked or if a button is selected) from the gui. the reason i ask is because i have run into a couple problems. what i have tried so far: if i use a statement to check like if(gui.button.isSelected) the button never shows up in the "gui." pop up menu. and if in the gui class i try to make a function to get the details of an item it doesn't allow me to access the variable. can anyone explain how to correctly get the information from the gui. thanks!
-
weird thing happening with gui not showing up correctly.
The problem was that i hadnt set the default size yet. thank you everyone
-
weird thing happening with gui not showing up correctly.
Hey, so while attempting to make my gui i have encountered a problem. when i call the gui to appear using gui.setvisible(true) I get a weird version where nothing pops up but it says that there is an open window in my open programs bar thing (picture for reference, the gui is the thing on window on the right). my Gui class is named "Gui" and is in the same package as the main class. i also call it by using "public Gui gui = new Gui();" at the top of main before onStart() in onStart the gui is set to visible with: "gui.setVisible(true);" its weird because i use the gui the same way i did in other scripts and it worked fine there. just wondering if anyone else has had this weird problem.
-
Adding a value to a jTable (GUI help)
Hey there, so im making a fighting script and im trying to make a method for creating a list of items to pick up that the user can put in. the problem im running into right now is that i beleive im doing everything right but on the button press it doesnt add anything to the table. This is my current code. http://pastebin.com/rKUbk6Kz this is how the gui looks if a visual is needed.
-
RQ Wine Drinker & Filler
it takes all the wine out of the bank in the ge and then just sits there after this message [ERROR][bot #1][05/13 06:04:54 PM]: Error in bot executor! java.lang.NoSuchMethodError: org.osbot.rs07.event.WebWalkEvent.<init>(Lorg/osbot/rs07/api/webwalk/INodeRouteFinder;Lorg/osbot/rs07/api/map/Position;)V at rq.winedrinkerfiller.Main.g(n:319) at rq.winedrinkerfiller.Main.onLoop(n:66) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(lk:242) at java.lang.Thread.run(Unknown Source)
-
Perfect Fighter AIO
wow, i thought i was trying to make a nice fighting script with a good amount of options but this just takes it to the next level. this looks amazing! i hope i can buy it some day
-
Al-Karaid - Gold Amulet Crafter // 140K-180K HOUR!, Limited Time!
would really like to try this if it still works!
-
Creating a filter for ground items
Hello forums, I am trying to figure out how to either use a type of filter that will work with GroundItems. or a way to get all of the closest GroundItems inside of a certain area During the initialization of the ground item. thanks
-
All the best ways to walk and tips for walking.
Its no problem i should have been more specific! ill have to look into iNodeRouteFinder, it shouldnt be too hard right?
-
All the best ways to walk and tips for walking.
okay yea i didnt know, but kinda guessed, that walking event works only in the loaded areas. and i think WebWalkEvent is exactly what i needed, ill try to implement it, but what does it take in? and do i have to create like a web or something for it to work? paths seem like a simple and efficient way to do things but im trying to make something that walks from anywhere to a certain spot and i dont think i would be able to do that.
-
All the best ways to walk and tips for walking.
Thanks! see i was stuck on using non supporting shoes meant for Skateboarding. would i have to create anything related to walking or webwalking or if i just put in an area it will walk to that area from anywhere
-
All the best ways to walk and tips for walking.
so i am trying to make some of my own scripts and maybe upload them for people to use, but i feel like i need to update the way i walk. i currently use walking events which i think is pretty good, but i dont really know how to walk long distances or how to find out where my current position is compared to everything else to know what to do next. so if anyone can give me any tips for walking through runescape long distances or better in general, that would be awesome!
-
how and when to use filters with npc's
hey there guys. im trying to learn how to use filters when defining an npc, mostly to find the closest npc that has a specific name, and is inside of a certain pre-defined area. my current code is: public boolean ShouldAttack() { NPC monster = npcs.closest(n -> ( !n.isUnderAttack() && n.getName().contains(g.name) && (g.monsterArea.contains(n) || g.monsterArea2.contains(n)) )); log("attacking"); if(monster.exists()) { log(monster.getName()); log(monster.getCurrentHealth()); if(g.safespot.contains(myPlayer()) && !myPlayer().isAnimating()) return true; } return false; } and returns a null pointer error whenever i do anything with monster. as im testing this the monsters are in the area and it should be returning true. the g.xxxx are just my global variables. initialized like so. public static class g { static Area safespot = new Area(3154, 9908, 3153, 9908); static Position SafeSpot = new Position(3154,9908,0); static String name = "Moss Giant"; static String ammo = "Iron arrow"; static String food = "Tuna"; static boolean shouldsafespot = true; static Area monsterArea = new Area(3155,9907,3159,9906); static Area monsterArea2= new Area(3157,9905,3160,9901); static String lootlist[] = {"Coins", "Law rune", "Nature rune", "Chaos rune", "Chaos rune" ,"Earth rune", "Air rune"}; }
-
Checking numbers of items in a stack
what do you mean by null check.