Jump to content

HunterRS

Scripter I
  • Posts

    479
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by HunterRS

  1. http://prntscr.com/goke1u
  2. Error in script executor! java.lang.NullPointerException at Main.onLoop(Main.java:385) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(xe:49) at java.lang.Thread.run(Unknown Source). EDIT: it is no longer in the condition sleep Line 385: if(getMagic().castSpell(NormalSpells.HIGH_LEVEL_ALCHEMY)){
  3. so I have this code: case ALCH: if(getMagic().canCast(NormalSpells.HIGH_LEVEL_ALCHEMY)){ if(!myPlayer().isAnimating()){ if(getMagic().castSpell(NormalSpells.HIGH_LEVEL_ALCHEMY)){ status = "Alching"; if(getInventory().interact("Cast", "Maple longbow")){ new ConditionalSleep(3000) { @Override public boolean condition() { return myPlayer().isAnimating(); } }.sleep(); } } } } break; ?and I am geting a freaking NPE on declarin the ConditionalSleep, any idea why
  4. Could I get a trial please?
  5. Ahh I see, thought I all ready went through it but apearantly I skipped a part. Ty for your help
  6. Where would I find the config id values? EDIT: What do you guys even mean by config values because I think i miss understood :p
  7. Is there a way to change the combat options? Right now I have the following code: switch(style){ case ATT: combatStyle = getWidgets().get(593, 3); break; case DEF: combatStyle = getWidgets().get(593, 15); break; case STR: combatStyle = getWidgets().get(593, 7); break; default: break; } after I set the combat style I'll interact with it What I am looking for is 2 things: 1. Is there a simpler way to change style? 2. Is there a way to get the current style? (other than checking for what type of xp I get when I attack or checking the color)
  8. I hear it's full of bots and gold farmers...
  9. Looks simple enough, Ty very much
  10. Is there a way to get all of the tiles in a certain radius that are valid for lighting fires on them?
  11. Ahhh I get it, ty very much
  12. Ya saw this, still think I dont understand it fully
  13. Could you explain this line? I tried without it and it didnt work.
  14. I am having a problem with figuring out if a player can access an Area. Talking webwalk wise, like quests, items, teleports... How can I check if the webwalk has found a path without acually executing the walk?
  15. It was because I had null items in my equipmentStart array, didnt know getItems also returns nulls. ty, that could be useful, I'll look into that.
  16. Ahhh good to know, tyvm
  17. for some reason I am getting a NullPointerException in this code, I am trying to figure out if I should equip something (after death): for(Item equip: equipmentStart){ if(!getEquipment().contains(equip.getName())){ if(getInventory().contains(equip.getName())){ return State.EQUIP; } } } anyone knows whats wrong with it? EDIT: equipmentStart = getEquipment().getItems(); in onStart()
  18. Just did 2 seperate checks one for the State define and the other for the attack itself.
  19. ya just found isFighting, was exactly what I was looking for. Ty for your help
  20. I cant for the life of me get this to work. I am trying to attack a cow while my player is not in combat and the cow is not in combat. I used so many freaking filters but non of them work. Here is what I currently have: State definer NPC cow = getNpcs().closest(cowFilter); if (cow != null && !myPlayer().isAnimating()) return State.ATTACK; switch case case ATTACK: NPC cow = getNpcs().closest(cowFilter); if (cow != null && !myPlayer().isAnimating()) cow.interact("Attack"); break; cow filter Filter<NPC> cowFilter = new Filter<NPC>(){ public boolean match(NPC npc){ return (npc.getName().equalsIgnoreCase("Cow") || npc.getName().equalsIgnoreCase("Cow calf")) && !npc.isHitBarVisible() && !npc.isAnimating() && npc.isAttackable() && getMap().canReach(npc); } }; Anyone has any idea what I am doing wrong?
  21. I did :), here is also the onStart: public void onStart() { log("Goblin killer has started"); for(final Skill skill : new Skill[]{Skill.ATTACK, Skill.STRENGTH, Skill.DEFENCE, Skill.RANGED, Skill.MAGIC}) { getExperienceTracker().start(skill); } } EDIT: just to be clear, it was all ready done before so that is not the problem.
  22. ty though if anyone knows why it is adding 2 hrs I would appriciate it might just do it like that if i dont find an answer
  23. hi guys, so I am new to writing scripts and i have kind of a stupid question. I wrote this basic goblin killing script and added some draws, for some reason though my timer always starts at 2 hrs. Anyone knows why? here is the code: int totalXp = 0; for(final Skill skill : new Skill[]{Skill.ATTACK, Skill.STRENGTH, Skill.DEFENCE, Skill.RANGED, Skill.MAGIC}) { totalXp += getExperienceTracker().getGainedXP(skill); } Date date = new Date(getExperienceTracker().getElapsed(Skill.ATTACK)); DateFormat formatter = new SimpleDateFormat("HH:mm:ss"); String dateFormatted = formatter.format(date); g.drawString("Time Running: " + dateFormatted, 20, 300); g.drawString("Total XP: " + Integer.toString(totalXp), 20, 330);
  24. ty, howl long is the trial for?
  25. could i please get a trial?
×
×
  • Create New...