-
Posts
1664 -
Joined
-
Last visited
-
Days Won
4 -
Feedback
100%
Posts posted by Bobrocket
-
-
It's all about the nodes.
There are plenty of tutorials for how to do nodes, and they keep me writing less code than required. The OOP structure of a node is good too.
-
1
-
-
Isn't it bad to have static variables? Like static getters and stuff I understand, but static variables just sounds like a bad idea
It probably is, but a solution is a solution.
-
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?
-
Firstly, your example doesn't include anything to do with the var item.
Secondly, how are you getting the item? items[index] or getInventory().getItemAtSlot(index)?
-
I'll probably have some sort of boolean in the action constructor. Tabs.open(Tab, boolean useBind).
That works even better
-
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?)
-
With the introduction of custom keybinds, these could be super useful. It could also be utilised as an antipattern device too.
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
-
List of people who care:
-
5
-
The Office (US)
Parks and Recreation
Community
30 Rock
-
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
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.
-
Looks clean man good job. Just remember quality of the script>quality of the logo (:
You chatting shit about my scripts bruh?
-
-
I figured he was still trying to learn the process, if I were him i'd stick to states, they are easy to understand and after you have them down you can learn new processes
It's better to learn things like this early on, it's simple and it's gonna remove a lot of redundant code (1000+ lines in onLoop was mainstream anyway, right guys?)
-
1
-
-
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());
-
1
-
-
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
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
-
1
-
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
Seriously though, congrats dude, you deserve it
-
1
-
-
i hate you all
-
Write a flowchart to understand the flow of the script, and then build the basic script and finetune as you go.
-
1
-
-
Windows 10 is fucking amazing. I'm just now trying to set up an email account so I can say "Hey cortana, send an email to <x> saying he sucks".
-
1
-
-
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)
-
It should say when you purchase the script if you end up with a monthly contract or not.
-
Will see about testing now. Just got on win10 and I fucking love it! This shit is fucking amazing!!!!
EDIT: Works just fine.
Only problem (seen above in console log) is a lack of AAing. Same happens in my script GUIs.
-
44% upgrading, hope its worth it. Looks amazing and MS have taken some great turns recently so I have high hopes!
-
Let's try that. That looks a lot better now haha.
Yeah looks great
Molly's Thiever
in Thieving
Posted
Molly hasn't been on for nearly 24 hours now, patience is a virtue![:)](https://osbot.org/forum/uploads/emoticons/new_smile.png)