Thread: 508 Scratch Login

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 508 Scratch Login 
    Renown Programmer

    Sean's Avatar
    Join Date
    May 2007
    Age
    29
    Posts
    2,758
    Thanks given
    264
    Thanks received
    1,089
    Rep Power
    4393


    Credits :
    Light232(godsent) fixing my login.

    Me, Creator of framework (was orignaly made for a 523 light was doing but i wanted 508 login)

    Pali, basicly, if it wasnt for him, 508's wouldnt be here lawl and (TX)

    Still Dont Belive?

    Code:
    package net.sirpkp00n.server508.model.world;
    
    import java.io.DataInputStream;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.util.HashMap;
    
    import net.sirpkp00n.server508.util.SystemLogger;
    
    public class MapRegion {
    
    	private static int mapId;
    	private static HashMap<Integer, MapList> mapRegions;
    
    	static {
    		setMapId(0);
    		setMapRegions(new HashMap<Integer, MapList>());
    		loadRegions();
    	}
    
    	public static int[] getMapData(int region) {
    		return mapRegions.get(region).getMapRegions();
    	}
    
    	private static int getMapId() {
    		return mapId;
    	}
    
    	private static HashMap<Integer, MapList> getMapRegions() {
    		return mapRegions;
    	}
    
    	private static void loadRegions() {
    		try {
    			DataInputStream in = new DataInputStream(new FileInputStream(
    					"./data/mapdata/1.dat"));
    			do {
    				int i = in.readInt();
    				if (i == 0) {
    					break;
    				} else if (i != 0) {
    					setMapId(in.readInt());
    				}
    				setRegions(getMapId(), new int[] { in.readInt(), in.readInt(),
    						in.readInt(), in.readInt() });
    			} while (true);
    			SystemLogger.log("Total Map Data Regions Loaded "
    					+ mapRegions.size());
    		} catch (IOException ioe) {
    			ioe.printStackTrace();
    		}
    	}
    
    	private static void setMapId(int mapId) {
    		MapRegion.mapId = mapId;
    	}
    
    	private static void setMapRegions(HashMap<Integer, MapList> mapRegions) {
    		MapRegion.mapRegions = mapRegions;
    	}
    
    	private static void setRegions(int id, int region[]) {
    		MapList map = new MapList(id, region);
    		getMapRegions().put(id, map);
    	}
    }
    Code:
    package net.sirpkp00n.server508.model.world;
    
    public class MapList {
    
    	private int mapId;
    	private int[] mapRegions;
    
    	public MapList(int id, int[] map) {
    		this.mapId = id;
    		this.mapRegions = map;
    	}
    
    	public int getMapId() {
    		return mapId;
    	}
    
    	public int[] getMapRegions() {
    		return mapRegions;
    	}
    
    }
    Still Got To Do:

    Player Updating Masks
    Event System
    Packet Handler
    Remove XSocket and use Mina or Raw Nio

    Reason I Use RS2D'S EntityList :
    The main reason i use is bevause it keeps its index's unlike an ArrayList which will cause huge amount of problems with the server
     

  2. #2  
    Encouragin
    Guest
    XSocket server fur teh lulz.
     

  3. #3  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,074
    Thanks given
    2,625
    Thanks received
    3,578
    Discord
    View profile
    Rep Power
    5000
    Very good, one of your best server bases yet .
    .
     

  4. #4  
    Renown Programmer

    Sean's Avatar
    Join Date
    May 2007
    Age
    29
    Posts
    2,758
    Thanks given
    264
    Thanks received
    1,089
    Rep Power
    4393
    thanks graham, not as good as your over non rsps servers ive seen
     

  5. #5  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,747
    Thanks given
    354
    Thanks received
    1,368
    Rep Power
    3032
    if you are going to use rs2d's EntityList (or any other persons class), you really shouldnt rebrand it using your own package..
     

  6. #6  
     

    Vastiko's Avatar
    Join Date
    Dec 2006
    Posts
    5,700
    Thanks given
    300
    Thanks received
    660
    Discord
    View profile
    Rep Power
    5000
    Thats very nice, I hope you go far with this
     

  7. #7  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,747
    Thanks given
    354
    Thanks received
    1,368
    Rep Power
    3032
    Quote Originally Posted by sir pk p00n
    Reason I Use RS2D'S EntityList :
    The main reason i use is bevause it keeps its index's unlike an ArrayList which will cause huge amount of problems with the server
    you're also using rs2d's logger class (renamed as 'SystemLogger')
     

  8. #8  
    Registered Member Paketa's Avatar
    Join Date
    Oct 2007
    Posts
    2,681
    Thanks given
    17
    Thanks received
    82
    Rep Power
    680
    sir pk p00n, get ready for the WORST Glitch which has made me quit my scratch made 508.
     

  9. #9  
    Renown Programmer

    Sean's Avatar
    Join Date
    May 2007
    Age
    29
    Posts
    2,758
    Thanks given
    264
    Thanks received
    1,089
    Rep Power
    4393
    Quote Originally Posted by Bandos View Post
    sir pk p00n, get ready for the WORST Glitch which has made me quit my scratch made 508.
    and whats the glitch
     

  10. #10  
    Mancockinmyass
    Guest
    Quote Originally Posted by sir pk p00n View Post
    and whats the glitch
    his mind rofl mts
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •