Thread: [pi] Npc giving A Rank

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 [pi] Npc giving A Rank 
    OoO Donor <3
    Rockstar Jax's Avatar
    Join Date
    Mar 2011
    Age
    22
    Posts
    608
    Thanks given
    77
    Thanks received
    78
    Rep Power
    21
    Okay, well im working on a cool feature for the server. we are doing clans. Like the whole server joins a clan. Like blue team and red team. I got the var. set and the rank set blah blah got the npc dialogue set up all i need help with is this. on the npc it will have a option like.

    I choose Blue Team!
    I choose Red Team!

    make it where when they click ea Blue one. it will make isBlue equal to 1. they will have to relogg for the effect to work. Im kinda stumpped at that part any ideas?
    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Oct 2006
    Posts
    1,371
    Thanks given
    64
    Thanks received
    197
    Rep Power
    426
    c.dialogueAction and c.dialogueId, buttonclicking,java
    [Only registered and activated users can see links. ]


    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2011
    Posts
    178
    Thanks given
    16
    Thanks received
    41
    Rep Power
    30
    Code:
    case 1682:
    				sendOption2("Red team", "Blue team");
    				c.dialogueAction = 1682;
    			break;
    then
    under which ever clickingbutton u get
    Code:
    } else if (c.dialogueAction == 1682) {
    					//red team
    					c.isRed = 1();
    Code:
    } else if (c.dialogueAction == 1682) {
    					//blue team
    c.isBlue = 1();<sumthin like that
    Reply With Quote  
     

  4. #4  
    OoO Donor <3
    Rockstar Jax's Avatar
    Join Date
    Mar 2011
    Age
    22
    Posts
    608
    Thanks given
    77
    Thanks received
    78
    Rep Power
    21
    thanks will be tryin
    Reply With Quote  
     

  5. #5  
    Donator


    Join Date
    Jun 2011
    Posts
    2,562
    Thanks given
    539
    Thanks received
    402
    Rep Power
    658
    Why use ints, I believe a boolean would be simpler?

    True & false
    All the best,
    Nirvana

    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    Oct 2009
    Posts
    734
    Thanks given
    168
    Thanks received
    54
    Rep Power
    0
    In DialogueHandler.java add:
    Code:
    case ####://dialogue ID number (could be any number, as long as it is not already used in another dialogue
    			sendOption2("I choose the red team!",  I choose the blue team!");
    			c.dialogueAction = ####;//make this the same as the case number above ^
    			break;
    Read the // comment so you know how to configure that correctly.

    Then in ClickingButtons.java look for
    Code:
    case 9157:
    Under that add:
    Code:
    if(c.isBlue != 0) {
     c.isRed = 1;
    } else {
    c.getPA().sendStatement("You are already on the blue team!");
    }
    Look for:
    Code:
    case 9158:
    Under that add:
    Code:
    if(c.isRed != 0) {
     c.isRed = 1;
    } else {
    c.getPA().sendStatement("You are already on the red team!");
    }
    This isn't complete, you still need to add the isRed = and isBlue = into the character files. I'm too lazy to look into that atm, but maybe someone else can help you with it.
    Reply With Quote  
     

  7. #7  
    Donator


    Join Date
    Jun 2011
    Posts
    2,562
    Thanks given
    539
    Thanks received
    402
    Rep Power
    658
    Quote Originally Posted by anarchypk508 View Post
    In DialogueHandler.java add:
    Code:
    case ####://dialogue ID number (could be any number, as long as it is not already used in another dialogue
    			sendOption2("I choose the red team!",  I choose the blue team!");
    			c.dialogueAction = ####;//make this the same as the case number above ^
    			break;
    Read the // comment so you know how to configure that correctly.

    Then in ClickingButtons.java look for
    Code:
    case 9157:
    Under that add:
    Code:
    if(c.isBlue != 0) {
     c.isRed = 1;
    } else {
    c.getPA().sendStatement("You are already on the blue team!");
    }
    Look for:
    Code:
    case 9158:
    Under that add:
    Code:
    if(c.isRed != 0) {
     c.isRed = 1;
    } else {
    c.getPA().sendStatement("You are already on the red team!");
    }
    This isn't complete, you still need to add the isRed = and isBlue = into the character files. I'm too lazy to look into that atm, but maybe someone else can help you with it.
    This.

    Yeah, then declare and add to the character files.
    All the best,
    Nirvana

    Reply With Quote  
     

  8. #8  
    OoO Donor <3
    Rockstar Jax's Avatar
    Join Date
    Mar 2011
    Age
    22
    Posts
    608
    Thanks given
    77
    Thanks received
    78
    Rep Power
    21
    Quote Originally Posted by anarchypk508 View Post
    In DialogueHandler.java add:
    Code:
    case ####://dialogue ID number (could be any number, as long as it is not already used in another dialogue
    			sendOption2("I choose the red team!",  I choose the blue team!");
    			c.dialogueAction = ####;//make this the same as the case number above ^
    			break;
    Read the // comment so you know how to configure that correctly.

    Then in ClickingButtons.java look for
    Code:
    case 9157:
    Under that add:
    Code:
    if(c.isBlue != 0) {
     c.isRed = 1;
    } else {
    c.getPA().sendStatement("You are already on the blue team!");
    }
    Look for:
    Code:
    case 9158:
    Under that add:
    Code:
    if(c.isRed != 0) {
     c.isRed = 1;
    } else {
    c.getPA().sendStatement("You are already on the red team!");
    }
    This isn't complete, you still need to add the isRed = and isBlue = into the character files. I'm too lazy to look into that atm, but maybe someone else can help you with it.
    doest work i have the varible set jaja it doesnt save tho. and yes added it into player saving right. i go to try again says im already in a clan when both of them are 0
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    Oct 2009
    Posts
    734
    Thanks given
    168
    Thanks received
    54
    Rep Power
    0
    My bad, I fucked up, try this:

    In DialogueHandler.java add:
    Code:
    case ####://dialogue ID number (could be any number, as long as it is not already used in another dialogue
    			sendOption2("I choose the red team!",  I choose the blue team!");
    			c.dialogueAction = ####;//make this the same as the case number above ^
    			break;
    Read the // comment so you know how to configure that correctly.

    Then in ClickingButtons.java look for
    Code:
    case 9157:
    Under that add:
    Code:
    if(c.isBlue == 0) {
    	c.isRed = 1;
    } else {
    	c.getPA().sendStatement("You are already on the blue team!");
    }
    Look for:
    Code:
    case 9158:
    Under that add:
    Code:
    if(c.isRed == 0) {
    	c.isBlue = 1;
    } else {
    	c.getPA().sendStatement("You are already on the red team!");
    }
    This isn't complete, you still need to add the isRed = and isBlue = into the character files. I'm too lazy to look into that atm, but maybe someone else can help you with it.
    Reply With Quote  
     

  10. #10  
    Banned

    Join Date
    Oct 2009
    Posts
    734
    Thanks given
    168
    Thanks received
    54
    Rep Power
    0
    Works?
    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

Similar Threads

  1. 1 rank.
    By Imworth73m in forum Requests
    Replies: 15
    Last Post: 06-27-2011, 07:52 PM
  2. The rank suggestion to end ALL rank suggestions
    By Runite in forum Suggestions
    Replies: 12
    Last Post: 07-15-2010, 03:51 AM
  3. new rank
    By blitzduck in forum Suggestions
    Replies: 12
    Last Post: 08-18-2009, 10:55 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •