Thread: Need help learning to code

Results 1 to 6 of 6
  1. #1 Need help learning to code 
    Registered Member
    Join Date
    Oct 2009
    Posts
    133
    Thanks given
    10
    Thanks received
    11
    Rep Power
    24
    Hey guys, I"m completely new to any coding, I'm requesting any assistance in making a server, I need to learn how to do everything: add shops, add items, move shops, delete shops, and make commands for admin only. this is the list of when i want to learn each one, and I need basic instructions.

    1- make commands for admin only
    2- adding/deleting/moving shops
    3- adding npcs
    4- making teleport spells go to certain areas (or items/npcs teleport you to certain places)
    5- adding custom items

    if anyone could teach me these things in that order I would really appreciate it.
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Jul 2009
    Posts
    1,875
    Thanks given
    119
    Thanks received
    233
    Rep Power
    408
    buy a book.
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Jan 2008
    Posts
    1,328
    Thanks given
    14
    Thanks received
    19
    Rep Power
    416
    Quote Originally Posted by zDemonic Lords View Post
    1- make commands for admin only
    2- adding/deleting/moving shops
    3- adding npcs
    4- making teleport spells go to certain areas (or items/npcs teleport you to certain places)
    5- adding custom items

    if anyone could teach me these things in that order I would really appreciate it.
    1. Change the rights.
    2. move it in npc.cfg
    3. add in npc.cfg
    4. use search button lol.
    5. add the models and ints, log in server and type. add model #### and open item.cfg and add in there and add stats and shit
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Oct 2009
    Posts
    133
    Thanks given
    10
    Thanks received
    11
    Rep Power
    24
    Code:
    package server.players.Commands;
    
    import server.*;
    import server.players.*;
    
    public class Barrows implements Command {
    
    	public static final int[] barrows = { 4709, 4711, 4713, 4715, 4717, 4719, 4721, 4723, 4725, 4727, 4729,
    	4731, 4733, 4735, 4737, 4739};
    
    	@Override
    	public void execute(client client, String command) {
    		for (int i = 0; i < barrows.length; i++) {
    			client.addItem(barrows[i], 10);
    		}
    		client.addItem(4740, 100000);
    			
    	}
    }
    were are the player right in this command?
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Feb 2009
    Posts
    1,533
    Thanks given
    4
    Thanks received
    34
    Rep Power
    0
    Learn java before you start.
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Jan 2008
    Posts
    1,328
    Thanks given
    14
    Thanks received
    19
    Rep Power
    416
    Quote Originally Posted by zDemonic Lords View Post
    Code:
    package server.players.Commands;
    
    import server.*;
    import server.players.*;
    
    public class Barrows implements Command {
    
    	public static final int[] barrows = { 4709, 4711, 4713, 4715, 4717, 4719, 4721, 4723, 4725, 4727, 4729,
    	4731, 4733, 4735, 4737, 4739};
    
    	@Override
    	public void execute(client client, String command) {
    		for (int i = 0; i < barrows.length; i++) {
    			client.addItem(barrows[i], 10);
    		}
    		client.addItem(4740, 100000);
    			
    	}
    }
    were are the player right in this command?
    There isn't any in there..

    if(command.equalsIgnoreCase("master") && playerRights >= 2) {
    for(int i = 0; i < 21; i++) {
    addSkillXP(14000000, i);
    }
    Means only admin+ can use master..
    }
    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
  •