Thread: [508] Best Pick-Pocking base i've seen..

Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1 [508] Best Pick-Pocking base i've seen.. 
    Registered Member
    Join Date
    Feb 2008
    Age
    29
    Posts
    188
    Thanks given
    0
    Thanks received
    1
    Rep Power
    27
    Hello..
    Purpose: Adding a base Thieving System on NPC and Objects! *UPDATED* Nothing in process! it repeats itself every 6-7 seconds
    Difficulty: 1/10
    Base: Pali
    Creds: Well Graham for the Event Manager? And the rest for me..
    Files Needed: Event Manager!

    Well first up make a folder called "Skills"

    if you already have it, then you don't need to make another one -_-

    then open your folder and make a new file called Pick.java

    open the file and past this in:

    Code:
    package palidino76.rs2.Skills;
    
    import palidino76.rs2.EventManager.*;
    import palidino76.rs2.players.Player;
    import palidino76.rs2.Engine;
    import palidino76.rs2.npcs.NPC;
    import palidino76.rs2.util.Misc;
    
    /**
     * Base Thieving System
     * 
     * @author The I loot I Aka Lootface
     *
     */
     
    public class Pick {
    
        Player p;
        public int delay = 3330;
        public int delay2 = 3090;
        public int fail = 0;
        public int enough = 0;
        
        /**
         * Constructor
         * @param player
         */
        public Pick(Player player) {
            this.p = player;
        }
        
    
        public void thiefNpc(final NPC n) {
            p.frames.sendMessage(p, "You attempt to pickpock..");
            p.requestAnim(881, 0);
            EventManager.getSingleton().addEvent(new Event() {
                public void execute(EventContainer c) {
                       p.requestAnim(881, 0);
                       attemptNpc(n);
                    if (fail == 1) {
                       c.stop();
                       fail = 0;
                       enough = 0;
                    }
                }
            }, delay);
        }
        
        public void thiefStall(final int id) {
            p.frames.sendMessage(p, "You attempt to steal from the stall..");
            p.requestAnim(881, 0);
            EventManager.getSingleton().addEvent(new Event() {
                public void execute(EventContainer c) {
                       p.requestAnim(881, 0);
                       attemptObject(id);
                    if (fail == 1) {
                       c.stop();
                       fail = 0;
                       enough = 0;
                    }
                }
            }, delay2);
        }
        
        
        /**
         * the void that will gives you the exp, cash, ...
         * 
         * 
         */
        public void attemptNpc(NPC n) {
          if (fail != 1) {
            if (p.skillLvl[17] < lvl(n.npcId)){
                 fail = 1;
                 p.frames.sendMessage(p, "You need to be level " +lvl(n.npcId)+ " Thieving for this.");
            } else if (Misc.random(p.skillLvl[17]) > Misc.random(lvl(n.npcId)) && enough <= 50) {
                 p.addSkillXP(xp(n.npcId), 17);
                 p.frames.sendMessage(p, "You managed to pickpock him!");
                 Engine.playerItems.addItem(p, 995, cash(n.npcId));
                 enough = enough + 1;
            } else {
                fail = 1;
                p.requestAnim(404, 0);
                p.requestGFX(348, 100);
                p.appendHit(Misc.random(5), 1);
                p.frames.sendMessage(p, "You've failed to pick-pock..");
            }
          }
        }
        
        public void attemptObject(int object) {
          if (fail != 1) {
            if (p.skillLvl[17] < lvlObj(object)){
                 fail = 1;
                 p.frames.sendMessage(p, "You need to be level " +lvlObj(object)+ " Thieving for this.");
            } else if (Misc.random(p.skillLvl[17]) > Misc.random(lvlObj(object)) && enough <= 50) {
                 p.addSkillXP(xpObj(object), 17);
                 p.frames.sendMessage(p, "You managed to pickpock from the stall!");
                 Engine.playerItems.addItem(p, 995, cashObj(object));
                 enough = enough + 1;
            } else {
                fail = 1;
                p.requestAnim(404, 0);
                p.requestGFX(348, 100);
                p.appendHit(Misc.random(5), 1);
                p.frames.sendMessage(p, "You've failed to pick-pock..");
            }
          }
        }
        
        
         /**
         * lvl needed for pickpocking npc
         * 
         * 
         */
        public int lvl(int npc) {
            int lvl = 0;
            switch(npc) {
            case 18:
              lvl = 1;
            break;
            
            case 19:
              lvl = 10;
            break;
            
            case 20:
              lvl = 30;
            break;
            }
            return lvl;
        }
        
        /**
         * xp you will get
         * 
         * 
         */
        public int xp(int npc) {
            int xp = 0;
            switch(npc) {
            case 18:
              xp = 111;
            break;
            
            case 19:
              xp = 331;
            break;
            
            case 20:
              xp = 611;
            break;
            }
            return xp;
        }
    
        /**
         * the cash that you'll get
         * 
         * 
         */
        public int cash(int npc) {
            int cash = 0;
            switch(npc) {
            case 18:
              cash = 1200;
            break;
            
            case 19:
              cash = 2110;
            break;
            
            case 20:
              cash = 3000;
            break;
            }
            return cash;
        }
        
        /**
         * lvl needed for pickpocking Stall
         * 
         * 
         */
        public int lvlObj(int obj) {
            int lvl = 0;
            switch(obj) {
            case 26969:
              lvl = 1;
            break;
            }
            return lvl;
        }
        
        /**
         * xp you will get from Object
         * 
         * 
         */
        public int xpObj(int obj) {
            int xp = 0;
            switch(obj) {
            case 26969:
              xp = 111;
            break;
            }
            return xp;
        }
    
        /**
         * the cash that you'll get from Object
         * 
         * 
         */
        public int cashObj(int obj) {
            int cash = 0;
            switch(obj) {
            case 26969:
              cash = 1200;
            break;
            }
            return cash;
        }
    }
    save and close that file

    now open up Player.java

    Paste this in it:

    Code:
    public Pick pick = new Pick(this);//Thieving system by i loot i
    also add the import

    Code:
    import palidino76.rs2.Skills.*;
    (if you only have one file or you only use 1 file in your Player.java then make it this

    Code:
    import palidino76.rs2.Skills.Pick;
    now save and close your Player.java

    new open up your NPCOption1.java andNPCOption2.java

    Code:
                case 19:
                case 20:
                case 18:
                   p.pick.thiefNpc(Engine.npcs[p.clickId]);
                break;
    paste this in it

    open up your ObjectOption1.java

    and paste this in it:

    Code:
            case 26969:
            p.pick.thiefStall(p.clickId);
            break;
    this is an example... this will thief the deposit bank in edgeville..

    now just save and compile

    there you have it your thieving base.. (well actaully pickpocking cba to code the objects to atm...)

    remember these npc's are only testers! this is not complete right oke?

    spawn these npcs:

    Code:
    spawn	=	5	3084	3505	0	0	0	0	0	Gujuo
    spawn	=	5	2612	3089	0	0	0	0	0	santa
    spawn	=	2	3084	3496	0	0	0	0	0	aurbery
    spawn	=	7	3087	3494	0	0	0	0	0	bandet
    they are located in edgeville!

    thanks

    don't flame, it's the best base there is on this forum...



    -I loot I-
    I loot I:
    Hybrid 508: [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    :doge:

    Join Date
    Jan 2009
    Posts
    3,759
    Thanks given
    221
    Thanks received
    816
    Rep Power
    2113
    Your code could be neater but good job, also to put step 2 and step 3 together, replace
    Code:
    Public Pick pick;
    with
    Code:
    Public Pick pick = new Pick();
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Feb 2008
    Age
    29
    Posts
    188
    Thanks given
    0
    Thanks received
    1
    Rep Power
    27
    Quote Originally Posted by `Discardedx2 View Post
    Your code could be neater but good job, also to put step 2 and step 3 together, replace
    Code:
    Public Pick pick;
    with
    Code:
    Public Pick pick = new Pick();
    oke thanks i'll change
    I loot I:
    Hybrid 508: [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    #Flippergang

    Alberto's Avatar
    Join Date
    May 2008
    Posts
    756
    Thanks given
    46
    Thanks received
    40
    Rep Power
    121
    Uhmm.... you can pickpocket items too you know.
    Hopes and Dreams
    Need something programmed and willing to pay?
    Pm me.
    Reply With Quote  
     

  5. #5  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,784
    Discord
    View profile
    Rep Power
    5000
    if (pickag > 0) {
    pickag--;
    }
    Learn how events work please, events mean you don't have to use 'int timers'.

    Reply With Quote  
     

  6. #6  
    Registered Member
    X Mercy X's Avatar
    Join Date
    May 2009
    Age
    28
    Posts
    1,336
    Thanks given
    3
    Thanks received
    41
    Rep Power
    301
    Quote Originally Posted by Luke132 View Post
    Learn how events work please, events mean you don't have to use 'int timers'.
    this and also name your variables appropriately example

    public void thiefNpc() {
    }
    lower first word cap second etc
    just minor things like this improve readability and usability

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Feb 2008
    Age
    29
    Posts
    188
    Thanks given
    0
    Thanks received
    1
    Rep Power
    27
    oke, well i've changed the things you've guys asked
    I loot I:
    Hybrid 508: [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  8. #8  
    Hi.

    'Mystic Flow's Avatar
    Join Date
    Nov 2007
    Posts
    7,141
    Thanks given
    256
    Thanks received
    1,247
    Rep Power
    3636
    Nice job, nice to see you back in the rsps biz

    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Feb 2008
    Age
    29
    Posts
    188
    Thanks given
    0
    Thanks received
    1
    Rep Power
    27
    Quote Originally Posted by 'Mystic Flow View Post
    Nice job, nice to see you back in the rsps biz
    yeh, it's been a while, but not alot has changed in the sector of 508 only custom models i see and some updating methods have changed
    I loot I:
    Hybrid 508: [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #10  
    Donator

    iZAjz's Avatar
    Join Date
    Mar 2007
    Age
    26
    Posts
    3,675
    Thanks given
    105
    Thanks received
    47
    Rep Power
    1882
    No offence, but this is certainly not the best pick pocking base i've seen.

    Use 'if pickpock failed' facing.
    and what luke said above.

    And more stuff.
    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
  •