Thread: level up (new) interface

Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1 level up (new) interface 
    🍕

    Linus's Avatar
    Join Date
    Dec 2008
    Age
    28
    Posts
    2,778
    Thanks given
    970
    Thanks received
    410
    Rep Power
    0
    Obviously not the most efficient way. You should use an array to determine if more than one lvl is achieved. This code will support 2 levels at a time only.
    You should also use the cache packed sprites for skill icons. I could not find the index so I gave up, please feel free to post if you have it.

    [Only registered and activated users can see links. ]

    As I received help with this I feel stupid for not releasing.

    Now players won't get spammed up in chatbox. yey



    Sprites + psd
    [Only registered and activated users can see links. ]

    Code:
    			for(int i = 0; i < 5; i++)
    				levelup[i] = new Sprite("Level/STAGE "+i);
    
    			for(int i = 0; i < 23; i++)
    				skillIcon[i] = new Sprite("Level/ICON "+i);
    Code:
    		levelup = new Sprite[5]; //for different backgrounds example when stat 99 is achieved etc etc
    		skillIcon = new Sprite[23];
    Code:
    	public static String[] skillName = {"Attack", "Defence", "Strength", "Hitpoints", "Ranging", "Prayer", "Magic", "Cooking", "Woodcutting", "Fletching", "Fishing", "Firemaking", "Crafting", "Smithing", "Mining", "Herblore", "Agility", "Thieving", "Slayer", "Farming", "Runecrafting","Construction","Hunter"};
    	
    	Sprite[] levelup;
    	Sprite[] skillIcon;
    
    	public int movlng = 0;
    	public int movlng2 = 0;
    	public int stage = 0;
    	public int stage2 = 0;
    	public int skillToLvi = -1;
    	public int skiilLevel = -1;
    	public int skiliToLvl1 = -1;
    	public int siklllevel1 = -1;
    	
    	public int levelUpInstances = 0;
    	
    	public boolean didLeveIUp = false;
    	public boolean didLevelUp2 = false;
    	
    	public void runLevelInterface(){
    		int x = -200;
    		int y = 290;
    		if(clientSize != 0){
    			y = clientHeight - 215;
    		}
    		if(stage == 250){
    			stage = 0;
    			moving = 0;
    			didLevelUp = false;
    			skillToLvl = -1;
    			skillLevel = -1;
    			return;
    		}
    		moving += 3;
    		if(moving > 200) {
    			moving = 200;
    		}
    		stage++;
    		String text = "You advanced to level "+skillLevel+" "+skillName[skillToLvl]+".";
    		levelup[4].drawSprite1(x+moving,y, moving);
    		skillIcon[skillToLvl].drawSprite1(x+11+moving,y+10, moving);
    		smallText.drawText(0x000000, text, y+26, x+135+moving);
    	}
    
    	public void runLevelInterface2(){
    		int x = -200;
    		int y = 243;
    		if(clientSize != 0){
    			y = clientHeight - 262;
    		}
    		if(stage2 == 250){
    			stage2 = 0;
    			moving2 = 0;
    			didLevelUp2 = false;
    			skillToLvl1 = -1;
    			skillLevel1 = -1;
    			return;
    		}
    		moving2 += 3;
    		if(moving2 > 200) {
    			moving2 = 200;
    		}
    		stage2++;
    		String text = "You advanced to level "+skillLevel1+" "+skillName[skillToLvl1]+".";
    		levelup[3].drawSprite1(x+moving2,y, moving2);
    		skillIcon[skillToLvl1].drawSprite1(x+11+moving2,y+10, moving2);
    		smallText.drawText(0x000000, text, y+26, x+135+moving2);
    		
    	}
    Code:
    case 149:
    					int lvl = inStream.readSignedByte();
    					int tolvl = inStream.readSignedByte();
    					if(skillLevel != -1){
    						skillLevel1 = lvl;
    						skillToLvl1 = tolvl;
    						didLevelUp2 = true;
    					} else {
    						skillLevel = lvl;
    						skillToLvl = tolvl;
    						didLevelUp = true;
    					}
    					pktType = -1;
    					return true;
    Don't forget to change packet value in the size arrays in both server and client.

    Server;

    Code:
    	public void sendLevelUp(int level, int skill) {
    		if (getOutStream() != null && this != null) {
    			getOutStream().createFrame(149);
    			getOutStream().writeByte(level);
    			getOutStream().writeByte(skill);
    			flushOutStream();
    		}
    	}
    Code:
    c.sendLevelUp(getLevelForXP(c, c.playerXP[skill]), skill);
    debug;
    Code:
    		if (playerCommand.equalsIgnoreCase("ttt")) {
    			c.sendLevelUp(97, 18); //97 slayer
    		}
    oops forgot:
    Client in draw3dScreen():
    Code:
            if(didLevelUp)
                runLevelInterface();
            if(didLevelUp2)
                runLevelInterface2();

    ╠╬╣
    ╦╦
    ╠╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╝

    ╠╬╬╬╣

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    The One & Only


    Join Date
    Oct 2013
    Posts
    2,596
    Thanks given
    425
    Thanks received
    1,624
    Rep Power
    5000
    Meh looks alright I guess, good work man

    Spoiler for More Signatures:


    Credits to Niceman, Vippy and Dami for the awesome signatures



    Reply With Quote  
     

  3. #3  
    HTML5, jQuery & CSS3 Master
    Jaiden Watling's Avatar
    Join Date
    Nov 2010
    Age
    26
    Posts
    890
    Thanks given
    306
    Thanks received
    92
    Rep Power
    0


    But having said that, it still looks friggin great.

    Except for the sprite background. that looks like diarrhea. the bad kind.

    Reply With Quote  
     

  4. #4  
    🍕

    Linus's Avatar
    Join Date
    Dec 2008
    Age
    28
    Posts
    2,778
    Thanks given
    970
    Thanks received
    410
    Rep Power
    0
    Quote Originally Posted by Socioscape View Post


    But having said that, it still looks friggin great.

    Except for the sprite background. that looks like diarrhea. the bad kind.
    psd included, call it losec.

    ╠╬╣
    ╦╦
    ╠╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╝

    ╠╬╬╬╣

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Registered Member
    shed's Avatar
    Join Date
    Dec 2010
    Posts
    1,837
    Thanks given
    504
    Thanks received
    575
    Rep Power
    5000
    I like it and the idea behind it.

    Good job.
    "We don't submit to terror. We make the terror." - #FU2016
    Reply With Quote  
     

  6. #6  
    Wut can u say when theres nothin to tell

    Tyrant's Avatar
    Join Date
    Jul 2013
    Age
    21
    Posts
    1,535
    Thanks given
    668
    Thanks received
    402
    Rep Power
    971
    Looks awesome!

    Testing now..
    Reply With Quote  
     

  7. #7  
    Extreme Donator Market Banned Market Banned



    Join Date
    Aug 2011
    Age
    25
    Posts
    3,596
    Thanks given
    1,403
    Thanks received
    1,619
    Rep Power
    5000
    looks nice, goodjob on this xD

    [Only registered and activated users can see links. ]

    Discord: Roy#2382

    Reply With Quote  
     

  8. #8  
    Wut can u say when theres nothin to tell

    Tyrant's Avatar
    Join Date
    Jul 2013
    Age
    21
    Posts
    1,535
    Thanks given
    668
    Thanks received
    402
    Rep Power
    971
    Any idea how to set up a new packet size?

    I tried multipe ways but none of them were working, I suppose I'm using the wrong size, any clue?
    Reply With Quote  
     

  9. #9  
    WEEEEEWOOOOWEEEEEWOOOOWEEEEWOOOO-----[[#]]---[[8]]--[[8]]------[[8]]----[[8]]------[[8]]
    sIlLy gOoSe's Avatar
    Join Date
    Nov 2012
    Posts
    3,235
    Thanks given
    1,285
    Thanks received
    2,307
    Discord
    View profile
    Rep Power
    5000
    This is pretty cool idea, it sure was annoying getting your chatbox spammed before. The background of it looks like something off the 2006 clients instead of the 2007 client, which isn't hard to edit and isn't that big of a deal anyways.

    Spoiler for Come under my wing:

    Spoiler for sb lol!:





    Oldschool Runescape progress thread is [Only registered and activated users can see links. ]!
    Reply With Quote  
     

  10. #10  
    🍕

    Linus's Avatar
    Join Date
    Dec 2008
    Age
    28
    Posts
    2,778
    Thanks given
    970
    Thanks received
    410
    Rep Power
    0
    I was missing one part in draw3d but I guess you knew, I added it to top post.

    ╠╬╣
    ╦╦
    ╠╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╠╬╬╬╬╬╬╣
    ╚╩╩╩╩╩╩╝

    ╠╬╬╬╣

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. Level up interface
    By Shamon King in forum Configuration
    Replies: 10
    Last Post: 06-10-2012, 05:56 PM
  2. Level-Up Interfaces
    By Divide in forum Tutorials
    Replies: 19
    Last Post: 01-16-2009, 02:49 AM
  3. how i can do Level-Up Interfaces
    By imukaszz in forum Help
    Replies: 1
    Last Post: 01-11-2009, 11:12 PM
  4. Level up interfaces will skillcape
    By Icy Whip in forum Tutorials
    Replies: 5
    Last Post: 06-14-2008, 02:11 AM
  5. 80% Perfect Level Up Interfaces [MUST HAVE]
    By Ian... in forum Tutorials
    Replies: 48
    Last Post: 05-24-2008, 02:44 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •