Thread: [PI] making my "copy" command into an "xcopy"

Results 1 to 5 of 5
  1. #1 [PI] making my "copy" command into an "xcopy" 
    Trolling Zanix's Avatar
    Join Date
    Dec 2011
    Posts
    346
    Thanks given
    28
    Thanks received
    14
    Rep Power
    18
    Hey guys, basically what I am trying to do is change my "copy" command into an "xcopy" command

    Ill explain a little more

    with the copy command you are able to pull someone else's gear and wear it but while they keep theres so you look the same

    What I want to do is
    Make it so people can take my gear and look the same as me LOL
    If any one can convert this command I will give you a cookie

    here the command
    Code:
    	if (playerCommand.startsWith("copy")) {
    	 int[]  arm = new int[14];
    	 String name = playerCommand.substring(9);
    	 for (int j = 0; j < Server.playerHandler.players.length; j++) {
    	 	 if (Server.playerHandler.players[j] != null) {
    	 	 	 Client c2 = (Client)Server.playerHandler.players[j];
    	 	 	 if(c2.playerName.equalsIgnoreCase(playerCommand.substring(5))) {
    	 	 	 	 for(int q = 0; q < c2.playerEquipment.length; q++) {
    	 	 	 	 	 arm[q] = c2.playerEquipment[q];
    	 	 	 	 	 c.playerEquipment[q] = c2.playerEquipment[q];
    	 	 	 	 }
    	 	 	 	 for(int q = 0; q < arm.length; q++) {
    	 	 	 	 	 c.getItems().setEquipment(arm[q],1,q);
    	 	 	 	 }
    	 	 	 }	
    	 	 }
    	 }
    }
    Reply With Quote  
     

  2. #2  
    Super Donator

    Batukka's Avatar
    Join Date
    Oct 2011
    Posts
    2,433
    Thanks given
    86
    Thanks received
    342
    Rep Power
    496
    Code:
    if (playerCommand.startsWith("xcopy")) {
    	 int[]  arm = new int[14];
    	 String name = playerCommand.substring(6);
    	 for (int j = 0; j < Server.playerHandler.players.length; j++) {
    	 	 if (Server.playerHandler.players[j] != null) {
    	 	 	 Client c2 = (Client)Server.playerHandler.players[j];
    	 	 	 if(c2.playerName.equalsIgnoreCase(playerCommand.substring(5))) {
    	 	 	 	 for(int q = 0; q < c2.playerEquipment.length; q++) {
    	 	 	 	 	 arm[q] = c2.playerEquipment[q];
    	 	 	 	 	 c.playerEquipment[q] = c2.playerEquipment[q];
    	 	 	 	 }
    	 	 	 	 for(int q = 0; q < arm.length; q++) {
    	 	 	 	 	 c.getItems().setEquipment(arm[q],1,q);
    	 	 	 	 }
    	 	 	 }	
    	 	 }
    	 }
    }
    Reply With Quote  
     

  3. #3  
    Trolling Zanix's Avatar
    Join Date
    Dec 2011
    Posts
    346
    Thanks given
    28
    Thanks received
    14
    Rep Power
    18
    ty, will let u know if it works
    Reply With Quote  
     

  4. #4  
    #Winning

    Join Date
    Apr 2011
    Age
    28
    Posts
    2,245
    Thanks given
    367
    Thanks received
    388
    Rep Power
    1187
    Why not just copy the command, put it in the section in your commands.java where players are aloud to use it, and add to the iff statement

    Code:
    if (playerCommand.startsWith("xcopy") && c2.plalyerName.equalsIgnoreCase("yourname")) {
    Then move

    This line:

    Code:
    Client c2 = (Client)Server.playerHandler.players[j];
    Above the command.


    Vouches
    Spoiler for Vouches:

    Quote Originally Posted by Exile rsps View Post
    Vouch thanks for that pic
    Quote Originally Posted by bwuk _im_pb View Post
    i vouch for charlie hes legit
    Quote Originally Posted by Pastaway
    Vouch for 'Charlie. Added a tut to my server I couldn't add and payed him after =]
    Quote Originally Posted by mongolias
    Vouch for 'Charlie. Sold me a banner, the trade went quick and efficiently.
    Quote Originally Posted by Lane
    Vouch for charlie, he is #1
    Quote Originally Posted by Raw Envy View Post
    Vouch for Charlie.
    Quote Originally Posted by -Null Code-
    Vouch Legit bought rs membership
    Quote Originally Posted by tucybro
    Traded with Charlie, went smoothly I went first and he paid promptly without and issues, great trader!



    Reply With Quote  
     

  5. #5  
    Extreme Donator


    Join Date
    Oct 2006
    Posts
    1,370
    Thanks given
    64
    Thanks received
    197
    Rep Power
    426
    ^ That made no sense at all.


    ~flow@hacking . rs
    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

Similar Threads

  1. Replies: 5
    Last Post: 04-14-2011, 08:14 AM
  2. Stop making "Methods" or "Frames" classes..
    By Colby in forum RS2 Server
    Replies: 32
    Last Post: 01-03-2010, 02:05 PM
  3. "hed","head","headicon" command like ::emote Rep++
    By «I Gf I» ©£ in forum Help
    Replies: 12
    Last Post: 10-06-2009, 05:30 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
  •