Jump to content

Bobrocket

Members
  • Posts

    1664
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    100%

Posts posted by Bobrocket

  1. once again had to reset at 1:45mins in for no apparent reason, standing in the bank, plenty of required food left in bank view.. wondering if u reply to customers or perform any maintenance at all on your scripts????

     

    Molly hasn't been on for nearly 24 hours now, patience is a virtue :)

  2. Hey i've just quoted you so that you get a notification.

     

    I like what you've done here, and was about to implement it myself but I came across a few issues, and was looking for some suggestions.

     

    As it stands, I pass the entire script into each class, including the gui, I then use the instance to pass values from the GUI back into the main instance so that it can be properly used by other classes. What I have come across is, how I should be accessing this data using the setup you have suggested, should I just pass it all into the DefaultAPI class you have used as an example, and access my extra data from there instead? (Stuff like if the script should bank, what fish to catch, what logs to chop, etc).

     

    Thanks, sorry if its poorly worded

     

    Why not have a settings class? Within the settings class, have static vars which you change in the GUI?

  3. There really are no circumstances where you have to hard code widgets, even for the parents. I'm going to look and see where the binds are saved and use them for the option of clicking on the widget or sending the key bind click (F1, F2, etc). Chances are this won't come to life until late August but it's something I've already thought about. For the meantime I'll move it over to the accepted forum. 

     

    They were simply implementations that I came up with on the top of my head.

    I think you should be able to toggle in the API whether or not to send keypresses or click on a tab to open it (Client#openTabByKeypress(boolean) anyone?)

  4. With the introduction of custom keybinds, these could be super useful. It could also be utilised as an antipattern device too.

    859008b58683997bef923a33e877ebe6.png

     

    This could really help.

    Suggested Methods:

    Client#getCustomKeybinds()

    Client#getCustomKeybind(InterfaceTab tab)

    Client#getEscCloseCurrentInterface()

     

    Client#getCustomKeybinds() - Gets all the custom keybinds, in a HashMap<InterfaceTab, char> or some form of Map.

    Client#getCustomKeybind(InterfaceTab tab) - Gets a custom keybind, specified by the InterfaceTab.

    Client#getEscCloseCurrentInterface() - Returns true/false depending on whether or not the checkbox for "Esc closes current interface" is ticked.

     

     

    Why add these methods?

    A few implementations I can think of:

    • In some skills, when you level up you will stop your action. Being able just to send a keypress of "esc" helps as you do not need to hard code the widgets (in a way, so if you're doing numerous skills at once in a script for example)
    • Can be used as an antipattern of sorts - sometimes the user can click the close manually, other times the user can press escape

     

    Thanks :)

  5. Completed all easy achievement diaries today, this cape is going to take even longer than the quest cape took me but I don't mind wink.png

     

    e7448e8339326d1ad660a010cd47c711.png

    5415afd21d3e1402cf413d1780c82a51.png

     

    Note: I already have Varrock Armour (2) & Explorer's ring (2)

     

    Go for explorer's ring 3 and morytania legs 3 and you've got yourself some pretty decent teleports. Ardy cloak has been the most useful achievement on my account for sure.

     

  6. Actually, I'd say there is nothing wrong with the banking you have. 

    if (inventory.isFull() && BANK_AREA.contains(myPlayer().getPosition())) {
    
    if (inventory.isFull()) {
    return State.GO_TO_BANK;
    }
    
    

    This is part of my fighting script. It switches to the correct states when needed, I don't see how it can be improved. 

     

    I can: use nodes

    public abstract class _Node
    {
        protected Script script;
        public _Node(Script script)
        {
            this.script = script;
        }
    
        public abstract boolean canProcess();
        public abstract void process();
    
        public void run()
        {
            if (canProcess()) process();
        }
    }
    
    public class Bank extends _Node
    {
        public Bank(Script script)
        {
            super(script);
        }
    
        @Override
        public boolean canProcess()
        {
            return script.getInventory().isFull();
        }
    
        @Override
        public void process()
        {
            //stuff
        }
    }
    
    
    //in onStart
    List<_Node> nodes = new ArrayList<_Node>();
    nodes.add(new Bank(this));
    
    //in onLoop
    nodes.forEach(node -> node.run());
    
    • Like 1
  7. This ^

    They say you should spend 50% of development time planning your program out, think of this as the building blocks of your script. You don't want to build a house with a shitty foundation tongue.png

    The best way of planning it out, do what you are gonna do manually, and write down everything you do.

    If you went down a set of stairs, you'll need that.

    if you walked somewhere, you'll need that.

    write everything down! 

     

    I don't think spending half of your dev time planning is a bad idea.

    Here's my (personal) process:

    • Think of script idea and all the complex details and write them down
    • Boil it down to the super basics and flowchart it (eg a NPC killer would be things like "walk to nearest bank -> prepare inventory -> (loop) has item? (y/n) -> walk to mob -> kill mobs until out of food/no more items -> repeat")
    • Write the basics
    • Start adding complex details (try and keep an OOP structure to ensure it's easy to add more stuff to)
    • Refine your script and finetune it until it is ready for release

    An example for your complex details, an NPC killer may have these points:

    • If in wilderness, search for a looting bag in your bank to use
    • Must be able to start anywhere and work anywhere
    • Support changing combat styles on demand
    • Dynamic safespots for range/mage
    • The script must check if the mob is at full hp for loot
    • Like 1
  8. Hi guys, just want to thank you all.. remember everything is possible! I'm now 7th on the latest products list, hopefully together we can make it #1 doge.png

    566b0d7d6ac81e9630db34188bfea0f7.png

     

    Seriously though, congrats dude, you deserve it :)

    • Like 1
  9. Well, for starters, let's assume you're renting a 1U dedicated server in a datacentre for $99.99/mo. Your server has 16GB RAM, a quad core 2.8GHz intel xeon and a 1TB HDD, with a 1gbps uplink.

    You pay approximately $0.01/gb incoming traffic, and about $0.03/gb outgoing traffic.

    You'd be paying $0.60/day when not in games peroid, and about $3.15/day when in the games period.

    You're going to be paying 90x $0.60 and 20x $3.15 which is a total of $117 in terms of bandwidth. Including incoming traffic may get you to around $125.

    Your server would be running some form of Linux (eg CentOS), so you do not pay for the OS. To further save money, you use php5 and nginx for your web server and web language of choice. These are both free. However, since you are not setting it up, expect to pay around $100 for some IT technicians to do it for you. Since you are also looking for a managed solution, you would probably pay another $50/mo.

     

    In terms of security, you don't need too much. You could probably get your IT technicians to change the SSH port, enable RSA keys for SSH, disable root login, and add iptables rules to protect further for another $100 or so.

     

    You can do the calculations yourself. If you are looking for totally in-house solutions, the server would cost around $399 to purchase and maybe a static $59 per month to keep the server up 24/7.

     

     

    These are all estimates though, so don't take them seriously (do your own research)

  10. Will see about testing now. Just got on win10 and I fucking love it! This shit is fucking amazing!!!!

    EDIT: Works just fine.

    beb4591ebe08c48d9b4c7544cb43c1bc.png

    Only problem (seen above in console log) is a lack of AAing. Same happens in my script GUIs.

×
×
  • Create New...