SRL Archive - OSR Help

Trouble with... idk what lol


l6bustank

2012-09-14 05:52:10

Had some spare time and decided to make my ban-machine of a selling script to sth I can actually use. I ran into this problem:
When my script is about to repeat the selling 500 items procedure, it only does it once (sells 500 once), then moves the mouse to the upper right corner of the main screen and leaves it there forever.
The mouse movement to the upper right corner of the main screen also happens once, right before it sells 500 items (once), but then it comes back to selling.
What should I do to make things work?
My current procedure:
procedure Sell;
var
RightClickSell, x, y : Integer;
begin
FindNormalRandoms;
RightClickSell := DTMFromString('mlwAAAHicY2dgYMgC4g4gbgfiTCD2AGIvIM4G4gVAPAOIl0PxUii/H4gNVKUZVGTFGfIMBcDYxkAVzFeQFGZgBcrjwox4MBQAAGsSCr4=');
if FindDTM(RightClickSell, x, y, MSX1, MSY1, MSX2, MSY2)then
begin
Writeln('found the button');
Mouse(x, y, 5, 5, false);
Wait(RandomRange(107, 193));
ChooseOption('ell 500');
Wait(RandomRange(200, 400));
Antiban;
end;
FreeDTM(RightClickSell);
end;

//The part of my main loop, concerning the procedure:
repeat
Sell;
until(InvCount = 0);
end.

riwu

2012-09-14 05:59:59

Post your antiban procedure.

l6bustank

2012-09-14 06:01:20

there ya go:
procedure Antiban;
begin
case random(203) of
44..47:
PickUpMouse;
101..104:
RandomRClick;
137..141:
MMouse(MSX1, MSY1, MSX2, MSY2);
189..195:
wait(987+random(532));
end;
end;

CephaXz

2012-09-14 06:01:28

You're right clicking something in your inventory or main screen? And its better to load the DTM only one time, and free the DTM when script is terminated.

EDIT: Your antiban

MMouse(MSX1, MSY1, MSX2, MSY2);

l6bustank

2012-09-14 06:07:22

From: CephaXz
You're right clicking something in your inventory or main screen? And its better to load the DTM only one time, and free the DTM when script is terminated.

EDIT: Your antiban

MMouse(MSX1, MSY1, MSX2, MSY2);

Removed, still the same :/

E:Im clicking stuff on main screen (shop interface)

CephaXz

2012-09-14 06:17:13

Ummm… Maybe try this

  
if FindDTM(RightClickSell, x, y, MSX1, MSY1, MSX2, MSY2)then
begin
Writeln('found the button');
Mouse(x, y, 5, 5, false);
while not waitoption('ell 500', 1500) do
begin
mouse(x, y, 5, 5, mouse_Right);
end;
Antiban;
end else
begin
writeln('not found');
end;

l6bustank

2012-09-14 06:38:07

From: CephaXz
Ummm… Maybe try this

  
if FindDTM(RightClickSell, x, y, MSX1, MSY1, MSX2, MSY2)then
begin
Writeln('found the button');
Mouse(x, y, 5, 5, false);
while not waitoption('ell 500', 1500) do
begin
mouse(x, y, 5, 5, mouse_Right);
end;
Antiban;
end else
begin
writeln('not found');
end;

I think I found the solution:
It was about the DTM. before the 1st right-click selling, the selling button has a little different colors. The colors change brighter after the 1st sell (highlighting the button) and my DTM becomes useless. I think I will incorporate the current sell procedure to the previous, which sets everything up, and then make another repeating procedure that sells everything.
Thx for for the code, it lead me to this :D

CephaXz

2012-09-14 07:32:40

Since others are not the problem, the only one left should be the dtm. I used to have a shop item selling script myself. Instead of dtm, I used mouse coordinates since its always at the same position. It's easier without having to use any dtm.

l6bustank

2012-09-14 14:55:16

nvm, solved.