Thread: Adding Gfz in WhiteScape And Advanced Level Interface

Results 1 to 2 of 2
  1. #1 Adding Gfz in WhiteScape And Advanced Level Interface 
    Registered Member Santa Noobie's Avatar
    Join Date
    Jan 2007
    Posts
    481
    Thanks given
    0
    Thanks received
    0
    Rep Power
    26
    O.o

    Purpose: To Have You JUst Advande Blah..

    Server Base: WhiteScape

    Harness: Nothing Adding Void'z Agian.. Got Bugs Though :\ Trying to Fix.. Someone Help Maybe?!?!

    Okay..

    Add These Void'z

    Code:
    public void levelup(int skill)
    {
    switch(skill)  
    {
          
           case 0: // Attack
                sendFrame164(6247);
                sendFrame126("Congratulations, you just advanced an Attack level!", 6248);
                sendFrame126("Your Attack level is now "+playerLevel[0]+" .", 6249);
                sendMessage("Congratulations, you just advanced an Attack level.");
                stillgfx(199, absY, absX);
    	    NpcDialogueSend = true;
                break;
             case 1: // Strength
                sendFrame164(6206);
                sendFrame126("Congratulations, you just advanced a Strength level!", 6207);
                sendFrame126("Your Strength level is now "+playerLevel[2]+" .", 6208);
                sendMessage("Congratulations, you just advanced a Strength level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 2: // Defence
                sendFrame164(6253);
                sendFrame126("Congratulations, you just advanced a Defense level!", 6254);
                sendFrame126("Your Defense level is now "+playerLevel[1]+" .", 6255);
                sendMessage("Congratulations, you just advanced a Defense level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 3: //Hitpoints
                sendFrame164(6216);
                sendFrame126("Congratulations, you just advanced a Hitpoints level!", 6217);
                sendFrame126("Your Hitpoints level is now "+playerLevel[3]+" .", 6218);
                sendMessage("Congratulations, you just advanced a Hitpoints level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 4: //Ranged
                sendFrame164(4443);
                sendFrame126("Congratulations, you just advanced a Ranged level!", 4444);
                sendFrame126("Your Ranged level is now "+playerLevel[4]+" .", 4445);
                sendMessage("Congratulations, you just advanced a Ranged level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 5: // Prayer
                sendFrame164(6242);
                sendFrame126("Congratulations, you just advanced a Prayer level!", 6243);
                sendFrame126("Your Prayer level is now "+playerLevel[5]+" .", 6244);
                sendMessage("Congratulations, you just advanced a Prayer level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 6: // Magic
                sendFrame164(6211);
                sendFrame126("Congratulations, you just advanced a Magic level!", 6212);
                sendFrame126("Your Magic level is now "+playerLevel[6]+" .", 6213);
                sendMessage("Congratulations, you just advanced a Magic level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 7: //Cooking
                sendFrame164(6226);
                sendFrame126("Congratulations, you just advanced a Cooking level!", 6227);
                sendFrame126("Your Cooking level is now "+playerLevel[7]+" .", 6228);
                sendMessage("Congratulations, you just advanced a Cooking level.");
    	stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 8: //Woodcutting
                sendFrame164(4272);
                sendFrame126("Congratulations, you just advanced a Woodcutting level!", 4273);
                sendFrame126("Your Woodcutitng level is now "+playerLevel[8]+" .", 4274);
                sendMessage("Congratulations, you just advanced a Woodcutting level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 9: //Fletching
                sendFrame164(6231);
                sendFrame126("Congratulations, you just advanced a Fletching level!", 6232);
                sendFrame126("Your Fletching level is now "+playerLevel[9]+" .", 6233);
                sendMessage("Congratulations, you just advanced a Fletching level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 10: //Fishing
                sendFrame164(6258);
                sendFrame126("Congratulations, you just advanced a Fishing level!", 6259);
                sendFrame126("Your Fishing level is now "+playerLevel[10]+" .", 6260);
                sendMessage("Congratulations, you just advanced a Fishing level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 11: //Firemaking
                sendFrame164(4282);
                sendFrame126("Congratulations, you just advanced a Firemaking level!", 4283);
                sendFrame126("Your Firemaking level is now "+playerLevel[11]+" .", 4284);
                sendMessage("Congratulations, you just advanced a Firemaking level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 12: //Crafting
                sendFrame164(6263);
                sendFrame126("Congratulations, you just advanced a Crafting level!", 6264);
                sendFrame126("Your Crafting level is now "+playerLevel[12]+" .", 6265);
                sendMessage("Congratulations, you just advanced a Crafting level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 13: //Smithing
                sendFrame164(6221);
                sendFrame126("Congratulations, you just advanced a Smithing level!", 6222);
                sendFrame126("Your Smithing level is now "+playerLevel[13]+" .", 6223);
                sendMessage("Congratulations, you just advanced a Smithing level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 14: //Mining
                sendFrame164(4416);
                sendFrame126("Congratulations, you just advanced a Mining level!", 4417);
                sendFrame126("Your Mining level is now "+playerLevel[14]+" .", 4418);
                sendMessage("Congratulations, you just advanced a Mining level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 15: //Herblore
                sendFrame164(6237);
                sendFrame126("Congratulations, you just advanced a Herblore level!", 6238);
                sendFrame126("Your Herblore level is now "+playerLevel[15]+" .", 6239);
                sendMessage("Congratulations, you just advanced a Herblore level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 16: //Agility
                sendFrame164(4277);
                sendFrame126("Congratulations, you just advanced a Agility level!", 4278);
                sendFrame126("Your Agility level is now "+playerLevel[16]+" .", 4279);
                sendMessage("Congratulations, you just advanced an Agility level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 17: //Thieving
                sendFrame164(4261);
                sendFrame126("Congratulations, you just advanced a Thieving level!", 4262);
                sendFrame126("Your Thieving level is now "+playerLevel[17]+" .", 4263);
                sendMessage("Congratulations, you just advanced a Thieving level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 18: //Slayer
         //       sendFrame164(12123);
        //        sendFrame126("Congratulations, you just advanced a Slayer level!", 6207);
        //        sendFrame126("Your Slayer level is now "+playerLevel[18]+" .", 6208);
                sendMessage("Congratulations, you just advanced a Slayer level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 19: //Farming
          //      sendFrame164(4261);
          //      sendFrame126("Congratulations, you just advanced a Farming level!", 6207);
          //      sendFrame126("Your Farming level is now "+playerLevel[19]+" .", 6208);
                sendMessage("Congratulations, you just advanced a Farming level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
             case 20: //Runecrafting
                sendFrame164(4267);
                sendFrame126("Congratulations, you just advanced a Runecrafting level!", 4268);
                sendFrame126("Your Runecrafting level is now "+playerLevel[20]+" .", 4269);
                sendMessage("Congratulations, you just advanced a Runecrafting level.");
    		stillgfx(199, absY, absX);
                NpcDialogueSend = true;
                break;
    
    }
    }
    You Also Need This for Stillgfx'z..

    Code:
    public void stillgfxz(int id, int Y, int X, int height, int time)
    {
    for (Player p : server.playerHandler.players)
    {
    if(p != null) 
    {
    client person = (client)p;
    if((person.playerName != null || person.playerName != "null"))
    {
    if(person.distanceToPoint(X, Y) <= 60)
    {
    person.stillgfxz2(id, Y, X, height, time);
    }
    }
    }
    }
    }
    public void stillgfxz2(int id, int Y, int X, int height, int time)
    {
    outStream.createFrame(85);
    outStream.writeByteC(Y - (mapRegionY * 8));
    outStream.writeByteC(X - (mapRegionX * 8));
    outStream.createFrame(4);
    outStream.writeByte(0);//Tiles away (X >> 4 + Y & 7)
    outStream.writeWord(id);//Graphic id
    outStream.writeByte(height);//height of the spell above it's basic place, i think it's written in pixels 100 pixels higher
    outStream.writeWord(time);//Time before casting the graphic
    }
    
    
    public void stillgfx3(int id, int heightS, int Y, int X, int timeBCS) {
    		outStream.createFrame(85);
    		outStream.writeByteC(Y - (mapRegionY * 8));
    		outStream.writeByteC(X - (mapRegionX * 8));
    		outStream.createFrame(4);
    		outStream.writeByte(0);//Tiles away (X >> 4 + Y & 7) 	//Tiles Away From absX and absY 
    		outStream.writeWord(id);//Graphic id
    		outStream.writeByte(heightS);//height of the spell above it's basic place, i think it's written in pixels 100 pixels higher //100
    		outStream.writeWord(timeBCS);//Time before casting the graphic
    		}
    
    public void stillgfx2(int id, int Y, int X)
    {
    outStream.createFrame(85);
    outStream.writeByteC(Y - (mapRegionY * 8));
    outStream.writeByteC(X - (mapRegionX * 8));
    outStream.createFrame(4);
    outStream.writeByte(0);//Tiles away (X >> 4 + Y & 7)
    outStream.writeWord(id);//Graphic id
    outStream.writeByte(100);//height of the spell above it's basic place, i think it's written in pixels 100 pixels higher
    outStream.writeWord(0);//Time before casting the graphic
    }
    
    public void stillgfx(int id, int Y, int X)
    {
    for (Player p : server.playerHandler.players)
    {
    if(p != null) 
    {
    client person = (client)p;
    if((person.playerName != null || person.playerName != "null"))
    {
    if(person.distanceToPoint(X, Y) <= 60)
    {
    person.stillgfx2(id, Y, X);
    }
    }
    }
    }
    }
    Replace You'r public boolean addSkillXP

    With This..

    Code:
    public boolean addSkillXP(int amount, int skill){
     	int Attack = getLevelForXP(playerXP[0]);
          int Defence = getLevelForXP(playerXP[1]);      
          int Strength = getLevelForXP(playerXP[2]);
          int Hitpoints = getLevelForXP(playerXP[3]);
          int Ranging = getLevelForXP(playerXP[4]);
          int Prayer = getLevelForXP(playerXP[5]);
          int Magic = getLevelForXP(playerXP[6]);
          int Cooking = getLevelForXP(playerXP[7]);
          int Woodcutting = getLevelForXP(playerXP[8]);
          int Fletching = getLevelForXP(playerXP[9]);
          int Fishing = getLevelForXP(playerXP[10]);
          int Firemaking = getLevelForXP(playerXP[11]);
          int Crafting = getLevelForXP(playerXP[12]);
          int Smithing = getLevelForXP(playerXP[13]);
          int Mining = getLevelForXP(playerXP[14]);
          int Herblore = getLevelForXP(playerXP[15]);
          int Agility = getLevelForXP(playerXP[16]);
          int Thieving = getLevelForXP(playerXP[17]);
          int Slayer = getLevelForXP(playerXP[18]);
          int Farming = getLevelForXP(playerXP[19]);
          int Runecrafting = getLevelForXP(playerXP[20]);
    		if ((amount + playerXP[skill]) < 0 || playerXP[skill] > 14717000) {
    			
    			return false;
    		}
    
    		int oldLevel = getLevelForXP(playerXP[skill]);
    		playerXP[skill] += amount;
    		if (oldLevel < getLevelForXP(playerXP[skill])) {
     	if (Attack < getLevelForXP(playerXP[0])) {
                playerLevel[0] = getLevelForXP(playerXP[0]);
                levelup(0);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Defence < getLevelForXP(playerXP[1])) {
                playerLevel[1] = getLevelForXP(playerXP[1]);
                levelup(2);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Strength < getLevelForXP(playerXP[2])) {
                playerLevel[2] = getLevelForXP(playerXP[2]);
                levelup(1);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Hitpoints < getLevelForXP(playerXP[3])) {
                playerLevel[3] = getLevelForXP(playerXP[3]);
                levelup(3);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Ranging < getLevelForXP(playerXP[4])) {
                playerLevel[4] = getLevelForXP(playerXP[4]);
                levelup(4);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Prayer< getLevelForXP(playerXP[5])) {
                playerLevel[5] = getLevelForXP(playerXP[5]);
                levelup(5);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Magic < getLevelForXP(playerXP[6])) {
                playerLevel[6] = getLevelForXP(playerXP[6]);
                levelup(6);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Cooking < getLevelForXP(playerXP[7])) {
                playerLevel[7] = getLevelForXP(playerXP[7]);
                levelup(7);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Woodcutting < getLevelForXP(playerXP[8])) {
                playerLevel[8] = getLevelForXP(playerXP[8]);
                levelup(8);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Fletching < getLevelForXP(playerXP[9])) {
                playerLevel[9] = getLevelForXP(playerXP[9]);
                levelup(9);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Fishing < getLevelForXP(playerXP[10])) {
                playerLevel[10] = getLevelForXP(playerXP[10]);
                levelup(10);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Firemaking < getLevelForXP(playerXP[11])) {
                playerLevel[11] = getLevelForXP(playerXP[11]);
                levelup(11);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Crafting < getLevelForXP(playerXP[12])) {
                playerLevel[12] = getLevelForXP(playerXP[12]);
                levelup(12);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Smithing < getLevelForXP(playerXP[13])) {
                playerLevel[13] = getLevelForXP(playerXP[13]);
                levelup(13);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Mining < getLevelForXP(playerXP[14])) {
                playerLevel[14] = getLevelForXP(playerXP[14]);
                levelup(14);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Herblore < getLevelForXP(playerXP[15])) {
                playerLevel[15] = getLevelForXP(playerXP[15]);
                levelup(15);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }   
             if (Agility < getLevelForXP(playerXP[16])) {
                playerLevel[16] = getLevelForXP(playerXP[16]);
                levelup(16);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Thieving < getLevelForXP(playerXP[17])) {
                playerLevel[17] = getLevelForXP(playerXP[17]);
                levelup(17);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }      
             if (Slayer < getLevelForXP(playerXP[18])) {
                playerLevel[18] = getLevelForXP(playerXP[18]);
                levelup(18);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Farming < getLevelForXP(playerXP[19])) {
                playerLevel[19] = getLevelForXP(playerXP[19]);
                levelup(19);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
             if (Runecrafting < getLevelForXP(playerXP[20])) {
                playerLevel[20] = getLevelForXP(playerXP[20]);
                levelup(20);
                updateRequired = true;
                appearanceUpdateRequired = true;
             }
    
    			playerLevel[skill] = getLevelForXP(playerXP[skill]);
    			updateRequired = true;
    			appearanceUpdateRequired = true;
    		}
    		setSkillLevel(skill, playerLevel[skill], playerXP[skill]);
    		
    		if (skill == 2) {
    			CalculateMaxHit();
    			
    		}
    		return true;
    
    	}
    Credit'z: Me

    [size=10pt]There is a Bug you Can Get Out of It.. Trying to Fix.. [/size]

    Did anyone else think this is a Cig or J
    <-- Rep If you support!
     

  2. #2  
    Member
    Boomer's Avatar
    Join Date
    Sep 2006
    Posts
    1,282
    Thanks given
    309
    Thanks received
    795
    Rep Power
    1111
    Straight out of any source


    Osiris ||| FightScape | InnerFantasy | PkIsle | Paragon | Enkrona | 2006Scape
     


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. Advanced SERVERGUI(Interface only)
    By thefifthlord in forum Tools
    Replies: 22
    Last Post: 09-17-2010, 12:50 AM
  2. Replies: 20
    Last Post: 06-14-2008, 10:27 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
  •