Thread: [PI] Would this Agility class work?

Results 1 to 3 of 3
  1. #1 [PI] Would this Agility class work? 
    Banned

    Join Date
    Jul 2011
    Age
    30
    Posts
    745
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    Hey peoples, I've decided to redo Sanity base, and I thought that I would start on the skills, The main reason is just to highten my undersatanding of java.

    This is a redo base of the Agility class already made by Sanity, I'm just planning on adding 3 courses on to PI.

    I know this isn't the best Agility Class, and also that it is incomplete, but I will fix it and I want to add timers aswel later on.


    So anyways, I was just woundering if there is anything I missed out, or should add in?


    Spoiler for Agility Class:

    Code:
    package server.model.players.skills;
    import server.Config;
    import server.model.players.Client;
    
    /*
     * - Agility.java
     */
    
    public class Agility {
    
    	private Client c;
    
    	public Agility(Client c) {
    		this.c = c;
    	}
    
    
    
    
    	//AGILITY COURSES
    
    
    	/**GNOME STRONGHOLD AGILITY COURSE**/
    	private boolean[] gnomeCourse = new boolean[6];
    	private final int[] EXP = {#,#};
    	public void handleGnomeCourse(int object, int objectX, int objectY) {
    	
    		if (object == #### && objectY > c.getY()) {
    			c.startAnimation(###);
    			c.getPA().movePlayer(c.getX(), c.getY() + #, #);
    			c.getPA().addSkillXP(EXP[##] * Config.AGILITY_EXPERIENCE, c.playerAgility);	
    		} 
    		else if (object == #### || object == ####) {
    		if (object == #### && objectY > c.getY()) {
    			c.startAnimation(###);
    			c.getPA().movePlayer(c.getX(), c.getY() + #, #);
    			c.getPA().addSkillXP(EXP[##] * Config.AGILITY_EXPERIENCE, c.playerAgility);
    		}
    	}
    
    	private void giveReward(int level) {
    	}
    	c.sendMessage("You have completed the Gnome course and have been given " + level + " tickets.");
    		c.getItems().addItem(2996,level);
    		if (level == 1)
    			c.getPA().addSkillXP(EXP[EXP.length-1] * Config.AGILITY_EXPERIENCE, c.playerAgility);
    		for (int j = 0; j < gnomeCourse.length; j++)
    			gnomeCourse[j] = false;
    	}
    
    	private boolean isDoneGnome() {		
    		//return gnomeCourse[0] && gnomeCourse[1] && gnomeCourse[2] && gnomeCourse[3] && gnomeCourse[4] && gnomeCourse[5];
    		return false;
    	}
    }
    
    
    	/**BARBARIAN OUTPOST COURSE*/
    	private boolean[] barbCourse = new boolean[6];
    	private final int[] EXP = {#,#};
    	public void handleBarbCourse(int object, int objectX, int objectY) {
    
    		if (object == #### && objectY > c.getY()) {
    			c.startAnimation(###);
    			c.getPA().movePlayer(c.getX(), c.getY() + #, #);
    			c.getPA().addSkillXP(EXP[##] * Config.AGILITY_EXPERIENCE, c.playerAgility);	
    		} 
    		else if (object == #### || object == ####) {
    		if (object == #### && objectY > c.getY()) {
    			c.startAnimation(###);
    			c.getPA().movePlayer(c.getX(), c.getY() + #, #);
    			c.getPA().addSkillXP(EXP[##] * Config.AGILITY_EXPERIENCE, c.playerAgility);
    		}
    	}
    
    	private void giveReward(int level) {
    	}
    	c.sendMessage("You have completed the Barbarian course and have been given " + level + " tickets.");
    		c.getItems().addItem(2996,level);
    		if (level == 35)
    			c.getPA().addSkillXP(EXP[EXP.length-1] * Config.AGILITY_EXPERIENCE, c.playerAgility);
    		for (int j = 0; j < gnomeCourse.length; j++)
    			gnomeCourse[j] = false;
    	}
    	
    	private boolean isDoneBarb() {		
    		//return barbCourse[0] && barbCourse[1] && barbCourse[2] && barbCourse[3] && barbCourse[4] && barbCourse[5];
    		return false;
    	}
    }
    
    
    	/**WILDERNESS AGILITY COURSE*/
    	private boolean[] wildCourse = new boolean[6];
    	private final int[] EXP = {#,#};
    	public void handleWildCourse(int object, int objectX, int objectY) {
    
    		if (object == #### && objectY > c.getY()) {
    			c.startAnimation(###);
    			c.getPA().movePlayer(c.getX(), c.getY() + #, #);
    			c.getPA().addSkillXP(EXP[##] * Config.AGILITY_EXPERIENCE, c.playerAgility);	
    		} 
    		else if (object == #### || object == ####) {
    		if (object == #### && objectY > c.getY()) {
    			c.startAnimation(###);
    			c.getPA().movePlayer(c.getX(), c.getY() + #, #);
    			c.getPA().addSkillXP(EXP[##] * Config.AGILITY_EXPERIENCE, c.playerAgility);
    		}
    	}
    
    	private void giveReward(int level) {
    	}
    	c.sendMessage("You have completed the Barbarian course and have been given " + level + " tickets.");
    		c.getItems().addItem(2996,level);
    		if (level == 52)
    			c.getPA().addSkillXP(EXP[EXP.length-1] * Config.AGILITY_EXPERIENCE, c.playerAgility);
    		for (int j = 0; j < gnomeCourse.length; j++)
    			gnomeCourse[j] = false;
    	}
    
    	private boolean isDoneWild() {		
    		//return WildCourse[0] && WildCourse[1] && WildCourse[2] && WildCourse[3] && WildCourse[4] && WildCourse[5];
    		return false;
    	}
    }
    
    //END OF



    thnx For your time

    *Take if you want, I don't want creds since most of it is Sanity's work, I just built off it.

    UPDATE
    I added agility ticket rewards
    Reply With Quote  
     

  2. #2  
    Web Developer
    Ben2's Avatar
    Join Date
    Oct 2010
    Posts
    663
    Thanks given
    157
    Thanks received
    70
    Rep Power
    118
    Code:
    private void giveReward(int level) {
    	}
    What is the reward?


    Formerly Crimson.
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jul 2011
    Age
    30
    Posts
    745
    Thanks given
    2,207
    Thanks received
    451
    Rep Power
    0
    I will make agility ticket from every course, getting more depending on the complexity of course, Sorry, Should had left it out till I finished it, but it wont matter if its just sitting there.

    Edit
    I added a basic reward system
    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: 09-03-2011, 11:58 PM
  2. Replies: 19
    Last Post: 05-25-2010, 02:22 PM
  3. Class20, Class 8, Class 5
    By Exion in forum Help
    Replies: 1
    Last Post: 05-23-2010, 07:20 PM
  4. Which class is the object class?
    By Mr. Epic in forum Help
    Replies: 2
    Last Post: 12-22-2009, 12:58 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
  •