Pkhonor Download
- importjava.awt.Graphics;
- importjava.awt.Image;
- importjava.net.URL;
- importorg.parabot.environment.api.interfaces.Paintable;
- importorg.parabot.environment.api.utils.Time;
- importorg.parabot.environment.input.Keyboard;
- importorg.parabot.environment.scripts.Script;
- importorg.parabot.environment.scripts.ScriptManifest;
- importorg.parabot.environment.scripts.framework.SleepCondition;
- importorg.parabot.environment.scripts.framework.Strategy;
- importorg.rev317.min.api.events.MessageEvent;
- importorg.rev317.min.api.events.listeners.MessageListener;
- importorg.rev317.min.api.methods.Inventory;
- importorg.rev317.min.api.methods.Npcs;
- importorg.rev317.min.api.methods.SceneObjects;
- importorg.rev317.min.api.wrappers.SceneObject;
- @ScriptManifest(
- category = Category.SMITHING,
- description ='Smelts gold near ANY furnace and bank. Start with an empty inventory! Written on Fixion's request.',
- servers ={'PkHonor'},
- )
- publicclass RDMGoldSmelter extends Script implements MessageListener, Paintable {
- privatefinal ArrayList<Strategy> Strategies =new ArrayList<Strategy>();
- private ScriptManifest Manifest=(ScriptManifest) RDMGoldSmelter.class.getAnnotation(ScriptManifest.class);
- privatestaticImage backgroundIMG;
- privatestaticint[] FURNACE ={2643, 3994, 2781, 11666};
- privatestaticint SMELT_INTERFACE =2400;
- privatestaticint DEPOSIT_ALL_BUTTON =23412;
- int smeltCooldown =10;
- @Override
- backgroundIMG = getImage('http://i.imgur.com/cciyTiy.png');
- Strategies.add(new CheckIfSmelting());
- Strategies.add(new ClickFurnace());
- Strategies.add(new UseBank());
- provide(Strategies);
- }
- @Override
- System.out.println('Ran '+Manifest.name()+' v'+Manifest.version()+' for: '+ scriptTimer.toString());
- System.out.println('Smelted '+ moltenBars +' bars ('+ scriptTimer.getPerHour(moltenBars)+' Bars/PH).');
- System.out.println('Thank you for using my script!');
- @Override
- if(isSmelting)
- returnfalse;
- publicvoid execute(){
- isSmelting =false;
- }
- if(Players.getMyPlayer().getAnimation() SMELT_ANIMATION){
- Time.sleep(500);
- smeltCooldown--;
- isSmelting =false;
- Time.sleep(500);
- }
- @Override
- if(Game.getOpenBackDialogId() SMELT_INTERFACE &&!isSmelting && Inventory.getCount(ORE_GOLD)>0)
- returnfalse;
- publicvoid execute(){
- Time.sleep(1000);
- Keyboard.getInstance().sendKeys(Random.between(28, 99)+');
- @Override
- return(Players.getMyPlayer().getAnimation() SMELT_ANIMATION);
- }, 3000);
- isSmelting =true;
- }
- SceneObject[] Furnace;
- publicboolean activate(){
- if(Game.getOpenBackDialogId()!= SMELT_INTERFACE &&!isSmelting && Inventory.getCount(ORE_GOLD)>0){
- if(Furnace.length>0&& Furnace !=null)
- }
- }
- @Override
- try{
- Time.sleep(()->(Game.getOpenBackDialogId() SMELT_INTERFACE),
- }catch(Exception _e){}
- }
- publicclass OpenBank implements Strategy {
- publicboolean activate(){
- if(Game.getOpenInterfaceId()!= BANK_INTERFACE && Inventory.getCount(ORE_GOLD)0)
- returnfalse;
- publicvoid execute(){
- SceneObject[] BankBooths = SceneObjects.getNearest(2213);
- SceneObject BankBooth = BankBooths[0];
- Time.sleep(BankBooth.getLocation().distanceTo()*400+400);
- }else{
- if(Butler.length>0){
- Butler[0].interact(2);
- sleep(Butler[0].getLocation().distanceTo()*400+400);
- }catch(Exception _e){
- System.out.println('Prevented an error! - Nulled NPC');
- }else{
- System.out.println('Unable to find a valid bank/butler.');
- }
- return;
- }
- publicclass UseBank implements Strategy {
- publicboolean activate(){
- if(Game.getOpenInterfaceId() BANK_INTERFACE && Inventory.getCount(ORE_GOLD)0)
- returnfalse;
- publicvoid execute(){
- Menu.clickButton(DEPOSIT_ALL_BUTTON);
- }
- int[] bankIDs = Loader.getClient().getInterfaceCache()[5382].getItems();
- if(bankIDs[i] ORE_GOLD){
- Menu.sendAction(WITHDRAW_ALL, bankIDs[i]-1, i, 5382);
- Time.sleep(()-> Inventory.getCount(ORE_GOLD)>0, 1000);
- }
- }
- publicvoid messageReceived(MessageEvent message){
- String msg = message.getMessage().toLowerCase();
- moltenBars++;
- smeltCooldown =4;
- if(msg.contains('you do not have any ore of this type')){
- }
- }
- @Override
- Graphs.drawImage(backgroundIMG, 400, 5, null);
- Graphics2D g =(Graphics2D) Graphs;
- g.drawString(Manifest.name(), 406, 20);
- g.drawString('Runtime: '+ scriptTimer.toString(), 404, 36);
- g.drawString('P/H:', 405, 64);
- g.drawString('+ moltenBars, 440, 52);
- g.drawString('+ scriptTimer.getPerHour(moltenBars), 440, 64);
- try{
- }catch(IOException e){
- }
- }
Sorry about any video quality messing up should fix more by next episode, it's been a while since I've made a video so I rendered slightly incorrect. PkHonor is one of the top RsPs out there has loads of poeple playing it, has chaotics as you can see at the time of the picture there was 115 people on and it was like 5 AM.