SRL Archive - SRL Archives

procedure InvDrop(StopX : Integer);


WhiteShadow

2006-05-01 23:53:08

A Drop Procedure

It works pretty good. It uses a different technique than the SRL drop procedures.

+//Mid-Speed (MouseSpeed:= 25)
+//Misses around 1-3 times per load (Miss as in right clicking an empty spot and clicking cancel)
+//Doesn't just drop in straight columns. (Does sometimes also though)
+//Stops dropping when it doesn't see the color of the item in the middle of the inventory
or InvCount = StopX
+//Even has Anti-Randoms. xD

//By WhiteShadow

{.include SRL/SRL.Scar}

procedure InvDrop(StopX : Integer);//Drops, until StopX left in Inv
var
DropOre : integer;
begin
DropOre:= GetColor(670, 300);//A middle of inv, item coord
GameTab(4);
repeat
if(FindColorSpiral(x, y, DropOre, 560, 210, 740, 460))then
begin
BenMouse:= False
Mouse(x, y, 1, 1, false);
Wait(50 + random(100));
FindNormalRandoms;
end;
if(ClickOption('Drop', 2))then
begin
Wait(100 + random(100));
end else
begin
ClickOption('Cancel', 2);
end;
until(InvCount = StopX) or (not(FindColorSpiral(x, y, DropOre, 560, 210, 740, 460)))
BenMouse:= True;
end;

timmyboy

2006-05-02 10:45:14

Looks good, but what if in the middle of the inventory there is a sapphire, or a random event item from Dwarf, or coins? Then if it gets that color, and not of the ore, it will leave the ore and drop the stuff. Maybe get user to set the color?

WhiteShadow

2006-05-02 19:43:26

From: timmyboy
Looks good, but what if in the middle of the inventory there is a sapphire, or a random event item from Dwarf, or coins? Then if it gets that color, and not of the ore, it will leave the ore and drop the stuff. Maybe get user to set the color?


Hmm, good thinking, I'll edit it to have two colors. (Bottom Right Hand Corner) If it picks two spots with both spots with random's items, that's totally weird. xD having a random item in the middle and in the bottom right hand corner.

timmyboy

2006-05-02 20:06:30

From: WhiteShadow
Hmm, good thinking, I'll edit it to have two colors. (Bottom Right Hand Corner) If it picks two spots with both spots with random's items, that's totally weird. xD having a random item in the middle and in the bottom right hand corner.

Lol, but still, you should prob just do something like this:

procedure InvDrop(StopX, OreC : Integer);//Drops, until StopX left in Inv
begin
GameTab(4);
repeat
if(FindColorSpiral(x, y, OreC, 560, 210, 740, 460))then
begin
BenMouse:= False
Mouse(x, y, 1, 1, false);
Wait(50 + random(100));
FindNormalRandoms;
end;
if(ClickOption('Drop', 2))then
begin
Wait(100 + random(100));
end else
begin
ClickOption('Cancel', 2);
end;
until(InvCount = StopX) or (not(FindColorSpiral(x, y, OreC, 560, 210, 740, 460)))
BenMouse:= True;
end;

Userset color, way more safe. But it's your procedure, so do what you want:)