Thread: Thieving Bug (Rep++)

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Thieving Bug (Rep++) 
    Registered Member
    Join Date
    Feb 2009
    Posts
    110
    Thanks given
    2
    Thanks received
    1
    Rep Power
    6
    OK.. First Here is my Theiving Code

    Code:
    			case 9:
     		if(c.playerLevel[17] >= 40) {
      				c.startAnimation(881);
      				c.sendMessage("You Pick Pocket the Guard");
       				c.getItems().addItem(995, 300);
       				c.getPA().addSkillXP(150, 17);
    				c.getPA().refreshSkill(17);
      		}
      		else if(c.playerLevel[17] < 40) {
      			c.sendMessage("You need a thieving level of 40 to thieve This Man.");
    			break;
    			}
    			case 1:
    		if(c.playerLevel[17] >= 1) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Man!");
    				c.getItems().addItem(995, 30);
    				c.getPA().addSkillXP(80, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 1) {
    			c.sendMessage("You Need a Thieving Level of 1 the Thieve this Man.");
    			break;
    			}
    			case 2:
    		if(c.playerLevel[17] >= 1) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Man!");
    				c.getItems().addItem(995, 30);
    				c.getPA().addSkillXP(80, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 1) {
    			c.sendMessage("You Need a Thieving Level of 1 the Thieve this Man.");
    			break;
    			}
    			case 3:
    		if(c.playerLevel[17] >= 1) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Man!");
    				c.getItems().addItem(995, 30);
    				c.getPA().addSkillXP(80, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 1) {
    			c.sendMessage("You Need a Thieving Level of 1 the Thieve this Man.");
    			break;
    			}
    			case 4:
    		if(c.playerLevel[17] >= 1) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Woman!");
    				c.getItems().addItem(995, 30);
    				c.getPA().addSkillXP(80, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 1) {
    			c.sendMessage("You Need a Thieving Level of 1 the Thieve this Woman.");
    			break;
    			}
    			case 5:
    		if(c.playerLevel[17] >= 1) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Woman!");
    				c.getItems().addItem(995, 30);
    				c.getPA().addSkillXP(80, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 1) {
    			c.sendMessage("You Need a Thieving Level of 1 the Thieve this Woman.");
    			break;
    			}
    			case 6:
    		if(c.playerLevel[17] >= 1) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Woman!");
    				c.getItems().addItem(995, 30);
    				c.getPA().addSkillXP(80, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 1) {
    			c.sendMessage("You Need a Thieving Level of 1 the Thieve this Woman.");
    			break;
    			}
    			case 7:
    		if(c.playerLevel[17] >= 10) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Farmer!!");
    				c.getItems().addItem(995, 90);
    				c.getPA().addSkillXP(145, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 10) {
    			c.sendMessage("You Need a Thieving Level of 10 the Thieve this Farmer!.");
    			break;
    			}
    			case 18:
    		if(c.playerLevel[17] >= 25) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Warrior!!");
    				c.getItems().addItem(995, 180);
    				c.getPA().addSkillXP(260, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 25) {
    			c.sendMessage("You Need a Thieving Level of 25 the Thieve this Warrior.");
    			break;
    			}
    If I Like Theiving the Npc ID 9 (Guard) It Gives the XP + Cash + Send Message's To all of them.. So like If I Click Pick Pocket Guard.. It Does All of them.. and If i Pickpocket Npc ID 1 (Man) It Does Every Code After It.

    Can Any One help?

    I will Rep++ if you can.

    Thanks.
    - Removed
    Reply With Quote  
     

  2. #2  
    Registered Member Sheddy's Avatar
    Join Date
    Jul 2009
    Age
    31
    Posts
    1,053
    Thanks given
    56
    Thanks received
    89
    Rep Power
    69
    You need breaks. Put one at the end of each case.

    Example:
    Code:
    case 1:
    		if(c.playerLevel[17] >= 1) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Man!");
    				c.getItems().addItem(995, 30);
    				c.getPA().addSkillXP(80, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 1) {
    			c.sendMessage("You Need a Thieving Level of 1 the Thieve this Man.");
    			break;
    			}
    break;
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Jan 2008
    Age
    31
    Posts
    1,380
    Thanks given
    76
    Thanks received
    384
    Rep Power
    962
    Quote Originally Posted by Downsx View Post
    You need breaks. Put one at the end of each case.

    Example:
    Code:
    case 1:
    		if(c.playerLevel[17] >= 1) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Man!");
    				c.getItems().addItem(995, 30);
    				c.getPA().addSkillXP(80, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 1) {
    			c.sendMessage("You Need a Thieving Level of 1 the Thieve this Man.");
    			break;
    			}
    break;
    No, the problem is he is simply placing the break in the incorrect spot. He should put the break after the bracket.

    Code:
    case 1:
    		if(c.playerLevel[17] >= 1) {
    				c.startAnimation(881);
    				c.sendMessage("You Pick Pocket the Man!");
    				c.getItems().addItem(995, 30);
    				c.getPA().addSkillXP(80, 17);
    				c.getPA().refreshSkill(17);
    		}
    		else if(c.playerLevel[17] < 1) {
    			c.sendMessage("You Need a Thieving Level of 1 the Thieve this Man.");
    			
    			}
    break;
    Reply With Quote  
     

  4. #4  
    Registered Member Sheddy's Avatar
    Join Date
    Jul 2009
    Age
    31
    Posts
    1,053
    Thanks given
    56
    Thanks received
    89
    Rep Power
    69
    Lmfao thats exactly what I just said...also the break after c.sendMessage is optional he can have it if he wants.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Jan 2008
    Age
    31
    Posts
    1,380
    Thanks given
    76
    Thanks received
    384
    Rep Power
    962
    Quote Originally Posted by Downsx View Post
    Lmfao thats exactly what I just said...also the break after c.sendMessage is optional he can have it if he wants.
    If you have two breaks in once case, that is absolutely redundant, and no that is not what you said.
    Reply With Quote  
     

  6. #6  
    Registered Member Sheddy's Avatar
    Join Date
    Jul 2009
    Age
    31
    Posts
    1,053
    Thanks given
    56
    Thanks received
    89
    Rep Power
    69
    You need breaks. Put one at the end of each case.
    No, the problem is he is simply placing the break in the incorrect spot. He should put the break after the bracket.
    Umm pretty sure that's the same...
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Jan 2008
    Age
    31
    Posts
    1,380
    Thanks given
    76
    Thanks received
    384
    Rep Power
    962
    Quote Originally Posted by Downsx View Post
    Umm pretty sure that's the same...
    Those statements are two different statements. I said he is placing them in the incorrect spot, and needs one after the bracket of his last bit of code(directing that towards the code in OP's post, not in all general switch statements). You said he needs one at the end of each case, which in my opinion is an horrible way to put it.

    Now will you please, step aside.
    Reply With Quote  
     

  8. #8  
    Registered Member Sheddy's Avatar
    Join Date
    Jul 2009
    Age
    31
    Posts
    1,053
    Thanks given
    56
    Thanks received
    89
    Rep Power
    69
    Lmfao kid you gtfo I'm not going anywhere...Putting it at the end of each case I felt would be easy for him to understand cause each NPC was a different case...
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Feb 2009
    Posts
    110
    Thanks given
    2
    Thanks received
    1
    Rep Power
    6
    Thanks (: Repp++
    - Removed
    Reply With Quote  
     

  10. #10  
    Member Thieving Bug (Rep++) Market Banned
    Awak333's Avatar
    Join Date
    Dec 2009
    Age
    30
    Posts
    825
    Thanks given
    241
    Thanks received
    45
    Rep Power
    22
    Quote Originally Posted by VielZykloN View Post
    Those statements are two different statements. I said he is placing them in the incorrect spot, and needs one after the bracket of his last bit of code(directing that towards the code in OP's post, not in all general switch statements). You said he needs one at the end of each case, which in my opinion is an horrible way to put it.

    Now will you please, step aside.
    The help section was created for the community to help the person in need. So I don't think anyone will be stepping aside, hence "community".

    And it actually is the same thing, he gave an example of the break being in the correct position without there being a second one in the incorrect position. You're just making everything more complicated.
    Mystery Youtube Video: Give it some thought
    Then learn how real it is: You don't have to believe it, it is real
    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

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