Jump to content

Solzhenitsyn

Members
  • Posts

    181
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Solzhenitsyn

  1. Few things: You are initializing an RS2Object in your get state function. Don't do that. The reason that it is running around is because you are initializing, and assigning your currentRock object each time onLoop runs. If you want to do it like this, you should initialize it as null outside of your loop, and assign it to a rock at the beginning of your script's runtime. You aren't doing any existence checks. Since there are other rocks in the error, there won't be a null pointer error (NPE), but you should always always always perform an existence check when you are calling something that could throw an NPE. EDIT: I've modified your code so that you have a better working example. Read comments + complete small exercise. RS2Object tinRocks = null; onStart() { [...] if (getObjects.closest(7485) != null) { tinRocks = getObjects.closest(7485); } } private State getState() { if (inventory.isFull()) { return State.DROP; } else if (!myPlayer.isAnimating() && !myPlayer.isMoving && tinRocks.exists()) { return State.MINE // getState should ONLY return information, so we are moving calls to functions which cause something to happen in into your loop. } else { return State.WAIT; } } @[member=Override] public int onLoop() throws InterruptedException { if (tinRocks == null) { // Exercise: Move this existence check into your state function. log("There are no tin rocks in this area!"); stop(); } switch (getState()) { case MINE: // If you are using getState to determine which action you should be performing, and each state handles only one simple task, then migrate all of your [...] // conditional checks into getState. If we are in this state, then we know that a) You are not animating, b) You are not moving, and c) The tin rock exists. break; case DROP: inventory.dropAll(); break; case WAIT: [...] break; } return 1000; }
  2. You have absolutely no reason to believe that. I'll quote myself from a different thread because there's nothing new to say.
  3. I have written my own mouse handler which doesn't move the mouse (it sets the cursor location), it creates mouse events, assigns them a time, inserts them into a min-heap, and then handles them at the correct time. My scripts runs like a machine and makes no mistakes, because the goal is for all of them to be maximally efficient. My ban rates are identical to what they were before. I doubt that they are tracking mouse patterns.
  4. I guess I can share my snippet too, for anyone who is doing wilderness work. private boolean isPkerPresent() { List<Player> players = getPlayers().getAll(); log("BEGIN PLAYER REPORT: "); for (Player o : players) { log("Player encountered: " + o.getName() + ", Level: " + o.getCombatLevel() + ", Skull icon: " + o.getSkullIcon()); if (aMethods.weAreAttackable(o) && o.getSkullIcon() != -1 && !o.getName().equals(myPlayer().getName())) { log("RUNNING FROM PKER: " + o.getName()); return true; } } log("-----"); return false; }
  5. Just wrote a test script. Maybe someone can update the docs because these aren't the values I would have guessed. -1 = no icon 0 = regular skull 1+ = bh skull
  6. http://osbot.org/api/org/osbot/rs07/api/model/Player.html#getSkullIcon-- If anyone knows, it would be much appreciated.
  7. Write a method which populates a list of events, and then use a range-based for loop to execute them. For whatever reason (possibly a limitation of Java, the client, or my slow computer), trying to execute multiple within a ~25ms time-frame will cause bad things to happen.
  8. You guys need to work on your reading comprehension. This type of "anti-ban" does NOTHING.
  9. Without checking to see if the widget has been initialized, you are gonna get a shit load of NPEs. In any case, the house loading screen has no widgets. Returns true when you are in the house (according to the map), but things cannot be interacted with yet.
  10. If you are hitting each other on different ticks, shouldn't switching to defensive style on the tick before you are hit confer an invisible defense bonus, and switching to the controlled style on the tick before you hit confer a small invisible stat buff to all of your combat stats? If that is the case, then flicking provides a 2% defense stat bonus relative to a non-flicking opponent at maxed stats.
  11. The behaviour of the house loading screen appears to be different than regular loading screens. Even though you cannot see or interact with anything, everything has already been loaded into the game so checks like myPlayer.exists, UI widget checks (I tried inventory), and in-game object checks all return true, even though the game cannot be interfaced with. Anyone got a solution? Current workaround are the normal checks, then when all the background objects have loaded I wait until run can be toggled on and off.
  12. What object type is this, and how can I retrieve it?
  13. The fact that you don't get that this isn't about the scammer who got banned is precisely why I think you're retarded. It wasn't to throw it back at you, it was to show you that brigading is bad because a false positive is so much worse than a false negative -- and if you don't understand that after I've used your names in a hypothetical then I think it's a lost cause.
  14. Do you have to try to miss the point that hard? OK, lets try again. @Adapt and @SeleneIsLove have both scammed me for 6.9 trillion SolzBucks. I have filed a dispute against them, but in the meantime (i.e., until they are banned), everybody please brigade their feedback score, because they have scammed me -- for 6.9 trillion SolzBucks! Believe me, I have a lot of evidence, but until justice is carried out by the marketplace staff, it won't be public and we have an obligation to protect our fellow users from the trash users Adapt and SeleneIsLove by bombarding them with negative feedback. This way, no one will trade with them. [at mention all of my friends] -- but of course, this has nothing to do with popularity, since we evaluate disputes in a totally nonpartisan way and don't take up the causes of our friends who feel that they have been wronged. If you still don't see how this is a problem, then you guys are just plain retarded.
  15. How can you guys justify brigading him with negative feedback when... you were not personally scammed no staff verdict has been handed down in the dispute This isn't how feedback is supposed to work. You should only leave feedback for transactions that you were personally involved in, otherwise it just becomes a popularity contest.
  16. Putting your pathetic attempt at begging for free stuff in bold and coloured font doesn't make it any less pathetic. As for mirror mode, I think that your assessment is more or less correct. I don't use it, and when I did I didn't notice any difference in ban rates -- which makes sense to me, as hardly anyone seems to be getting banned as a result of using third party clients. There are premium scripts in the SDN. You can make your own scripts with the API (what I suspect most users do). If not, there are a lot of free/open source local scripts that you can download from the appropriate subforum. Welcome to OSB, I hope you become less retarded as a function of time.
  17. You asked if your goals were realistic and he told you that if you have no experience then no, they aren't realistic at all. What's the point in asking for advice if you only listen to the yes men?
  18. Danny, maybe you can try running from command line (I don't see why it would make a difference, but perhaps). java -jar "C:\somePath...\2.4.84.jar" -login Yesitsdanny:forumpassword -bot gameAccount:gamePassword:pin Hope you get it fixed soon, not being able to use something you paid for
  19. Look into using configs to validate the attack style. Parent ID 43 Child values [0,4] in order of [1, 2] [3, 4]
  20. The most reliable way I found was to sleep until the current world has changed. I posted a snippet in the scripting subforum which might save you some time.
×
×
  • Create New...