Jump to content

Nor3g

Members
  • Posts

    101
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Nor3g

  1. I'm making a snippet for scripts to connect directly to a mySQL db. I believe I read somewhere, as long as the library is in the same folder as the script/osbot client, can't remember which one, it will work. Haven't tested it yet but will probably do in the next few days. I can report back how it went.

    • Like 1
  2. 59 minutes ago, defil3d said:

    very interesting project looking forward to the results!

     

    1 hour ago, PerfectMoney said:

    Amazing story

     

    On 2/1/2019 at 1:42 PM, 194m said:

    Nice project dude!

     

    Thank you all!

     

    02.02.19 Report:
    Unfortunately my girlfriend gave me a hard time because she said I was spending too much time with my computer, so I wasn't able to do the harder parts. However, I did clean up the training script, and the account launcher is sorta-finished now, because it is making accounts, and saving them to the db, but it fails a lot. After having taken a look at it, I can't figure out why it fails however this may change once I'm sober again. Yes, you read that right, I'm drunk af rn. Current state of the project is that I'm able to create accounts, assigned with IPs, train them with the training script so that they are "universal" and can be used for a number of Money Makers. However I won't be trying to amass these accounts yet, because I want the money maker finished before I start shelling out cash for proxies. Currently, I'm planning on running 10 bots per proxy, 1 mule per proxy and 10 bots per mule. This is with money maker #1, and can be changed depending on how much work the bot has to train through, before it is ready. Everything, except buying and feeding proxies is fully automated and requires no user input.

  3. Intro: I recently joined the Osbot community with the intent of using my knowledge about Runescape to make IRL cash. I've played runescape for years since I was very young. The last time i logged into my main was when I by random chance stumbled upon some news of a 10 year veteran cape. I quit the game a long time before that and didn't give the game much thought until my cousin, who I've used to play with, told me he recently started playing again. We used to play the game for hours every day, but eventually, right before the bot nuke and everybody was botting, we both said goodbye to the game after getting some 99s purely from bots.

    Needless to say, after you've botted, the grind becomes excruciatingly more painful, as you know there are more efficient ways to do all the menial tasks, so i looked around for bots. I was aware of the botnuke, and how it removed almost all the bots, but surely there must be some client somewhere. I stumbled upon a thread here, on these forums, about a zulrah bot farm. It was ran by mister Swedens, and after a while it became apparent that he was banking a lot. I thought to myself, I want in on this goldmine as well! So I took it upon myself to do research and learn about everything I could possibly need. I concluded that I wanted to make a fully fledged full auto bot farm. All I wanted to do in the end was the eventual bug-fixes and logging into the main mule to sell the gold for real world cash. And thus, this account, Nor3g, and my project was born.

    Finished Semi-Finished Not Started

    INFRASTRUCTURE GOALS

    -These are goals that are paramount to a full auto experience.


    1. Make an account creator that gets fed proxies, and makes a chosen amount of accounts on each IP before saving the login details to a database.

    - fix database connection

    - Long term, get gmails from list of gmails I own to be able to unlock the accounts instead of random generation.

    - +? gmail trick option (This is now standard)

    2. Make an account launcher code snippet that launches accounts from the database with a chosen script and it's respective configuration.

    -Implement list of worlds and their type

    3. Make universal client(read botpart-muling) code that can be added to any scripts Task system. The bot should mule every 1-2 hours to minimize losses on the inevitable ban.

    4. Make a server that handles requests from clients and launches a mule from the appropriate database, with appropriate mulepart-muling script and configurations.

    5. Make a mulepart-muling script that is compatible with  botpart-muling script.

               -Have the snippet update wealth to database

               -Make mulepart-muling script that is compatible with other mulepart-muling script for muleweb

     

    6. Ban Checker

    - Account replacement

    7. Make a universal snippet that implements a connection to the DB directly from the script

     

     

    TRAINING SCRIPT GOALS

    1. Have script that completes Tut Island

    2. Have script that does quests

    3. Have script that trains to lvl 15+

    4. Have script that trains to lvl 30+

    5. Have script that trains to lvl 40+

    6. Have script that trains to lvl 50+

    7. Have script that trains to lvl 60+

    8. Have script that trains to lvl 70+

     

     

    MONEY MAKING SCRIPT GOALS (MMSG)

    -I won't share my money makers, as that only increases competition, but for my scripts, these are all universal:

    1. Making a script that has a satisfactory efficiency

    2. Implementing the botpart-muling code into the script.

    3. Satiate all worlds applicable (F2P and/or P2P depending on profitability. E.G If it generates more than a bonds worth before it is banned, it is ran on P2P world as well as F2P)

     

    AUXILIARY GOALS (long term)

    1. Simple bot-herding script that hangs around the botting spot and reports any accounts not listed in my database for botting to remove competition (Will see if this is profitable even if it is going to cost an additional proxy). 

    2. Mule web that obfuscates where fund went to minimize mule ban rate. Will employ both trade to superior mule, drop at obscure location to superior mule, Duel arena to superior mule etc.

    3. Strike deal with major OSRS gold arbitrage so that a server can ping the OSRS arbitrage website directly and sell the gold without my interference. Will check this every other day or so just to make sure I'm not getting scammed.

    4. Mirror mode support 

    5. Have the Farm Manager notify when a bot has been logged in for too long, indicating that something went wrong with it

    -Have snippet that can change the title of the process to the name of the bot to be able to easily find it among the other bots

     

    Money Maker #1

    1. MMSG

    2. 10m/day

    3. 20m/day

    4. 30m/day

    5. 50m/day

    6. 80m/day

    7. 100m/day

     

    OVER ARCHING GOALS:

    Stored accounts:

    1. Have 100 trained accounts in storage in the database

    2. Have 500 trained accounts in storage in the database

    3. Have 1000 accounts trained and in storage in the database

    Amount of running money makers:

    1. 1 MM

    2. 2 MM

    3. 5MM

    4. 10MM

    Income Every month in OSRSgp:

    1. Earn 300m in a month

    2. Earn 600m in a month

    3. Earn 900m in a month

    4. Earn 1500m in a month

    5. Earn 2400m in a month

    6. Earn 3b in a month

    7. Earn 10b in a month

     

    ANTI-BAN SYSTEM:
    Randomized tasks:

    This means that the bot will switch between different tasks at random (within the limits of it's configuration)

    Randomized order of operations:

    This means that the bot will randomize tasks within grouped limits. Example:

    wrong:

    if (!inventory has food || inventory is full of loot) {
    run to bank and get more food
    }else if (!location is correct) {
    go to location
    }else if (!attack style is correct) {
    change to correct attack style
    } else if (loot is nearby) {
    pick that shit up
    } else if (location is here) {
    attack monster
    } 

    correct: 

    group 1 {
    bank and get more food
    maybe switch attack style
    }
    group 2 {
    go to location
    maybe switch attack style
    }
    group 3 {
    attack monster
    pick that shit up
    switch attack style
    }
    group 1 shuffle;
    group 2 shuffle;
    group 3 shuffle;
    
    for ( int i = 0; group1.size; i++) {
    group1
    }
    for ( int o = 0; group1.size; o++) {
    group2
    }
    for ( int p = 0; group1.size; p++) {
    group3
    }
    

     

    ROADMAP:

     

    V 1.0
    Can run tutisland script
    Can run getname script
    Can run two botscripts simulataneously
    Can mule

    V 1.1
    -Implemented custom loginhandler, removed tutisland script & getname script.

    V 1.2
    -Implemented option to run unlimited script configurations.
    -Statistics overview.
    -Set maximum daily login hours.

    V 1.3
    -Combat script has ability to wear armour.

    -Script updates it's stats between each task

    V 1.4
    -Scripts have random order of operation as antiban.

    -Script bank and upload their gear, supplies and tools to database on script end

    V 1.5
    -Muling implemented as a task in the script rather than a separate script.

    -Account replacement

    V 1.6

    -Can mule set items.

    -Set trigger in database to set a role for bot after a certain lvl has been reached. Example, if a bot reaches 50 wc, it won't be assigned to train mining to become a clay miner

    V 1.7

    Mule-web to super mule & sell mule

    01.02.19 REPORT:

    Spoiler

    The infrastructure is nearly completed and could be launched today under manual supervision, however this would only steal time from actually making it completely fully automatic. It won't be running besides small-scale testing until every feature is implemented. The muling script on both ends are complete, and the server can handle multiple requests at the same time. I'm considering implementing a list of muling locations chosen at random, however only one, hard coded location, is sufficient for now. Tomorrow I will give the account creator a proper GUI where the accounts created may be chosen to be stored in one of the databases; mulesdb, botsdb, TBDdb.

    02.02.19 Report:

    Spoiler

    Unfortunately my girlfriend gave me a hard time because she said I was spending too much time with my computer, so I wasn't able to do the harder parts. However, I did clean up the training script, and the account launcher is sorta-finished now, because it is making accounts, and saving them to the db, but it fails a lot. After having taken a look at it, I can't figure out why it fails however this may change once I'm sober again. Yes, you read that right, I'm drunk af rn. Current state of the project is that I'm able to create accounts, assigned with IPs, train them with the training script so that they are "universal" and can be used for a number of Money Makers. However I won't be trying to amass these accounts yet, because I want the money maker finished before I start shelling out cash for proxies. Currently, I'm planning on running 10 bots per proxy, 1 mule per proxy and 10 bots per mule. This is with money maker #1, and can be changed depending on how much work the bot has to train through, before it is ready. Everything, except buying and feeding proxies is fully automated and requires no user input.

    03.02.19

    Spoiler

     

    As per the last report, hangover from yesterday is making progress slow. As we all know programming requires a certain level of brain capacity, however some say that alcohol makes you more creative. Today, the latter effect made up for the first and I solved a problem with the account creator that had been bugging me for the bigger part of last week. It was a great relief that It now works as it is supposed to. It solves the captcha, generates a random everything and I can save the information to the database. A small problem is that after solving the previous problem, it won't properly save to the database anymore. I'll look into this in the coming days as it kind of is a crucial part to the full auto experience I need to be able to run a large farm efficiently.
    I've dabbled with the money maker script, but it isn't anywhere near completed yet. I've decided to lay it off for now, focusing purely on the infrastructure.
    I've also written a list of convenient information I may want to save to the database that I'm going to implement into the snippet that can write to the database.
    The snippet should run on every bot script in the onExit() method, sending this information:
    -All levels in all skills

    -Add live runtime to existing runtime

    -Amount of gp (or, given that I'm going to run multiple money makers, all applicable resources. I haven't yet decided if the bot is going to sell it's resources itself, or if this is a task for the mules. Either way, the snippet should be universal for both mules and bots for convenience so I might as well. Kind of like a bank statement of sorts)

    -Names of the mules it traded to this session (Since the bot is going to be assigned a random mule from the muledb, it would be nice to know the mules that have traded banned bots so I can potentially assign them a banrisk factor that could be used to asses maximum allowed fund for it at a later stage)

    -What money makers the bot has participated in today (All the bots are trained to be able to do multiple money makers, so they are not limited to just one skill.)

    -How many trades it has done today (Useful for both mules and bots to see if a mule is maybe overactive and should rest more to avoid suspicion. Don't know if this will play any role at all given the high volume that I'm planning to operate in, but is easy to implement and could potentially be used at a later stage)

     

    04.02.19 REPORT

     

    Spoiler

    Nothing on the programming side was done today. I decided to write down in detail what I need to do and when it needs to be done to get to a MVP, so I did it with a friend. I told him in exact detail what my plan was and afterwards I wrote it down into a cohesive list of things to do. I think it'll make it easier to tie it down together in the end if I have a sort of flowchart to go from. I'll of course add things to this list as I work through it, because problems do arise out of nowhere.

    13.02.19

    Spoiler

     

    Account creator is now fully operational, database support implemented for both mules and bots with proxies.

    image.png.b9ca7b06a7aaa97b417fd0c40b7ac952.png

     

    15.02.19

    Spoiler

     

    Had some trouble with the way I wanted it to work and the fact that I'm very new to Java. I'm not confident enough in my skills to implement every aspect into a single script, but I am however, confident in my ability to make separate, simpler scripts. Here is the crude way I'm planning to get the bot farm operational and ready for the first launch. The Custom Login Handler Script is only going to log in to the email from it's respective database, then figure out it's in game username and write it back to the database.

    image.png.42550a59a03eeb6b984b2afc2039bc4d.png

    EDIT: Decided to write a flowchart of the entire farm, green is done, red is not done:

     

    51890324_1149983455176184_3902636486075351040_n.png?_nc_cat=110&_nc_ht=scontent.fosl2-1.fna&oh=7f0ecbc5161492f9946bf8782f5fe364&oe=5CE2C04D

     

    17.02.19

    Spoiler

     

    Minimum infrastructure has been completed and I have begun testing with 2 bots and 2 mules. The reason I have an equal amount of mules and bots is because I don't want to wait for a mule to be ready in the unlikely event that a mule is not available. The server is capable of handling multiple requests, and if a mule isn't available it will place the request in a que.

    Account launcher, Account Creator and Mule Request Server have all been added into a singular program that I named the Farm Manager.

    So far testing is revealing a lot of minor bugs. Scripts not updating properly to SQL being the main ones. I was relieved to see that the main functions are working properly though. The account is running flawlessly through tutorial island, then doing some tasks before it logs out, saves it's logintimestamp to the sql and is launched from the Farm Manager.

    Also added some new goals:

    -Statistics in the GUI

    -Set max number of accounts on each money maker and training, the Farm Manager will stop trying to launch accounts if it reached maximum capacity, and will only launch a new account if another one updates it's loginstatus to null.

     

    Here is an image of some of the data for two of my accounts:

    image.thumb.png.2841e7ad0b35081d8f2bcacf9235df3f.png

    Some of the stuff that is stored in the database:

    image.png.ad199bd6abb2fd70034f48dd33460136.pngimage.png.64da19182f254e82c187fa88c1d3ba15.png

    I'm going to calculate what the average loss on a ban is, and if it is unacceptable or suboptimal I will increase muling frequency.

     

    Report 19.02.19

    Spoiler

     

    Added some more columns to the database to be able to store more relevant information about the bots. In the future, the farm manager will be able to draw any bot from the database and launch it with a script that is perfect for it's level and items.

    image.png.233fbd8d8f276cfed49757c1f8faf607.png

    I also cleaned the Farm Manager code, because to be honest it was a mess. After everything has been sorted, it was much easier to implement all the database connections I needed. 

    10 bots and 2 mules have also been added to the farm and are currently running very efficiency-wise conservative scripts to try and avoid any bans. None so far.

     

    21.02.19

    Spoiler

    I re-wrote the botpart-mulingscript so it could have more failsafes. The bots are coming along nice and steady, and only have had 2 bans so far. I haven't given much thought into how much money they are earning yet, partly because I'm enjoying the system just working, but mostly because this is just a test phase to see if everything works correctly.

    Also I'm designing a new GUI for the account launcher because it's getting really tiresome to go into the code every time i'm going to add or edit the name/parameters of a script.

    image.thumb.png.171b8b4c25d10ad25b3ec03bb1ec6f21.png

     

    25.02.19

    Spoiler

     


    Going to implement a custom login handler into the main script so I can get rid off the getname script.

    image.png.0e85e8603d4dc74bd75c95bd1cd15d7e.png

    Also going to optimize the main script with randomize order of operation during a given task.

    And working on a giant code snippet that will include most if not all wearable items in OSRS and their stat requirement so that my bots can gear up with the optimal gear they have.

    Almost half of the bots on my home IP has been banned so far so i'm going to look into changing my home IP soon, and implement a jagex files deleter into the farm-manager.

    Statistics panel have been started on.

    Going to implement a warning system notifying if any bots have ran for longer than 12 hours, indicating that something went wrong and that there is most likely a bug in the script.

     

     

    26.02.19
     

    Spoiler

     


    A custom login handler has been implemented into the script, making the getnamescript and the tutisland script obsolete. Some bugs still remain with the custom login handler, but all in all it works. 
    I will start optimalizing the Farm Manager for the new script setup, remove legacy code etc. Before I take on adding new features.

     

    Here are some pics of the account creator wich works flawlessly now:

    image.thumb.png.87b7f1fb8eb7265e5585f850405ddc8d.png

    For the account launcher I'm going to make it possible to add new panels dynamically, and new conditions dynamically, so that I can have for example, Select bots that have both more than 23 combat and less than 15 fletching and send them to fish yew in the Ardougne ocean. Currently, I've implemented a rudimentary system with only two panels and one condition, and they are both static. This allows me to train one skill, and then moneymake it after it's reached it's moneymakingable lvl. 

    Account Launcher: 

    image.thumb.png.5b205270647a07f2e28563e979ac29ba.png

     

    28.02.19

    Spoiler

     

    The new account launcher GUI is taking form. It's not pretty, but it's dynamic, and more importantly, it's functional:

    53055668_1988930397871156_8827831580689956864_n.png?_nc_cat=107&_nc_ht=scontent.fosl2-1.fna&oh=f0e35dd2785266b2eb962106c5263b66&oe=5CEBB774

    Next I need to make a listunpacker that unpacks the lists inside the lists and outputs them into a String I can use to request an applicable account from the database.

     

    01.03.19
     

    Spoiler

     

    One month has passed! The project is well underway, and so far I'm looking at a small profit of 1m/day in sub-optimal test conditions. I must say I'm impressed with myself and how far I've come with this. 

    During the next few days I will do a lot of testing, since I finally had the time to implement the muling script fully, as a task, into the main script. However, before that I need to set up all the different configs I need, so I've made a spreadsheet that covers all requirements, and one that covers everything that the config is supposed to accomplish during it's time online. Here is the excel spreadsheet I'm using to keep track of it. The different configs will only have a number as a name:

    image.thumb.png.fb3786656d300bffd302b71f8d889336.png

    The farm manager account launcher, now with toggled editables to avoid user errors, fully dynamic add and remove script configs&tasks:

    image.thumb.png.7080bd6b92b398673b52dd0648e53e05.png

    Mules update their current wealth straight to the database making it easy to find one that is ready to sell, accounts are replaced immediately on ban:

    image.png.a0b29f3299179c74a18187f69143f584.pngimage.png.41d4f71ba381a62ab7e288861c0f2456.png

     

    02.03.19

    Spoiler

     

    10 mill muled successfully overnight with between 10-15 bots activated.

    Only 65k where lost due to bans, allthough I don't know the value of the items lost. All bots where banned and immediately replaced, no mules where banned.

     

    11.03.19
     

    Spoiler

     

    Successfully tested the farm so far. Account replacement is working flawlessly. I added some checks to the muling system to make sure the bot doesn't wait forever if a mule is banned. Somehow I managed to break the mule part of the script, so I'm currently attempting to fix it. In any case it was absolutely necessary to have this check in place so it isn't a big deal. During the test phase Everything has been running on one IP. Including the mules, and suprisingly only two mules have been banned. One with only 200k on it and one with absolutely nothing. Average actual profit every day is unclear because I have been adding in failsafes in all the scripts and softwares and that has taken some time from actual botting time. So far with 10 bots running 24/7 I have calculated, with the time online that I can make about 100$ every month. This is very promising because these numbers can then be extrapolated to 1000$ every month for 100 bots running 24/7. This is of course including training time for the bots and given that the current banrate stays the same. 
    So I have decided to go ahead with building my very own server that hopefully can support this many bots. Here is the current setup I'm looking to buy:
    2x Intel Xeon E5-2640 V4 CPU
    8x Kingston 32GB DDR4 2400Mhz ECC Reg 

    1x ATI 5870 GPU

     

    For a total of 256GB RAM and 20 Cores at 2.4Ghz. I think my main bottleneck will be the CPU So I'll be looking into maybe splitting the RAM over 2 different computers/servers with 2x extra CPUs.

    Everything will of course have a strong cooling system in place.

    I have yet to calculate exactely when I'll break even but I'm counting on running about 320 bots 24/7 and I think it'll take me about 2-3 months before I break even on that investment.

    As far as software goes my current goal is to implement a mule web that supports bond transfers so I can expand to members and partake in more lucrative money makers there. This is so that I can earn more per computing power unit, reducing the time it'll take to break even, make more money, or continue investing in additional servers. Long term I would like to leave F2P all together to focus purely on better moneymakers in the member worlds, but for now F2P botting is going to repay the hardware investment and fund the entrance into members.

     

     

    • Like 2
  4. 8 hours ago, dreameo said:

    readLine is a blocking call and waits for input.

    Your issue is that your making multiple reads when you should be just reading the value once at the time of your while loop.

    
    msg = in.ReadLine();
    
    if(msg == ..){
      
    } else if (msg == ..){
    
    } else {
    
    }

    You have to make your client and server very ping pong like:

    If you read, then you must immediately write and vice versa. However, there should only be one read and it should be at the top.

     

    You can look at this but it might be a bit confusing:

    Also make your outputstream autoflash (set true in constructor)

     

    I don't know how to set outputstream to autoflush if that's what you meant. 

    After implementing the other changes you suggested, and some other changes (like closing the socket), it eventually gets it right:

    image.png.d01bf36f3fa86ba7f501b2535ec9c4ac.png

     

    Even though It isn't breaking the program, I don't know why the client spams three consecutive messages to the server, or maybe it's the server spam printing one message three times to the console, but I'd rather have it a clean conversation. I'm going to work on this some more...

    Thank you so much for helping me! :) Greatly appreciated!

     

  5. I'm trying to build a mule script, and thus trying to build a server/client, where the client is the bot.

     

    This is the client side of the code:

            while (true) {
                    out.println(Protocol.REQUESTING_MULE);
                    out.flush();
                System.out.println(in.readLine());
    
                if (in.readLine().startsWith("mule:")) {
                    mule = in.readLine().substring(5);
                    out.println(Protocol.GOT_MULE);
                    out.flush();
                    System.out.println(in.readLine());
                   }
                if (in.readLine().equals(Protocol.REQUESTING_WORLD)) {
                    out.println("World:123");
                    out.flush();
                    System.out.println(in.readLine());
                }
                if (in.readLine().equals(Protocol.REQUESTING_NAME)) {
                    out.println("bot:bot");
                    out.flush();
                    System.out.println(in.readLine());
                }'
                Thread.sleep(2000);
            }

    This is the server side of the code:

                    while (true) {
                        System.out.println(in.readLine());
                        if (in.readLine().equals(Protocol.REQUESTING_MULE)); {
                            out.println("mule:mule");
                            out.flush();
                            System.out.println(in.readLine());
                        }
                        if (in.readLine().equals(Protocol.GOT_MULE)) {
                            out.println(Protocol.REQUESTING_WORLD);
                            out.flush();
                            System.out.println(in.readLine());
                        }
                        if (in.readLine().startsWith("World:")) {
                            world = in.readLine().substring(8);
                            out.println(Protocol.REQUESTING_NAME);
                            out.flush();
                            System.out.println(in.readLine());
                        }
                        if (in.readLine().startsWith("bot:")) {
                            bot = in.readLine().substring(4);
                            System.out.println(in.readLine());
                        }
                        System.out.println(bot);
                        System.out.println(world);
    
                        //Thread.sleep(2000);
                    }

    Console output, client side: image.png.af42a2ef94d2c09207999b585cbc48a0.png

    Console output, server side: image.png.db4a586bff9875d4d34baefe5a01fe8b.png

     

    The protocol:

    public class Protocol {
        public static final String BREAK = "0";
        public static final String REQUESTING_MULE = "1";
        public static final String REQUESTING_NAME = "2";
        public static final String REQUESTING_WORLD = "3";
        public static final String GOT_MULE = "4";
    
    }

     

    I thought that because they were in a while(true) they would finish the conversation, but it seems they get stuck on the first message they are supposed to send each.
    I've tried messing around with switch(in.println) and a lot of other stuff but I can't seem to get it to work properly. Any help would be greatly appreciated!

  6. On 1/28/2019 at 3:16 PM, ItPoke said:

    It would be great if you pushed the MUSA POINT fix for us all to use :D 

    Would love to, but I don't know how to do that.
    if you go to this: AIO/src/org/aio/activities/skills/fishing/FishingLocation.java
    and change this:

    MUSA_POINT(new Location("Musa Point", new Area(2924, 3176, 2925, 3183))),

    to this:

    MUSA_POINT(new Location("Musa Point", new Area(2923, 3176, 2926, 3183))),

    It now covers all the fishing spots.

  7. 11 minutes ago, Explv said:

    So your server is running on port 9000, but your Script is trying to connect to port 8080?

    Try changing the port in your Script to 9000

    I changed the port but it still shows the exact same error message:
    image.png.ee0aa7a59996f70f1a087384b3d2b967.png

     

    Nevermind, I didn't reload properly. Now I get a different error:

     

    image.png.cd922d357d73f08b0a54a3789fbb21df.png

    Its the same one, very many times. But atleast it's progress, right.

  8. 1 minute ago, Explv said:

    Show us your server code as well

    Server:

     

    public class MultiThreadedServer implements Runnable{
    
        protected int          serverPort   = 9000;
        protected ServerSocket serverSocket = null;
        protected boolean      isStopped    = false;
        protected Thread       runningThread= null;
    
        public MultiThreadedServer(int port){
            this.serverPort = port;
        }
    
        public void run(){
            synchronized(this){
                this.runningThread = Thread.currentThread();
            }
            openServerSocket();
            while(! isStopped()){
                Socket clientSocket = null;
                try {
                    clientSocket = this.serverSocket.accept();
                } catch (IOException e) {
                    if(isStopped()) {
                        System.out.println("Server Stopped.1") ;
                        return;
                    }
                    throw new RuntimeException(
                            "Error accepting client connection", e);
                }
                new Thread(
                        new WorkerRunnable(
                                clientSocket, "Multithreaded Server")
                ).start();
            }
            System.out.println("Server Stopped.2") ;
        }
    
    
        private synchronized boolean isStopped() {
            return this.isStopped;
        }
    
        public synchronized void stop(){
            this.isStopped = true;
            try {
                this.serverSocket.close();
            } catch (IOException e) {
                throw new RuntimeException("Error closing server", e);
            }
        }
    
        private void openServerSocket() {
            try {
                this.serverSocket = new ServerSocket(this.serverPort);
            } catch (IOException e) {
                throw new RuntimeException("Cannot open port 9000", e);
            }
        }
    }

     

    Worker Runnable:

     

           import java.io.InputStream;
            import java.io.OutputStream;
            import java.io.IOException;
            import java.net.Socket;
    
    public class WorkerRunnable implements Runnable{
    
        protected Socket clientSocket = null;
        protected String serverText   = null;
    
        public WorkerRunnable(Socket clientSocket, String serverText) {
            this.clientSocket = clientSocket;
            this.serverText   = serverText;
        }
    
        public void run() {
            try {
                InputStream input  = clientSocket.getInputStream();
                OutputStream output = clientSocket.getOutputStream();
                long time = System.currentTimeMillis();
                output.write(("HTTP/1.1 200 OK\n\nWorkerRunnable: " +
                        this.serverText + " - " + "Hello " +
                        time +
                        " ").getBytes());
                output.close();
                input.close();
                System.out.println("Request processed: " + time);
            } catch (IOException e) {
                //report exception somewhere.
                e.printStackTrace();
            }
        }
    }


    Start from GUI:

     

    import javax.swing.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    
    public class MainGUI extends JFrame {
        private JButton startServerButton;
        private JPanel rootPanel;
        private JButton stopServerButton;
    
        public MainGUI(){
    
            add(rootPanel);
    
            setTitle("Server");
            setSize(400, 500);
    
            startServerButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent arg0) {
    
                    System.out.println("Starting server...");
    
                    MultiThreadedServer server = new MultiThreadedServer(9000);
                    new Thread(server).start();
                    System.out.println("Server started");
    
    
                    try {
                        Thread.sleep(20 * 1000);}
                    catch (InterruptedException e) {
                        e.printStackTrace();
                        }
                    stopServerButton.addActionListener(new ActionListener(){
                        public void actionPerformed(ActionEvent arg0){
                            System.out.println("Stopping Server");
                            server.stop();
                        }
                    })
                ;}
            })
        ;}
    }



    The server works fine in web broswer, and I can access it from localhost:9000

  9. private void client() {
        try {
            socket = new Socket(address, port);
            log("Connected");
            input = new DataInputStream(System.in);
            output = new DataOutputStream(socket.getOutputStream());
        } catch (IOException u)
        { log(u); }
        String line = "REQUESTING MULE";
        while (!line.equals("Over")){
            try {
                output.writeUTF(line);
                log("Requested mule");
                log ("" + input + "");
            } catch (IOException i)
            { log(i); }
    }
            try {
                input.close();
                output.close();
                socket.close();
            }
            catch(IOException i)
            { log(i); }
        }
    }

     

    I am trying to connect my mule script to a local server on localhost, but I'm getting this error:

    image.png.14fb84b2d1d4c27dbf1bd9968e528067.png

     

    line 73:
     

    output.writeUTF(line);

    Line 27 is in onLoop and is just:

    client();}

    I read somewhere that network connections are blocked. Is that why I'm getting this error or is there something else?

    These are the socket and output/input streams:

        private Socket socket            = null;
        private DataInputStream  input   = null;
        private DataOutputStream output     = null;
        private String address = "localhost";
        private int port = 9000;

    EDIT: Changed port to 9000 but still the same error.
    EDIT2: New error, but now i know they are connected so it's considered solved.

  10. import org.osbot.rs07.api.map.constants.Banks;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    import org.osbot.rs07.utility.ConditionalSleep;
    import java.util.function.BooleanSupplier;
    import java.awt.*;
    
    
    @ScriptManifest(name = "Muler", author = "Nor3g", info = "Trynna holla at the m00le", version = 0.1, logo = "")
    public final class Muler extends Script {
    
        @Override
        public final int onLoop() throws InterruptedException {
            bank();
            return random(150, 200);
        }
    
        private void bank() throws InterruptedException {
            if (!Banks.VARROCK_WEST.contains(myPosition())) {
                getWalking().webWalk(Banks.VARROCK_WEST);
                log("Walking to V WB");
            } else if (!getBank().isOpen()) {
                log("Opening bank");
                getBank().open();
            } else if (!getInventory().isEmptyExcept("Raw swordfish")) {
                getBank().depositAll();
            } else if (getBank().contains("Raw swordfish")) {
                getBank().withdrawAll("Raw swordfish");
            } else {
                stop(true);
            }
        }
    }

     

    I'm trying to make a script that walks to Varrock West Bank, but when I run it, starting in lumbridge, it doesn't do anything. Can someone explain what is wrong?

    The log doesn't tell me anything other than that the script started.

    Thanks

  11. On 1/22/2019 at 8:57 PM, Explv said:

     

    How do I build it properly? I've tried both IntelliJ and Eclipse. I include the OSBot client in the libraries.
    Sorry for being such a noob!

    image.png.a7596f020c88767fcb61d234b426b38d.png

    I get this error regardless ?

     

    Never mind I figured it out! Just needed to add the resource folder to the build!

    EDIT:

    After compiling it, I changed MUSA POINT fishing location to cover the entire pier, it now fishes from all the fishing spots and not just the one up north. While fishing for swordfish with harpoon it also catches Tuna. Fishing methods that catches multiple types of fish should have an ability to drop the undesired fish. I don't think I'm experienced enough to implement this myself.

    EDIT2: New Bug, it was mining rune essence, and after it teleported in, it rotated the camera so that the rune essence rock was visible on screen, but unclickable. The mouse moved back and forth, presumably trying to click the rock, but it couldn't due to the camera being in an odd angle. According to the logger, i deduced that this went on for at least 2 hours when I wasn't there to watch over it. And also, this was a timed task, and it went almost 1,5 hours overtime.

     

     

     

     

    • Like 1
  12. Suggestions:

    When buying and selling from the grand exchange it should also withdraw all the cash it intends on spending for all the items and not do this separately The same for selling, it should withdraw at least three stacks of items and sell them without reopening the bank for each item. Maybe this could be done with a list of items separated by comma in the configurator?

     

    Bugs:


    It also managed to hover over the "sell" option in the GE while trying to sell it's resources, I wondered why, and it struck me that the cursor was located right on the edge of the "sell" button, after pause(moved cursor of screen) /unpause it worked flawlessly again and managed to click the sell button. 
    I don't know if this is a flaw with osbot or only with this script in particular.

    It died once, while web-walking(?) through an area with NPCs that aggro onto it, and after it died it re-spawned in Lumbridge, there was a screen informing it about dying in RS, it had an option to never show this again, but before I could react, the bot promptly logged out and terminated the script. It should be noted that there was more tasks after the one it was doing when it died. Here are some screens of the OSBot Logger and the debugger.

    image.thumb.png.b7556f670df827ab003999fb5125bf25.png

    It may have been due to that the current task was woodcutting and that when it died, it lost it's only axe, but if that happens it would be better if it continued on with the next task.

     

    I also saved a config file, ran the script, stopped the script to edit config file, opened config file again, changed fishing location, saved script, but the bot went ahead and disregarded the changed locations. I tried again and saved the config file, then loaded it again. It seems the save function doesn't work for locations for the fishing skill, and possibly other skills as well. This bug is reproducible.

     

    Also looking forward to a fighter! :)

  13. 6 hours ago, Explv said:

    Are you using the SDN version of the script? There is an issue where the script won't start. I have messaged the devs because I have no idea what's wrong with it.

    The open source version should work:

    https://github.com/Explv/Explvs-AIO/releases/latest

    Let me know if it doesn't

    I'm using the latest 3.4 release from github and tutorial script doesn't work. Do I have to write something in the paramters?

  14. 3 hours ago, UbexHD2 said:

    Just experienced same issue as the guy above ^^

     

    6 hours ago, 7upSprite said:

    hey thank you for making this script, I started on tutorial island using mirror mode and stealth injection however nothing is happening for either, it just sits there. In the logger below I stopped the script and then started it up again

    *snip*

    *edit* also I noticed in the original post it shows the GUI, however that did not appear for me either. 

     

    Just tested this and it's true weather or not a config is loaded from the CLI.

  15. I found a new bug: While doing the sheep shearer quest, if Fred the farmer is outside of his house the bot will go inside the house, then click on Fred the farmer to do the quest, but before the dialogue is finished it will try to re enter the house, probably because it expects him to be inside before it will talk to him. Even if it manages to go outside and talk to him, it won't continue the dialogue, presumably because it expects to be inside the house to continue the dialogue.

     

    Also I see the Tutorial Island files inside the github, but there is no option to include it in a configuration.  Nevermind! :)

     

    I would very much like a tutorial on how to build the .jar or a link to one if there is one so I can try to fix these myself.

  16. 10 hours ago, Explv said:

    I've filed the bug https://github.com/Explv/Explvs-AIO/issues/51

    I'll fix as soon as I can. Thanks for the report :)

     

    Thanks for the fast reply and for filing the bug! :)

    I love the script so far, and it is really fascinating to be able to set it to do exactly what i want. I encountered somewhat of an issue while it was travelling from Port Sarim to Karamja for banking while fishing. It halts for somewhere between 10-15 seconds on the boat before it disembarks via the plank. As far as I can tell from the OSBOT client log it uses webwalking while doing this so I don't know if this is something you can fix. In any case it is just a minor inconvenience.

    I've also noticed that the bot while either fishing for Lobster or Swordfish sometimes stops when it gets to the pier on Musa Point. This stop completely halts everything it seems, because either the account is logged of automatically due to inactivity, and then logs in again automatically and resumes fishing, or I can manually pause/unpause the bot to make it resume fishing.

    It also seems to only utilize the north fishing spot and none of the others, even though they have the option to fish for Lobster/Swordfish. I can't tell this for sure though because I haven't tested it enough. EDIT It only uses the north fishing spot because Musa Point is defined as follows:
     

    MUSA_POINT(new Location("Musa Point", new Area(2924, 3176, 2925, 3183))),

     

    I am no coder, but it seems changing this to this will fix it because it then covers the entire pier as well as all the water around it and not just the water in the north direction:

     

    MUSA_POINT(new Location("Musa Point", new Area(2923, 3176, 2926, 3183))),

     

    Location:

     

    Explvs-AIO/AIO/src/org/aio/activities/skills/fishing/FishingLocation.java

    I have no idea how to compile the jar myself, so I haven't tested it. I would love for you to make a guide on how to import it into IntelliJ or Eclipse and then compile it!

    It might fix the other issue as well, because sometimes the north-most fishing spot doesn't have an option for Swordfish/Lobster. 

  17. Very good thread by you explv, I love your bot and that it's open source so I can see what it is doing. I ran it today and watched carefully just as if I would have been playing. When my bot was fishing Salmon in Barbarian Village, powerlevelling (drop) it somehow managed to click use on the last fish. Then, it got stuck trying to click on the fishing spots, it went back and forth between two of these for some time until i stepped in and solved it for it. Other than that the bot seems to work flawless so far!

×
×
  • Create New...