• Log in or sign up for an account here: https://www.sythe.org/login

Dropping

Element1

Forum Addict
Joined
Mar 22, 2007
Sythe Gold
0
Messages
440
Can someone help me write a dropping procedure. Credits will be given, its for iron ores.


Procedure DropOre;
Var
X, Y, OreDTM, I:Integer;
Slotbox:Tbox;
OrePattern:TIntegerArray;

Begin
If InvFull then
Begin
MarkTime(TooLong);
OreDTM := DTMFromString('mrAAAAHic42BgYHBmYmCwB2IvIA4GYj8gdgBiYyA2AeLHQDVXgfgmEN8H4tdA/AmI3wDxQyA2kRcHkkx4MG7wH4gZCWAYAAAOhgrG');
OrePattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
StatsGuise('Dropping Ore:' + IntToStr(I));
For I:=0 To 27 Do
Repeat
Begin
SlotBox:=InvBox(OrePattern);
If FindDTm(OreDTM, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
FindNormalRandoms;
MMouseItem(OrePattern);
Mouse(X, Y, 2, 2, mouse_Right);
ChooseOption('Dro');
End;
End;
Until(InvEmpty);
MarkTime(TooLong);
End;
End;

That is what I have right now, but it does not drop any of the ore.
 
procedure OreDropper;

var
x, y, Iron: Integer;

begin
GameTab(tab_Inv);
if InvFull = true then
Iron:=DTMFromString('mggAAAHicY2NgYPBjZGCIAmJvIHYCYh8gDgPiuUA8DYgnAvFCIF4NxIuA2EBGlCHB1wyokwmOtSSFGPiBLGyYEQeGAACzzAeb'); //my working DTM
if FindDTM(Iron, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 4, 4, False);
ChooseOption('rop');
Wait(400+random(250));
Writeln('Ore dropped');
Until(InvEmpty);
FreeDTM(Iron);
end;
end;
Hope this helps!
Always check out the documentation http://docs.villavu.com/srl-5/inventory.html#invcount
 
Yes my DTM was correct I have gotten it to work thanks guys I ended up writing a different procedure.
 
I'm not sure I didn't test it as I had already written another one, but the code looks fine, sorry it took me so long to reply.
 
Runescape Gamblingrunescape gambling
Back
Top