Thread: Weapon Anims...Would this work?

Results 1 to 3 of 3
  1. #1 Weapon Anims...Would this work? 
    Registered Member

    Join Date
    Mar 2009
    Posts
    1,123
    Thanks given
    36
    Thanks received
    217
    Rep Power
    183
    I can't compile or anything on this computer, so can someone tell me if this would work properly?

    Code:
    	/**
    	 * Get's The player's weapon animation
    	 * @param p The source of the animation
    	 */
    	public static int getCombatAnim(Player p) {
    		try {
    			int id = p.getEquipment().get(Equipment.SLOT_WEAPON).getId();
    			int fightStyle = p.getCombat().getFightStyle();
    			/* Format: {id, anim} / {id, style1anim, style2anim} /
    					{id, style1anim, style2anim, style3anim} / 
    					{id, style1anim, style2anim, style3anim, style4anim} */
    			final int[][] ATK_ANIM = {{11230, 582}, {868, 0x326}, {4718, 2067, 2066}, {11694, 7075, 7074, 7073, 7072}};
    			for(int i = 0; i < ATK_ANIM.length; i++) {
    				if(id == ATK_ANIM[i][0]) {
    					if(ATK_ANIM[i].length == 2)
    						return ATK_ANIM[i][1];
    					else if(ATK_ANIM[i].length > 2) {
    						if(fightStyle == 1)
    							return ATK_ANIM[i][1];
    						else if(fightStyle == 2 && ATK_ANIM[i].length > 3)
    							return ATK_ANIM[i][2];
    						else if(fightStyle == 3 && ATK_ANIM[i].length > 4)
    							return ATK_ANIM[i][3];
    						else
    							return ATK_ANIM[i][ATK_ANIM.length-1];
    					}
    				}
    			}
    		} catch(Exception e) {
    			return 451;
    		}
    	}
    I'm not the devil, but I'm sure as **** not a saint.
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Dec 2009
    Posts
    90
    Thanks given
    1
    Thanks received
    0
    Rep Power
    0
    Erm yea i guess, i do it a different way though. This looks sexy if it works.
    Reply With Quote  
     

  3. #3  
    Member Weapon Anims...Would this work? Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    Should do, yeah.

    Attached imageAttached image
    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
  •