Everything posted by Isolate
-
Two quick questions
as for the dropping you could try something like: void dropAllExceptA(String...names) throws InterruptedException { if(Tab.INVENTORY.isOpen(this.bot)){ for(int i = 1; i < 29; i++){ Item item = inventory.getItemInSlot(i); if(item != null && !item.getName().equals(names)){ item.interact("Drop"); sleep((long) random(0, 0)); } } }else{ tabs.open(Tab.INVENTORY); sleep((long) random(0, 0)); } } void dropAllExceptB(String...names) throws InterruptedException { if(Tab.INVENTORY.isOpen(this.bot)){ Item[] items = inventory.getItems(); if(items != null) { for (int i = 0; i < items.length; i++) { Item item = items[i]; if (item != null && !item.getName().equals(names)) { item.interact("Drop"); sleep((long) random(0, 0)); } } } }else{ tabs.open(Tab.INVENTORY); sleep((long) random(0, 0)); } } i dont actually know if there's alot of difference between the methods but you could alter the length of sleeps to make it quicker Yes i wrote 29.
-
FREE Script tester. ;)
You know. i totally didnt gather it was meant to be dirty until you specified. that bit about your personal pleasures being satisfied followed by a wink, went straight over my head. thanks for clarification.
-
ERROR when starting script?
I feel like something is wrong here. edit: i'm assuming you removed something before posting the script, a few lines somewhere, otherwise that error makes no sense
-
How can I store multiple areas in one array?
Gave me a fun idea. Whats better about an enum compared to having a list of areas in a separate class?
-
Feeling bored
that'd require me to make an account and pay for membership :P all my past scripts i could make using logic and not need to waste my money
-
How can I store multiple areas in one array?
Reuse in which way, more than one time in the same script or across multiple?
-
How can I store multiple areas in one array?
Well i don't see the point in coding more than you have to... Sure this: public enum Location { //your pre-definding the value of whatever you need. AREA_ONE(new Area(3092, 3246, 3095, 3240)), AREA_TWO (new Area(3215, 9623, 3219, 9620)), AREA_WHATEVER_YOU WANT (new Area(3207, 3220, 3210, 3216)), ; //these are the private fields you pre-definded private Area area; //constructor add what values you need to pre-define private Location(Area area){ this.area = area; } //these are simple getter methods. //setter method arent allowed because the values are pre-fined so they are basically static. public Area getArea(){ return this.area; } } Looks great and all but why when Area AREA_ONE = new Area(3092, 3246, 3095, 3240); Area AREA_TWO = new Area(3215, 9623, 3219, 9620); Area AREA_WHATEVER_YOU_WANT = new Area(3207, 3220, 3210, 3216); Would do the same thing or even storing it it a lil nooby class like public class Areas { static Area AREA_ONE = new Area(3092, 3246, 3095, 3240); static Area AREA_TWO = new Area(3215, 9623, 3219, 9620); static Area AREA_WHATEVER_YOU_WANT = new Area(3207, 3220, 3210, 3216); } would do the same thing It might just be me being super lazy but i see no point in over complicating the situation Someone plz enlighten me.
- Al alkarid script
-
Feeling bored
I can see alot of threads for magic scripts, do none of them work? :P
-
Feeling bored
Should have chosen better wording
-
Feeling bored
Want to see if i've still got it. Give me something simple i can play with please
-
anitban system concept
Yes, but the problem here is how to stretch out the time before anything repeats :3
-
Hi
Soo.... Where'd Everyone Go..... Serisouly..... This place is ded 6 people commented on my thread, and none are h8, something is wrong.
- Hi
-
Hi
Well this place has gotten kinda quite hasn't it
-
Wizard Tower Lesser Demon Fighter
What's grammar 0.0
-
Need Help With First Script
Did osbot loose the ability to interact with widgets? + the lack of checks is intense
-
How would I get the Z coordinate..?
If for some reason or another the debug option 'location' doesn't show z/Plane. you could always:
-
How would I get the Z coordinate..?
Does player location debug show it? or you could just make a script to log it or draw your coords on the screen.
-
Display Area
Oh I seee. would be same result though no?
-
Display Area
I thought that's what you wanted? Feels easier.
-
Display Area
Ffs, editing post on my phone just fucked up te formattiñg, I'll be home in two hours to fix
-
Display Area
Sorry if this is wrong, had < 5 to do it. you get the gist though... fix and use: Position[] areaBounds(Position tile1, Position tile2){ List<Position> tiles = new LinkedList<Position>(); //TOP if(tile1.getX() > tile2.getX()){ for(int i = tile1.getX(); i != tile2.getX(); i--){ tiles.add(new Position(i, tile1.getY(), tile1.getZ())); } }else if(tile1.getX() < tile2.getX()){ for(int i = tile1.getX(); i != tile2.getX(); i++){ tiles.add(new Position(i, tile1.getY(), tile1.getZ())); } } //Side 1 if(tile1.getY() > tile2.getY()){ for(int i = tile1.getY(); i != tile2.getY(); i--){ tiles.add(new Position(tile1.getX(), i, tile1.getZ())); } }else if(tile1.getY() < tile2.getY()){ for(int i = tile1.getY(); i != tile2.getY(); i++){ tiles.add(new Position(tile1.getX(), i, tile1.getZ())); } } //side 2 if(tile2.getY() > tile1.getY()){ for(int i = tile2.getY(); i != tile1.getX(); i--){ tiles.add(new Position(tile2.getX(), i, tile2.getZ())); } }else if(tile2.getY() < tile1.getY()){ for(int i = tile2.getY(); i != tile1.getX(); i++){ tiles.add(new Position(tile2.getX(), i, tile2.getZ())); } } //bottom if(tile2.getX() > tile1.getX()){ for(int i = tile2.getX(); i != tile1.getX(); i--){ tiles.add(new Position(i, tile1.getY(), tile1.getZ())); } }else if(tile2.getX() < tile1.getX()){ for(int i = tile2.getX(); i != tile1.getX(); i++){ tiles.add(new Position(tile2.getX(), i, tile2.getZ())); } } //convert list to array, return array or convert constructor to list return null; }
-
hello im new to botting and i could use some help =p
I must be missing something, what did you need help with?
-
WorldHopper Question
Good to see someone else finally bothered to make one of these.