Thread: Thieving stalls (items they give)

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 Thieving stalls (items they give) 
    Registered Member
    Join Date
    Nov 2012
    Posts
    299
    Thanks given
    14
    Thanks received
    5
    Rep Power
    29
    I need to change the items that the stalls give and how many of that item. Thanks.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Oct 2011
    Age
    28
    Posts
    1,880
    Thanks given
    311
    Thanks received
    557
    Rep Power
    703
    Post your thieving.java in [CODE] [/CODE] tags.
    Reply With Quote  
     

  3. #3  
    Registered Member austinb555's Avatar
    Join Date
    Jul 2011
    Posts
    826
    Thanks given
    0
    Thanks received
    42
    Rep Power
    41
    it seriously isnt that hard...
    just go look at the items it already gives and either copy and paste that under and replace the id's or just change the id's that are already there..simple.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Nov 2012
    Posts
    299
    Thanks given
    14
    Thanks received
    5
    Rep Power
    29
    Quote Originally Posted by austinb555 View Post
    it seriously isnt that hard...
    just go look at the items it already gives and either copy and paste that under and replace the id's or just change the id's that are already there..simple.
    Can't find the items it gives. Anyways here's the code:
    Code:
    package server.model.players.skills;
    
    import server.Config;
    import server.util.Misc;
    import server.model.players.Client;
    /**
     * Thieving.java
     *
     * @author Sanity
     *
     **/
     
    public class Thieving {
    	
    	private Client c;
    		
    	public Thieving(Client c) {
    		this.c = c;
    	}
    	
    	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 thieve 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 thieve the NPC.");
    						break;
    					}
    				} else {
    					c.sendMessage("You need a thieving level of " + npcThieving[j][1] + " to thieve 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 thieve from this stall.");
    		}
    	}
    	//npc, level, exp, coin amount
    	public int[][] npcThieving = {{1,1,8,200,1},{18,25,26,500,1},{9,40,47,1000,2},{26,55,85,1500,3},{20,70,152,2000,4},{21,80,273,3000,5}};
    
    }
    Reply With Quote  
     

  5. #5  
    Registered Member Grown's Avatar
    Join Date
    Oct 2012
    Posts
    838
    Thanks given
    650
    Thanks received
    86
    Rep Power
    54
    Code:
    SILK_STALL(34383, 20, new int[] { 950 }, 1, 8, 24, 34381)
    I suggest you post your thieving.java code, although you may not feel comfortable doing so, that I will respect.

    If you don't I will try to explain this basic code, which is a line of code for a Silk Stall out of thieving.java.
    34383 = Object id. 20 = the amount of seconds it takes till the stall "renews." 950 = item id, in this case silk. This is the number you would like to change, because for yourself you wanted to change what certain stalls give. Simply change the id to what you would prefer. Say I wanted my Silk Stall to give out Bronze platebody's I would simply change the 950 to 1117(Bronze Platebody id) Now my code will be

    Code:
    SILK_STALL(34383, 20, new int[] { 1117 }, 1, 8, 24, 34381)
    Hopefully this helped you out, if not please feel free to respond...
    "Programs aren’t just built in one go, like a bridge. They are talked about,
    sketched out, prototyped, played with, refactored, tuned, tested, tweaked,
    deleted, rewritten....
    A program is not built; it is grown.
    Because a program is always growing and always changing, it must be written
    with change in mind."
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Oct 2011
    Age
    28
    Posts
    1,880
    Thanks given
    311
    Thanks received
    557
    Rep Power
    703
    In ActionHandler you will find something like

    stealFromStall(1234, 50000, 50)

    The first number in those parameters is the item id that is being added to the player's inventory. So just search up the item id it currently gives in ActionHandler and change it.
    Reply With Quote  
     

  7. #7  
    Registered Member Grown's Avatar
    Join Date
    Oct 2012
    Posts
    838
    Thanks given
    650
    Thanks received
    86
    Rep Power
    54
    Quote Originally Posted by Drewski View Post
    Can't find the items it gives. Anyways here's the code:
    Code:
    package server.model.players.skills;
    
    import server.Config;
    import server.util.Misc;
    import server.model.players.Client;
    /**
     * Thieving.java
     *
     * @author Sanity
     *
     **/
     
    public class Thieving {
    	
    	private Client c;
    		
    	public Thieving(Client c) {
    		this.c = c;
    	}
    	
    	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 thieve 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 thieve the NPC.");
    						break;
    					}
    				} else {
    					c.sendMessage("You need a thieving level of " + npcThieving[j][1] + " to thieve 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 thieve from this stall.");
    		}
    	}
    	//npc, level, exp, coin amount
    	public int[][] npcThieving = {{1,1,8,200,1},{18,25,26,500,1},{9,40,47,1000,2},{26,55,85,1500,3},{20,70,152,2000,4},{21,80,273,3000,5}};
    
    }
    It's very basic, if you read it


    Code:
    						c.getItems().addItem(995, npcThieving[j][3]);
    It says that it will add item 995(Coins) I know you must be new to this, no offense.

    Here is a tip that could possibly help you. This is theoretical, for instance test in game the thieving stall say you get 15 coins from the stall. You know that at that moment you do receive 15 coins from successfully thieving from that stall. Now there are many ways to approach this, for you I suggest an easy way. Look up the item id of coins(995) Now while in thieving.java press ctrl + f on your keyboard and search 995 skim through the codes until you find a familiar code to the in game experience. Now this is a slower process than being able to read the code for the most part. So, it may not be the fastest process; although it might work better off for yourself.
    "Programs aren’t just built in one go, like a bridge. They are talked about,
    sketched out, prototyped, played with, refactored, tuned, tested, tweaked,
    deleted, rewritten....
    A program is not built; it is grown.
    Because a program is always growing and always changing, it must be written
    with change in mind."
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Oct 2011
    Age
    28
    Posts
    1,880
    Thanks given
    311
    Thanks received
    557
    Rep Power
    703
    Quote Originally Posted by Afghan Dream View Post
    It's very basic, if you read it


    Code:
    						c.getItems().addItem(995, npcThieving[j][3]);
    It says that it will add item 995(Coins) I know you must be new to this, no offense.

    Here is a tip that could possibly help you. This is theoretical, for instance test in game the thieving stall say you get 15 coins from the stall. You know that at that moment you do receive 15 coins from successfully thieving from that stall. Now there are many ways to approach this, for you I suggest an easy way. Look up the item id of coins(995) Now while in thieving.java press ctrl + f on your keyboard and search 995 skim through the codes until you find a familiar code to the in game experience. Now this is a slower process than being able to read the code for the most part. So, it may not be the fastest process; although it might work better off for yourself.
    That's for the npc method, he's referring to the stall method.
    Reply With Quote  
     

  9. #9  
    Registered Member Grown's Avatar
    Join Date
    Oct 2012
    Posts
    838
    Thanks given
    650
    Thanks received
    86
    Rep Power
    54
    Quote Originally Posted by Revival View Post
    That's for the npc method, he's referring to the stall method.
    Same concept, what you've said should work very easily for him as well; going into actionhandler
    "Programs aren’t just built in one go, like a bridge. They are talked about,
    sketched out, prototyped, played with, refactored, tuned, tested, tweaked,
    deleted, rewritten....
    A program is not built; it is grown.
    Because a program is always growing and always changing, it must be written
    with change in mind."
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Nov 2012
    Posts
    299
    Thanks given
    14
    Thanks received
    5
    Rep Power
    29
    The stall method is not in Theiving.java im will look at Actionhandler when i get home. Thanks
    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. [PI] Better Thieving Stalls
    By Dexter Morgan in forum Snippets
    Replies: 28
    Last Post: 01-21-2014, 02:50 AM
  2. Thieving stalls give items
    By Hellenic in forum Help
    Replies: 5
    Last Post: 02-25-2012, 05:02 PM
  3. Replies: 28
    Last Post: 01-31-2010, 05:07 AM
  4. Thieving on stalls
    By Sir Lethal in forum Requests
    Replies: 3
    Last Post: 10-22-2009, 05:49 AM
  5. [delta] stalls give items??
    By big king in forum Requests
    Replies: 5
    Last Post: 06-06-2009, 06:42 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
  •