Thread: [PI] Items not deleting

Results 1 to 4 of 4
  1. #1 [PI] Items not deleting 
    Registered Member

    Join Date
    Feb 2009
    Age
    27
    Posts
    2,861
    Thanks given
    127
    Thanks received
    226
    Rep Power
    700
    I'm trying to make it so that if you talk to the Lumbridge guide, and questOneStage == 2, then it removes 3 items.

    Here's my code for the dialogue:
    Code:
    		case 5:
    			if(c.questOneStage == 0) {
    				sendNpcChat4("I'm the Lumbridge Guide!", 
    							"And HonorRealm,.. Well, you're in it!", 
    							"You look ready for a quest!", 
    							"Are you?", c.talkingNpc, "Lumbridge Guide");
    			} else if(c.questOneStage == 2) {
    				sendStatement("The Lumbridge Guide takes the items.");
    				c.dialogueAction = 7;
    			}
    			c.nextChat = 6;
    			break;
    And here's "dialougeAction 7":
    Code:
    					case 7:
    						c.getItems().deleteItem(436, c.getItems().getItemSlot(436), 1);
    						c.getItems().deleteItem(438, c.getItems().getItemSlot(438), 1);
    						c.getItems().deleteItem(1511, c.getItems().getItemSlot(1511), 1);
    						break;
    Now, it sends the stament in the dialogue box, but doesn't remove the items from the player. Also, clicking "click here to continue..." on the dialogue does nothing. Any ideas?
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Nov 2006
    Posts
    1,132
    Thanks given
    5
    Thanks received
    17
    Rep Power
    0
    Why do you need to send them to a different case anyway? You could quite easily execute that code in the else if statement because it is blocked code.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Division's Avatar
    Join Date
    Dec 2009
    Age
    29
    Posts
    2,208
    Thanks given
    41
    Thanks received
    78
    Rep Power
    97
    Code:
    			} else if(c.questOneStage == 2) {
    				sendStatement("The Lumbridge Guide takes the items.");
    				c.getItems().deleteItem(436, c.getItems().getItemSlot(436), 1);
    				c.getItems().deleteItem(438, c.getItems().getItemSlot(438), 1);
    				c.getItems().deleteItem(1511, c.getItems().getItemSlot(1511), 1)
    			}
    This is what webber ment probaly
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Nov 2006
    Posts
    1,132
    Thanks given
    5
    Thanks received
    17
    Rep Power
    0
    Quote Originally Posted by Division View Post
    Code:
    			} else if(c.questOneStage == 2) {
    				sendStatement("The Lumbridge Guide takes the items.");
    				c.getItems().deleteItem(436, c.getItems().getItemSlot(436), 1);
    				c.getItems().deleteItem(438, c.getItems().getItemSlot(438), 1);
    				c.getItems().deleteItem(1511, c.getItems().getItemSlot(1511), 1)
    			}
    This is what webber ment probaly
    Anybody with a slight grasp of Java could understand what I said, you don't need to spoon feed..
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •