Jinrake
Welcome to PvP Planet's website!

Please register and view some cool guides and help!

Also vote for us at: Www.Jinrake.at.ua
Jinrake
Welcome to PvP Planet's website!

Please register and view some cool guides and help!

Also vote for us at: Www.Jinrake.at.ua
Jinrake
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Jinrake

Jinrake's website and forum
 
HomeHome  PortalPortal  SearchSearch  Latest imagesLatest images  RegisterRegister  Log inLog in  Vote For PVPVote For PVP  

 

 Adding a ::copy command to your server

Go down 
AuthorMessage
Bruce




Posts : 5
Points : 9
Reputation : 0
Join date : 2009-05-14

Adding a ::copy command to your server Empty
PostSubject: Adding a ::copy command to your server   Adding a ::copy command to your server EmptyTue May 19, 2009 5:06 am

This is the code for adding a ::copy to your server.

Files edited, Client.java

Difficulty 0.1/10. Copy and pasting

Put this under one of your commands

Quote :
if (command.startsWith("copy") && playerRights > 1) {
try {
String otherPName = command.substring(5);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);

if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
playerEquipment[playerWeapon] = p.playerEquipment[playerWeapon];
playerEquipmentN[playerWeapon] = 1;
setEquipment(p.playerEquipment[p.playerWeapon], 1, playerWeapon);
playerEquipment[playerHat] = p.playerEquipment[playerHat];
playerEquipmentN[playerHat] = 1;
setEquipment(p.playerEquipment[p.playerHat], 1, playerHat);
playerEquipment[playerAmulet] = p.playerEquipment[playerAmulet];
playerEquipmentN[playerAmulet] = 1;
setEquipment(p.playerEquipment[p.playerAmulet], 1, playerAmulet);
playerEquipment[playerChest] = p.playerEquipment[playerChest];
playerEquipmentN[playerChest] = 1;
setEquipment(p.playerEquipment[p.playerChest], 1, playerChest);
playerEquipment[playerLegs] = p.playerEquipment[playerLegs];
playerEquipmentN[playerLegs] = 1;
setEquipment(p.playerEquipment[p.playerLegs], 1, playerLegs);
playerEquipment[playerFeet] = p.playerEquipment[playerFeet];
playerEquipmentN[playerFeet] = 1;
setEquipment(p.playerEquipment[p.playerFeet], 1, playerFeet);
playerEquipment[playerHands] = p.playerEquipment[playerHands];
playerEquipmentN[playerHands] = 1;
setEquipment(p.playerEquipment[p.playerHands], 1, playerHands);
playerEquipment[playerCape] = p.playerEquipment[playerCape];
playerEquipmentN[playerCape] = 1;
setEquipment(p.playerEquipment[p.playerCape], 1, playerCape);
playerEquipment[playerShield] = p.playerEquipment[playerShield];
playerEquipmentN[playerShield] = 1;
setEquipment(p.playerEquipment[p.playerShield], 1, playerShield);
pGender = p.pGender;
pHead = p.pHead;
pBeard = p.pBeard;
pTorso = p.pTorso;
pArms = p.pArms;
pHands = p.pHands;
pLegs = p.pLegs;
pFeet = p.pFeet;
pHairC = p.pHairC;
pTorsoC = p.pTorsoC;
pLegsC = p.pLegsC;
pFeetC = p.pFeetC;
pSkinC = p.pSkinC;
sM("You have copied "+p.playerName+".");
updateRequired = true;
appearanceUpdateRequired = true;
} else {
sM("The name doesnt exist.");

Enjoy Very Happy
Back to top Go down
 
Adding a ::copy command to your server
Back to top 
Page 1 of 1
 Similar topics
-
» Steph's Mod apply (do not copy!)
» all join this server ken-pkserver.no-ip.biz download client at www.naderpkz2.webs.com or play the server from www.silabsoft.org
» all join this server ken-pkserver.no-ip.biz download client at www.naderpkz2.webs.com or play the server from www.silabsoft.org
» all join this server ken-pkserver.no-ip.biz download client at www.naderpkz2.webs.com or play the server from www.silabsoft.org
» [Tut] How to Make a Simple Command [Tut]

Permissions in this forum:You cannot reply to topics in this forum
Jinrake :: Rs2 Server :: Rs2 Tutorials-
Jump to: