Everything posted by FrostBug
-
Question about OSBot's synchronous behavior
You should probably just strive towards only doing 1 action every loop cycle. Always evaluate the action that currently needs to be done based on the current situation, not by assuming that previous actions completed successfully.
-
Finished my new script, but how do I type faster?
if typekey has a delay, just simulate it instead getKeyboard().pressKey(c); getKeyboard().releaseKey(c); I'll assume typekey does the same, but with a delay inbetween the two Also, do you have a source for the \r\n thing? I really kind of doubt it's necessary. What reason would the game applet have to not simply listen for the VK_ENTER keypress? That's all the actual keyboard key triggers.
-
Fruity Barrows (Frost Barrows)
Check the client console output. If anything is wrong, it will write it there.
-
Bought Frost Hunter but no script yet?
Try checking if its registered in your Client Area
-
Fruity Barrows (Frost Barrows)
Yus, you have 24 hours
- Player Detector
-
Finished my new script, but how do I type faster?
Try something like this? (This is probably what typeString does, but with a substantial delay between each key) void typeFast(String str) { for(char c : str.toCharArray()) { getKeyboard().typeKey(c); } getKeyboard().typeKey((char)KeyEvent.VK_ENTER); }
-
Fruity Barrows (Frost Barrows)
It's included in the FAQ
-
Fruity Barrows (Frost Barrows)
Log out = misconfiguration. Reason for logging out is written in the client console. That's odd, what value do you have in the Special attack energy requirement field? Fastest banking = ClanWars, Shades of Mort'ton quest is required for the return trip.
-
Fruity Barrows (Frost Barrows)
Check out the Frequently Asked Questions section of the OP
-
Fruity Barrows (Frost Barrows)
:(
-
Fruity Barrows (Frost Barrows)
Started
-
Fruity Barrows (Frost Barrows)
Starting both now And please ceize the spamming @ @jimmers
-
Door help and eatting help
That is entirely 100% redundant lol But if it floats your boat
-
Door help and eatting help
The reason it eats all of your food is because getHealth() isn't updated outside of combat (so your 'health' will stay the same if you eat outside of combat). use something like this if you still want percentage: public int getHealthPercent() { int max = getSkills().getStatic(Skill.HITPOINTS); int dyn = getSkills().getDynamic(Skill.HITPOINTS); return (100 / max) * dyn; } Also, the reason you're getting an error is because you aren't nullchecking the door. if (door.exists()) { log("Opening door."); door.interact("Open"); } else { log("Cannot find door."); -> if (door != null && door.exists()) { log("Opening door."); door.interact("Open"); } else { log("Cannot find door.");
-
Door help and eatting help
Nothing, but that doesn't make OP a noob for using something else lol
-
Door help and eatting help
? What's wrong with interaction by slot ID?
-
Door help and eatting help
No and no.. When interacting with a door, it's perfectly valid to do it by position, if there are other doors of same name and ID nearby. He won't get the closed doors since those have different ID. ___ The way you're doing the interaction right now is essentially fine, but it would be slightly cleaner and more efficient to use this overload
- WTF?
-
Door help and eatting help
to fix your eating problem, swap these 2 around: if (warrior != null) return State.STEAL; if(myPlayer().getHealth() <= 30) return State.EAT; -> if(myPlayer().getHealth() <= 30) return State.EAT; if (warrior != null) return State.STEAL; Your door problem is probably caused by a typo in the door_tile. public final static Area door_tile = new Area(3287, 3172, 3287, 3271); Are you sure it shouldn't be: public final static Area door_tile = new Area(3287, 3172, 3287, 3171); ?
-
Door help and eatting help
Probably gonna need to see some more of your code. Eating is probably a question of whether you've already returned a different state before executing the health check. Also be aware that getHealth returns a percentage value, not the actual hitpoints.
-
Can see script, but won't run
int huntX = 2543; int huntY = 2887; myX = myPlayer().getX(); myY = myPlayer().getX(); <------- Should be Y distX = huntX - myX; distY = huntY - myY; log("Distances x & y from hunting spot:"); if (distX < 0) { distX = distX*-1; } if (distY < 0) { distY = distX*-1; } log(distX); log(distY); Note that you're getting your X coordinate twice instead of X,Y. It could also be written a little more compact. Position hunt = new Position(2543, 2887, 0); int dist = hunt.distance(myPosition()); or if you really do need both the X and Y distances: Position hunt = new Position(2543, 2887, 0); int distX = Math.abs(hunt.getX() - myPosition().getX()); int distY = Math.abs(hunt.getY() - myPosition().getY());
-
Small varpbit list
Well, I only checked some of them against my code. But both of the prayer ones (Regular and Quickpray) are incorrect. You'll need to mask them.
-
Can see script, but won't run
numTraps = (huntLvl / 20) + 1;
-
Small varpbit list
Several of the ones in the OP are incorrect. You should probably look a bit more into how varpbits work A table of them is still not a bad idea, though. Can help people make their own API, if they for some reason wish to do so :p