Thread: Working Vengence!

Page 1 of 16 12311 ... LastLast
Results 1 to 10 of 154
  1. #1 Working Vengeance! 
    Ferret
    Guest
    Purpose: Working Vengeance For Your Server

    Difficulty: 1-2

    Assumed Knowledge: How to read and copy + paste

    Server Base: Any

    Classes Modified: client.java

    Procedure:
    Step 1:

    Find
    Code:
    public class client extends Player implements Runnable {
    Under it, put this:
    Code:
    public void Vengeance() {
    if (IsAttacking == true && Vengeance == true) {
     if (server.playerHandler.players[AttackingOn].IsAttacking == true) {
      if (server.playerHandler.players[AttackingOn] != null) {
       if (PlayerHandler.players[AttackingOn].IsDead == false) {
    	if (IsDead == false) {
    
    	client p = (client) server.playerHandler.players[AttackingOn];
    	int damage = p.playerLevel[3] / 3;
    	int X = p.absX;
    	int Y = p.absY;
    
     if (GoodDistance(X, Y, X, Y, 1)) {
    	 txt4 = "Taste Vengeance!";
    	 string4UpdateRequired = true;
    	 startAnimation(811);
    	 stillgfx(437, Y, X);
    	 teleportToX = absX;
    	 teleportToY = absY;
    	 p.teleportToX = p.absX;
    	 p.teleportToY = p.absY;
    	 p.hitDiff = damage;
    	 p.updateRequired = true;
    	 p.hitUpdateRequired = true;
    
    	 Vengeance = false;
    	 }
    	}
       }
      }
     }
    }
    }
    
    public void VengeanceNPC() {
    if (IsAttackingNPC == true && Vengeance == true) {
      if (server.npcHandler.npcs[attacknpc] != null) {
       if (server.npcHandler.npcs[attacknpc].IsDead == false) {
    	if (IsDead == false) {
    
    	int X = server.npcHandler.npcs[attacknpc].absX;
    	int Y = server.npcHandler.npcs[attacknpc].absY;
    	int HP = server.npcHandler.npcs[attacknpc].HP;
    	int damage = HP / 3;
    
     if (GoodDistance(X, Y, X, Y, 1)) {
     	 txt4 = "Taste Vengeance!";
    	 string4UpdateRequired = true;
    	 startAnimation(811);
    	 stillgfx(437, Y, X);
    	 teleportToX = absX;
    	 teleportToY = absY;
    	 server.npcHandler.npcs[attacknpc].hitDiff = damage;
    	 server.npcHandler.npcs[attacknpc].updateRequired = true;
    	 server.npcHandler.npcs[attacknpc].hitUpdateRequired = true;
    
    	 Vengeance = false;
    	 }
        }
       }
      }
     }
    }
    
    
    
    public void CastVengeance() {
    	if (playerLevel[6] >= 94 && CanVen == true)
    	{
    	if (Vengeance == true)
    	{
    	sendMessage("You already have Vengeance casted!");
    	}
    	else if (Vengeance != true)
    	{
    	teleportToX = absX;
    	teleportToY = absY;
    	startAnimation(811);
    	stillgfx(437, absY, absX);
    	Vengeance = true;
    	VengeanceTimer = 360;
    	VenTimer = 120;
    	}
    	else if(playerLevel[6] < 94)
    	{
    	sendMessage("You need a magic level of 94 to cast Vengeance!");
    	}
    }
    }
    Step 2:

    Find
    Code:
    public boolean process()
    Under it, add this:
    Code:
    if (VenTimer == 0) {
    	CanVen = true;
    } else if (VenTimer > 0) {
    	VenTimer--;
    }
    
    if (IsAttacking == true && Vengeance == true) {
     if (server.playerHandler.players[AttackingOn].IsAttacking) {
      if (server.playerHandler.players[AttackingOn] != null) {
       if (PlayerHandler.players[AttackingOn].IsDead == false) {
    	   Vengeance();
       }
      }
     }
    }
    
    if (IsAttackingNPC == true && Vengeance == true) {
     if (server.npcHandler.npcs[attacknpc] != null) {
      if (server.npcHandler.npcs[attacknpc].IsDead == false) {
          VengeanceNPC();
      }
     }
    }
    
    if (Vengeance == true) {
    	if (VengeanceTimer == 0) {
    		Vengeance = false;
    		sendMessage("Your Vengeance spell wears off!");
    	} else if (VengeanceTimer > 360) {
    		VengeanceTimer = 360;
    	} else if (VengeanceTimer > 0) {
    		VengeanceTimer--;
    	}
    }
    
    if (Vengeance == false) {
    	VengeanceTimer = 0;
    }
    After, above
    Code:
    public boolean process()
    add these:
    Code:
    public boolean Vengeance = false;
    public boolean CanVen = false;
    public int VengeanceTimer = 0;
    public int VenTimer = 0;
    Step 3:

    Find:
    Code:
    switch(actionButtonId)
    under it, put this:
    Code:
    case 4169: CastVengeance(); break;
    And your done!

    Summary: What this does is. You get 94 magic and go into the magic spell book. Click the charge button (Level 80 Spell). You will cast Vengeance on yourself. The spell hits the opponent with their hp level divided by 3.

    Guy - 99 hp
    Enemy - 99 hp

    In this case, Guy uses Vengeance and it hits Enemy with a 33 (99 divided by 3).

    Picture:


    Credits: Ferret
     

  2. #2  
    Registered Member
    Join Date
    Feb 2007
    Posts
    104
    Thanks given
    0
    Thanks received
    0
    Rep Power
    32
    Great work i added it to my server

    +REP
     

  3. #3  
    Phstudz15
    Guest
    This is an awesome tut.. But my character doesn't say "Taste Vengance" when he casts it. It also needs a time. Like you can only use every 10 seconds. But otherwise Beauuuuutifulllllllllllll tutoiral.

    Rep++ for sure
     

  4. #4  
    Ferret
    Guest
    Thanks for the rep. This is one of my 4th TuTs.
     

  5. #5  
    Phstudz15
    Guest
    Are you gonna add the timer and txt thing?
     

  6. #6  
    Ferret
    Guest
    Quote Originally Posted by Phstudz15 View Post
    Are you gonna add the timer and txt thing?
    The text is already there, so is the timer.
     

  7. #7  
    Phstudz15
    Guest
    How come they don't work? I can do like 20 vengance's per second lol. It would be so awesome if they worked.
     

  8. #8  
    Perfection
    Guest
    Great, works, used it on my server.

    Im a very inexperienced coder and very new to it, I followed this tut and got no errors on my first try, awesome tut.

    Rep++

    -Edit- Could you help me out with the timer by any chance?
     

  9. #9  
    Louisiana
    Guest
    o yea time is in there u just gotta change it
     

  10. #10  
    Ferret
    Guest
    Quote Originally Posted by Louisiana View Post
    o yea time is in there u just gotta change it
    Yeah, you have to change the CastVengence void. Where it says VenTimer = 360;

    makes it so the timer is 3 minutes. Have to wait 3 minutes to cast the spell again.
     

Page 1 of 16 12311 ... LastLast

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. 614 Vengence Problem
    By Spoon Man in forum Help
    Replies: 6
    Last Post: 10-09-2010, 09:49 AM
  2. need vengence!
    By leitchy18 in forum Requests
    Replies: 0
    Last Post: 04-16-2009, 10:52 AM
  3. [525]Vengence Base
    By Inspired Dreams in forum Tutorials
    Replies: 13
    Last Post: 02-20-2009, 02:51 AM
  4. Vengence
    By Marcus|fury upon u in forum Requests
    Replies: 1
    Last Post: 12-24-2008, 10:12 AM
  5. Ravage//.Vengence
    By .vengence in forum Showcase
    Replies: 7
    Last Post: 10-09-2008, 02:04 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
  •