Jump to content

Archon

Members
  • Posts

    112
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by Archon

  1. Just do what the assignment asks for. Storing the data in an array isn't necessary for the results are quite obvious. Just use a new thread to determine what amount of time you'd like execution to occur on.

    import java.util.Random;
     
    /**
     * Created by Archon
     */
    public class VehicleSimulator {
     
        private static final Random RANDOM = new Random();
     
        public static void main(String[] args) {
            VehicleSimulator camry = new VehicleSimulator(1, 100, 20, 1);
            camry.start();
        }
     
        /**
         * Separator
         */
     
        private int passengers, fuelCap, mpg, gear;
     
        private boolean acc, running;
     
        public VehicleSimulator(int passengers, int fuelCap, int mpg, int gear) {
            this.passengers = passengers;
            this.fuelCap = fuelCap;
            this.mpg = mpg;
            this.gear = gear;
            this.running = true;
        }
     
        private void start() {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    while(running) {
                        accDec();
                        changeGears();
                        debug();
                        try {
                            Thread.sleep(1000L);
                        } catch(InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }, this.getClass().getName()).start();
        }
     
        private void accDec() {
            if(gear == 1) {
                /**
                 * Cannot decelerate at this point!
                 */
                acc = true;
                return;
            }
            acc = RANDOM.nextBoolean();
        }
     
        private void changeGears() {
            int change = acc ? +1 : -1;
            gear += change;
        }
     
        private void debug() {
            System.out.println("Accelerate: " + acc + "     Gear: " + gear);
        }
     
    }
  2. You just pm'd me about it for the first time, and that was ONLY because I pm'd you and asked if you were updating the script. I have forwarded this to the administration.  I am looking into this and trying to get it figured out as quick as possible. Not updating your scripts because you can't see your sales just ruins your reputation as a scripter and gets you less sales.

     

    I have no idea who you are, are you new? I've contacted several of the administrators such as Maxi, Laz, and Zach. Also, you never replied to me when I brought it up to you.

     

    I don't live off of this site, I can care less about my reputation. It's either my scripts are purchased or they are not.

  3. I'm tired of not being able to see my scripts from the sales page. I'm tired of being ignored by the administration team.

     

    I have no reason to update my scripts when I get this kind of treatment.

     

    angry.png wacko.png unsure.png dry.png

  4. OSBot's scrolling to an item from the bank interface isn't the greatest and is buggy. Also, who honestly scrolls with the tiny up and down arrows? Anyways, this will scroll more human like. Feel free to use it. 

       private boolean scrollToItem(String name) throws InterruptedException {
            RS2Interface bankInterface = client.getInterface(12);
            if(bankInterface == null || !bankInterface.isVisible())
                return false;
            Item[] bankItems = bankInterface.getItems(6);
            if(bankItems == null || bankItems.length < 400) {
                log("Invalid items container child id!");
                return false;
            }
            int itemSlot;
            Item bankItem = null;
            for(itemSlot = 0; itemSlot < bankItems.length; itemSlot++) {
                Item item = bankItems[itemSlot];
                if(item == null || !item.getName().equalsIgnoreCase(name))
                    continue;
                bankItem = item;
                break;
            }
            if(bankItem == null) {
                log(name + " not found in bank!");
                return false;
            }
            if(client.getBank().isSlotVisible(itemSlot))
                return true;
            int row = itemSlot > 8 ? itemSlot / 8 : 0;
            System.out.println("Scrolling to row: " + row);
            int x = 482;
            int y = 75 + (int) (row * 3.5);
            int width = 14;
            int height = 10;
            return client.moveMouseTo(new RectangleDestination(x, y, width, height), false, true, false);
        }
  5.  

    No offense, but I couldn't see you being a good administrator regardless of the community.

    915de2884863a553c8bb6ffb49153062.png

     

    you're lucky i dont want to get you banned ......... i wont dispute you

     

    Clearly I was joking, but feel free to dispute.

  6. Firstly, this is probably not the correct section but hopefully the ones who visit this section have better knowledge on the subject.

    I understand that pooling connections allows for connections to be 'recycled' but whenever I read about the action of pooling connections there is always something that states: "Make sure you close the connection when you're finished with it to put it back into the pool."

    Now, I've also read that having to re-open a connection is very costly, so I don't see how a pool helps if the connection is always being closed and re-opened.

    Someone help me better understand this subject,

    Archon

  7. I understand you don't like getting paid in time at all, but unless you use this as a job(which would be pretty stupid imo, but oh well) it's more or less of a hobby. I understand it's stupid, but just be patient :s

     

    Once again, I wasn't complaining simply asking a question directed towards the staff members.

  8. Yeah and the thing is I wasn't ranting about OSBot not paying, all I did was ask when they do actually pay because I haven't yet received a payment. Kids blew everything way out of proportion. 

    • Like 1
  9.  

    I don't see why you are being completely blatant.

    Tell me this, if you go to a job and you are told you will be paid every certain day but after that days go by two times without being paid will you do something to question why or simply sit back and say "Oh it's only been 8 days."

    Also, I have messaged Laz, Maxi, and Raflesia.

     

    You really have no place of even replying to this thread as you are no body in this community, beside the fact that you probably know the basics of Java and can put together a few scripts.

     

    Clearly this thread was a last resort to get an Administrators attention.

    Now now I know you can't stand me but no need to get offensive. I have as many rights to post in this thread as anyone else. As far as the job comparison, I don't remember signing any contracts which state that you will be payed EXACTLY every 7 days. Not to mention if I remember correctly the SDN section says that they will do their best to pay you every 7 days.

     

     

    No, you don't. I was posting this thread directly to the administration team with the following issue:

    "Why isn't my script showed on the scripts page?" and "When does OSBot pay scrtipers?"

    You cannot answer either of these questions with confidence, so please be on your way.

  10.  

    I don't see why you are being completely blatant.

    Tell me this, if you go to a job and you are told you will be paid every certain day but after that days go by two times without being paid will you do something to question why or simply sit back and say "Oh it's only been 8 days."

    Also, I have messaged Laz, Maxi, and Raflesia.

     

    You really have no place of even replying to this thread as you are no body in this community, beside the fact that you probably know the basics of Java and can put together a few scripts.

     

    Clearly this thread was a last resort to get an Administrators attention.

    Now now I know you can't stand me but no need to get offensive. I have as many rights to post in this thread as anyone else. As far as the job comparison, I don't remember signing any contracts which state that you will be payed EXACTLY every 7 days. Not to mention if I remember correctly the SDN section says that they will do their best to pay you every 7 days.

     

     

    No, you don't. I was posting this thread directly to the administration team with the following issue:

    "Why isn't my script showed on the scripts page?" and "When does OSBot pay scrtipers?"

    You cannot answer either of these questions with confidence, so please be on your way.

  11.  

    Archon has waited 2 weeks.

    That's not a few days.

     

    I don't like to do this but let me write this out for you Archon said the following:

     

    *removed*

    I cannot see my Archon Agility script on this page.

     

    Also, when does OSBot pay scrtipers? I was told every Wednesday but it's been two Wednesdays now without anything.

    Now we're going to do some simple counting:

    Wed nr 1 - Start

    Thu - Day nr 1

    Fri - Day nr 2

    Sat - Day nr 3

    Sun - Day nr 4

    Mon - Day nr 5

    Tue - Day nr 6

    Wed nr 2 - Day nr 7

    Thu - Complain day

    According to this 8 days passed since the pay date. The complaints started the 8th day. So he has been waiting a maximum of 8 days (which isn't that long in my opinion). And instead of PMing the admin for information he goes public with it causing people to spread rumors like: "seeing so many scripters not getting paid. its ridicilious. staff doesnt give a fuck.". I made this up using the information in the thread correct me if I am wrong.

     

     

    I don't see why you are being completely blatant.

    Tell me this, if you go to a job and you are told you will be paid every certain day but after that days go by two times without being paid will you do something to question why or simply sit back and say "Oh it's only been 8 days."

    Also, I have messaged Laz, Maxi, and Raflesia.

     

    You really have no place of even replying to this thread as you are no body in this community, beside the fact that you probably know the basics of Java and can put together a few scripts.

     

    Clearly this thread was a last resort to get an Administrators attention.

    • Like 2
  12. A quirk in RS's client and or server, I have no other idea as the information available is just a representation of what the client knows.

     

    Added custom fix for this, maybe you should do something similar in your closestNPC methods:

       private NPC getClosestAttackablePest() {
            NPC closest = null;
            int closestDistance = Integer.MAX_VALUE;
            for (NPC npc : client.getLocalNPCs()) {
                if(npc == null)
                    continue;
                if(Misc.getDistance(npc.getPosition(), myPosition()) > 15) {
                    System.err.println("Error: " + npc.getName() + " not in screen!");
                    continue;
                }
                int priority = getAttackPriority(npc.getName());
                if(priority == 0)
                    continue;
                int dist;
                if(attackPortals) {
                    dist = Misc.getDistance(myPosition(), game.selectedPortal.walkTo);
                    if(dist > 8)
                        continue;
                } else {
                    dist = realDistance(npc);
                }
                if(priority == 2) {
                    /**
                     * Spinner
                     */
                    return npc;
                }
                if (dist == -1 || dist > closestDistance)
                    continue;
                closest = npc;
                closestDistance = dist;
            }
            return closest;
        }
    • Like 1
  13. Script output: Found Spinner true 6856 3363

    Output info: Name isValid X Y

    My coordinates: 8993, 3553

     

    Please explain to me how the npc found above is in the local npc list.

  14. I dont believe you are an official script writer and you dont know that there is a hook in the API that gives you the option to override any RandomEvent and handle it the way you want. Also in options there checkboxes that you can uncheck to disable the built in for the random you want.

     

    Docs in API:

    http://osbot.org/api/index.html?org/osbot/script/rs2/randoms/RandomBehaviourHook.html

     

    As the API shows this only seems to allow you to modify the onLoop method. There is no way for me to determine what I need from a BehaviourHook.

     

    Also, I am aware of the checkbox but this still leaves a problem: If you turn of 'Talkers' and a random event such as Dr. Hyde comes he will teleport to you wherever you go.

  15. So there is a problem with random events while doing Agility. Considering there are obstacles you have to pass if a random spawns behind one and there is no way to get to it to talk to it OSBot will just stand there until the random event teleports you away.

     

    Since OSBot pauses your script you have no way to actually handle this yourself as a script writer.

     

    This needs to be fixed...

     

    Edit: Possibly disabling 'Talker' random events may help, testing this.

×
×
  • Create New...