Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • stCky: idk man im just a chat bot
      August 22, 2017, 11:14:52 PM
    • symantec: is this forum
      August 22, 2017, 09:02:56 PM
    • symantec: what the fudge
      August 22, 2017, 09:02:52 PM
    • symantec: I just joined to download datmaker, the links are broken and a user named i nelson i has a fudgeing weird signature
      August 22, 2017, 08:59:33 PM
    • stCky: ur so cool and edgy
      August 22, 2017, 04:15:50 PM
    • Deathspirit: anyways, i'm un ip banned now.. but don't even want to be that at this point lmfao
      August 22, 2017, 01:58:14 PM
    • Deathspirit: now it's some sell out half leeched server :')
      August 22, 2017, 01:57:53 PM
    • Deathspirit: gf moparscape, was the best rsps community i've been on since 2006
      August 22, 2017, 01:57:31 PM
    • stCky: yeah, nah. it's cooked. [link] might help u with a backup or something idk man im just a chat bot
      August 22, 2017, 12:13:25 AM
    • flew420: I sure hope someone has a copy of the forum before it was recked
      August 21, 2017, 11:40:52 PM
    • flew420: O wow i see now, just read thru all the news articles. :(  i've been out of the game for a couple years so coming back to this shit is sad.
      August 21, 2017, 11:39:46 PM
    • flew420: Huh?
      August 21, 2017, 10:49:51 PM
    • stCky: got bought by a russian dude, he put a shitty rsps on it for donations, now no one cares
      August 21, 2017, 10:48:30 PM
    • flew420: I came on for some nostalgic reading in old classic development, and it only goes back to 2014 wtf.
      August 21, 2017, 10:43:09 PM
    • flew420: what happened to this site??
      August 21, 2017, 10:42:36 PM
    • Sean56:[link]
      August 21, 2017, 05:33:45 PM
    • kb010: how can i play? i downloaded the client and it doesnt open.
      August 21, 2017, 10:52:56 AM
    • wodkode: shut it down or fix it
      August 20, 2017, 10:11:28 PM
    • wodkode: dude i cant goto no links on here from google
      August 20, 2017, 10:11:13 PM
    • Dell: Greetings
      August 20, 2017, 11:56:30 AM

    Author Topic: [PI/Emu/Riot] Server Side pathfinding (Clipped following)  (Read 26061 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinematzie

    • Member
    • ****
    • Posts: 1,006
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #220 on: November 25, 2014, 03:24:53 PM »
    Your best best is to modify your client, then hardcode the items into the cache (so you don't have to send them every time). Then create a cache dump of your own walk map :)
    Quote from: Justin Bieber
    Also, I don't know how other people feel about this but personally I really dislike having to interact with community staff since they're usually kids with a pumped up sense of authority.
    Who its by XD


    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #221 on: November 25, 2014, 09:48:25 PM »
    Your best best is to modify your client, then hardcode the items into the cache (so you don't have to send them every time). Then create a cache dump of your own walk map :)
    if you're responding to:
    How do i add my own custom clipped coords? cuz my thieveing stalls arent clipped?
    You're wrong but right...

    @Quintorz it's really easy.. He made a method for it, but it's not implemented..

    In Region.java there's a method called "loadCustomObjects"
    You want to add something similar to this in order for it to load your objects.
    Code: Java
    1. addObject(id, x, y, height, type, rotation);
    2.  
    For each object...

    I forget if I had to add it, but make sure this is in the load() method for Region:
    Code: Java
    1. loadCustomObjects();

    Yes, you can do what matzie said and add the objects in client sided and then dump it to load server sided, but the way I did it seemed easiest..

    Edit: if there's no loadCustomObjects method, then make it. The method ain't anything special.


    OfflineReaperXScape

    • Member
    • ****
    • Posts: 376
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #222 on: December 15, 2014, 07:14:12 PM »
    Since sk8r bumped this, I might as well ask this now...

    Does anybody know how to make this work for Npc following?
    And how to make it work for objects that were spawned manually through the server?
    OMFG LOOK AT SPOILERS
    (click to show/hide)


    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #223 on: December 15, 2014, 07:23:10 PM »
    Since sk8r bumped this, I might as well ask this now...

    Does anybody know how to make this work for Npc following?
    And how to make it work for objects that were spawned manually through the server?
    Refer literally to the post above.. I *just* went over that..
    It's basically the same thing. Because custom objects get put in the server's object list anyways.

    OfflineReaperXScape

    • Member
    • ****
    • Posts: 376
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #224 on: December 15, 2014, 07:43:48 PM »
    I don't have that method in region.java..
    OMFG LOOK AT SPOILERS
    (click to show/hide)

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #225 on: December 15, 2014, 09:02:34 PM »
    I don't have that method in region.java..
    Then create it. it was an empty method anyways.

    OfflineReaperXScape

    • Member
    • ****
    • Posts: 376
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #226 on: December 16, 2014, 04:18:09 PM »
    I don't have that method in region.java..
    Then create it. it was an empty method anyways.

    I called the method from void load, and now I get errors in runserver when somebody follows. and it takes me to the line where it calls to load the objects.
    OMFG LOOK AT SPOILERS
    (click to show/hide)

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #227 on: December 16, 2014, 05:47:48 PM »
    I don't have that method in region.java..
    Then create it. it was an empty method anyways.

    I called the method from void load, and now I get errors in runserver when somebody follows. and it takes me to the line where it calls to load the objects.
    Doesn't seem like you loaded them right then.
    Show some code maybe?

    OfflineReaperXScape

    • Member
    • ****
    • Posts: 376
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #228 on: December 16, 2014, 05:55:06 PM »
    public static void loadCustomObjects() {
          addObject(2213, 2038, 4535, 0, 10, 2);
    }

    that's an example, I have more objects loading from it, they are all like that though.


    I called the method under
    Code: [Select]
    int size = in.length() / 7;

    in this method...

    Code: [Select]
    public static void load() {
        try {
    File f = new File("./Data/world/map_index");
    byte[] buffer = new byte[(int) f.length()];
    DataInputStream dis = new DataInputStream(new FileInputStream(f));
    dis.readFully(buffer);
    dis.close();
            ByteStream in = new ByteStream(buffer);
            int size = in.length() / 7;
            regions = new Region[size];
            int[] regionIds = new int[size];
            int[] mapGroundFileIds = new int[size];
            int[] mapObjectsFileIds = new int[size];
    boolean[] isMembers = new boolean[size];
            for (int i = 0; i < size; i++) {
                regionIds[i] = in.getUShort();
                mapGroundFileIds[i] = in.getUShort();
                mapObjectsFileIds[i] = in.getUShort();
                isMembers[i] = in.getUByte() == 0;
            }
            for (int i = 0; i < size; i++) {
                regions[i] = new Region(regionIds[i], isMembers[i]);
            }
            for (int i = 0; i < size; i++) {
                byte[] file1 = getBuffer(new File("./Data/world/map/" + mapObjectsFileIds[i] + ".gz"));
                byte[] file2 = getBuffer(new File("./Data/world/map/" + mapGroundFileIds[i] + ".gz"));
                if (file1 == null || file2 == null) {
                    continue;
                }
    try {
    loadMaps(regionIds[i], new ByteStream(file1), new ByteStream(file2));
    } catch(Exception e) {
    System.out.println("Error loading map region: " + regionIds[i]);
    }
            }
    System.out.println("[Region] DONE LOADING REGION CONFIGURATIONS");
        } catch (Exception e) {
        e.printStackTrace();
        }
        }
     

    OMFG LOOK AT SPOILERS
    (click to show/hide)

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #229 on: December 16, 2014, 06:15:30 PM »
    Try putting it before:
    Code: Java
    1.         System.out.println("[Region] DONE LOADING REGION CONFIGURATIONS");

    OfflineReaperXScape

    • Member
    • ****
    • Posts: 376
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #230 on: December 16, 2014, 08:19:02 PM »
    Works :) thanks a lot :)

    does anybody know how to use this for clipping npcs?
    or attack player following
    or following npcs?
    OMFG LOOK AT SPOILERS
    (click to show/hide)

    Offlinedoleo

    • Member
    • **
    • Posts: 6
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #231 on: April 18, 2015, 09:58:24 AM »
    Feel like I'm reviving an old old thread haha but worked perfectly for me :) saved me so much time!

    Thanks heaps for uploading this haha, the other guides had client-side checking or just horribly made :D

    Thanks again!

    Offlineasshole_rule

    • Member
    • ****
    • Posts: 4,872
    • Thanks: +0/-0
      • View Profile
    Re: [PI/Emu/Riot] Server Side pathfinding (Clipped following)
    « Reply #232 on: April 20, 2015, 04:08:22 PM »
    Works :) thanks a lot :)

    does anybody know how to use this for clipping npcs?
    or attack player following
    or following npcs?

    pretty easy to apply this to all the above things u named

    Feel like I'm reviving an old old thread haha but worked perfectly for me :) saved me so much time!

    Thanks heaps for uploading this haha, the other guides had client-side checking or just horribly made :D

    Thanks again!

    np...
    the strongest super saiyan on moparscape

    I'd also like to say that rep abuse is an offense, and one member of this topic has had their rep locked due to it.

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal