vacalao Posted October 8, 2015 Share Posted October 8, 2015 Man, hey! i got a problem i use this : import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Vacalao", info = "My first mining script", name = "MiningBankVarrock", version = 1.0, logo = "") public class Main extends Script { private static final int rock_id = 14864; private static final int ore_id = 438; @Override public void onStart() { log("lets try"); } @Override public int onLoop() throws InterruptedException { if(!myPlayer().isAnimating()){ if(inventory.isFull()){ inventory.dropAll(ore_id); } Entity rocks = objects.closest(rock_id); if(rocks != null){ rocks.interact("Mine Rock"); sleep(random(25, 30)); } } return random(200, 300); } @Override public void onExit() { log("Thanks for test my script"); } @Override public void onPaint(Graphics2D g) { } } Obviously i will put the iron value on the ores.. but when i compile all see good, but when i try run in my osbot the script no appear on local scripts, why? Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 8, 2015 Author Share Posted October 8, 2015 Man, hey! i got a problem i use this : import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import java.awt.*; @ScriptManifest(author = "Vacalao", info = "My first mining script", name = "MiningBankVarrock", version = 1.0, logo = "") public class Main extends Script { private static final int rock_id = 14864; private static final int ore_id = 438; @Override public void onStart() { log("lets try"); } @Override public int onLoop() throws InterruptedException { if(!myPlayer().isAnimating()){ if(inventory.isFull()){ inventory.dropAll(ore_id); } Entity rocks = objects.closest(rock_id); if(rocks != null){ rocks.interact("Mine Rock"); sleep(random(25, 30)); } } return random(200, 300); } @Override public void onExit() { log("Thanks for test my script"); } @Override public void onPaint(Graphics2D g) { } } Obviously i will put the iron value on the ores.. but when i compile all see good, but when i try run in my osbot the script no appear on local scripts, why? Do you have any other local scripts? What you should do is close OSBot and delete (or move) your other local scripts (and delete this one). Then reboot your OSBot, and then compile the code. It should then show up apa Quote Link to comment Share on other sites More sharing options...
vacalao Posted October 8, 2015 Share Posted October 8, 2015 no, i got one sdn script, the frost miner.. but dont have any other local script, i already do that like 10 times, redownload eclipse, redownload osbot, and eliminate all carpets, and nothing, i cant see my local script Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 8, 2015 Author Share Posted October 8, 2015 no, i got one sdn script, the frost miner.. but dont have any other local script, i already do that like 10 times, redownload eclipse, redownload osbot, and eliminate all carpets, and nothing, i cant see my local script Is your build path the latest osbot? Quote Link to comment Share on other sites More sharing options...
vacalao Posted October 8, 2015 Share Posted October 8, 2015 2.3.117 now i donwload the 119 OSbot, and running the 119 i can see you teaThiever but no my script, i am doing any barely wrong? tired cant do any, i just will buy scripts, cant make Quote Link to comment Share on other sites More sharing options...
Benz Posted October 8, 2015 Share Posted October 8, 2015 TL;DR Teach me in two sentences please. OT: Seriously high quality guide though. Bookmarked. Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 8, 2015 Author Share Posted October 8, 2015 2.3.117 now i donwload the 119 OSbot, and running the 119 i can see you teaThiever but no my script, i am doing any barely wrong? tired cant do any, i just will buy scripts, cant make Don't give up so easily, if you can see the thiever but not ur script then I have no idea... are u sure that there are no errors? everything in ur script looks okay... apa Quote Link to comment Share on other sites More sharing options...
amoeder Posted October 15, 2015 Share Posted October 15, 2015 (edited) private State getState() { Entity stall = objects.closest("Tea stall"); if (!inventory.isEmpty()) return State.DROP; if (stall != null) return State.STEAL; return State.WAIT; } is it really necessary here define the stall again? because you dont seem to need it in this block of code and u define it in your onloop or am i wrong here? nvm figured it out Edited October 15, 2015 by amoeder Quote Link to comment Share on other sites More sharing options...
Tolemi959 Posted October 22, 2015 Share Posted October 22, 2015 Can someone give me some directions on how to make a simple bone grabber and banker? (port sarim, seagulls) Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 22, 2015 Author Share Posted October 22, 2015 Can someone give me some directions on how to make a simple bone grabber and banker? (port sarim, seagulls) Follow the framework I have for the tea thiever. But you're going to need different states: BANK, GRAB the grab state would have a check for bones: GroundItem bone = groundItems.closest("Bones"); if (bone != null && bone.exists()) { bone.interact("Take"); } The other state would be bank define bank the same way as stall, and interact wtih it the same way. Take a look at the banking API to see the interactinos apa Quote Link to comment Share on other sites More sharing options...
urnutzmyboot Posted October 23, 2015 Share Posted October 23, 2015 Awesome guide, would making a yew chopper be the same sort of idea? Except states would be CHOP, BANK and WAIT. I've spent a lot of time using actionscript 2 in flash, could never be bothered to use java for rsbots. You made all the hard parts seem so simple though so I might try it out 1 Quote Link to comment Share on other sites More sharing options...
MrChocolate Posted October 23, 2015 Share Posted October 23, 2015 i dont understand how i get the codes i want to make chop& dropper i didnt seee how u got ur script coding thing there? Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 23, 2015 Author Share Posted October 23, 2015 Awesome guide, would making a yew chopper be the same sort of idea? Except states would be CHOP, BANK and WAIT. I've spent a lot of time using actionscript 2 in flash, could never be bothered to use java for rsbots. You made all the hard parts seem so simple though so I might try it out Yep. exactly the same idea except you may need walking states aswell (eg to and from). You could equally condense it into 1 state but then you're not making full use of the framework available Ye it's really not as complicated as you may first think. Deffo worth a try and hopefully you'll be able to pull off some nice scripts apa i dont understand how i get the codes i want to make chop& dropper i didnt seee how u got ur script coding thing there? Open the spoilers stage by stage and it will talk you through it! apa Quote Link to comment Share on other sites More sharing options...
urnutzmyboot Posted October 23, 2015 Share Posted October 23, 2015 Yep. exactly the same idea except you may need walking states aswell (eg to and from). You could equally condense it into 1 state but then you're not making full use of the framework available Ye it's really not as complicated as you may first think. Deffo worth a try and hopefully you'll be able to pull off some nice scripts apa Do I need to set my own path (tiles and such) or is there some sort of API that has easy bank methods there? Quote Link to comment Share on other sites More sharing options...
Apaec Posted October 23, 2015 Author Share Posted October 23, 2015 Do I need to set my own path (tiles and such) or is there some sort of API that has easy bank methods there? in terms of pathwalking, you'll have to record your own path (you can use divine's utility on the sdn to do this, i've heard it's good with the pre-recorded path (as a Position[]), you can use localwalker to walk it: localWalker.walkPath(Position[] path); and that will get you from A to B. As for banking, you can use the fruitful banking API which will allow you to open the closest bank provided you're close enough, as well as allow you to withdraw, deposit etc eg bank.depositAll() deposits your inventory. apa Quote Link to comment Share on other sites More sharing options...