Thread: Thieving method help..

Results 1 to 2 of 2
  1. #1 Thieving method help.. 
    Registered Member
    Join Date
    Jun 2015
    Posts
    7
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Code:
    public void stealFromStall(int id, int xp, int level, final int i, final int x, final int y) {
    		if (System.currentTimeMillis() - c.lastThieve < 2500)
    			return;
    		if (c.playerLevel[c.playerThieving] >= level) {
    			if (c.getItems().addItem(id, id2))  {
    				c.startAnimation(832);
    				c.getPA().addSkillXP(xp * Config.THIEVING_EXPERIENCE, c.playerThieving);
    				c.lastThieve = System.currentTimeMillis();
    				c.sendMessage("You steal a " + server.rs2.items.Item.getItemName(id) + ".");
    				c.getPA().checkObjectSpawn(634, x, y, 0, 10);
    				EventManager.getSingleton().addEvent(new Event() {
    					public void execute(EventContainer p) {
    						c.getPA().checkObjectSpawn(i, x, y, 0, 10);
    						p.stop();
    					}
    				}, 7000);
    			}
    		} else {
    			c.sendMessage("You must have a thieving level of " + level + " to thieve from this stall.");
    		}

    theiving method in skilling class




    Code:
    
    	public static final int[] GemStall = {1623,1621, 1617, 1619};
    Int string in action handler

    Code:
    case 2562:
    				c.getThieving().stealFromStall(GemStall[Misc.random(getGemLength() - 1), c.getItems().addItem(995, 1000)], GemCoin, 30, 25, objectType, obX, obY);
    			break;
    first click object statement



    I was thinking by adding like Id2 in my thieving class method to look like

    Code:
    public void stealFromStall(int id, int id2, int xp, int level, final int i, final int x, final int y) {
    Could I make something like public int GemCoins[][] = {995, 1000}

    to make the stall give me an object and 1000 coins? Please would appreciate if anyone could help me solve this simple method, i'm new to java. Thanks.







    [

    - - - Updated - - -

    bump.
    Reply With Quote  
     

  2. #2  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    I'm quite confused over what your trying to get help with.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    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. dropItem method help?
    By Discardedx2 in forum Help
    Replies: 2
    Last Post: 09-21-2009, 10:28 PM
  2. Interface Method Help
    By Stewie in forum Help
    Replies: 2
    Last Post: 06-01-2009, 09:01 AM
  3. Switch Weapon Method - help?
    By zezarak in forum Help
    Replies: 0
    Last Post: 04-25-2009, 08:55 PM
  4. Stream Method help
    By popbob in forum Help
    Replies: 0
    Last Post: 04-13-2009, 12:54 AM
  5. Method Help.
    By The Killer18 in forum Help
    Replies: 1
    Last Post: 03-27-2009, 09:16 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
  •