-
Posts
1096 -
Joined
-
Last visited
-
Feedback
100%
Posts posted by HeyImJamie
-
-
Probably cache the tile the trap was placed on
-
1 hour ago, Juggles said:
Nope that's it.
public void startedQuest() {
if (configs().get(62)==3) {
return true;
}
return false;
}
im on mobile you get the idea
10/10 S2 ability. Goodluck returning a void method
public boolean isQuestStarted(Quest quest) { return quest.getConfig() > 0; } public enum Quest { GOBLIN_DIPLOMACY(63); int questConfig; Quest(int questConfig) { this.questConfig = questConfig; } public int getConfig() { return questConfig; } }
I'd do something like this. Store all your quests in an enum and just check the config is > 0 to check if it's started. Quests also have finished settings, so you can store those in this enum as well and add an isQuestFinished method etc. Hope this helps.
- 1
-
Looking for thread designs for a few of my scripts. Payment is open for discussion. I'll ideally need the layout designed w/ graphics, text etc so ideally will need someone who's creative and good w/ 'marketing' / advertisement. I'm not looking for a generic large image.
Can't really think of how to word this to get exactly what I want across, so please pm me or add my Discord @ HeyImLit#3244 if you have any questions. Cheers.
-
I thought only S3's were allowed to write Slayer scripts?
-
32 minutes ago, Elixar said:
WebWalk should be able to find a route... especially to Lumbridge bank that's a commonly used place that is programmed In the API so double check the code maybe?
If not... I hear that it's better practice to program your own paths, you'll have to map each position, but I'm pretty sure if you type in on Google " OsBot custom pathing" then Explv or someone should have a tutorial for this.
The only issue is that when you're not using webWalk you will have to manually code in the handling of Stairs, Doors, whatever it may be that's in the way of your custom path.
Depends where you are. It's only better practice when you can guarantee you're walking from one set location to another.
-
It's been a while since I've done any scripting on this client but I'm pretty sure there's a way you can check the response.
Edit: Look at the API. WebWalkEvent -> getDestination()
-
32 minutes ago, Naked said:
Scripter 3 requirement for clue scripts, huh?
Read the thread. Written by Patrick, maintained by Night.
-
45 minutes ago, kramnik said:
Could you tell more about this?
So that means that there is no point if making your own mining or etc. script then?
Google what the two terms mean, use your brain and you'll figure it out.
-
Use the remove format button
-
Pls tell me there's no getBot().getPassword() method
-
I personally split my scripts into a mix of a 'Task' / 'State' based framework. Add my Discord @ HeyImLit#3244 and I'll give you some code snippets.
-
Go learn a little Java and then come back. Save yourself a world of trouble
-
If anyone leaks these to you they're dumb as fuck.
-
Remove your tinfoil hat.
- 2
-
Just now, t0r3 said:
Yeah u'r right ahha Managed to fix it I'll b careful to null check in the future. Ty
Well done Next step I'd say would be to re-think your logic a little bit. For example, your bank method could be re-ordered so it checks that the bank contains the ore prior to withdrawing, rather than attempting to withdraw and then stopping script.
- 1
-
7 minutes ago, t0r3 said:
Ok, changed the script to this above, and got this NPE ;
Error in script executor!
java.lang.NullPointerException
at EdgeSmelter.bronzeBars(EdgeSmelter.java:33)
at EdgeSmelter.onLoop(EdgeSmelter.java:90)
at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(df:126)
at java.lang.Thread.run(Unknown Source)I don't think spoonfeeding you here is going to help you much. The NPE directs you to where the error is (line 33 of your script). You're not null checking something correctly on that line, so go figure it out Based on looking at your code though there's a few areas where you haven't bothered to null check, so get them fixed up too and you'll be good to go!
- 1
-
-
8 minutes ago, t0r3 said:
Happening everytime I start this script i made ;
public class EdgeSmelter extends Script { private Area smeltArea = new Area(3105, 3501, 3110, 3496); private void bronzeBars(){ boolean gotCopperAndTinOre = getInventory().contains("Copper ore", "Tin ore"); boolean isSmeltScreenVisible = getWidgets().get(270,14).isVisible(); boolean inSmeltArea = smeltArea.contains(myPosition()); RS2Widget bronzeBarsButton = getWidgets().get(270,14); RS2Object smelter = getObjects().closest("Furnace"); if (gotCopperAndTinOre && !inSmeltArea){ log("Walking to Smelter"); getWalking().webWalk(smeltArea); } if (inSmeltArea && smelter != null) { smelter.interact("Smelt"); SleepEasy.sleepUntil(() -> isSmeltScreenVisible, 5000); bronzeBarsButton.interact("Smelt"); SleepEasy.sleepUntil(() -> !gotCopperAndTinOre,18000); } } private void needToBank() throws InterruptedException { boolean gotCopperAndTinOre = getInventory().contains("Copper ore", "Tin ore"); if (!Banks.EDGEVILLE.contains(myPosition()) && !gotCopperAndTinOre){ log("Walking to bank"); getWalking().webWalk(Banks.EDGEVILLE); } if (Banks.EDGEVILLE.contains(myPosition()) && !gotCopperAndTinOre) { getBank().open(); SleepEasy.sleepUntil(() -> getBank().isOpen(), 10000); log("Depositing bronze bars"); getBank().depositAll("Bronze bar"); log("Withdrawing ores"); getBank().withdraw("Copper ore" + "Tin ore", 14); } if (!getBank().contains("Copper ore", "Tin ore")){ log("Stopping script"); stop(false); } } @Override public int onLoop() throws InterruptedException{ boolean gotCopperAndTinOre = getInventory().contains("Copper ore", "Tin ore"); if (!gotCopperAndTinOre) { needToBank(); } else { bronzeBars(); } return 600; } }
What did I do wrong?
Is that the entire script? and does the NPE direct you to any line?
-
https://github.com/HeyImJamie/JProgressiveWoodcutter/tree/master/src/scripts/JProgressiveWoodcutter
Take a look at this. It's for a separate client, but should give you a right idea. The enum and best axe method can be found in the data folder.
- 1
-
I'd suggest looking at Enums.
-
Need a little more context. We can't magic up reasons why your program doesn't work.
-
I personally use a mix between a Task and a State 'framework'
For example, I'll have a Bank Task which contains code for banking. And in that class will be a switch statement that chances based on certain conditions, for example:
switch (getTaskState()) { case WALK_TO_BANK: // walk to bank etc break; case OPEN_BANK: // open bank break; // etc } private enum TaskState { WALK_TO_BANK, OPEN_BANK, BANK_ETC } private TaskState getTaskState() { if (!Bank.contains(Player)) { return TaskState.WALK_TO_BANK; // etc }
-
I can write you one privately that afks if you want. HeyImLit#3244 is Discord.
-
Awesome! Now I'd suggest you start looking at other things, such as better checks on the booleans available to you, and maybe neatening it even more?
For example: You can use && to check for multiple conditions in one line!
Perm Banned on 123
in Botting & Bans
Posted
If you were on a different IP to the one you use your main on, maybe? Try recovering / appealing anyway but I can't say it's likely.