-
Posts
479 -
Joined
-
Last visited
-
Feedback
100%
Everything posted by HunterRS
-
That is exactly what I explained how to do... FileOutputStream Fwrite=new FileOutputStream("Confidential1.txt") ; int input=0; Scanner scanner = new Scanner (System.in); System.out.print("Which file do you want to copy? "); String name = scanner.next(); System.out.print("Where do you want the file to be copied? "); String fileName = scanner.next(); FileInputStream Fread =new FileInputStream(fileName); scanner.close(); pretty sure it is a HW assignment
-
You want to define Fread after the scanner and inplace of "Confidential.txt" you will want to give it your new file location that you recieved from the user(after you ran all of the needed checks on the input).
-
Huge vouch! made me a great logo for my script. Fast and cheap!
- 69 replies
-
- graphics
- signatures
-
(and 1 more)
Tagged with:
-
well they try something like this: Define your hashmap private HashMap<String, Area> miningLocationsMap = new HashMap<String, Area>(); Add values to the map in the onstart miningLocationsMap.put("Varrock", new Area(0,0,0,0)); etc.... and finaly, define your mining location: String locationString = skillgui.getArea(); Area miningLocation = miningLocationsMap.get(locationString);
-
Hash map of String, Area would work. You can also define a general area after the gui closes (miningArea) and use that in you check. if you are planning on having many locations I would go with the hashmap though...
-
Welcome and GL
-
Your problem is that you are not checking if you found the dragon, change target.interact to: if(target != null){ target.interact("Attack"); also, look into conditional sleeps.
-
Check the logger, you are probably getting a nullPointer or something. Check it and post it here
-
Can make this for you. PMed
-
No idea what it can handle put cost wise this is the best option
-
when you load the client you have a proxy tab. Buy sock5 proxies and set them up in the tab. Then select a proxy and load the client. EDIT: mb, thought you got a vps
-
This. Going down to i5 isn't worth it, and once you have the money to upgrade you better upgrade the GPU and not the CPU, it will be overall cheaper because you already have the current GPU.
-
Task based WC+Fish script (Just need some opinion)
HunterRS replied to flexike's topic in Scripting Help
@flexike Great script, a few pointers: 1. In the walkToShrimp task, in verify, might want to change <= to just <, it will never be equal anyways because of you if statement in your main but if in the future you want to change anything it might mess it up. 2. In the walkToShrimp task, in execute, might want to think about adding a sleep after the walking event (SleepUntill(() -> ShrimpSpot.contains(myPlayer()), 2000). Again, not necessary but better safe than sorry. 3. In LumbyFishShrimps task, in execute, I would suggest also checking if the fishing spot is within the fishing location. I would also suggest you look into the use of osBot filters. 4. In LumbyFishShrimps task, in execute, before you interact with the spot you might also want to check if it has that action you are trying to do. Again this is just to double check you got to the right place and you don't try to interact with the wrong spot. Filter<NPC> spotFilter = new Filter<NPC>(){ public boolean match(NPC npc){ return npc.getName().equalsIgnoreCase("Fishing spot") && npc.hasAction(fishingType) && fishingArea.contains(npc) && script.getMap().canReach(fishingSpot); } }; 5. In LumbyFishShrimps task, in execute, I dont see any reason to sleep until your inv is filled as you are not interacting with the spot if you player is animating anyways. In my opinion that sleep will only cause delay and problems. 6. In LumbyFishShrimps task, in execute, again look into filter for the fishing net, also interact and then sleep (it might spam click the pickup). if(fishingNet.interact("Take")){ Sleep.sleepUntil(() -> script.getInventory().contains("Small fishing net"), 2000); } 7.In DropTask, in execute, I would sleep untill inv is empty/only contains the net. 8. In WalkToTrees, in execute, again sleep for the walk. Same with the walkToOak 9. In OakWoodCutTask, in verify, again < and not <= with the finalWcLvl, right now it will train until the final level + 1. In execute, filters xD. 10. In TreeWoodCutTask, just filters 11. In AIO (main), pretty sure dismissing level up msgs is pretty useless as they will stop the animation anyways and once you interact again they will auto dismiss. A few tips: - Go over as much of the API as you possibly can. - Test your script logic with flow charts, make sure you get all of the end situations (Do them in your head like me if you can't, no one really writes them down outside of school ) - Test your script by running it for as long as possible with babysitting it. This will probably show you anything you missed . - Keep writing scripts because you are a great script writer. Over all, great script man. Looks like you are a natural . -
Welcome
-
this is botting
-
He is right, we will need more information about what is wrong in order to help you
-
bought 1 account
-
package Main; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.*; import org.osbot.rs07.api.map.Position; import java.awt.*; @ScriptManifest(name = "CrabKiller", author = "kyu", version = 1.0, info = "noob scripting", logo = "") public class Main extends Script { private final Position starting, reset; @Override public void onStart() { starting = myPlayer().getPosition(); reset = new Position(1750,3503,0); log("welcome to kyu crabs"); //Code here will execute before the loop is started } private enum State{ FIGHTING, RESET; } private State getState(){ if(myPlayer().isHitBarVisible() || myPlayer().isUnderAttack()) return State.FIGHTING; return State.RESET; } @Override public void onExit() { log("ending...."); //Code here will execute after the script ends } @Override public int onLoop() throws InterruptedException{ switch(getState()){ case FIGHTING: if(myPlayer().getHealthPercent()<50) getInventory().interact("Eat","Tuna"); return 20000; case RESET: log("walking...."); getWalking().walk(reset); sleep(15000); log("walking to start"); getWalking().walk(starting); sleep(15000); } return 5000; //The amount of time in milliseconds before the loop starts over } @Override public void onPaint(Graphics2D g) { //This is where you will put your code for paint(s) } }
-
I'll take 3, pm me your skype
-
If player is animating, move mouse outside screeen?
HunterRS replied to 08egans's topic in Scripting Help
change myPlayer().isAnimating() to myPlayer().isInteracting() maybe? You could also try changing it to lesserdemon.isUnderAttack(), but you will need to filter out all of the demons you dont want to attack. In the code you have now you are not checking if someone else is fighing the demon etc...