Thread: 530 Sending Orbs

Results 1 to 7 of 7
  1. #1 530 Sending Orbs 
    Banned
    Join Date
    Sep 2013
    Posts
    116
    Thanks given
    33
    Thanks received
    14
    Rep Power
    0
    Hey so I am trying to send the Orbs for Run Energy, Prayer, and HP. For some reason when I try and send them it crashes the server, I have the interface ids correct but I think my issue is that they need the correct tab index. Well anyways here are some details any help would be appreciated!

    This is the Open tabs, and this gets called upon login, so I am trying to figure out what the slot id is for the orbs.

    Code:
    public void openDefaultTabs() {
    		player.getInterfaceManager().openWindowsPane(new Component(548));
    		WeaponInterface inter = player.getExtension(WeaponInterface.class);
    		if (inter == null) {
    			player.addExtension(WeaponInterface.class, inter = new WeaponInterface(player));
    		}
    		openTab(0, inter); // Attack
    		openTab(1, new Component(320)); // Skills
    		openTab(2, new Component(274)); // Quest
    		openTab(3, new Component(149)); // inventory
    		openTab(4, new Component(387)); // Equipment
    		openTab(5, new Component(271)); // Prayer
    		openTab(6, new Component(player.getSpellBookManager().getSpellBook())); // Magic
    		if (player.getFamiliarManager().hasFamiliar()) {
    			openTab(7, new Component(662)); // summoning.
    		}
    		openTab(8, new Component(550)); // Friends
    		openTab(9, new Component(551)); // Ignores
    		openTab(10, new Component(589)); // Clan chat
    		openTab(11, new Component(261)); // Settings
    		openTab(12, new Component(464)); // Emotes
    		openTab(13, new Component(187)); // Music
    		openTab(14, new Component(182)); // Logout
    		openTab(15, new Component(750));//Run orb
    		openTab(16, new Component(748)); // HP bar
    		openTab(17, new Component(749)); // Prayer bar
    		if (player.getProperties().getAutocastSpell() != null) {
    			inter.selectAutoSpell(inter.getAutospellId(player.getProperties().getAutocastSpell().getSpellId()), true);
    		}
    	}
    Code:
    public void openTab(int slot, Component component) {
    		if (component.getId() == 92 && !(component instanceof WeaponInterface)) {
    			throw new IllegalStateException("Attack tab can only be instanced as " + WeaponInterface.class.getCanonicalName() + "!");
    		}
    		if (component.getDefinition().getTabIndex() != slot) {
    			System.err.println("Set tab index to " + slot + " for component " + component.getId() + ", definition requires updating!");
    			component.getDefinition().setTabIndex(slot);
    		}
    		if (component.getDefinition().getType() != InterfaceType.TAB) {
    			System.err.println("Set interface type to TAB for component " + component.getId() + ", definition requires updating!");
    			component.getDefinition().setType(InterfaceType.TAB);
    		}
    		component.open(player);
    		tabs[slot] = component;
    	}

    Thanks in advance!
    Reply With Quote  
     

  2. #2  
    Extreme Donator 530 Sending Orbs Market Banned



    Join Date
    Dec 2010
    Age
    25
    Posts
    6,060
    Thanks given
    1,692
    Thanks received
    1,238
    Rep Power
    1765
    Why are you sending run orb as a tab?
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Sep 2013
    Posts
    116
    Thanks given
    33
    Thanks received
    14
    Rep Power
    0
    Quote Originally Posted by Azure View Post
    Why are you sending run orb as a tab?
    I didn't know if it was a tab or not.
    Reply With Quote  
     

  4. #4  
    Registered Member
    TnN_'s Avatar
    Join Date
    May 2014
    Posts
    252
    Thanks given
    324
    Thanks received
    115
    Rep Power
    507
    Try sending them differently
    Reply With Quote  
     

  5. #5  
    pride, love, happiness
    .alycia's Avatar
    Join Date
    Jun 2010
    Age
    28
    Posts
    4,106
    Thanks given
    1,714
    Thanks received
    2,062
    Rep Power
    5000
    Code:
    sendTab(70, 748); // HP bar
    			sendTab(71, 749); // Prayer bar
    			sendTab(72, 750); // Energy bar
    Code:
    public void sendTab(int tabId, int childId) {
    		if (player.isHd()) {
    			sendInterface(1, childId == 137 ? 752 : 746, tabId, childId);
    			return;
    		}
    		if (childId == 550) {
    			modifyText("Friends list - World " + player.getWorld() + "", 550, 3);
    		}
    		sendInterface(1, childId == 137 ? 752 : 548, tabId, childId);
    	}
    Reply With Quote  
     

  6. #6  
    Donator


    Join Date
    Jan 2014
    Posts
    1,652
    Thanks given
    428
    Thanks received
    501
    Rep Power
    221
    Quote Originally Posted by Chaflie View Post
    Code:
    sendTab(70, 748); // HP bar
    			sendTab(71, 749); // Prayer bar
    			sendTab(72, 750); // Energy bar
    Code:
    public void sendTab(int tabId, int childId) {
    		if (player.isHd()) {
    			sendInterface(1, childId == 137 ? 752 : 746, tabId, childId);
    			return;
    		}
    		if (childId == 550) {
    			modifyText("Friends list - World " + player.getWorld() + "", 550, 3);
    		}
    		sendInterface(1, childId == 137 ? 752 : 548, tabId, childId);
    	}
    He already fixed it
    Reply With Quote  
     

  7. #7  
    Registered Member
    TnN_'s Avatar
    Join Date
    May 2014
    Posts
    252
    Thanks given
    324
    Thanks received
    115
    Rep Power
    507
    I think he fixed it.
    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. Replies: 0
    Last Post: 04-13-2014, 02:14 PM
  2. Replies: 0
    Last Post: 03-05-2014, 10:03 PM
  3. using swing to send a "pop up"
    By jonyo in forum Tutorials
    Replies: 10
    Last Post: 08-04-2009, 12:14 PM
  4. My First Kiosk Glass Orb
    By Zane in forum Showcase
    Replies: 10
    Last Post: 06-26-2007, 03:04 AM
  5. glassy orb tut
    By Zane in forum Tutorials
    Replies: 0
    Last Post: 06-24-2007, 07:16 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
  •