Jump to content

Bobrocket

Members
  • Posts

    1664
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    100%

Posts posted by Bobrocket

  1. Well, I developed it specifically for our school, so that was kind of how I had it done.

    Teachers really aren't going to be using it because it's the students that upload the gapped files. Mostly, it just tries to ensure you have a valid edu email address you can access.

     

    Yeah, that makes more sense. I believe there's a project that has a list of every campus email, might want to look into that. It's lightweight, too, like 100kb at best.

  2.  

    Play around with it a bit smile.png

    public void onPaint(Graphics2D g){
       for(int i = 0; i < mouse.getEntitiesOnCurson().size(); i++){
          g.drawString("Entity number: " +i +" = " +mouse.getEntitiesOnCurson()[i], x, y + (i*15));
       }
    }
    

     

    Yeah will do, just hoped you had the answer tongue.png

     

    Edit: was right; higher index = closer to the front of the stack.

  3. Use client.getToolTip() for the top left messages. In my interaction method I check if the action parameter is in the toolTip, if yes I left click, otherwise I right click. To check if your entity is first on cursor you could maybe use something like: if getMouse().getEntitiesOnCursor()[0].equals(yourEntity).... and so on.

     

    Would index 0 really be the first object though? Because the items are drawn in a layered fashion, so the first visible object is drawn the last. Maybe I'm overthinking this though :/

     

    Also, didn't know about getToolTip(). Thanks!

  4. 1. getMouse().getEntitiesOnCursor().contains(...);

     

    Might do the trick, or you could derive it from the action displayed in the top left corner, however I'm not sure whether the API supports that out of the box.

     

    2. You could get the 3D bounding boxes of multiple entities' models and obtain a new model(s) by subtracting overlapping ones.

     

    Thank you. I'll see what I can do about the bounding boxes and edit the first post with a solution for those looking for it.

    Also, for the first one, I am looking to see if the Master Farmer is on top of the stack. I know that the mouse will have the entity on the cursor, but I simply need to know if the farmer is on top or not.

     

    Also, while I'm asking questions, I seem to have something which is more of a problem with Entity#isVisible(), for some reason, when the entity goes off the game screen but still within the actual applet, it seems to return true. Is there a method that checks if an entity is within the window?

  5. I have 2 questions regarding models:

    • How do I check which model or object is at the top of where the cursor is? For example, say I have my camera moved in such a way where a seed stall is infront of the master farmer, and I move my mouse to the master farmer and left click. This is going to click the seed stall. How can I detect that the seed stall is the first object there so I can choose to right click?
    • How do I check for visible parts of the model? For example, say 2 models are slightly overlapping (let's use the seed stall and master farmer example once more), and this leaves the master farmer with about half his actual model as actual visible space (to us). The client, however, recognises his entire model as visible. How can I see which bits of the model are actually visible to the client?

    Sorry if these do not make sense, I just woke up.

     

    EDIT: I am still looking for how to find which objects appear in front of my specified object. pls help <3

  6.  

    I ended up going with this for anyone running into a similar problem. Thanks again to everyone that helped

    List<NPC> fishingSpots = getNpcs().filter(new ActionFilter<NPC>("Cage"));
    NPC fishingSpot = fishingSpots.get(0);
    for (NPC n : fishingSpots) {
        if (getMap().distance(n) - getMap().distance(myPlayer()) < getMap().distance(fishingSpot) - getMap().distance(myPlayer())) {
            fishingSpot = n;
        }
    }
    

     

    You should really use Botre's answer for that, or do something like this:

    NPC fishingSpot = getNpcs().closest(new Filter<NPC>() {
        @Override
        public boolean match(NPC n) {
            return (n.hasAction("Cage") /* Other options if needed */);
        }
    });
    

     

  7. You're going to need php for this.

    <?php
    
    if (isset($_POST['feedback'], $_POST['uniq'])) {
      //connect to database, insert row with feedback, uniq and other vars
    }
    else {
      die("invalid");
    }
    
    ?>
    

    You'll also need to look into sending POST requests in Java.

    • Like 1
  8. Configs are values part of the client state. In this case config 43 tells us something about the current attack style, if config 43 is set to 0 it means the first attack style is selected, config 43 = 1 means the second is selected etc. There are config values for a lot of things ranging from current quest state to the autocasted spell (config 108). I'm not even sure why most of them are stored in the client, but they're very useful smile.png

     

    Please take this as a like as I have given out too many today :(

    Is there a list of configs? Sorry for derailing the thread l0l

  9. Things to learn in order

     

    HTML

    CSS

    SQL

    Then a language to execute sql ie (php/asp.net)

    JavaScript -> makes it alot easier to display data sources

     

    There are a few things wrong with this.

    • You don't need to learn HTML, it's literally markup. Not too hard to write <b>My website!</b>
    • People should learn PHP/ASP.NET before they learn SQL, so they can utilise it better
    • I personally don't recommend learning ASP.NET as it's hard to find servers that support it

     

    OP, the best advice I can give you is to quite simply try and write shit. Skip HTML/CSS, go straight to PHP. Set yourself a goal (eg user registration and login system), learn basic syntax (and practice OOP) and just give it a go.

    And keep doing it.

    Over and over.

    Until your registration and login is flawless. Look up common security flaws (using MD5 to hash passwords, SQL injection, XSS when displaying user info), and patch them.

    Once you have a flawless user registration/login, expand on it. Implement a private message system, and perfect that. Refine your code to support these new features, and soon enough you'll not only have a fully working forum, but you'll also have learned a lot about PHP.

    From there, you should do the same. Again.

    Keep doing it until you're fully comfortable with the wide array of functions you use. Don't be afraid about not fully knowing all the functions, I still forget what the parameters of str_replace() are (and in which order).

  10. Through use of various flash/java exploits you can get a lot of information. Been a long time since I looked into this stuff but I believe CVE-2014-0543 (not even sure if that's the right CVE) could grab hardware info since it could execute arbitrary code.

     

    The standard information someone can get from visiting a website without exploits includes:

    • Whether or not you have JS enabled
    • Whether or not you have a form of adblock
    • Your IP
    • Your country and rough area (through your IP)
    • Your browser
    • Your OS
    • Your .NET version (some user agents submit this information, I believe only IE does this but no idea)
    • Whether or not you are using a transparent proxy
    • Your screen resolution and the resolution of your browser window
    • Your local time + timezone
    • Your referrer (the last site you visited)

    Here's a little example of the sheer amount of information you can grab from your user agent string:

    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0

    -I am using Firefox, version 39.0

    -I am using Windows 7 (NT 6.1)

    -I am running a 32-bit browser on 64-bit architecture (WOW64)

    -I use the Gecko CSS engine (default firefox engine)

    -My Gecko engine is version "2010-01-01"

    • Like 1
  11. This is everything I needed. Thank you guys for being so helpful.

    Edit - Still looking for some information on looting individual kills. Trying to make a bot that doesn't run around like a chicken with it's head cut-off grabbing things. Cheers. Working on combat script for multiple monster types in obscure places. IE (not alkharid, not cows, not stronghold). :)

    Would recommend looking at the mobs position when it dies (there will be an animation for it), and wait until there are GroundItems for it.

    Also, use filters when possible. They're really good!

×
×
  • Create New...