Everything posted by Satire
-
OSBot 2.4.103 - More WebWalking and GrandExchange
Added GE sell item. After spending 30mins writing a function...... GGWP
- LF 40 Attack, 80-99str with 75+ range
-
LF 40 Attack, 80-99str with 75+ range
It depends, will it be cheaper? What are your rates and stuff?
-
LF 40 Attack, 80-99str with 75+ range
Must have no more than 40 defense(pref 1). Give me an offer.
-
Need help with classes, Java [class included]
I'll take a look into this then. Damn this is gonna take a while to fix up. Thank you!
-
Need help with classes, Java [class included]
You legend! You just saved main from going to 3k+ lines.
-
Need help with classes, Java [class included]
Ok before anyone laughs, I'm new to Java and I seriously have no idea what's wrong. This should work, works very well in c#. I have a class here http://pastebin.com/UPUdfhdx And I wanted to call the function by making a new instance of that class MakeMoneyHandler moneyhandler = new MakeMoneyHandler(); moneyhandler.Mining(0); However, when I run it, I get this [ERROR][bot #1][12/13 03:50:13 PM]: Error in script executor! java.lang.NullPointerException at org.osbot.rs07.script.MethodProvider.log(lp:841) at MakeMoneyHandler.Mining(MakeMoneyHandler.java:22) at main.onLoop(main.java:824) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(qi:31) at java.lang.Thread.run(Unknown Source) There is nothing wrong with the code as I copied it to main and it all worked 100% fine. Don't worry about the code itself and say "this check is wrong", I know there are some errors and I'm re-writing it as I post this. I just wanted a seperate class that handles my functions. Also don't worry about the while loop, It was there for another test.
-
@Mods/Admins
You have the right to ask for a ban request. I haven't been on this forum for a while until now. However, if you want to return then just leave this website and come back when you want to. Unless you don't have self control over a website? Regarding new alias, you can just get a name change if you buy vip, I think(I could when I was VIP years back, but I never did).
-
OSBot 2.4.102 - Shortcuts, Tabs, and Scrolls
:xcate: You're a goddess! Very good support and updates, best botclient ever!
-
[withdrawing an addy scim with getbank().withdraw method] Not sure if bug or something weird with my code (possible bug?)
Lmfao yep, it was. Commented the whole paint line out and boom, no lagg. By all means, what does NPE mean? I've never heard of NPE. NPC Entity? (sorry if it's wrong) Null Pointer Exception, took me a while to realize (was too busy focusing on my script). But why did it only occur with adamant scims and nothing else? Super weird. g.setColor(Color.WHITE); //Time Drawn on the Screen timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 125, 392); //Drawing Numbers of the Screen currentXPAttack = skills.getExperience(Skill.ATTACK); xpGainedAttack = currentXPAttack - beginningXPAttack; currentLevelAttack = skills.getStatic(Skill.ATTACK); levelsGainedAttack = currentLevelAttack - beginningLevelAttack; g.drawString("" + xpGainedAttack + " (" + levelsGainedAttack + ")", 136, 440); currentXPStrength = skills.getExperience(Skill.STRENGTH); xpGainedStrength = currentXPStrength - beginningXPStrength; currentLevelStrength = skills.getStatic(Skill.STRENGTH); levelsGainedStrength = currentLevelStrength - beginningLevelStrength; g.drawString("" + xpGainedStrength + " (" + levelsGainedStrength + ")", 140, 465); currentXPHitpoints = skills.getExperience(Skill.HITPOINTS); xpGainedHitpoints = currentXPHitpoints - beginningXPHitpoints; currentLevelHitpoints = skills.getStatic(Skill.HITPOINTS); levelsGainedHitpoints = currentLevelHitpoints - beginningLevelHitpoints; g.drawString("" + xpGainedHitpoints + " (" + levelsGainedHitpoints + ")", 140, 413); g.drawString("Status:",27,53); g.drawString(getState().toString(),75,53); This is the whole onPaint code. It lags when I have it on and I want to keep it on. I'm assuming its the time ran which is causing it to go all crazy. How would I solve it without having to remove it? Edit found the problem "g.drawString("Status:",27,53); g.drawString(getState().toString(),75,53);" I had this in there temp for debugging purposes as I like to use the console for the actual loops.... I guess I'll have to find another way.
-
[withdrawing an addy scim with getbank().withdraw method] Not sure if bug or something weird with my code (possible bug?)
Tried with strings too, still the same result. There's a bug with the method somewhere. I'm not sure if it's only for the addy scim. I will test it out for the other scims too! I always have the logger opened. I tried with condition sleeps and without condition sleeps and even normal sleeps, still the same thing... No null pointer exception. I declare it, a bug...
-
[withdrawing an addy scim with getbank().withdraw method] Not sure if bug or something weird with my code (possible bug?)
So I have no idea wtf is happening. I thought I coded something wrong, maybe it's just my computer. So I have an id for all the scimitars in the game. When I call getBank().withdraw(idname, 1); My client lags so god damn hard like something is going to shit. So I tried it with food, strangely enough no lag. Could this be a bug with my code or this certain ID? So I have int idname = theid; in this case its 1331. Now when I call it on purpose this happens https://puu.sh/sJik7/fb7c80c853.mp4 notice when I pushed stop the mini map stops lagging and everything goes well. Now if I was to recreate this with food, this is the result https://puu.sh/sJios/0194facc6e.mp4 So I'm not sure what is exactly happening.... Forcing both of them the exact same way, is it a bug? EDIT3: Solved, if this occurs for you then it's your OnPaint method somewhere. I fixed it by removing a line.
-
Stealth Quester
Was looking at a quest bot for 7 qp's and saw this. Damn it looks sexy and nice! Congrats on making a very awesome bot XD How long did it take to make, I'm curious. "40 quests supported" would seem like a very long time...
-
Walk back to area if out of range?
I have a check before hand for the inventory. But I see what you mean for that second check. I've added that in. But it doesn't matter because I still get the errors for whatever reason...
-
Walk back to area if out of range?
That won't work without very detailed arguments. Let's say I started the script with a full inventory of food or let's say I finished buying an item from GE, it doesn't want to walk back to the designated area. Ontop of that, something is causing my web walking to go null.... Here is my Walktoarea private void walkToDArea(){ if(selectedArea.equals("Edgeville Rats")){ getWalking().walk(new Position(3237,9866,0)); }else if(selectedArea.equals("Chickens")){ getWalking().webWalk( new Position(3189,3278,0)); } It should walk back but it doesn't.... It throws me an error or just stands and says waiting. It gets called when the state is Walking (if inv is full of food)
-
Walk back to area if out of range?
So I was thinking about doing if(!area.contains(myplayer()) it'll walk back to the area. For some random reason, banking works fine but when I play my script at a bank with a full inv of food, when the check should be true, it just stays there on waiting.... Let's say I finished a task that is in lumby and my fighting area was in edgeville or varrock, after the task is complete, it should walk back to where it was fighting. Also how would I use webwalking without getting [ERROR][bot #1][12/07 10:59:49 PM]: Error in script executor! java.lang.NullPointerException at main.Banking(main.java:108) at main.onLoop(main.java:370) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(qh:103) at java.lang.Thread.run(Unknown Source) This only happens when it keeps spamming the webwalker. It says "your destination is complete" , opens the bank then spams that error. I think it's because I have a state called WALKING and it keeps spamming the webwalker. I thought the webwalker is a whole function that walks to the area then stops then continues running down the lines and completeing the task. For example getWalking().webWalk(banks); if(!getBank().open()){ getBank().open(); sleep(2500); getBank().depositAll(); } getWalking().webWalk(trainingarea); Works like a charm but when I do this my check if(inventoryisfull && playerisnotinarea){ return State.WALKING; -------------------------------------------------------- //when case = walking if(selectedArea.equals("Edgeville Rats")){ getWalking().walk(new Position(3237,9866,0)); then it calls walkToDArea(); which basically walks to an area which contains string of x so I think the 2 webwalking instances are clashing on another or something. I can tell that everything works without webwalking (cause I've tested it). It's only when webwalking is called, this happens. EDIT: Seems like WalkToDArea is the cause of those errors. I will re-write it and hopefully it'll work.... EDIT2: Seems to be happening when banking is called. No idea what's wrong with that, as banking was working yesterday! EDIT3: SOLVED!
-
Check what skill is being trained?
I guess you are more experienced. I may take it out after finishing this method.
-
Check what skill is being trained?
I meant to say that maybe there's a time that I didn't get banned because of it. You'll never know because it depends on how they handled it. A normal player checks for exp but they also don't at the same time because of OSBuddy. So you may be right. I just can't be bothered taking it out.
-
Check what skill is being trained?
You never know :P It's there now and there's no need to take it out.
-
Check what skill is being trained?
Making an autofighter that has an antiban that hovers over the skill i'm training. Ontop of that, there's a series of skills in the antiban which completes a certain task no matter how long it takes then goes back to fighting. Currently there's only 4 tasks but there will be more. The only reason was to make the antiban hover over the right skill just so it doesn't look weird lol.
-
Check what skill is being trained?
True that but it's kinda complicated with my script. Because it will randomly train a skill. And after posting this, I felt like a retard as I found out how I can do all that with a string T_T. Yep
-
Check what skill is being trained?
So there were a few methods that I wanted to do but before doing that I wanted to know if there's something in the API that checks what skill is being trained? Else I can do it the easier way which checks for an exp drop.
-
Can someone check if this script works on your PC?
I understand that now, thanks!
-
Can someone check if this script works on your PC?
I love you! That was it. Why exactly did that happen? I'm learning Java as I go as I'm used to C# but I've never encountered something like this before.
-
Can someone check if this script works on your PC?
So I was making a script but before I decided to do that I wanted to run it. It ran 2 times but then after I added a bit more code into it, it doesn't run. import org.osbot.rs07.api.Inventory; import org.osbot.rs07.api.Skills; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; import java.util.concurrent.TimeUnit; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; @ScriptManifest(author = "KappaKeepo", info = "AutoFigherScript", name = "KappasAwesomeFighter", version = 0, logo = "") public class main extends Script { //GUI Handlers private JFrame gui; private String selectedArea;// Global String variable to store selected option private boolean started = false; private long timeBegan; private long timeRan; double hpPercentage = getSkills().getDynamic(Skill.HITPOINTS) * 100 / getSkills().getStatic(Skill.HITPOINTS); //Banking banking = new Banking(); @[member='Override'] public void onStart() { timeBegan = System.currentTimeMillis(); log("KappasAwesomeFighter"); createGUI(); } public State getState() { if (inventory.isEmptyExcept(314, 526, 2138)) { return State.BANKING; } if (hpPercentage < 50) { //log("My HP is below 50%"); // was experimenting with this lol //this.getInventory().interact(20,"Eat"); return State.BANKING; } return State.WAITING; } private enum State{ATTACKING,WAITING,WALKING,BANKING,ANTIBAN,EAT}; @[member='Override'] public int onLoop() throws InterruptedException { if(started){ if(selectedArea == "Edgeville Rats"){ log("Edgeville works"); }else if(selectedArea == "Chickens"){ }else if(selectedArea == "Lumbridge Goblins"){ }else if(selectedArea == "Edgeville Men"){ } } return random(200, 300); } @[member='Override'] public void onExit() { log("KappasAwesomeFighter has successfully exited!"); if(gui != null) { // If the JFrame has been created gui.setVisible(false); // Hide it gui.dispose(); // Dispose } } private String ft(long duration) { String res = ""; long days = TimeUnit.MILLISECONDS.toDays(duration); long hours = TimeUnit.MILLISECONDS.toHours(duration) - TimeUnit.DAYS.toHours(TimeUnit.MILLISECONDS.toDays(duration)); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS .toHours(duration)); long seconds = TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS .toMinutes(duration)); if (days == 0) { res = (hours + ":" + minutes + ":" + seconds); } else { res = (days + ":" + hours + ":" + minutes + ":" + seconds); } return res; } @[member='Override'] public void onPaint(Graphics2D g) { if(started){ Graphics2D gr = g; timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 1, 1); if(myPlayer().isAnimating()){ } } } private void antiBan() throws InterruptedException{ if(started){ if(!myPlayer().isAnimating() && myPlayer().isMoving()){ getTabs().open((Tab.SKILLS)); getSkills().hoverSkill(Skill.STRENGTH); sleep(100 + random(400,15000)); } } } private void createGUI() { gui = new JFrame("GUI"); final int GUI_WIDTH = 350, GUI_HEIGHT = 75; //get size of screen Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //calc x and y final int gX = (int) (screenSize.getWidth() / 2) - (GUI_WIDTH / 2); final int gY = (int) (screenSize.getHeight() / 2) - (GUI_HEIGHT / 2); gui.setBounds(gX, gY, GUI_WIDTH, GUI_HEIGHT); gui.setResizable(false); // Disable resizing JPanel panel = new JPanel(); gui.add(panel); JLabel label = new JLabel("Select an area to train at:"); // Create a label label.setForeground(Color.white); // Set text colour to white panel.add(label); // Add it to the JPanel // Create a select box for tree options JComboBox<String> areaSelector = new JComboBox<>(new String[]{"Edgeville Rats", "Lumbridge Goblins", "Edgeville Men"}); // Add an action listener, to listen for user's selections, assign to a variable called selectedTree on selection. areaSelector.addActionListener(e -> selectedArea = areaSelector.getSelectedItem().toString()); // Add the select box to the JPanel panel.add(areaSelector); JButton startButton = new JButton("Start"); startButton.addActionListener(e -> { // This code is called when the user clicks the button started = true; // Set the boolean variable started to true gui.setVisible(false); // Hide the GUI }); panel.add(startButton); // Add the button to the gui.setVisible(true); } } I commented out most of them because I thought they were the problem. However, it doesn't seem like that's the case. So I'm not sure if it's the botclient itself or my script. Because it doesn't seem like other scripts I try to run doesn't work either.