Thread: please help skill cape in server side.. :(

Results 1 to 7 of 7
  1. #1 please help skill cape in server side.. :( 
    Registered Member

    Join Date
    Oct 2009
    Posts
    1,595
    Thanks given
    100
    Thanks received
    50
    Rep Power
    232
    help me please in server side plz how i add them after i added the emotes on client please ? :=
    Reply With Quote  
     

  2. #2  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    234
    Rep Power
    689
    You'll need to know the ids of the emotes (depends on cape ofcourse), and the id of the button (skillcape emote button).

    Somewhere in your code (where packets are received (buttons in particular) there should be a switch-statement or a bunch of if-else statements (be sure you're in the correct place first).

    You add the id of the skillcape emote button to it and then call a new method (I'll call it clickSkillcapeEmote(Player player), Player may be Client or something else, depending on what your 'player' class is. If you're using a switch statement, don't forget to call break; after this method.

    In this new method you'll first need to retrieve the id of the cape you're wearing.
    If you're not wearing any cape, you can go ahead and quit the method, leaving a message to the player if you want.
    If you are wearing a cape, you can go ahead and put it in a switch statement.
    The cases in this switch will be the emotes of all the skillcapes (don't forget trimmed ones).
    under each 2 cases (grouped untrimmed and trimmed), you call another method performSkillcapeEmote(int skillId, int emoteId) (you fill in the correct emoteId and skillId, call this method whatever you feel is appropriate).
    After this method, you should call break; again, to prevent executing multiple emotes.
    In a switch statement you can use "default:" to catch any cases not used in the switch statement. A message could be send saying you're not wearing a valid cape here.

    Back to the performSkillcapeEmote(int skillId, int emoteId) method (be sure you can access the player who's performing the emote (or trying to) his/her class.
    In this method it's best to do a check on the player's levels before finaly executing the emote.
    So you check if the (permanent) level of the skill is 99, if this is the case, you can execute the code performing the emote for the player (using the emoteId) and quit the method.
    If not (else) you know 1 thing:
    -The player is wearing a skillcape, even though he has no 99 skill. This should be impossible (if you have put in checks). This indicates bugs or glitches in your server, or the use of a good cheat client by the player (and most likely ill programmed server). Wether you just ignore this, send a message to the player, or send a message elsewhere is your choice.

    So in short:
    -Have the buttonId be picked up.
    -Have a method with a check for the cape.
    -Have a method with a check for the level requirement.
    -Have the emote executed if valid.
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Oct 2009
    Posts
    1,595
    Thanks given
    100
    Thanks received
    50
    Rep Power
    232
    but i got the skill cape emotes and gfx but where i add ? i use delta . paradis
    Reply With Quote  
     

  4. #4  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    234
    Rep Power
    689
    I don't know much about different bases, but you will have it. If you know the id of another emote which is working, you can search for that id to find where it is.
    Or you could search for "buttonId", it's likely to be a variable in that place.
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Dec 2009
    Posts
    833
    Thanks given
    8
    Thanks received
    8
    Rep Power
    0
    This is what's in DeltaScape if you added it add this method to client.java
    Code:
    public void SkillCape() {
    if (playerEquipment[playerCape] == 4319) { //attack
           stillgfx(346, absY, absX);
           stillgfx(427, absY, absX);
           stillgfx(83, absY, absX);
    setAnimation(2890);
            sM("You Do your skillcape emote");
    
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4339) { //herblore
           stillgfx(67, absY, absX);
           stillgfx(552, absY, absX);
           stillgfx(572, absY, absX);
    
    setAnimation(2588);
            sM("You Do your Skillcape emote.");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4317) { //agility
           stillgfx(62, absY, absX+1);
           stillgfx(54, absY, absX);
           stillgfx(65, absY, absX);
    
    setAnimation(1110);
            sM("You Do your Skillcape emote.");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4359) { //strenth
           stillgfx(406, absY, absX);
           stillgfx(327, absY, absX);
           stillgfx(436, absY, absX);
    setAnimation(2756);
            sM("You Do your skillcape emote");
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4329) { //Defence
           stillgfx(247, absY, absX);
           stillgfx(263, absY, absX);
           stillgfx(439, absY, absX);
         
    setAnimation(403);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
       }
    if (playerEquipment[playerCape] == 4341) { //hp
           stillgfx(444, absY, absX);
           stillgfx(574, absY, absX);
           stillgfx(199, absY, absX);
         
    setAnimation(1500);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4351) { //Range
           stillgfx(472, absY, absX);
           stillgfx(474, absY, absX);
           stillgfx(325, absY, absX);
         
    setAnimation(426);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4347) { //prayer
           stillgfx(293, absY, absX);
           stillgfx(281, absY, absX);
           stillgfx(327, absY, absX);
        
     setAnimation(1331);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4353) { //woodcuttin
           stillgfx(61, absY, absX);
           stillgfx(266, absY, absX);
           stillgfx(267, absY, absX);
         stillgfx(59, absY, absX);
           stillgfx(441, absY, absX);
           stillgfx(524, absY, absX);
    setAnimation(2890);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
       }
    if (playerEquipment[playerCape] == 4343) { //mage
           stillgfx(409, absY, absX);
           stillgfx(498, absY, absX);
           stillgfx(497, absY, absX);
         stillgfx(370, absY, absX);
           stillgfx(441, absY, absX);
           stillgfx(524, absY, absX);
    setAnimation(811);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4325) { //cooking
           stillgfx(563, absY, absX);
           stillgfx(264, absY, absX);
           stillgfx(275, absY, absX);
       setAnimation(883);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4321) { //firemaking
           stillgfx(453, absY, absX);
           stillgfx(446, absY, absX);
           stillgfx(76, absY, absX);
       setAnimation(1500);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4361) { //Theving 
           stillgfx(421, absY, absX);
           stillgfx(143, absY, absX);
           stillgfx(293, absY, absX);
       setAnimation(2890);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4337) { //fletching 
           stillgfx(588, absY, absX);
           stillgfx(361, absY, absX);
           stillgfx(417, absY, absX);
       setAnimation(2890);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4345) { //mining 
           stillgfx(287, absY, absX);
           stillgfx(346, absY, absX);
           stillgfx(446, absY, absX);
       setAnimation(2890);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    if (playerEquipment[playerCape] == 4357) { //smithing
           stillgfx(436, absY, absX);
           stillgfx(438, absY, absX);
           stillgfx(474, absY, absX);
       setAnimation(2890);
            sM("You Do your skillcape emote");
           
    playerLevel[0] = getLevelForXP(playerXP[0]);
          playerLevel[0] += 1;
          sendFrame126(""+playerLevel[0]+"", 4016);
               updateRequired = true;
               appearanceUpdateRequired = true;
    
       }
    }
    Then go into ur actionpacket and put:
    case XXXXXX:
    c.SkillCape();
    break;

    Replace XXXXXX with the id.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    234
    Rep Power
    689
    Quote Originally Posted by back View Post
    This is what's in DeltaScape if you added it add this method to client.java
    Code:
    (...)
    Then go into ur actionpacket and put:
    case XXXXXX:
    c.SkillCape();
    break;

    Replace XXXXXX with the id.
    You should concider using methods. Clears up a lot of code, and it's a lot less work when you want to change something about it.
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Dec 2009
    Posts
    833
    Thanks given
    8
    Thanks received
    8
    Rep Power
    0
    you could make it an int i guess lol
    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
  •