SRL Archive - OSR Help

Npc Pick Pocketing


[XoL]

2011-11-25 20:03:40


function FindMan(): Boolean;
var
x, y : Integer;
begin
Wait(RandomRange(500, 1200));
FindObjCustom(x, y, ['hop'], [8162191, 8754585, 6977403, 5000265], 5);
Mouse(x, y, 5, 5, false);
ChooseOption('cket');
until False;
end;

In all honesty I have no idea if this works (I kept erroring out)
My problem seems to stem from FindObjCustom I am actually trying to find a man but I don't see FindNpcCustom so I used the next best option.

I am not sure if the 'hop' was correct either as there is only one man in the room (It is just multiple colors of the same man).

I know I did this wrong but feel free to guide me in the right direction trying to create a pickpocketing script for low level thieving training (Fill in that void for the public scripts)

Flight

2011-11-25 20:42:33

Ok, let's see…

These numbers:
[8162191, 8754585, 6977403, 5000265]
are an array of colors to search for. I suggest using your color picking in Simba and getting a few colors from a Man and replacing those above numbers with your new ones. Also, "['hop']" is the array of UpText to search for while the function looks for that array of colors. It will keep looking through all of the colors your provided until it finds that UpText which is, in this case, "hop". I suggest changing that to… "[Man]".

[XoL]

2011-11-25 20:45:50

[8162191, 8754585, 6977403, 5000265]
Are from a man :)

And thats uptext, I see I was wondering what it was saw "hop" on two different scripts so it confused me :P

Thanks :)
Will continue to post here for the creation of this script

I seem to still have issues here :(

RISK

2011-11-25 21:11:19

For your uptext array, try: ['ttac', 'an'].
Never use capital letters in your uptext as it slows it down, which is just bad practice. At least, as far as I know.

What other issues would you be having?

E:
Tip #2: Get the shirt color of the NPC you are searching for and only the shirt color. Find the bright colors of the shirt and not the dark colors. Use those colors for your array and change the tolerance to 10 ~ 15.
Tip #3: You have a random "Until" in there when you need a "Repeat" to start it. Like this:
repeat 
//
until((Stuff) or (not(Stuff2)));
Also you shouldn't do "False". That's also bad practice and will lead to infinite loops.

[XoL]

2011-11-26 14:30:50

Thanks for the help I appreciate it :)

How do I activate sps walking ONLY when I die?
I mean I suppose I could do a failsafe if said color was not there for 6000 then proceed to failsafe sps walking? (Also how do I make sps go up stairs o.o)

RISK

2011-11-26 14:35:47


if (FindDead) then // Detects if we have died or not
begin
//
end;

Your other questions can be answered with merely just creating your own methods. You can click the stairs and go up them that way. I don't think SPS handles objects, it just handles walking paths. So the rest of the script like going up stairs and such, is up to you.

You are very welcome, by the way. Please don't hesitate to ask further questions.

[XoL]

2011-11-26 14:37:54

Awesome :D
Thanks again!