Thread: Right Arrow GFX;

Results 1 to 6 of 6
  1. #1 Right Arrow GFX; 
    No Ban Hama
    Guest
    Ok So First Open Up Client.java And Replace Your CreateProjectile Down To Static Animation Void (Or Add If You Don't Have) With This
    Code:
    public void createProjectile(int casterY, int casterX, int offsetY, int offsetX, int angle, int speed, int gfxMoving, int startHeight, int endHeight, int lockon)
    	{
    for (Player p : server.playerHandler.players)
    {
    if(p != null) 
    {
    client person = (client)p;
    if((person.playerName != null || person.playerName != "null"))
    {
    if(person.distanceToPoint(casterX, casterY) <= 10)
    {
    	person.createProjectile3(casterY, casterX, offsetY, offsetX, angle, speed, gfxMoving, startHeight, endHeight, lockon);
    	}
    	}
    	}
    	}
    	}
    	public void createProjectile3(int casterY, int casterX, int offsetY, int offsetX, int angle, int speed, int gfxMoving, int startHeight, int endHeight, int lockon) {
                    outStream.createFrame(85);
                    outStream.writeByteC((casterY - (mapRegionY * 8)) - 2);
                    outStream.writeByteC((casterX - (mapRegionX * 8)) - 3);
                    outStream.createFrame(117);
                    outStream.writeByte(angle);                     //Starting place of the projectile
                    outStream.writeByte(offsetY);               //Distance between caster and enemy Y
                    outStream.writeByte(offsetX);                //Distance between caster and enemy X
                    outStream.writeWord(lockon);        //The NPC the missle is locked on to
                    outStream.writeWord(gfxMoving);             //The moving graphic ID
                    outStream.writeByte(startHeight);           //The starting height
                    outStream.writeByte(endHeight);             //Destination height
                    outStream.writeWord(51);                        //Time the missle is created
                    outStream.writeWord(speed);                     //Speed minus the distance making it set
                    outStream.writeByte(16);                        //Initial slope
                    outStream.writeByte(64);                        //Initial distance from source (in the direction of the missile) //64    
        }
    public void staticAnimation(int graphicID, int playerX, int playerY, int heightLevel)
    {
    for (Player p : server.playerHandler.players)
    {
    if(p != null) 
    {
    client person = (client)p;
    if((person.playerName != null || person.playerName != "null"))
    {
    if(person.distanceToPoint(playerX, playerY) <= 10)
    {
    person.staticAnimation2(graphicID, playerX, playerY, heightLevel);
    }
    }
    }
    }
    }
    
    
    public void staticAnimation2(int graphicID, int playerX, int playerY, int heightLevel) { /*Used from phates old stuff*/
    		outStream.createFrame(85);
    		outStream.writeByteC(playerY - (mapRegionY * 8));
    		outStream.writeByteC(playerX - (mapRegionX * 8));
    		outStream.createFrame(4);
    		outStream.writeByte(0);				
    		outStream.writeWord(graphicID);			//	Graphic ID
    		outStream.writeByte(heightLevel);		//	Height above gorund
    		outStream.writeWord(0);					//	Pause before casting
    	}
    Now Search For
    Code:
       sendMessage("There's no arrows left in your quiver");
    And Under The DeleteArrows() In All Of Them Add
    Code:
    createProjectile(absY, absX, offsetX, offsetY, 50, 80, arrowgfx(), 43, 31, 0 - AttackingOn);
    Now Add This Int

    Code:
    public int arrowgfx()
    {
    if(playerEquipment[playerWeapon] != 4214)
    {
    return 15;
    }
    if(playerEquipment[playerWeapon] != 6522)
    {
    return 442;
    }
    else
    {
    return 471;
    }
    Compile & Run
    }
    [
     

  2. #2  
    kama
    Guest
    i dont have a thing called static animation
     

  3. #3  
    No Ban Hama
    Guest
    Well Add It
     

  4. #4  
    Mariushka
    Guest
    Does this Gfx corectly moves to target ?
     

  5. #5  
    Just
    Guest
    Yeah, (BTW I'm No Ban Hama)
     

  6. #6  
    Mariushka
    Guest
    Hmh...time to fix my source's gfx bugs thanks for this tutorial.

    Where does your ints goes ? (c)
     


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. Arrow on npc
    By Tx-Sec in forum Help
    Replies: 5
    Last Post: 04-06-2010, 10:19 PM
  2. Arrow ->
    By Thee Wolf in forum Showcase
    Replies: 7
    Last Post: 11-10-2009, 04:10 AM
  3. Npc arrow
    By zezarak in forum Help
    Replies: 0
    Last Post: 10-15-2009, 06:39 PM
  4. Replies: 11
    Last Post: 06-05-2009, 09:01 AM
  5. Skull, prayer, and arrow height, loading arrow.
    By dustrip in forum Tutorials
    Replies: 34
    Last Post: 03-17-2009, 01:06 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •