Thread: Redoing Weapon emotes

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Redoing Weapon emotes 
    なぜこのテキストは日本語で書かれている ?

    Kenneh's Avatar
    Join Date
    Dec 2009
    Age
    30
    Posts
    2,753
    Thanks given
    63
    Thanks received
    296
    Rep Power
    478
    Im trying to redo the weapon emotes in deltascape, but I don't know how to implement something like "WeaponName.contains("scimitar");" Anyone got some advice?


    Reply With Quote  
     

  2. #2  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    if(what you posted)
    return ID HERE;
    Reply With Quote  
     

  3. #3  
    なぜこのテキストは日本語で書かれている ?

    Kenneh's Avatar
    Join Date
    Dec 2009
    Age
    30
    Posts
    2,753
    Thanks given
    63
    Thanks received
    296
    Rep Power
    478
    Quote Originally Posted by i r maggot View Post
    if(what you posted)
    return ID HERE;
    didnt work :/


    Compiling Server
    .\com\rs2\model\Client.java:4683: int cannot be dereferenced
    if (playerWeapon.contains("scimitar")) {
    ^
    1 error
    Compiling completed.
    Press any key to continue . . .


    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    May 2010
    Posts
    1,550
    Thanks given
    92
    Thanks received
    154
    Rep Power
    0
    Code:
                   if(weaponName.contains("Verac"))
    			return blahblah;
    		 if(weaponName.endsWith("2h sword"))
    			return blah blahdf;
    		if(weaponName.equals("Seercull"))
    			return 5543;
    I don't know if that will work. It works on Hyperion though
    Reply With Quote  
     

  5. #5  
    なぜこのテキストは日本語で書かれている ?

    Kenneh's Avatar
    Join Date
    Dec 2009
    Age
    30
    Posts
    2,753
    Thanks given
    63
    Thanks received
    296
    Rep Power
    478
    Quote Originally Posted by polaris459 View Post
    Code:
                   if(weaponName.contains("Verac"))
    			return blahblah;
    		 if(weaponName.endsWith("2h sword"))
    			return blah blahdf;
    		if(weaponName.equals("Seercull"))
    			return 5543;
    I don't know if that will work. It works on Hyperion though
    I dont have a weaponName Method.


    Reply With Quote  
     

  6. #6  
    Registered Member Hexagon's Avatar
    Join Date
    May 2008
    Posts
    672
    Thanks given
    28
    Thanks received
    18
    Rep Power
    33
    Quote Originally Posted by Kenneh View Post
    I dont have a weaponName Method.
    getwepanim()
    Reply With Quote  
     

  7. #7  
    なぜこのテキストは日本語で書かれている ?

    Kenneh's Avatar
    Join Date
    Dec 2009
    Age
    30
    Posts
    2,753
    Thanks given
    63
    Thanks received
    296
    Rep Power
    478
    Quote Originally Posted by sn4k3d View Post
    getwepanim()
    That doesn't help... I know the getwepanim method :/ What i need is something to let me use a WeaponName starts with code inside the getwepanim method


    Reply With Quote  
     

  8. #8  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    Code:
    public String getItemName(int itemId) {
            for(Item temp : World.getWorld().itemManager.itemList)
                if(temp.itemId == itemId)
                    return temp.itemName;
            return null;
        }
    Reply With Quote  
     

  9. #9  
    なぜこのテキストは日本語で書かれている ?

    Kenneh's Avatar
    Join Date
    Dec 2009
    Age
    30
    Posts
    2,753
    Thanks given
    63
    Thanks received
    296
    Rep Power
    478
    Quote Originally Posted by i r maggot View Post
    Code:
    public String getItemName(int itemId) {
            for(Item temp : World.getWorld().itemManager.itemList)
                if(temp.itemId == itemId)
                    return temp.itemName;
            return null;
        }
    How would i use that in "getwepanim"?


    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Mar 2009
    Posts
    1,123
    Thanks given
    36
    Thanks received
    217
    Rep Power
    183
    Quote Originally Posted by Kenneh View Post
    How would i use that in "getwepanim"?
    Do you know java at all..?

    I'm using hyperion, you can easily convert.

    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 = 1;
    			final int[][][] ATK_ANIM = {{{1307, 1309, 1311, 1313, 1314, 1315, 1317, 1319, 11694, 11696, 11698, 11700, 11730}, {7041, 7041, 7048, 7049}}, 
    					{{4151}, {1658, 1658, 1658}}, {{10887}, {5685, 5685, 5685, 5685}}, {{806, 807, 808, 809, 810, 811, 3093, 11230}, {582, 582, 582}}, 
    					{{863, 864, 865, 866, 867, 868, 869}, {0x326, 0x326, 0x326}}};
    			for(int i = 0; i < ATK_ANIM.length; i++) {
    				for(int f = 0; f < ATK_ANIM[i][0].length; f++) {
    					if(id == ATK_ANIM[i][0][f]) {
    						return ATK_ANIM[i][1][fightStyle-1];
    					}
    				}
    			}
    			return 451;
    		} catch(Exception e) {
    			return 451;
    		}
    	}
    Usage: {{wep1, wep2}, {fightstyle1, fightstyle2, fightstyle 3, fightstyle4}}

    I already have whip, 2h's and all non-poisoned darts handled. You can convert to weapon names by making it a 3d string and making the anim id a string too.
    I'm not the devil, but I'm sure as **** not a saint.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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
  •