Thread: Whats up with this code? PI

Results 1 to 9 of 9
  1. #1 Whats up with this code? PI 
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    Code:
    case 512:
    	if (c.getItems().playerHasItem(286, 1)){
    	c.getItems().deleteItem2(286, 1);
    	sendNpcChat4("I like this very much!","It is a nice colour and It- Oh, Bentnoze..","What are you looking at me like that for?!","*Sigh* We can't have this one then...", c.talkingNpc, "General Bentnoze");
    	c.nextChat = 513;
    	} else
    		c.nextChat = 507;
    case 513:
    if (c.getItems().playerHasItem(287, 1)) {
    	c.getItems().deleteItem2(287, 1);
    	sendNpcChat4("I like this very much!","It is a nice colour and It- Oh, Wartface..","What are you looking at me like that for?!","*Sigh* We can't have this one then...", c.talkingNpc, "General Wartface");
    	c.nextChat = 514; 
    }else 
    	c.nextChat = 507;
    break;
    case 514:
    if (c.getItems().playerHasItem(9054, 1)) {
    	c.getItems().deleteItem2(9054, 1);
    	c.GoblinDiplomacy = 3;
    	sendNpcChat4("WOW!","This armour it's so... so... stylish!","Human I am so impressed with this!","General Bentnoze, what do you think?", c.talkingNpc, "General Wartface");
    	c.nextChat = 515;
    } else
    	c.nextChat = 507;
    break;
    case 515:
    sendNpcChat4("I'm so in love with this colour!","Human you have earnt the magic sheet, the Exp","AND the runite bar!","", c.talkingNpc, "General Bentnoze");
    c.nextChat = 515;
    break;
    What's up with that code? They have to have item 286 and 287, it takes them both away, yet it stays on the first dialogue?? Why is it taking them both away??

    Any help would be appreciated.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Nov 2010
    Age
    14
    Posts
    2,639
    Thanks given
    158
    Thanks received
    280
    Rep Power
    0
    Do you get any errors?

    if so, please post and let us know.
    Reply With Quote  
     

  3. #3  
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    Nope, no errors. :/
    I just click "Click here to continue" and nothing happens.
    Reply With Quote  
     

  4. #4  
    Member Whats up with this code? PI Market Banned

    Join Date
    May 2011
    Age
    29
    Posts
    414
    Thanks given
    16
    Thanks received
    44
    Rep Power
    56
    Quote Originally Posted by Harryy View Post
    Nope, no errors. :/
    I just click "Click here to continue" and nothing happens.
    So when you "Click here to continue" nothing appears and nothing goes away?
    Reply With Quote  
     

  5. #5  
    Project Drop-Zone Owner & The BLOOD Gang Always Banging RED


    Join Date
    May 2013
    Age
    28
    Posts
    2,992
    Thanks given
    5
    Thanks received
    937
    Rep Power
    183
    I see the issue right now it says case 512 next chat 507 yet it jumps to case 513 without going to 507. Well I also need to look closer as well
    Reply With Quote  
     

  6. #6  
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    Quote Originally Posted by Chris^ View Post
    So when you "Click here to continue" nothing appears and nothing goes away?

    Yup :/
    After closer inspection, it goes straight to case 513....
    This is my action handler for this bit:

    Code:
    case 2187:
    	if (c.getItems().playerHasItem(286, 1)){
    				c.getDH().sendDialogues(512, npcType);
    	} else
    		c.getDH().sendDialogues(500, npcType);
    				break;
    Reply With Quote  
     

  7. #7  
    Project Drop-Zone Owner & The BLOOD Gang Always Banging RED


    Join Date
    May 2013
    Age
    28
    Posts
    2,992
    Thanks given
    5
    Thanks received
    937
    Rep Power
    183
    As you see with mine

    case 500:
    sendStatement("Hello,I am able to change your loyalty title");
    c.nextChat = 501;
    break;

    case 501:
    sendStatement("Choose any title you'd like");
    c.nextChat = 502;
    break;

    case 502:
    sendOption4("Lord","Sir", "beast","1337");
    c.dialogueAction = 1000;
    break;
    case 503:
    sendStatement("You already have a title! Reset it to get a new one!");
    break;
    It don't jump around
    Reply With Quote  
     

  8. #8  
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    Quote Originally Posted by Demolition View Post
    As you see with mine



    It don't jump around
    That's because you're doing something different to me...
    Reply With Quote  
     

  9. #9  
    Registered Member
    hacker's Avatar
    Join Date
    Jun 2013
    Posts
    1,409
    Thanks given
    576
    Thanks received
    580
    Rep Power
    5000
    Wouldnt the code that checks if player has item 236 and whatever wouldnt that be a dialogue action? not sure lol :/ correct me if im wrong but wouldnt it be like this? In DialogueHandler
    Code:
    case 512:
    	sendNpcChat4("I like this very much!","It is a nice colour and It- Oh, Bentnoze..","What are you looking at me like that for?!","*Sigh* We can't have this one then...", c.talkingNpc, "General Bentnoze");
    	c.dialogueAction = 512;
    break;
    case 513:
    	sendNpcChat4("I like this very much!","It is a nice colour and It- Oh, Wartface..","What are you looking at me like that for?!","*Sigh* We can't have this one then...", c.talkingNpc, "General Wartface");
    	c.dialogueAction = 513;
    break;
    case 514:
    	sendNpcChat4("WOW!","This armour it's so... so... stylish!","Human I am so impressed with this!","General Bentnoze, what do you think?", c.talkingNpc, "General Wartface");
    	c.nextChat = 515;
    break;
    case 515:
    sendNpcChat4("I'm so in love with this colour!","Human you have earnt the magic sheet, the Exp","AND the runite bar!","", c.talkingNpc, "General Bentnoze");
    c.nextChat = 515;
    break;
    and in ActionHandler
    Code:
    				case 2187:
    					if (c.getItems().playerHasItem(286, 1)){
    					c.getItems().deleteItem2(286, 1);
    					c.getDH().sendDialogues(512, npcType);
    				} else {
    					c.getDH().sendDialogues(500, npcType);
    				}
    				break;
    and in ClickingButtons.java
    Code:
    				if (c.dialogueAction == 512) {
    					if (c.getItems().playerHasItem(287, 1)) {
    					c.getItems().deleteItem2(287, 1);
    					c.getDH().sendDialogues(513, npcType);
    				} else {
    				c.getDH().sendDialogues(507, npcType);
    				}
    
    				if (c.dialogueAction == 513) {
    					if (c.getItems().playerHasItem(9054, 1)) {
    					c.getItems().deleteItem2(9054, 1);
    					c.GoblinDiplomacy = 3;
    					c.getDH().sendDialogues(514, npcType);
    				} else {
    				c.getDH().sendDialogues(507, npcType);
    				}
    Idk... I cant code lol dont hate pl0x
    Attached image
    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. Whats wrong with this code?
    By The Situationist in forum Help
    Replies: 0
    Last Post: 08-22-2010, 04:16 AM
  2. Whats wrong with this code?
    By 2ndOfMay in forum Application Development
    Replies: 9
    Last Post: 08-15-2010, 08:01 AM
  3. Whats wrong with this code?
    By Ken in forum Application Development
    Replies: 7
    Last Post: 11-19-2009, 10:47 PM
  4. Whats wrong with this code?[devo2.7]
    By MclovinScape in forum Help
    Replies: 22
    Last Post: 11-07-2009, 11:08 PM
  5. Whats up with this?
    By begonein2min in forum Complaints
    Replies: 4
    Last Post: 06-17-2009, 07:17 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
  •