Thread: [525] sendplayeroptions release?

Results 1 to 9 of 9
  1. #1 [525] sendplayeroptions release? 
    Donator


    Join Date
    Nov 2008
    Posts
    885
    Thanks given
    13
    Thanks received
    35
    Rep Power
    100


    Code:
    public void setPlayerOption(Player p, String option, int slot) {
            if (p == null || p.stream == null || p.disconnected[0]) {
                return;
            }
    	p.stream.createFrameVarSize(241);
            p.stream.writeByteS(0);
            p.stream.writeByte(slot);
            p.stream.writeString(option);
            p.stream.endFrameVarSize();
        }
    credits

    99% luke132
    1% me for umm i believe i got one stream right :l (if not then 100% to luke132)
    Reply With Quote  
     

  2. #2  
    Hi.

    'Mystic Flow's Avatar
    Join Date
    Nov 2007
    Posts
    7,141
    Thanks given
    256
    Thanks received
    1,247
    Rep Power
    3636
    Wow you go all crazy on having this and you release it xD? repped
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Aug 2008
    Posts
    699
    Thanks given
    1
    Thanks received
    0
    Rep Power
    242
    maybe this should be in snippets?
    Click if you support
    [Only registered and activated users can see links. ]
    clicky
    Reply With Quote  
     

  4. #4  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,789
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by sallenx7 View Post
    maybe this should be in snippets?
    Snippets and configuration are pretty much the same thing IMO lol but i'll move it.

    Reply With Quote  
     

  5. #5  
    DeclarationOfIndependence
    Guest
    I already released it like months ago.
    Reply With Quote  
     

  6. #6  
    HcoFlame
    Guest
    You almost have it full.

    Code:
    public void sendPlayerOption(String option, int slot, boolean top) {
    		player.getSession().write(new StaticPacketBuilder().setId(241)
    				.setSize(Packet.Size.VariableByte)
    				.addByte((byte)(128 - (top ? 1 : 0)))
    				.addByte((byte)slot)
    				.addString(option)
    				.toPacket());
    	}
    The "byteS" should be 1 if the option is above "Walk here," and 0 if it is below it.
    Reply With Quote  
     

  7. #7  
    Donator


    Join Date
    Nov 2008
    Posts
    885
    Thanks given
    13
    Thanks received
    35
    Rep Power
    100
    Quote Originally Posted by HcoFlame View Post
    You almost have it full.

    Code:
    public void sendPlayerOption(String option, int slot, boolean top) {
    		player.getSession().write(new StaticPacketBuilder().setId(241)
    				.setSize(Packet.Size.VariableByte)
    				.addByte((byte)(128 - (top ? 1 : 0)))
    				.addByte((byte)slot)
    				.addString(option)
    				.toPacket());
    	}
    The "byteS" should be 1 if the option is above "Walk here," and 0 if it is below it.
    doesnt matter it was orignally like that but luke told me it could go either way.

    @declaration no you didnt.
    Reply With Quote  
     

  8. #8  
    DeclarationOfIndependence
    Guest
    Quote Originally Posted by i laid ur gf View Post
    doesnt matter it was orignally like that but luke told me it could go either way.

    @declaration no you didnt.
    Yes I did.

    Quote Originally Posted by Encouragin View Post
    Well, I'm still collecting sum respect, So here it goes.

    Code:
        public void sendOption(int type, int value, String option) {
        	if (player != null) {
        		player.getByteVector().createFrameVarSize(241)
        							  .addByteA(type)
        							  .addByte(value)
        							  .addString(option)
        							  .endFrameVarSize();
        	}
        }
    [Only registered and activated users can see links. ]

    RESPECT TEH ENCOURAGIN FOR DIS PACKET OR ILL CRUSH UR LIFE
    Look at its date. 11 March 2009.
    Reply With Quote  
     

  9. #9  
    Pur3z is back!
    tehGanjaman's Avatar
    Join Date
    Jul 2008
    Age
    28
    Posts
    2,871
    Thanks given
    3,380
    Thanks received
    109
    Rep Power
    502
    this can become handy ty.
    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
  •