Thread: [613/614][Dkk] Player Rights & Commands

Results 1 to 8 of 8
  1. #1 [613/614][Dkk] Player Rights & Commands 
    Registered Member ownernickzarosscape's Avatar
    Join Date
    Jun 2010
    Posts
    64
    Thanks given
    1
    Thanks received
    0
    Rep Power
    1
    I need to know how and where to change player rights, and where to find and access commands. Someone help?
    Claws + Full bandos + Ags + 99 Strength = Domination
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Aug 2010
    Posts
    469
    Thanks given
    49
    Thanks received
    42
    Rep Power
    81
    commands are in packets.java and idk about player rights but u can spawn when u log in
    Reply With Quote  
     

  3. #3  
    The Illest

    iitzTyson's Avatar
    Join Date
    May 2010
    Posts
    1,164
    Thanks given
    345
    Thanks received
    73
    Rep Power
    103
    Packets.java for commands, frames.java for Rights, I think..
    Reply With Quote  
     

  4. #4  
    Registered Member ownernickzarosscape's Avatar
    Join Date
    Jun 2010
    Posts
    64
    Thanks given
    1
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Me iiz Tysonn View Post
    Packets.java for commands, frames.java for Rights, I think..
    Thanks, but where in frames is rights, and how do i add it.
    Claws + Full bandos + Ags + 99 Strength = Domination
    Reply With Quote  
     

  5. #5  
    Registered Member
    shassan's Avatar
    Join Date
    Oct 2008
    Age
    28
    Posts
    1,218
    Thanks given
    8
    Thanks received
    42
    Rep Power
    201
    rights are bugged on the base because it registers every player as an admin on login.
    Reply With Quote  
     

  6. #6  
    Registered Member Scar93's Avatar
    Join Date
    Aug 2010
    Age
    27
    Posts
    83
    Thanks given
    1
    Thanks received
    8
    Rep Power
    9
    Quote Originally Posted by shassan View Post
    rights are bugged on the base because it registers every player as an admin on login.
    I don't think it's bugged, I think it was made like that. What worked for me was I went into Frames.java and scrolled almost all the way down til I got to
    Code:
    	public void loginResponce() {
    		player.setRights((byte) 2);
    		OutStream out = new OutStream();
    		out.writeByte(player.getRights());
    		out.writeByte((byte) 0);
    		out.writeByte((byte) 0);
    		out.writeByte((byte) 0);
    		out.writeByte((byte) 1);
    		out.writeByte((byte) 0);
    		out.writeShort(player.getIndex());
    		out.writeByte((byte) 1);
    		out.write3Bytes(0);
    		out.writeByte((byte) 1); // members
    		OutStream out1 = new OutStream();
    		int length = out.getOffset();
    		out1.writeByte(length);
    		out1.writeBytes(out.buffer(), 0, length);
    		player.getConnection().write(out1);
    		this.sendMapRegion(false);
    	}
    and I removed the
    Code:
    		player.setRights((byte) 2);
    so it looks like
    Code:
    	public void loginResponce() {
    		OutStream out = new OutStream();
    		out.writeByte(player.getRights());
    		out.writeByte((byte) 0);
    		out.writeByte((byte) 0);
    		out.writeByte((byte) 0);
    		out.writeByte((byte) 1);
    		out.writeByte((byte) 0);
    		out.writeShort(player.getIndex());
    		out.writeByte((byte) 1);
    		out.write3Bytes(0);
    		out.writeByte((byte) 1); // members
    		OutStream out1 = new OutStream();
    		int length = out.getOffset();
    		out1.writeByte(length);
    		out1.writeBytes(out.buffer(), 0, length);
    		player.getConnection().write(out1);
    		this.sendMapRegion(false);
    	}
    For me doing that kept me admin but made every other account that wasn't already admin or mod a regular player.
    - Robin

    Reply With Quote  
     

  7. #7  
    Registered Member
    Motive's Avatar
    Join Date
    Jun 2009
    Age
    12
    Posts
    1,474
    Thanks given
    101
    Thanks received
    121
    Rep Power
    1634
    public void loginResponce() {
    if(player.getusername().equals"w/e") {
    player.setRights((byte) 2);
    }
    OutStream out = new OutStream();
    out.writeByte(player.getRights());
    out.writeByte((byte) 0);
    out.writeByte((byte) 0);
    out.writeByte((byte) 0);
    out.writeByte((byte) 1);
    out.writeByte((byte) 0);
    out.writeShort(player.getIndex());
    out.writeByte((byte) 1);
    out.write3Bytes(0);
    out.writeByte((byte) 1); // members
    OutStream out1 = new OutStream();
    int length = out.getOffset();
    out1.writeByte(length);
    out1.writeBytes(out.buffer(), 0, length);
    player.getConnection().write(out1);
    this.sendMapRegion(false);
    }

    i dont know exact code find out for yourself this prob easiest code lel
    Reply With Quote  
     

  8. #8  
    Registered Member Scar93's Avatar
    Join Date
    Aug 2010
    Age
    27
    Posts
    83
    Thanks given
    1
    Thanks received
    8
    Rep Power
    9
    Quote Originally Posted by Vanity View Post
    public void loginResponce() {
    if(player.getusername().equals"w/e") {
    player.setRights((byte) 2);
    }
    OutStream out = new OutStream();
    out.writeByte(player.getRights());
    out.writeByte((byte) 0);
    out.writeByte((byte) 0);
    out.writeByte((byte) 0);
    out.writeByte((byte) 1);
    out.writeByte((byte) 0);
    out.writeShort(player.getIndex());
    out.writeByte((byte) 1);
    out.write3Bytes(0);
    out.writeByte((byte) 1); // members
    OutStream out1 = new OutStream();
    int length = out.getOffset();
    out1.writeByte(length);
    out1.writeBytes(out.buffer(), 0, length);
    player.getConnection().write(out1);
    this.sendMapRegion(false);
    }

    i dont know exact code find out for yourself this prob easiest code lel
    I think I'll do what you did later, too busy doing other stuff right now.
    - Robin

    Reply With Quote  
     


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
  •