Thread: Add stuff to an interface?

Results 1 to 5 of 5
  1. #1 Add stuff to an interface? 
    Runebay™
    Guest
    How do i add stuff to an interface?

    I got the interface i want aswell as all of the ID's

    Code:
    Parent: 962	Id: 963	"Music"
    Parent: 962	Id: 3206	"Click the tune to play."
    Parent: 962	Id: 4287	"Adventure"
    Parent: 962	Id: 4288	"Al Kharid"
    Parent: 962	Id: 4289	"Alone"
    Parent: 962	Id: 4290	"Ambient Jungle"
    Parent: 962	Id: 4291	"Arabian"
    Parent: 962	Id: 4292	"Arabian 2"
    Parent: 962	Id: 4293	"Arabian 3"
    Parent: 962	Id: 4294	"Arabique"
    Parent: 962	Id: 4295	"Army Of Darkness"
    Parent: 962	Id: 4296	"Arrival"
    Parent: 962	Id: 4297	"Attack 1"
    Parent: 962	Id: 4298	"Attack 2"
    Parent: 962	Id: 4299	"Attack 3"
    Parent: 962	Id: 4300	"Attack 4"
    Parent: 962	Id: 4301	"Attack 5"
    Parent: 962	Id: 4302	"Attack 6"
    Parent: 962	Id: 4303	"Attention"
    Parent: 962	Id: 4304	"Autumn Voyage"
    Parent: 962	Id: 8971	"Background"
    Parent: 962	Id: 4306	"Ballad Of Enchantment"
    Parent: 962	Id: 4307	"Baroque"
    Parent: 962	Id: 4308	"Beyond"
    Parent: 962	Id: 4309	"Big Chords"
    Parent: 962	Id: 4310	"Book Of Spells"
    Parent: 962	Id: 4311	"Camelot"
    Parent: 962	Id: 8972	"Cave Background"
    Parent: 962	Id: 4313	"Cavern"
    Parent: 962	Id: 4314	"Chain Of Command"
    Parent: 962	Id: 4315	"Crystal Cave"
    Parent: 962	Id: 4316	"Crystal Sword"
    Parent: 962	Id: 4317	"Dangerous"
    Parent: 962	Id: 8973	"Dark"
    Parent: 962	Id: 4319	"Deep Wildy"
    Parent: 962	Id: 4320	"Desert Voyage"
    Parent: 962	Id: 4321	"Doorways"
    Parent: 962	Id: 8974	"Dream"
    Parent: 962	Id: 4323	"Dunjun"
    Parent: 962	Id: 4324	"Egypt"
    Parent: 962	Id: 4325	"Emotion"
    Parent: 962	Id: 4326	"Expanse"
    Parent: 962	Id: 4327	"Expecting"
    Parent: 962	Id: 4328	"Faerie"
    Parent: 962	Id: 4329	"Fanfare"
    Parent: 962	Id: 4330	"Fanfare 2"
    Parent: 962	Id: 4331	"Fanfare 3"
    Parent: 962	Id: 4332	"Fishing"
    Parent: 962	Id: 4333	"Flute Salad"
    Parent: 962	Id: 4334	"Forever"
    Parent: 962	Id: 4335	"Gaol"
    Parent: 962	Id: 4336	"Garden"
    Parent: 962	Id: 4337	"Gnome King"
    Parent: 962	Id: 4338	"Gnome Theme"
    Parent: 962	Id: 4339	"Gnome Village"
    Parent: 962	Id: 4340	"Gnome Village 2"
    Parent: 962	Id: 4341	"Gnome"
    Parent: 962	Id: 4342	"Gnomeball"
    Parent: 962	Id: 4343	"Greatness"
    Parent: 962	Id: 4344	"Harmony"
    Parent: 962	Id: 4345	"High Seas"
    Parent: 962	Id: 4346	"Horizon"
    Parent: 962	Id: 4347	"Iban"
    Parent: 962	Id: 4348	"In the Manor"
    Parent: 962	Id: 4349	"Inspiration"
    Parent: 962	Id: 4350	"Intrepid"
    Parent: 962	Id: 4351	"Jolly-R"
    Parent: 962	Id: 4352	"Jungle Island"
    Parent: 962	Id: 4353	"Jungly 1"
    Parent: 962	Id: 4354	"Jungly 2"
    ETC to like 18000 or so"
    But I dont know what to do to edit it...

    Like what do i do with the sendtext to be able to change the text?
    Reply With Quote  
     

  2. #2  
    Registered Member hybrent's Avatar
    Join Date
    Nov 2007
    Posts
    566
    Thanks given
    73
    Thanks received
    90
    Rep Power
    28
    Okay...

    You start out by finding your method. Not sure what your's is named, but mine is sendString.

    public void sendString(String string, int interfaceId, int childId) {

    Alright, so we do...

    player.getActionSender().sendString("text", interface, child);

    player.getActionSender().sendString("text", 962, 963);

    As you can tell, the parent is the interfaceId, and the position is the childId.

    You add that where you load your music tab. Would probably be in sendLogin or something close to that, which uses a sendTab. Not sure what all of your methods are named....Search for 962 as that is the interface.

    Hope I helped!
    Amused as I am not, I must continue to try. -Keith Charles
    Quote Originally Posted by Ayton View Post
    I'm sorry, but I have to agree with Hybrent.
    Reply With Quote  
     

  3. #3  
    Runebay™
    Guest
    I get error that i cant apply string int int

    I put it here at the bottom

    Code:
    directFlushOutStream();
    		resetItems(3214);
    		resetBank();
    		SetSidebar(0, 2423);
    		SetSidebar(1, 3917);
    		SetSidebar(2, 638);
    		SetSidebar(3, 3213);
    		SetSidebar(4, 1644);
    		SetSidebar(5, 5608);
    		if (spellSet == 1) {
    			SetSidebar(6, 12855);
    		} else if (spellSet == 2/* && isMember == 1*/) {
    			SetSidebar(6, 18787);
    		} else {
    			SetSidebar(6, 1151);
    		}
    		SetSidebar(7, 18852);
    		SetSidebar(8, 5065);
    		SetSidebar(9, 5715); 
    		SetSidebar(10, 2449);
    		SetSidebar(11, 904);
    		SetSidebar(12, 147);
    		SetSidebar(13, 962);
    		changeText126("You have completed the Lunar Diplomacy Quest!", 962,3206);
    And there is some custom stuff, such as the quest tab which loads ina public void, but im unsure how it was done...

    Code:
    	public void loadQuestTab()
    	{
    		if (Server.s.restartTime/2/60 < 60)
    			changeText126("@or1@Uptime: @gre@" + Server.s.restartTime/2/60 + " @or1@mins", 663);
    		else
    		{
    			int time = Server.s.restartTime;
    			int min = 0;
    			int hr = 0;
    			hr = time / 2 / 60 / 60;
    			int miliSecHr = Math.round((time / 2 / 60 / 60) - 0.5f);
    			min = (time - (miliSecHr * 2 * 60 * 60)) / 2 / 60;
    			changeText126("@or1@Uptime: @gre@" + hr + " @or1@hr @gre@" + min + " @or1@min", 663);
    		}
    		changeText126("@or1@Players online: @gre@" + Server.s.playerHandler.playerCount, 7332);
    		changeText126("@or1@Items kept on death", 7333);
    		changeText126("", 7334);
    		changeText126("", 7336);
    		changeText126("", 7383);
    		if (undergroundPassQuest == 0)
    			changeText126("@red@Underground Pass Quest", 7339);
    		else if (undergroundPassQuest > 0 && undergroundPassQuest < 3)
    			changeText126("@yel@Underground Pass Quest", 7339);
    		else if (undergroundPassQuest == 3)
    			changeText126("@gre@Underground Pass Quest", 7339);
    		if (ancQuest == 0)
    			changeText126("@red@Desert Treasure Quest", 7338);
    		else if (ancQuest > 0 && ancQuest < 4)
    			changeText126("@yel@Desert Treasure Quest", 7338);
    		else if (ancQuest == 4)
    			changeText126("@gre@Desert Treasure Quest", 7338);
    		if (runeMysteriesQuest == 0)
    			changeText126("@red@Rune Mysteries Quest", 7340);
    		else if (runeMysteriesQuest > 0 && runeMysteriesQuest < 4)
    			changeText126("@yel@Rune Mysteries Quest", 7340);
    		else if (runeMysteriesQuest == 4)
    			changeText126("@gre@Rune Mysteries Quest", 7340);
    		if (mageZQuest == 0)
    			changeText126("@red@Mage Zamorak Quest", 7346);
    		else if (mageZQuest > 0 && mageZQuest < 4)
    			changeText126("@yel@Mage Zamorak Quest", 7346);
    		else if (mageZQuest == 4)
    			changeText126("@gre@Mage Zamorak Quest", 7346);
    		if (legendQuest == 0)
    			changeText126("@red@Legends Quest", 7341);
    		else if (legendQuest > 0 && legendQuest < 3)
    			changeText126("@yel@Legends Quest", 7341);
    		else if (legendQuest == 3)
    			changeText126("@gre@Legends Quest", 7341);
    etc goes on for a little more
    uh?
    Reply With Quote  
     

  4. #4  
    Registered Member hybrent's Avatar
    Join Date
    Nov 2007
    Posts
    566
    Thanks given
    73
    Thanks received
    90
    Rep Power
    28
    Uhm, it looks like your other ones only have one int after the text...

    Show me your changeText126 method.
    And are you sure that's the right method?

    But yeah, post the changeText126 method please.

    I have to get to bed though. I'll help more tomorrow.

    EDIT: I think I know what to do.

    Your changeText126 method probably gets the interface your viewing. So just use the childId.
    Amused as I am not, I must continue to try. -Keith Charles
    Quote Originally Posted by Ayton View Post
    I'm sorry, but I have to agree with Hybrent.
    Reply With Quote  
     

  5. #5  
    Runebay™
    Guest
    Code:
    	public void frame106(int i1) {
    		if (Server.s.playerHandler.players[playerId] == null || disconnected || in == null || out == null) {
    			if (combatDelay <= 0 && deathDelay < 0)
    				disconnected = true;
    			return;
    		}
    		outStream.createFrame(106);
    		outStream.writeByteC(i1);
    		updateRequired = true;
    		appearanceUpdateRequired = true;
    	}
    
    	public void changeText126(String s, int id) {
    		//misc.debugMes("changeText126() Method");
    		if (Server.s.playerHandler.players[playerId] == null || disconnected || in == null || out == null) {
    			if (combatDelay <= 0 && deathDelay < 0)
    				disconnected = true;
    			return;
    		}
    		outStream.createFrameVarSizeWord(126);
    		outStream.writeString(s);
    		outStream.writeWordA(id);
    		outStream.endFrameVarSizeWord();
    	}
    
    	public void sendFrame248(int MainFrame, int SubFrame)
    	{
    		if (Server.s.playerHandler.players[playerId] == null || disconnected || in == null || out == null)
    		{
    			if (combatDelay <= 0 && deathDelay < 0)
    				disconnected = true;
    			return;
    		}
    		if (MainFrame == 5292)
    		{
    			minimap(1);
    		}
    		outStream.createFrame(248);
    		outStream.writeWordA(MainFrame);
    		outStream.writeWord(SubFrame);
    	}
    	public void sendFrame200(int MainFrame, int SubFrame) {
    		//misc.debugMes("sendFrame200() Method");
    		if (Server.s.playerHandler.players[playerId] == null || disconnected || in == null || out == null) {
    			if (combatDelay <= 0 && deathDelay < 0)
    				disconnected = true;
    			return;
    		}
    		outStream.createFrame(200);
    		outStream.writeWord(MainFrame);
    		outStream.writeWord(SubFrame);
    	}
    	public void sendFrame75(int MainFrame, int SubFrame) {
    		//misc.debugMes("sendFrame75() Method");
    		if (Server.s.playerHandler.players[playerId] == null || disconnected || in == null || out == null) {
    			if (combatDelay <= 0 && deathDelay < 0)
    				disconnected = true;
    			return;
    		}
    		outStream.createFrame(75);
    		outStream.writeWordBigEndianA(MainFrame);
    		outStream.writeWordBigEndianA(SubFrame);
    	}
    	public void sendFrame164(int Frame) {
    		//misc.debugMes("sendFrame164() Method");
    		if (Server.s.playerHandler.players[playerId] == null || disconnected || in == null || out == null) {
    			if (combatDelay <= 0 && deathDelay < 0)
    				disconnected = true;
    			return;
    		}
    		outStream.createFrame(164);
    		outStream.writeWordBigEndian_dup(Frame);
    	}
    	public void displayItem246(int MainFrame, int SubFrame, int SubFrame2) {
    		if (Server.s.playerHandler.players[playerId] == null || disconnected || in == null || out == null) {
    			if (combatDelay <= 0 && deathDelay < 0)
    				disconnected = true;
    			return;
    		}
    		outStream.createFrame(246);
    		outStream.writeWordBigEndian(MainFrame);
    		outStream.writeWord(SubFrame);
    		outStream.writeWord(SubFrame2);
    	}
    there is some that may helpyou
    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
  •