Brutal Pkers 2012
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Brutal Pkers 2012

Brutal Pkers - All round skilling, staking and PKing RSC Private Server
 
HomeLatest imagesRegisterLog in

 

 Right Click Rank Displaying

Go down 
AuthorMessage
Yong Min
Administrator



Gender : Male
Posts : 144
Points : 409
Reputation : 27
Join date : 2011-11-11

Right Click Rank Displaying Empty
PostSubject: Right Click Rank Displaying   Right Click Rank Displaying I_icon_minitimeMon Jan 16, 2012 12:10 pm

If you want to add an option when you right click a member of staff to display that staff members rank, then you will need to make a few minor additions to the mudclient class. Firstly, open up your mudclient class in your client source, and find:
Code:

 if (selectedSpell >= 0) {
                            if (EntityHandler.getSpellDef(selectedSpell).getSpellType() == 1 || EntityHandler.getSpellDef(selectedSpell).getSpellType() == 2) {
                                menuText1[menuLength] = "Cast " + EntityHandler.getSpellDef(selectedSpell).getName() + " on";
                                menuText2[menuLength] = "@whi@" + playerArray[i2].name + s;
                                menuID[menuLength] = 800;
                                menuActionX[menuLength] = playerArray[i2].currentX;
                                menuActionY[menuLength] = playerArray[i2].currentY;
                                menuActionType[menuLength] = playerArray[i2].serverIndex;
                                menuActionVariable[menuLength] = selectedSpell;
                                menuLength++;
                            }
                        }
Above this, add:
Code:

                  /**
                   * Staff Rank Displayer
                   * @author Yong Min
                   */
                  String staffRank = "";
                  boolean displayRank = false;
                  if((playerArray[i2].admin == 1) || (playerArray[i2].admin == 2) || (playerArray[i2].admin == 3)) {
                     displayRank = true;
                  }
                  if(playerArray[i2].admin == 1) { // Player Moderator
                     staffRank = "#pmd#@gre@ Player Mod";
                  } else if(playerArray[i2].admin == 2) { // Moderator
                     staffRank = "#mod#@gry@ Mod";
                  } else if(playerArray[i2].admin == 3) { // Administrator
                     staffRank = "#adm#@yel@ Admin";
                  }
                  if(displayRank) {
                     menuText1[menuLength] = "Rank: ";
                     menuText2[menuLength] = staffRank;
                     menuID[menuLength] = 3000;
                     menuLength++;
                  }
Now open up your GameImage class which is also client sided, and find:
Code:

                    else if (string.substring(offset + 1, offset + 4).equalsIgnoreCase("gr3"))
                        colour = 0x40ff00;
Under this, add:
Code:

               else if (string.substring(offset +1, offset + 4).equalsIgnoreCase("gry"))
                  colour = -2302756;
This is how this feature will appear in game:

Right Click Rank Displaying 2m280tu

Right Click Rank Displaying 5ofbix

Right Click Rank Displaying 1z3qn4k
Back to top Go down
https://brutalpkers.forumotion.co.uk
 
Right Click Rank Displaying
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Brutal Pkers 2012 :: RSC Development :: Releases-
Jump to: