PDA

View Full Version : [317] How to make Pickpocket work [317]



Xdragon
June 20th, 2010, 20:33
Search in client.java :


if(NPCID == 555){
PutNPCCoords = true;
WanneShop = 8;
}
Add under the last }


if(NPCID 21 ){
robPerson("hero", 995, 760, 120, 60);
}
under this :

public class client extends Player implements Runnable {

Add this :

public void robPerson(String NPCNAME, int item, int amount, int exp, int req) {
if(playerLevel[17] < req){
sM("You need at least "+req+" thieving to thieve this "+NPCNAME+".");
return;
}
if(System.currentTimeMillis() - lastAction < actionInterval) return;
if(misc.random(3)==1){
sM("You fail to pickpocket the "+NPCNAME+"..");
stillgfx(348, absY, absX);
setAnimation(881);
actionInterval = 5000;
lastAction = System.currentTimeMillis();
return;
}
actionInterval = 5000;
lastAction = System.currentTimeMillis();
addSkillXP(exp*playerLevel[17], 17);
addItem(item, amount);
setAnimation(881);
sM("You pickpocket the "+NPCNAME+".");
}




Change the green part to the npc whith pickpocket options
Change the blue one to the name of the npc
Change [If u want] the Red part to the items id that u can get from the npc

Save&Compile
Credits to me
Have Fun!

EDIT : Added public void thing

Rog3r
June 20th, 2010, 20:53
You didn't explain the other parameter fields in the robPerson method...

Xdragon
June 20th, 2010, 20:54
I thought that was only thing u needed ? lol Sorry my bad

XxBryantD
June 20th, 2010, 23:07
something missing?