Thread: 2 Jads

Results 1 to 7 of 7
  1. #1 2 Jads 
    Seven Lions

    Yvne's Avatar
    Join Date
    Sep 2012
    Posts
    1,204
    Thanks given
    164
    Thanks received
    173
    Rep Power
    81
    RESOLVED

    Hi I changed my fight caves it's just 1 wave with 2 jads, but after i kill the first 1 i teleport out.
    these are the methods that it uses.

    Code:
    public void handleJadDeath(int i) {
    		Client c = (Client) PlayerHandler.players[npcs[i].spawnedBy];
    		c.getItems().addItem(19111, 1);
    		c.sendMessage("Congratulations on completing the fight caves minigame!");
    		c.sendMessage("Your reward for your bravery is the TokHaar-Kal cape!");
    		c.getPA().resetTzhaar();
    		c.waveId = 300;
    	}
    Code:
    if (npcs[i].npcType == 2745) {
    							handleJadDeath(i);
    						}
    resettzhaar if needed

    Code:
    public void resetTzhaar() {
    		c.waveId = -1;
    		c.tzhaarToKill = -1;
    		c.tzhaarKilled = -1;
    		movePlayer(2438, 5168, 0);
    	}
    how do i make it so i have to kill both before being teled out?

    Thanks!
    Reply With Quote  
     

  2. #2  
    Ligma male grindset


    Join Date
    Nov 2011
    Age
    27
    Posts
    4,331
    Thanks given
    1,032
    Thanks received
    1,941
    Rep Power
    5000
    Code:
    public void resetTzhaar() {
    		c.waveId = -1;		c.tzhaarToKill = -2;		c.tzhaarKilled = -2;		movePlayer(2438, 5168, 0);  }
    dunno what im doing

    Spoiler for Signature:
    Attached image
    Attached image

    Attached image

    Attached image

    Reply With Quote  
     

  3. #3  
    Seven Lions

    Yvne's Avatar
    Join Date
    Sep 2012
    Posts
    1,204
    Thanks given
    164
    Thanks received
    173
    Rep Power
    81
    Quote Originally Posted by Liam Baby View Post
    Code:
    public void resetTzhaar() {
    		c.waveId = -1;		c.tzhaarToKill = -2;		c.tzhaarKilled = -2;		movePlayer(2438, 5168, 0);  }
    dunno what im doing
    Lol no that's not it.
    isn't -1, none or default?
    Reply With Quote  
     

  4. #4  
    Registered Member Aether Vial's Avatar
    Join Date
    Jul 2013
    Posts
    20
    Thanks given
    0
    Thanks received
    1
    Rep Power
    11
    The best solution that I came up with for this problem would be using a simple counter.

    It would look something like this(but not exactly):
    Code:
    if (npcs[i].npcType == 2745) {
    	if (jadDeath == 2)
    		handleJadDeath(i);
    	jadDeath += (jadDeath < 2) ? 1 : -2;
    }
    I'll let you figure out the specifics.
    Reply With Quote  
     

  5. #5  
    Seven Lions

    Yvne's Avatar
    Join Date
    Sep 2012
    Posts
    1,204
    Thanks given
    164
    Thanks received
    173
    Rep Power
    81
    Quote Originally Posted by Klampyne View Post
    The best solution that I came up with for this problem would be using a simple counter.

    It would look something like this(but not exactly):
    Code:
    if (npcs[i].npcType == 2745) {
    	if (jadDeath == 2)
    		handleJadDeath(i);
    	jadDeath += (jadDeath < 2) ? 1 : -2;
    }
    I'll let you figure out the specifics.
    Yeah I really don't know how to implement this :[
    Reply With Quote  
     

  6. #6  
    Registered Member
    thim slug's Avatar
    Join Date
    Nov 2010
    Age
    28
    Posts
    4,132
    Thanks given
    1,077
    Thanks received
    1,137
    Rep Power
    5000
    You're calling handleJadDeath when jad dies, but the server doesn't know whether it's the first death or second death, it just knows to execute that code when jad is killed.
    Reply With Quote  
     

  7. #7  
    Registered Member risgaard's Avatar
    Join Date
    Jul 2013
    Posts
    648
    Thanks given
    12
    Thanks received
    16
    Rep Power
    13
    just add it in player methode? jadkilled, and do as it gives +1 for ea jad kill and at 2 it will tele you out and reset? just a easy way to fix
    my grammar. aint pefect. but atleast you understand me

    did i help you ?
    i am not asking for rep but you can atleast say thanks
    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

Similar Threads

  1. Make Jad do all 3 attacks
    By Bulby Strife in forum Tutorials
    Replies: 22
    Last Post: 02-25-2008, 10:47 PM
  2. Replies: 8
    Last Post: 05-04-2007, 09:52 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
  •