Thread: How do I edit what you get from thieving in project insanity

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 How do I edit what you get from thieving in project insanity 
    Registered Member
    Join Date
    Apr 2010
    Posts
    41
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Title says it all. I am new to PI. So go easy on me. I went into actionhandler and changed the cake to money. and the next number to like 5k. but it only gave me 1 coin... how do i do it
    Reply With Quote  
     

  2. #2  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Code:
    			case 2561:
    				c.getThieving().stealFromStall(1897, 10, 1);
    			break;
    orange - item id
    red - thieving level
    Reply With Quote  
     

  3. #3  
    Registered Member
    Brady's Avatar
    Join Date
    Apr 2009
    Posts
    1,714
    Thanks given
    354
    Thanks received
    368
    Rep Power
    1633
    Post your steal from stall method, and the shit in action handler.
    Reply With Quote  
     

  4. #4  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Code:
    	public void stealFromNPC(int id) {
    		if (System.currentTimeMillis() - c.lastThieve < 2000)
    			return;
    		for (int j = 0; j < npcThieving.length; j++) {
    			if (npcThieving[j][0] == id) {
    				if (c.playerLevel[c.playerThieving] >= npcThieving[j][1]) {
    					if (Misc.random(c.playerLevel[c.playerThieving] + 2 - npcThieving[j][1]) != 1) {
    						c.getPA().addSkillXP(npcThieving[j][2] * Config.THIEVING_EXPERIENCE, c.playerThieving);
    						c.getItems().addItem(995, npcThieving[j][3]);
    						c.startAnimation(881);
    						c.lastThieve = System.currentTimeMillis();
    						c.sendMessage("You steal some money...");
    						break;
    					} else {
    						c.setHitDiff(npcThieving[j][4]);
    						c.setHitUpdateRequired(true);
    						c.playerLevel[3] -= npcThieving[j][4];
    						c.getPA().refreshSkill(3);
    						c.lastThieve = System.currentTimeMillis() + 2000;
    						c.sendMessage("You fail to steal the NPC.");
    						break;
    					}
    				} else {
    					c.sendMessage("You need a thieving level of " + npcThieving[j][1] + " to steal from this NPC.");
    				}
    			}		
    		}
    	}
    	
    	public void stealFromStall(int id, int xp, int level) {
    		if (System.currentTimeMillis() - c.lastThieve < 2500)
    			return;
    		if (Misc.random(100) == 0) {
    			return;
    		}
    		if (c.playerLevel[c.playerThieving] >= level) {
    			if (c.getItems().addItem(id,1)) {
    				c.startAnimation(832);
    				c.getPA().addSkillXP(xp * Config.THIEVING_EXPERIENCE, c.playerThieving);
    				c.lastThieve = System.currentTimeMillis();
    				c.sendMessage("You steal a " + server.model.items.Item.getItemName(id) + ".");
    			}		
    		} else {
    			c.sendMessage("You must have a thieving level of " + level + " to steal from this stall.");
    		}
    	}
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Apr 2010
    Posts
    41
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    I know the id and level. but how do i make it were you get like 5k coins or something..
    Reply With Quote  
     

  6. #6  
    Registered Member
    Brady's Avatar
    Join Date
    Apr 2009
    Posts
    1,714
    Thanks given
    354
    Thanks received
    368
    Rep Power
    1633
    Code:
    public void stealFromStall(int xp, int level, int item, int itemAmount) {
    			if (System.currentTimeMillis() - c.lastThieve < 2500)
    				return;
    			if (Misc.random(100) == 0) {
    				return;
    			}
    			if (c.playerLevel[c.playerThieving] >= level) {
    			{	c.startAnimation(832);
    				c.getItems().addItem(item, itemAmount);
    				c.getPA().addSkillXP(xp * Config.THIEVING_EXPERIENCE, c.playerThieving);
    				c.lastThieve = System.currentTimeMillis();
    				c.sendMessage("You steal an item from the stall....");
    			}		
    		} else {
    				c.sendMessage("You must have a thieving level of at least " + level + " to thieve from this stall.");
    		}
    	}
    Code:
    case 2561:
    				c.getThieving().stealFromStall(10, 1, 995, 1);
    			break;
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Apr 2010
    Posts
    41
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    nope. doesnt work
    Reply With Quote  
     

  8. #8  
    Registered Member
    Brady's Avatar
    Join Date
    Apr 2009
    Posts
    1,714
    Thanks given
    354
    Thanks received
    368
    Rep Power
    1633
    Quote Originally Posted by Skorgescape View Post
    nope. doesnt work
    Are you an IDIOT! Replace that method with the method I gave you, then change the coin amount on the other thing I gave you! The 1 after 995.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Apr 2010
    Posts
    41
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    I get a error:

    src/server/model/players/thieving/.java66: reached end of file while something.

    }

    1 error
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Apr 2010
    Posts
    41
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    This is my actionhandler for steal a stall:

    case 6163:
    c.getThieving().stealFromStall(1897, 10, 1);
    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
  •