kristi
2014-01-20 17:44:28
Hi!
I made this script last night, took me a few hours of looking around at other scripts here at the forum and kind of just redoing them a bit.
This is my code thus far:
So what it does is that it searches for the top color of the stand(beige), right click it, and press the "steal from" option. That's pretty much it. When the stand is empty, it right-clicks like crazy in search for the "steal from"-option, untill it finally finds it again.
So here's some of the problems that needs resolving
- Instead of right-clicking like crazy, it just waits a while when the "steal-from"-option has been chosen. I tried to do this at line 24-26, but it doesn't work and I have no idea why.
- Make it search for something more specific than just the top color of the stand.
- Make it run away if combat is detected(I was thinking about making it check if the health bar is visible, and if it is it would just run far away and come back after a while, though it currently seem too advanced for me)
- Drop all/bank option(I'll add a dropping option later, though I'll have to learn how to walk before)
- Make it left click instead of right click. The best thing would be to just let the cursor rest over the stand, and click only when the silk has respawned.
I'm still a newbie, I've only spent a few hours learning all this. I don't need anyone to resolve all the problems the script has, I just want someone to point me in the right direction, if it's possible :). Also, I'm sorry if I used something from your script without mentioning you, I just copied and pasted at random and changed it to work here.
I made this script last night, took me a few hours of looking around at other scripts here at the forum and kind of just redoing them a bit.
This is my code thus far:
program SilkStealer;
{$DEFINE SMART8}
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure StealSilk;
var x : Integer;
y : Integer;
Tries : Integer;
begin
if not LoggedIn then
Exit;
if (not (FindObjCustom(x, y, ['eal', 'ilk'], [8229534], 35))) then
begin
Wait(8500+Random(800));
end else
if FindObjCustom(x, y, ['eal', 'ilk'], [8229534], 35) then
repeat
begin Mouse(x, y, 4, 4, False);
ChooseOption('eal')
end;
until (InvFull);
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
StealSilk;
until (False)
end.So what it does is that it searches for the top color of the stand(beige), right click it, and press the "steal from" option. That's pretty much it. When the stand is empty, it right-clicks like crazy in search for the "steal from"-option, untill it finally finds it again.
So here's some of the problems that needs resolving
- Instead of right-clicking like crazy, it just waits a while when the "steal-from"-option has been chosen. I tried to do this at line 24-26, but it doesn't work and I have no idea why.
- Make it search for something more specific than just the top color of the stand.
- Make it run away if combat is detected(I was thinking about making it check if the health bar is visible, and if it is it would just run far away and come back after a while, though it currently seem too advanced for me)
- Drop all/bank option(I'll add a dropping option later, though I'll have to learn how to walk before)
- Make it left click instead of right click. The best thing would be to just let the cursor rest over the stand, and click only when the silk has respawned.
I'm still a newbie, I've only spent a few hours learning all this. I don't need anyone to resolve all the problems the script has, I just want someone to point me in the right direction, if it's possible :). Also, I'm sorry if I used something from your script without mentioning you, I just copied and pasted at random and changed it to work here.