Everything posted by fixthissite
-
NodeFragment and NodeLinking Systems
Please meet me in the Chatbox and I'll give you my skype there
-
PM button not on my profile, crash when sending another user message
Someone tried pming me, told me they couldn't find my pm button. So I go to send them a message. When I press "Send a message", I get this: With enough speed, if I quickly go to the home page, I get this: Which isn't true, seeing how I'm here posting about the problem. I have never encountered this problem until today, and it can be reproduce. The last time I've successfully received a message was June 19. The last time I've sent a message was June 21st. I am unsure whether it was successful or not.
-
NodeFragment and NodeLinking Systems
This is the version I actually tested:http://pastebin.com/ukJPBLhA You're going to need to add the constructor which access the MethodProvider, then go down to getConstructor().newInstance() and pass it to the newInstace() method. The previous pastebin I sent you was me trying to apply the changes from the version I actually tested to the version with the MethodProvider already implemented. This is the one I have ran, which I know works. You're going to have to fix up the imports, though. The other version should have worked after the changes, though. Are you sure you called "initCurrentSettings" in onStart()? And you've change nodeSet.get(node) to currentNodeSet = nodeSet.get(node) in initCurrentSettings, yeah? currentNodeSet should not be null. If it is, that means the value isn't in the map, which I've added to the map in the add method [nodeSet.put(node, linkNodes(...))]. I tried messaging you, but it keeps on saying the site lost connection. Idk what's wrong, I'ma have to report it.
-
NodeFragment and NodeLinking Systems
True champ For the first one, we need to check if the array passed in (through the parameters) has at least 1 value. Change linkedNodes.length (in the original code, not the one you modified) to linkedNodeTypes.length.The second one, you should actually be initializing the currentNodeSet variable with the value obtained from nodeSet.get(node). Change that line to currentNodeSet = nodeSet.get(node); For the last one, replace put(nodeType, linkNodes(...)) with put(node, linkNodes(...)) I promise these kinds difficulties will not appear in future guides/snippits. I'm not at home right now, so I can't do much when it comes to running the code I release on here, and if I only released these things while I was on a computer, I'd never get to it (too many other things to focus on while on a computer). But I will make sure others have tested before releasing anything in the future. As for the other guy implementing it right, keep in mind that not everyone is at the same programming skill level. He probably saw the problems himself and fixed it up
-
NodeFragment and NodeLinking Systems
Didn't realize my pm system was disabled. I'm not sure how to re-enable it. I'll send you a message (which hopefully you could reply to).I couldn't run the final pastebin I uploaded (not at a computer, so I removed references of OSBot before testing), but I ran a mock version of it which worked fine. Hopefully I didn't mess anything up while re-implementing the OSBot stuff (the MethodProvider reference)
-
NodeFragment and NodeLinking Systems
After taking another look at the code, I've made a fatal mistake. The nodeSet map is mapping class types to node: Map<Class<? extends Node>, Node[]> nodeSet; //should be named nodeSetMap But in initCurrentSet, I told you to do nodeSet.get(node), when node is an instance of the class, not the class type (since allNodes.values() returns a Set<Node> and not a Set<Class<? extends Node>>). Map<Class<? extends Node>, Node> allNodes; for(Node node : allNodes.values()) { if(node.canProcess()) { currentNodeSet = nodeSet.get(node); break; } } What I told you before (the code I just showed) should have actually generated a compiler error. On top of that, I found a few little mistakes I didn't tend to (such as validating that you actually specified nodes in @Linked), so try this out: http://pastebin.com/QHTEg53H It's still messy. The fixes I added were quick fixes (making the design look even messier), but I'm cleaning this up as we speak, since apparently a re-upload is much needed. Let me know if the new LinkerManager works for you! And thank you for finding these problems for me. As I've said before, I've never actually ran this. I released it shortly after the person who requested it told me he got it working (with a few minor tweaks). Never release without testing X_X
-
NodeFragment and NodeLinking Systems
Seems I forgot to set the initial "currentNodeSet". I uploaded this without testing, which seems to always be a problem. I'll make sure to test anything I release in the future To fix this, you're going to need to find a set that best fits your bot when it starts. You can do this in a few different ways. I recommend setting it in onStart, right before continuing to onLoop: void onStart() { manager.add(...); manager.add(...); manager.initCurrentSet(); } Within the Manager class, you would add public void initCurrentSet() { for(Node node : allNodes.values()) { if(node.canProcess()) { currentNodeSet = nodeSets.get(node); break; } } } I'll be fixing this up shortly after my current project, which will make it easier for people to apply it to their scripts. Sorry for the inconvienence (wrote these systems from my phone )
-
Know your scammer! [A simple guide into the world of scammers on OSBot]
I make a thread asking questions which contain very little harassment, it gets deleted and I get 2 warning points. This guy makes a fool out of another guy, and mods like his post. So confused..
-
Paying for a trusted scripting tutor
Selling any kind of educational services is against the rules /:
-
GUI not functioning but not giving errors in IDE.
So are the values returned both invalid values? That's what you mean by "not providing info to the script"?Run this through your IDE's debugger. I'd give your JCheckBox an ActionListener (which triggers when the item is changed). Put a breakpoint within it, make sure that when you change combobox item, the thread suspends (allowing you to see what happened up to that point). Open up the Variables view and make sure they are the values you want. I'm not at a computer, so not much I can do right now. What I CAN do is suggest: 1. Post your Swing code to the EDT 2. Don't use busy waiting 3. Check out my GUI Settungs guide (http://osbot.org/forum/topic/75074-creating-a-settings-ui-specify-settings-when-script-starts/) 4. DEBUG
-
GUI not functioning but not giving errors in IDE.
That's strange.. I never used Eclipse GUI builder, but GUI builders usually take advantage of GroupLayout, not absolute positioning, for consistency reasons.Could you take a picture of your results? I'm not sure what your problem is. Are the combo boxes not showing up in your frame? Or are the results from the check boxes aren't the ones you expected? Please be more specific
-
Anyone interested in helping setup/run/mod a Spigot 1000+ minecraft server?
Very detailed. Thank you I've helped a few friends with minecraft plugins. Let me know if you have any problems; I might be able to help. Although I can't be dedicated.. too much on my hands to take on another full project (sorry man)
-
Anyone interested in helping setup/run/mod a Spigot 1000+ minecraft server?
What kind of knowledge?
-
Hello
Welcome If you're interested in programming, feel free to message me
-
Who has a StackOverflow account?
Why not? And why would you come to this thread just to say that? There's nothing wrong with sharing your SO profile
-
Who has a StackOverflow account?
It's a GREAT source of knowledge Edit questions/answers until you're at 50 rep (minimum to comment). You'll find yourself needing to comment a lot more than you'll be able to answer/ask, so unlock commenting ASAP
-
Who has a StackOverflow account?
Post a link to your account!
-
Bug
Do you have the source code for the script? The stack trace is basically saying, "When the script tried creating an InteractionEvent, it tried using a variable which did not contain an expected object". Although the NPE occured "under the hood", that does not mean the cause of the problem resides there; you could have triggered something that caused it. To find the cause, we follow the stack trace. We can look through possible locations of the problem by reading the stack trace from bottom to top: The script thread calls onLoop of class PowerChopper. onLoop calls the method E of PowerChopper at line 186 of the PowerChopper file. Line 186 resides in the onLoop method; it's where onLoop calls E. E calls the method E of CoN at line 88 of PowerChopper. Line 88 resides in the E method (of powerchopper); it's where CoN#E is called. You should first examine the parts you have access to (PowerChopper#onLoop and PowerChopper#E). Once you have exhausted all the methods you have access to (once you have reached a method in the stacktrace that belongs to the API/Client), then you can ask someone who has access to that code to see what's going on. You must also know what a NullPointerException is. "under the hood", either a reference variable is not being initialized properly (thus pointing to null, and raising a NPE when used), or it's being passed the null value (you are passing it null). The second situation is what you want to watch out for.
-
Script wont run no idea why
Yeah, initializing in the field is similar to initializing in the constructor.Assign the values in onStart, not the field.
-
Need help from a runescape account specialist
I always liked hybrids. Not sure how low of a combat level you're looking for, but I tend to see hybrids maxed at 108, 109 depending on whether you want Turmoil (found a ton of them while playing Stealing Creation; they're pretty damn deadly. Also, not sure if OSRS has turmoil). Would be easier if you listed some standards. I wouldn't consider myself an account specialist, but hopefully I could pitch some useful ideas
-
How do I make a GUI for my script?
Don't forget to post your Swing related code to the Event Dispatch Thread! Ensures no inconcistencies with any GUI code that may be executing. As for the busy-waiting, wait/notify (guarded blocks) would be the best solution for what you want to achieve. It ensures a thread isn't continuously running while not executing any code (consuming CPU power). If you choose to busy-wait (maybe you find wait/notify too complex, which if so, message me), you should at least sleep for 1 or 2 millisec between each iteration, to ensure CPU usage isn't at max (You'd be surprised how much 2 ms helps). Hope you found this info beneficial! And thanks for the contribution!
-
Script wont run no idea why
You're getting a NullPointerException at line 27 of AKSkiller.java If you showed the chunk of code surrounding that line, I could help further. My guess is you're trying to use an API method within the constructor of the class that extends Script. Don't use the constructor. Instead, use the onStart method to write code you want to execute when the script starts. Calling things like myPlayer() in the constructor of your script class would result in a NPE, and seeing how you're getting one in the constructor, I'm guessing that's the reason.
-
What Colour Is It
The problem isn't high memory usage. Since the objects are short lived, they will be cleaned up as soon as a minor collection is performed. It's the amount of times the GC is required to perform. Your heap will fill up quickly, requiring far more collections than should be required. This can cause a performance impact when in comes to CPU time, not memory. Similar to defragmenting your hard drive, objects that don't get "sweeped" get reorganized. During this time, the object graph is considered to be in an inconsistent state, and all threads are blocked from accessing objects. This is called safepoint, but most refer to it as "Stop-The-World", and occurs not only for GC, but other "under the hood" systems. The more often STW occurs, the more latency you'll notice in your program. The more often a GC is required, the more often STWs occur
-
What Colour Is It
Very neat idea. You should tend to the excess onjects that are being created though. Keep in mind, Color is immutable, so decode returns a new Color instance each call. Depending on how fast your onPaint is executing, this could generate a lot of short-lived Color objects, requiring more GCs (although minor, enough minor GCs within a certain timeframe can result in a performance impact). Seeing how a new color generates only every second, you should only be creating a new Color after a second has passed
-
NodeFragment and NodeLinking Systems
Trust me, I'm a huge fan of finite state automata (I actually suggested a FSM addition to the API, which got rejected.. Don't be fooled by the lack of foundation for the states in the post, was just pitching an idea).If implemented right, a FSM can save you quite a bit of processing. In the Node framework, if you had a WalkToWild node, it's conditions would be "hasFood && hasGear && !inWild". These conditions would make sense when transitioning from Start to WalkToWild, but doesn't make as much sense when transitioning from Bank to WalkToWild. After banking, we can be sure that we have food and gear (if not, better add a WalkToStore node or have it transition to EXIT, which I don't think any node frameworks account for exiting). So checking if we have food and gave gear is not needed after banking. In a FSM based script, we could specify the EXACT logic for transitioning between states. The problem is, we need to write logic for EVERY possible transition. This doesn't scale as easily as encapsulating all the rules for a node inside a node. So now it's about "Do I wanna save CPU time by removing these excess checks, at the price of increased verbosity?". That's where it comes down to opinion. I found this video (https://youtu.be/wsmMOJj6ETo), which explains different AI techniques (for gaming purposes); a pretty interesting watch (and introdroduction) for those getting into AI. Constantly checking the current state allows for more percise interpretation. For example, lets say WalkToBank was processing, but your bot came across an expensive item on the ground while walking there. Unless your WalkToBank state manually checks for items between each step, it's not gonna notice it. In a node framework, you could have a Loot node, which gets triggered when a good item is near you on the ground. Since the states could change at any second in a node framework, it allows you to account for more actions without needing to manually implement that logic for each state. I was all for FSM scripts when I got here. Now, due to the environment and goals, I feel the node framework was a very nice contribution to the community, and whoever proposed it first should get a cookie. Is it the most efficient? Nah. But it most definitely has it's benefits. As for the excess processing that arises from it, unless you're planning on implementing some intense system, it's nothing anyone should worry about. Sorry for the long post. Could talk about automata all day :P I was planning on working on a script with 2 other devs here, based on the goal-oriented framework I was going to release to the public (but decided not to due to it's complexity; didn't want it dying out before people saw it's potential), but came across quite a few roadblocks (rules with timing, pricing, script complexity, ect..). I've heard there's a lot more money doing something a bit more advanced, somewhat similar, but in a free market, so I'm looking at my options. I feel scripting isn't where I belong anyways; doesn't take advantage of the variety of technologies I've familiarized myself with /: