Jump to content

Criboo

Members
  • Posts

    77
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Criboo

  1. I trialled this script and here are my thoughts:

    There's a lot to like - once it gets going it does its task well.

    A few suggestions to improve it:

    1.  More options re gear.  I couldn't use any of the shields available in the drop down, so after using Guthans to heal it just resumes without the shield.

    2.  Something is up with the deaths.  It died while up the ladder from the Dagannoth king lair while waiting to get in without being attacked by prime/supreme.  It then attempted to walk back without any gear equipped from Lumbridge.

    3.  More options for spells to use.

    Here's a 3 hour proggy from the trial - thanks!

    Dag Rex.png

  2. An account I was goldfarming on got banned at 77 ranged, ban was quashed, and then I kept doing the same thing until 90 range when it got banned again.  My goldfarming method was ~10k exp/hr, so it was a lot of botting between the first and second bans.

    I'm not convinced it was banned because it was being watched, all my accounts were hit at that time, so I'm taking a break from botting just now.

  3. 17 hours ago, HeyImJamie said:

    Where does your hate from 'Antiban' stem from when it's fairly common knowledge that bans are a result of the data analysts Jagex has employed? I can appreciate that 99% of 'Antiban' that scripters implement is worthless.. i.e. Computer-generated random ints, but still.. stating every suggestion is pointless seems a bit backwards to me. 

    How is it common knowledge?

    It's pure speculation.

  4. Mixed experiences, think it depends on a combination of luck, account age, originality, and the skill(s) involved.  I learned some basic scripting so that I could write my own scripts.  Some I have used extensively and experienced zero bans with, others have had frequent bans.  For example, a basic progressive WC script I made will get a fresh f2p account banned if used too much. 

    Don't think an original idea means no bans though.  I have a couple of scripts doing stuff that no one else seems to do and I've still had one or two accounts banned doing it.

    If you really want private scripts I'd suggest learning how to make them yourself.  There are good resources and helpful people on here, and you can build them up in scope quite quickly.  It's also good fun :)

     

  5. Hi all

    I'm writing a script which requires the player to attack an NPC and lure it to a safespot.  Doing so involves my player leaving the safespot to find the monster, attacking it, running to a certain place then running to the safespot.

    There are several of this NPC in my general fight area, and I am trying to ensure that once I attack it it becomes my NPC (rather than just a NPC) which I lure and attack.  This is to avoid attacking an NPC, running to my first spot then attempting to fight another one.

    Is there a way I can segregate an NPC which I attack, but am then subsequently not fighting (or necessarily being attacked by as I run away) so that my script keeps focus on that NPC? 

    Thanks in advance

    Chris

  6. Can be pre-made or I can provide a level 3 account for it to be levelled.

    Account must have no email registered.

    Looking for quotes.

    Thanks in advance

    Chris

  7. On 5/26/2018 at 9:38 PM, Cloxygen said:

    you can do it with an array of strings and just store the names of each object or you can use a linked list and store the items as rs2objects. I would probably just store the names. You also need a case if you run out of items in the bank, like end the script or buy more items from the ge.

    Thanks for getting back to me.  I have found a workable method which has not yet failed me, so I'm pleased with it as is.  I'll try and condense/tidy it next time I need to implement it.  I have added a stop script feature, but not tested it as I have plentiful supplies in the bank :)

  8. Jamie

    Thanks for your help.  I had started figuring it out by the time you got back to me.  My issue more is how to cache it, not the understanding that I need to.  

    The way I have done it is not strictly caching, I think, but seems to work.  I am grabbing the name of each piece of gear in my onStart, and storing that as a string in my public class Main extends Script { section.  On death I'll open the bank, deposit all and withdraw each item, which should be defined when the script starts.

    Any obvious flaw with that method of doing it?

     

     

  9. Hello all

    I've made a script which occasionally dies!  This isn't an issue, but what is an issue is that I can't figure out an effective way to regear, other than to specify in the deathwalk state to enter bank and withdraw the specified items that the character I used to test the deathwalking uses.  

    This is an issue as I want to use different gear at different levels (ie, not use the same gear on all my accounts), but if the gear my test account used isn't in the bank it gets stuck.

    So, I need to know how to get the script to check my gear when I turn the bot on, and then remember that gear should it die and need to regear.

    Could anyone give me a few pointers as to how to go about this?

    Thanks

    Chris

  10. My Proxy6 accounts get locked after tutorial.  The moment you finish if you log out and back in they'll be locked.  I create the accounts on my home network so that I can recover them and unlock, but it's a faff.

  11. 1 hour ago, Apaec said:

    No worries - what I meant about switch statements was as follows: While it may work to lay the code out as you have done in your onLoop, it might lead to some unexpected results since it may execute more than one thing per loop of the onLoop. Here's the correct (...or traditional...) way to use a switch statement:

    
    switch (getState()) {
        /* ... */
      case BANKING:
        break;
      case RETURN_FROM_BANK:
        break;
      case GO_TO_BANK:
        break;
        /* ... */
      default:
        break;
    }

    ____________________________

    As for using enums in this way to organise your code, I think it's a great way to separate the function of your code (i.e the interaction code, walking, etc) from the logic of your code (the checks, assertions etc). While plain if/else statements in your onLoop works just fine too, it can get quite overwhelming for larger projects.

    It is important to note however that the difference between these solutions is purely aesthetic: neither solutions offer any additional functionality. As you progress with scripting and java in general, you will learn about inheritance, encapsulation, and other key object oriented concepts (alongside some common design patterns) which you can apply to your code to make it 'do more for less'.

    Best

    Apa

     

    Apa

    Thanks again for getting back & taking your time to help.

    I suspect it was doing things repeatedly when all in the onLoop.  I also am aware that splitting it into States was purely aesthetic, but, as I said, I did it to learn + because my script was messy.  It looks much better now, and I'm finding it easier to debug/add additional functionality and checks now it's split into more manageable chunks. 

    Cheers,

    Chris

  12. 12 hours ago, Apaec said:

    There are a couple of syntactic issues with this code:

    1. You're putting a semi-colon straight after the if statement. Since if statements without any curly braces {} only encompass the next line, this semi colon is blocking your actual code. See https://stackoverflow.com/questions/15786949/is-there-a-difference-in-removing-the-curly-braces-from-if-statements-in-java
    2. Take a look at how switch statements work on google :) https://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html

    With regards to your banking question, splitting it up into states in your getState() method sounds like a good plan.

    -Apa

    Edit: added some links

    Apa

    Thanks for getting back for me and for posting those helpful links.  Not sure I completely follow the second one, but I have my States working, and have revamped (and fleshed out) my script using a lot more curly braces (and far fewer semicolons!).  I'm sure as I attempt to develop more complex scripts I'll figure it out as I tend to learn best through practical exercises!

     

    10 hours ago, Chris said:

    quick fix: dont use enum states

    Chris

    Thanks too for getting back, and for your tutorials, without which I'd not have gotten this far!

    I had the whole thing in the onLoop before without using states.  It did what I asked of it, but it was messy, and I'm not convinced it followed through every step properly.  I wanted to put it into states to basically learn how to do it, for when I want to make more complicated scripts.

    It seems like states are a more intuitive way of parceling up a script into lots of little tasks, but if that's not the case I'm happy to be corrected.

    Anyway, thanks again to both of you :)

    Chris

  13. Hi all

    As my first script, I've made a basic combat script which fights a specific monster, eats when health is low, and banks.  It seems to work fine as I have ran it for a few hours without issue!

    Everything is in the onLoop at the moment and looks a bit messy, so I'm attempting to tidy up the code.  My first thought was to use the following as a skeleton:-

    private enum State {
        FIGHT, GO_TO_BANK, BANKING, RETURN_FROM_BANK
    }
    
    public State getState() {
        String food = "Trout";
        if (getBank().isOpen() && !getInventory().contains(food));
            return State.BANKING;
        if (myPlayer().getPosition().equals(BANK) && getInventory().contains(food));
            return State.RETURN_FROM_BANK;
        if (!getInventory().contains(food));
            return State.GO_TO_BANK;
        return State.FIGHT;
    }
    
    @Override
    public int onLoop() throws InterruptedException {
    
        switch (getState()) {
            case BANKING:
        }
    
        switch (getState()) {
            case RETURN_FROM_BANK:
        }
    
        switch (getState()) {
            case GO_TO_BANK:
        }
    
        switch (getState()) {
            case FIGHT:
        }

    However, the second 'if' statement in the public State getState() { has a red line under it in IntelliJ as it is an 'unreachable statement'.  What does this mean? I'm clearly not understanding how the code flows in some way.

    Is there a better way to structure the code?

    Should I get rid of the 'RETURN_FROM_BANK' state, or get rid of all three banking states and replace it with one state which goes to the bank, does banking, then returns to my monster?

    Thanks in advance for any help!

    Chris

×
×
  • Create New...