Thread: Can't Add Special Attacks 0_o

Results 1 to 2 of 2
  1. #1 Can't Add Special Attacks 0_o 
    Registered Member kalo93's Avatar
    Join Date
    Aug 2010
    Posts
    55
    Thanks given
    0
    Thanks received
    10
    Rep Power
    1
    I made my own custom weapons, but when I add the weapon ID to my special.java, the spec bar still doesn't appear ingame.

    Here's my special.java
    Code:
    public class special {
    
        public void loginSpec(client c, int item)
        {
    	boolean flag = false;
    	for(int wep : SPEC_WEPS){
    	    if(wep == item){
    		flag = true;
    	    }
    	}
    	for(int frame = 0; frame < SPEC_BAR_FRAMES.length; frame++){
    	    c.outStream.createFrame(171);
    	    c.outStream.writeByte((flag ? 0 : 1));
    	    c.outStream.writeWord(SPEC_BAR_FRAMES[frame]);
    	    c.flushOutStream();
    	}
        }
    
        public void needSpecial(client c, int item, int target)
        {
    	if(target != 3){
    	    return;
    	}
    	loginSpec(c, item);
        }
    
        public void loadSpecBar(client c)
        {
    	c.outStream.createFrame(87);
    	c.outStream.writeWordBigEndian(300);
    	c.outStream.writeDWord_v1(c.specialAmount * 10);
    	c.flushOutStream();
    
    	c.outStream.createFrame(36);
    	c.outStream.writeWordBigEndian(301);
    	c.outStream.writeByte(c.specOn ? 1 : 0);
    	c.flushOutStream();
        }
    
        public int[] SPEC_WEPS = {
    	1215, 1231, 1249, 1263, 8010, 1305,
    	1377, 1434, 3204, 4587, 5680,
    	5698, 5716, 5730, 6739, 7158,
    	859, 861, 4827, 667, 746,
    	2402, 8100, 4151, 4153, 8002, 35,
    	13643, 7617, 9813, 9803, 9802, 10025
        };
    
        public int[] SPEC_BAR_FRAMES = {
    	12323,7574,7599,7549,8493,
    	7499,7474,7674,7624,7800,10025
        };
    
    }
    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
    Are you calling the method?
    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
  •