Thread: [PI] Crown Updating when new Crown Assigned

Results 1 to 5 of 5
  1. #1 [PI] Crown Updating when new Crown Assigned 
    Registered Member
    Join Date
    Feb 2010
    Posts
    279
    Thanks given
    43
    Thanks received
    26
    Rep Power
    7
    Hi I'm wondering how to make the crown update as soon as a player gets a new crown. I know relogging works but I'd prefer that I didn't have to force someone to relog if they dont have to since I know that its possible to update it without needing to relog.

    Here is what I DO know, this is where the crown is declared in RS2LoginProtocolDecoder, but I don't know how to make it update this information.
    Code:
    StaticPacketBuilder bldr = new StaticPacketBuilder();
    		bldr.setBare(true);
    		bldr.addByte((byte) returnCode);
    if(returnCode == 2) {
    			cl.saveCharacter = true;
    			if(cl.playerRights == 3) {
    				bldr.addByte((byte) 2);
    			} else {
    				bldr.addByte((byte) cl.playerRights);
    			}
    		}
    Reply With Quote  
     

  2. #2  
    I'm Baack...


    Join Date
    Mar 2011
    Posts
    1,663
    Thanks given
    281
    Thanks received
    202
    Rep Power
    324
    Oh shit, I think you just helped me solve a problem I was having....

    Anyways I would try taking that code and placing it into the command that gives them their rights, Give me a command that I can try editing and we can check if that works.

    Edit: Thanks for pointing this out, It helped me with my problem

    Now I'll try to help you with yours...
    I'm back
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Feb 2010
    Posts
    279
    Thanks given
    43
    Thanks received
    26
    Rep Power
    7
    Quote Originally Posted by Sillhouette View Post
    Oh shit, I think you just helped me solve a problem I was having....

    Anyways I would try taking that code and placing it into the command that gives them their rights, Give me a command that I can try editing and we can check if that works.
    Ive tried that and nothing happened and thats when I came here for help lol. I created an update method including this code and when I executed it there was no result and the crown didn't update. I just need a way to cut this code out and put it in process or something so the crown is constantly updating instead of only updating every time the player logs in.
    Reply With Quote  
     

  4. #4  
    I'm Baack...


    Join Date
    Mar 2011
    Posts
    1,663
    Thanks given
    281
    Thanks received
    202
    Rep Power
    324
    Quote Originally Posted by a box View Post
    Ive tried that and nothing happened and thats when I came here for help lol. I created an update method including this code and when I executed it there was no result and the crown didn't update. I just need a way to cut this code out and put it in process or something so the crown is constantly updating instead of only updating every time the player logs in.
    I dont think that would be a very good idea, but you can try going to process() in client.java and adding something like this in there:

    Code:
    StaticPacketBuilder bldr = new StaticPacketBuilder();
    		bldr.setBare(true);
    bldr.addByte((byte) this.playerRights);
    It might not be worth it just because this may cause lag in the server.
    I'm back
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Feb 2010
    Posts
    279
    Thanks given
    43
    Thanks received
    26
    Rep Power
    7
    Yea I just wanted it in process to see if it would even work I would implement a different method of updating after I found out how. But that is exactly what I tried and it didn't update so that is where Im stumped
    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

Similar Threads

  1. Crown help?
    By Someone in forum Help
    Replies: 10
    Last Post: 01-08-2012, 04:11 AM
  2. New crown
    By callmedragon in forum Help
    Replies: 9
    Last Post: 01-05-2012, 04:48 AM
  3. Crown beside the name - PI.
    By Unholy_ in forum Help
    Replies: 4
    Last Post: 10-30-2011, 10:52 PM
  4. double chat glitch crown+no crown
    By Edd - in forum Help
    Replies: 0
    Last Post: 09-03-2011, 12:14 AM
  5. crown help
    By xxbarragexx in forum Application Development
    Replies: 3
    Last Post: 07-30-2009, 10:41 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •