Thread: items in chatbox interface off center

Results 1 to 6 of 6
  1. #1 items in chatbox interface off center 
    Registered Member
    Join Date
    Apr 2013
    Posts
    63
    Thanks given
    3
    Thanks received
    2
    Rep Power
    36
    Hi everyone.

    With quests, its common where when giving an item the item is displayed in the chatbox with a message.

    However, for some reason some items are moved up and off center. An example:

    imgur.com/a/dznKBoD

    Does anyone know what this happens and how it is fixed?

    Thanks.

    EDIT

    I send the item via this

    Code:
    public void sendGiveItemNpc(String text, int item) {
    		player.getPlayerAssistant().sendFrame126(text, 308);
    		player.getPlayerAssistant().sendFrame246(307, 200, item); 
    		player.getPlayerAssistant().sendChatInterface(306);
    	}
    which is then processed

    Code:
    public void sendFrame246(int MainFrame, int SubFrame, int SubFrame2) {
    		// synchronized(c) {
    		if (player.getOutStream() != null && player != null) {
    			player.getOutStream().createFrame(246);
    			player.getOutStream().writeWordBigEndian(MainFrame);
    			player.getOutStream().writeWord(SubFrame);
    			player.getOutStream().writeWord(SubFrame2);
    			player.flushOutStream();
    		}
    	}
    and therefore is passed to the client via this:

    Code:
    if (pktType == 246) {
    				int i6 = inStream.method434();
    				int i13 = inStream.readUnsignedWord();
    				int k18 = inStream.readUnsignedWord();
    				if (k18 == 65535) {
    					RSInterface.interfaceCache[i6].anInt233 = 0;
    					pktType = -1;
    					return true;
    				} else {
    					ItemDef itemDef = ItemDef.forID(k18);
    					RSInterface.interfaceCache[i6].anInt233 = 4;
    					RSInterface.interfaceCache[i6].mediaID = k18;
    					RSInterface.interfaceCache[i6].anInt270 = itemDef.modelRotation1;
    					RSInterface.interfaceCache[i6].anInt271 = itemDef.modelRotation2;
    					RSInterface.interfaceCache[i6].anInt269 = itemDef.modelZoom * 100 / i13;
    					pktType = -1;
    					return true;
    				}
    			}
    So the only thing I can think of is the "ModelZoom" but I'm sure that this would account for all items. I'm still struggling to figure this out.
    Reply With Quote  
     

  2. #2  
    Donator

    Mythic Dream's Avatar
    Join Date
    Jun 2021
    Posts
    145
    Thanks given
    17
    Thanks received
    145
    Rep Power
    800
    Go into your the method that allows you to add items to chat box. Then search for the model on interface. It should have offset X and offset Y
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Apr 2013
    Posts
    63
    Thanks given
    3
    Thanks received
    2
    Rep Power
    36
    Quote Originally Posted by Mythic Dream View Post
    Go into your the method that allows you to add items to chat box. Then search for the model on interface. It should have offset X and offset Y
    Sorry for the really late reply, but thanks, Will look into that. However, some items work but some are off center, not sure how to fix that as I thought sprite size was the same (pixel wise)
    Reply With Quote  
     

  4. #4  
    Donator

    Mythic Dream's Avatar
    Join Date
    Jun 2021
    Posts
    145
    Thanks given
    17
    Thanks received
    145
    Rep Power
    800
    Quote Originally Posted by gilbo184 View Post
    Sorry for the really late reply, but thanks, Will look into that. However, some items work but some are off center, not sure how to fix that as I thought sprite size was the same (pixel wise)
    Possibly the model itself is messed up, have you tried to repack models?
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Apr 2013
    Posts
    63
    Thanks given
    3
    Thanks received
    2
    Rep Power
    36
    Quote Originally Posted by Mythic Dream View Post
    Possibly the model itself is messed up, have you tried to repack models?
    Sorry noob question here. What do you mean "repack"?
    Reply With Quote  
     

  6. #6  
    Donator

    Mythic Dream's Avatar
    Join Date
    Jun 2021
    Posts
    145
    Thanks given
    17
    Thanks received
    145
    Rep Power
    800
    Quote Originally Posted by gilbo184 View Post
    Sorry noob question here. What do you mean "repack"?
    Like let's say your model is messed up, you would use galkons method to repack a cache with new .gzip. for example if your NPC dialogue ID is wrong, repack the dialogue id's for whatever revision you using
    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. Duel Arena - Add/Remove items in staking interface
    By Google rapes bing in forum Snippets
    Replies: 2
    Last Post: 11-01-2013, 02:03 AM
  2. Sending Items In Chatbox
    By Paradoxi in forum Requests
    Replies: 0
    Last Post: 08-12-2012, 03:03 PM
  3. Item in chatbox method
    By Dexter Morgan in forum Help
    Replies: 2
    Last Post: 08-05-2010, 01:03 PM
  4. Bank - Items in bank [Interface add on]
    By Dexter Morgan in forum Snippets
    Replies: 21
    Last Post: 11-17-2009, 06:35 PM
  5. Items in a interface?
    By TheRedArmy in forum Help
    Replies: 4
    Last Post: 07-12-2009, 10:20 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
  •