-
Posts
21517 -
Joined
-
Last visited
-
Days Won
1885 -
Feedback
100%
Everything posted by Czar
-
If inventory isn't full, drop? Remember to remove the ! before the boolean (it was !isEmpty now !isFull) they are opposite so it should be if (getInventory().isFull()) Or is the isFull causing an actual error?
-
1) Don't generate jar files while testing a script, you should do that in the end, otherwise you must restart etc. What I do, is just make your project folder on Users/OSBot, and change your output folder to OSBot/scripts, so all the .class goes there and you can just save script on your ide, and refresh scripts on OSBot and you don't have to restart client every time you make an update 2) A trade request is a message, so you must add a messagelistener to your script by doing the following; put this in your onStart method: getBot().addMessageListener(this); and then add the overriden method onMessage(Message m) the message will be String msg = m.getMessage(); and to check if its a trade, just do m.getMessageType(), which is an enum and contains RECEIVE_TRADE (in your case) As for the last question I've never handled trading in a script so I'm unable to assist you there, but there's an open source merching bot (which handles trades) in the snippet section iirc.
-
gjdm , keep up the updates
-
public NPC getTarget(final String npc) { return getNpcs().closest(new Filter<NPC>() { public boolean match(NPC n) { if (!n.getName().equalsIgnoreCase(npc)) { return false; } if (n.getInteracting() != null) { return false; } return true; } }); } You can use a Filter<> to to find the best npc, in this case it's the npc which isn't interacting with anything, and is called whatever you put in the getTarget method, so: NPC guard = getTarget("Guard"); if (guard != null) { // attack } And it will attack every NPC with the name 'guard', also, try to use names instead of IDs when it comes to npcs and objects, since the IDs can change from time to time. You can greatly expand on the filter by adding more stuff like getMap().canReach for extra failsafes etc. As for the camera movement, the while() is unnecessary because you are already checking if its visible.
-
EDIT: Thought he meant for other scripts.
-
Damn nice, but does it run OSBot?
-
Mine: Called Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep Sleep public boolean contains(int i) { System.out.println("Called"); return true; } public void check() { if (contains(0)) { for (int i = 0; i < 100; i++) { System.out.println("Sleep"); } } } Yours Called Sleep Called Sleep Called Sleep Sleep Called Sleep Called Sleep Called Sleep Called Sleep Called Sleep Called Sleep Called Sleep Called Sleep Sleep Called public boolean contains(int i) { System.out.println("Called"); return true; } public void check() { for (int i = 0; i < 100 && contains(0); i++) { System.out.println("Sleep"); } } Hypothetical, but yeah.
-
Dude it's not the same thing, you just confused me.. if (getInventory().contains(uncut)){ for(int i = 0; i < 100; i++) { sleep(50); } } That is calling inventory.contains 1 time, the code you have calls it 100 times. Try it..
-
http://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html Use conditional sleep until inventory is empty
-
Lol my bad, I read it wrong, well IDK what else to say, just find another way to sleep after depositing items, it's really not a big issue
-
if (getInventory().contains(uncut)){ for(int i = 0; i < 100; i++) { sleep(50); } } Idk, try that
-
Ohh I understand, the best way to do this is returning 50 on the onLoop method, because it will re-loop after 50ms until the action is done.
-
You are calling that method 100 times, so it's 50 * 100 ms, just do getAmount if you want to get the amount of uncuts
-
CzarRangeGuild is a good script imo :P
-
Nice bro, how long it take?
-
Update 1.1 will feature a total re-write, as I am improving my library's combat code.
-
What's the problem? It seems to be running fine for everybody else.
-
CzarRangeGuild has yet to reach 2 account bans :P
-
Thanks for the progress report I will take another look at the camera code. Yes, this script is pure-friendly, it won't get defence xp at all
-
Nice to see others in gamedev too Any details?
-
I'll miss you all... not really. But I'd like to resign from SDN manager
Czar replied to Ericthecmh's topic in Farewells
Goodbye bro, good luck in the future -
I promise you, the problem is not my script - the bot is being detected and there are countless threads about this issue in the hidden section 'Script Developers'. Haven't you noticed how it's suddenly quiet around osbot? Where are all the developers? Not here. The bot's detectability is too high.. It's not if you get banned, it's when. However, my script does make it get banned less frequently because it has its fair share of mistakes and uniqueness to it. The best way (imho) to not get banned is to balance out botting and playing legit. Those who bot my range script usually pk or play/do something after, hence they don't get banned.. EDIT: You got a 2 day ban, that's very lucky nowadays.
-
It's alright man, I understand, I really do. How long was your ban, did you get a 2 day ban or a perm? As for antiban, there is really nothing else I can possibly do, the mouse is busy clicking, the camera is busy staying on the target, the only form of antiban I can offer is mistakes, and smooth camera movement. The rest, goes to the detectability of the client. Now, since this client is always the first to get banned (out of rival bots, i tested them all), I admittedly blame the bot detection and not because I don't want to say my script is bad or anything, but its evident that my accounts (especially f2p) last ~4-6 hours whereas on other bots it lasts upwards of 48 hours before getting banned. EDIT: Look at the state of this site/bot, the client is STILL offline (after 10+ hours). Another bot I know updated within <5 minutes. It shows how much sophistication OSBot has.