SRL Archive - OSR Help

Fastest way to detect mined/chopped


beats-

2013-05-21 20:53:16

So i got a good way to click on the item..

But now how do i make it see i got xp.. or the item was mined..
So i can quickly click on the next one

for epic xps.

??

rj

2013-05-21 21:00:19


LogCount := InvCount + 1

Repeat
wait(100)
until (InvCount = LogCount)

So let's say you have 25 logs. The script will get your inventory count (invCount, it's a function in the SRL Include), which would be 25, and add 1, so Logcount would be 26. It would then loop wait(100) until the inventory count = LogCount

You should add failsafes such as a timeout, like this:


MarkTime(t);
Timeout := RandomRange(4000, 6000);
LogCount := InvCount + 1
repeat
Wait(100));
until (TimeFromMark(t) > TimeOut) or (InvCount = LogCount);

that way, if somebody else chops down the tree it will break out of the look in 4-6 seconds

Peanuts

2013-05-21 21:01:51

Barbrady you are the man! Was just looking for this. Tyyy

NKN

2013-05-21 21:02:44

From: Peanuts
Barbrady you are the man! Was just looking for this. Tyyy


If someone takes the resource before you, it's a bad method. I'd just colorshift from the box you're using if it's a ore, or pixelshift if its a tree.


edit: and by color shift I mean compare the colors until they're no longer similar.

rj

2013-05-21 21:04:04

From: NKN
If someone takes the resource before you, it's a bad method. I'd just colorshift from the box you're using if it's a ore, or pixelshift if its a tree.


edit: and by color shift I mean compare the colors until they're no longer similar.


Yes this would be better, but if you are still learning then it's best to start simple.

NKN

2013-05-21 21:06:25

From: Officer Barbrady
Yes this would be better, but if you are still learning then it's best to start simple.

Never settle for less. ;)

The Mayor

2013-05-21 21:07:50

You can do an inventory count like Rjj said, or if using EOC you can go by the XP Bar.

Something like:

Program new;
{$i srl/srl.simba}

Var
StartingXP: Integer;


Procedure ProgressReport;
Var
CurrentXP, XPGained, LogsCut: Integer;

Begin
CurrentXP := GetXPBarTotal;
XPGained := CurrentXP - StartingXP;
LogsCut := XPGained / 45;
WriteLn('Logs cut: ' + IntToStr(LogsCut));
End;


Begin
SetupSRL;
//DeclarePlayers & login etc.
StartingXP := GetXPBarTotal;
Mainloop;
End.

Peanuts

2013-05-21 21:08:09

From: NKN
If someone takes the resource before you, it's a bad method. I'd just colorshift from the box you're using if it's a ore, or pixelshift if its a tree.


edit: and by color shift I mean compare the colors until they're no longer similar.


I'll try barbradys method as im rather new to this.. but..
I totally understand what you mean..
I will definitely check out this color shifting stuff in the future


From: The Mayor
You can do an inventory count like Rjj said, or if using EOC you can go by the XP Bar.

Something like:

Program new;
{$i srl/srl.simba}

Var
StartingXP: Integer;


Procedure ProgressReport;
Var
CurrentXP, XPGained, LogsCut: Integer;

Begin
CurrentXP := GetXPBarTotal;
XPGained := CurrentXP - StartingXP;
LogsCut := XPGained / 45;
WriteLn('Logs cut: ' + IntToStr(LogsCut));
End;


Begin
SetupSRL;
//DeclarePlayers & login etc.
StartingXP := GetXPBarTotal;
Mainloop;
End.



YES!! THIS LOOKS GOOD, ima try this also

King

2013-05-21 23:13:14

The color shift wouldn't be bad as a newbie(: Poke around the forums for a Object finding tutorial, then use that to find the tree and make a box around it ( use a tbox ) then just search the box till its gone, or you can use a color count ect. I

Peanuts

2013-05-22 02:14:21

From: King
The color shift wouldn't be bad as a newbie(: Poke around the forums for a Object finding tutorial, then use that to find the tree and make a box around it ( use a tbox ) then just search the box till its gone, or you can use a color count ect. I



Giving that a go now.
Thx for the help..
n sorry for the hijack xD


From: NKN
If someone takes the resource before you, it's a bad method. I'd just colorshift from the box you're using if it's a ore, or pixelshift if its a tree.


edit: and by color shift I mean compare the colors until they're no longer similar.


Gravedugggg… But.. I need help lol.. n its still on the same topic..

I have being using the other methods..
But now i see im getting stolen by others n my guy will stand for a while..

Do i make the box.. over the rock?..
I'm kinda confused.. :|

From: Officer Barbrady
Yes this would be better, but if you are still learning then it's best to start simple.


Maybe you could offer some assistance oh wise and mighty one?

Peanuts

2013-06-13 08:45:52

EDIT: God damn didn't see i was last poster.. ;|