Jump to content

Trey

RSPS Veteran
  • Content count

    3,412
  • Joined

  • Last visited

About Trey

  • Rank
    You can call me Dr. Daddy
  • Birthday 01/29/1988

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Trey

    Sethy in Army??

    [quote name='Sethy']Got daddy's approval? I'm g2g How's college going bb[/QUOTE] Pretty good man, about to graduate. So when will you find out if you made it?
  2. Trey

    Sethy in Army??

    Good luck man! Sounds exciting, and more importantly that you're excited.
  3. Trey

    RuneScript

    Ew wtf. I am now disappointed.
  4. Trey

    Want to learn?

    I wouldn't bother buying books unless you like having a physical reference (some people prefer this). You can find almost anything you need to know using existing tutorials and examples on the interwebs, plus Java's API documentation and tutorials. I have a vague and old guide stickied in this board if it helps you at all. I wish there was a way to allow modifications from a group of trusted users, as I can't be bothered to update or maintain something that has been done better many times over all over the web. My best advice is to simply dive in head first. Start with really simple tasks. Break things, experiment, google errors and understand why they occurred. It's also nice to start some projects that have potential for future improvement as you can always go back to expand with new things you've learned. Plus this will give you experience will building off of existing code, which is what you'll be doing in 99% of jobs you'll have in software development. Also, this allows you to start learning to design projects in a flexible and scalable way, which is important. Write code with the expectation that someone else who knows nothing about your code will some day have to make modifications. The best code is not clever; it is understandable, modular, and well designed to account for future expansion. The more code you write the more you'll develop an intuition for designing projects and a clear understanding of best practices.
  5. Use Java. The client already depends on Java anyway as noted by [MENTION=38556]Nouish[/MENTION], so no sense in depending on two VM's in order to run your software. Also you have (nearly) infinite power with reflection to hook into the existing client to fetch/modify values at runtime, which is how all the bot clients did (do?) things. Might as well take the same approach to provide some useful features in your client. Also, why not start an open source project out of it? This makes things more trustworthy (unlike OSBuddy, which is ran by a hacker and is closed-source, while still being used by a huge population of OSRS players and half-endorsed by staff), and also allows for community driven development. Produce something better than OSBuddy that doesn't require payments!
  6. I wonder how much more time will pass before Ikiliki just starts hosting RuneScape role playing porn starring Cart. Would probably draw a lot of traffic
  7. [quote name='Birdhouse919']I keep getting a weird error message when trying to preview my post that completely messes up the screen. I will write out the rest in a WORD file and then just input all the data at one time. :p This is a tutorial for Borland, which is different from standard C.[/QUOTE] C != C++. In fact C isn't event a subset of C++ (you can't throw C code at a c++ compiler necessarily; there are language differences) Also, pl ease don't spread false knowledge. You're better off not spreading any at that point. A number of the things you've stated are either clear misunderstandings or falsities. I can understand "dumbing down" a bit to appeal to an audience lacking enough background, but ensure that you aren't being incorrect while doing so. You could also precurse with "Can be thought of as ..." or "used here to ..." versus just stating that something is something that it isn't. For example, what you are calling a prototype is just a header file. A [B]function prototype[/B] is when you [B]declare [/B]a function before you [B]define[/B] its body. A prototype can be used to specify the number of and types of arguments for a function so that the compiler can throw errors when it sees the function being called otherwise. They can also be useful in a header file in order to kind of declare functions for use where the header is included regardless of how those functions are actually implemented. Also, in C/C++ only alphanumeric characters and the underscore are valid for use in an identifier, where a number can't begin it. It's probably worth mentioning the preprocessor, and how #include is a preprocessor command that literally copies the contents of the included file wherever the include statement is (which is header files should really only contain declarations for things: structs, prototpyes, typedefs etc.). This is also why it's important to include a newline at the end of the header, or the pasting of the included files contents could cause a syntax error if not ending in a newline. Another thing worth mentioning is that you don't have to (and really shouldn't) throw all of your variables at the beginning of a function. You should declare them in the lowest scope they can possibly exist in, as this allows for better optimization when the compiler knows that a variable is used only in a specific scope versus being needed for the entire function. You probably should declare variables at the beginning of their block, as this is required by < C99, but this doesn't mean the beginning of the function. You can even use braces to force scope, like in C89 where you had to declare your looping variable outside of the loop construct itself: [code] int i = 0; for(i = 0; i < someshit; i++) ; //more code [/code] You can force the scope of i to be with the loop by throwing extra braces around it giving it it's own block. with the loop: [code] { int i = 0; for(i = 0; i < someshit; i++) ; } //more code [/code] That's about as much as I feel like typing. Anyway, I hope you continue to play with C++ and continue to research and learn, but I hope even more that you realize how turd-like c++ is and instead choose to write more code in c. Good luck to you sir!
  8. [quote name='kibitz']I thought about that after i hit post haha, yeah. But now that you know that, it is bad practice to do that because although it only uses very little resources to do that math, its still resources that you dont "need" to use, just a tip. Either way, good job and good luck :D[/QUOTE] Makes no difference actually. Constant arithmetic would be resolved at compile-time. Just less readable and looks possibly unintended. In fact, in some cases you way not want to carry out arithmetic if you want to show where the resulting constant came from. An expression kind of explains itself versus some magic number. But I'm just being picky :P @OP: [quote] // Math. provides math methods number2 = 5; [/quote] The Math package simply provides some useful mathematical functions (sin, cos, sqrt, etc.), it doesn't have anything to do with the actual evaluation of mathematical expressions. FYI for your own benefit EDIT: @Hope beat me to it.
  9. Post the contents of the script your running (your .*sh or .bat file)
  10. [quote name='VoltexRsPs']Read my pm should fix problem[/QUOTE] Why not post the answer to prevent redundant threads in the future? No reason to try and keep solutions for simple RSPS problems to yourself.
  11. What do you mean by "both and integer and a string"? You'll read the input as a string, as in "10ml". You're also making the assumption that the user is entering a value in the proper units. So, when I tell your code I wish to convert to ml and I enter "10ml", it expects me to enter in liters, so it'd give the wrong answer. I'd go ahead and tokenize the input into two, the value and the units. You can use a simple regular expression to do this using the String.split method by tokenizing on the first non-numeric or the first character in the alphabet (a-z). Would be best to modify this regular expression to eliminating/ignore any whitespace between value and units also, but that's something for you to look up on your own (it's really easy). Something like this: [code] System.out.print("Enter a value in liters/milliliters: "); String line = scanner.nextLine(); String[] tokens = line.split("[^0-9]"); //You could use '[a-z]' also if (tokens.length > 1) { switch (tokens[1].toUpperCase()) { case "ML": //do ml conversion to l break; case "L": //do l conversion to ml break; } } else { System.out.println("You must provide units!"); } [/code] Uppercasing (is that a word?) the string gives the advantage of eliminating checking for "mL" vs "Ml" vs "ml" etc. Good luck! Post any other questions or progress you have.
  12. Trey

    Girl Advice?

    [quote name='Fascism']feed her at least 3 times a day[/QUOTE] Don't forget to change her water too
  13. Trey

    Python?

    At my highschool they taught people with C# in the introductory level, and Java for the AP exam. At my university the introductory classes were in C++, but they switched to Java about 2 years ago. All the systems courses use C though, and the project/software engineering courses used Java and C# depending on which you chose. The language isn't all that important assuming you pick one that's decently high-level and well documented/used. The challenge comes from learning how to think logically, break things into components/steps, and notice patterns/relations between components that you can abstract. If you have a mathematical way of thinking this shouldn't be a big challenge, but others never get past this hurdle. Once you learn to think, picking up more programming languages is just a matter of learning paradigms, syntax and APIs, and becomes pretty straight forward. So, if you wish to learn with Python then get started. The time you spend figuring out which language to start with could be spent learning a language now.
  14. [quote name='Divine-X']If I have the regular getter/setter setup and I do some calculations for the damage done to the player, and I try to save the game, the player file will stay at[code]<hp>100</hp>[/code] when in the game itself the player is at for example 70hp.[/QUOTE] Sounds like you either aren't saving successfully or are somehow not loading correctly. Keep in mind that the changes to the instance aren't magically felt by the saved copy, though this goes without saying. Make sure you really are saving the player; check file timestamp and such, and also check the value of hp at the time that you save.
  15. You're abusing/misunderstanding the point of the static keyword. When a variable is static, it is the same value for all instances of that class, rather than each instance having its own separate value such as for non-static variables. This mean every instance of Player will have the same hp, which is almost assuredly not intended. You say that you make it static so that you can change it, and I don't understand why this is. You have setters/getters for all your other instance variables, so why is hp any different? Are you using serialization (Serializable interface, read/writeObject)? The fact that it is static is also probably why it isn't saved in the XML. It doesn't make sense to save static variables, so they aren't.
×