What is the function to drop an item from the inventory??
What is the function to drop an item from the inventory??
Simba Code:DropItem(I);
I is what slot, 1 ~ 28. You can see all of SRL's functions by using the in-built search that Simba has, by the way:
![]()
No i dont know the inventory slot of my item , want to rtclick my item and select select drop
I am using ChooseOption('Drop') but it doesnot click on Drop after rt clicking????
Last edited by astoria1112000; 12-01-2011 at 02:33 PM.
Here, you can study this from my script that I am working on. If you have any questions, feel free to ask.
Simba Code:function DropInventory: Boolean;
var
X, Y, I, DTM : Integer;
Box : TBox;
M : string;
begin
if (not(LoggedIn)) or (not(InvFull)) then Exit;
FindNormalRandoms;
M := Players[CurrentPlayer].Strings[MINING];
case Lowercase(M) of
'iron' : DTM := DTMFromString('mbQAAAHicY2VgYOhhYmCYA8S1QDwJiFuAWISRgYEf' +
'iGWhmBeITeXFgaqZUDArAyZgxILBAABOugO3');
'copper' : DTM := DTMFromString('mbQAAAHicY2VgYLjKxMBwE4jPAvF9ID4JxOKMD' +
'AzcQCwHxPJALAjEu7OtgKqZUDArAyZgxILBAAA' +
'WYgYa');
'tin' : DTM := DTMFromString('mbQAAAHicY2VgYNjGxMBwDIi3AvEyIN4AxKKMDAz' +
'8QKwIxCJAzAnEaYmJQNVMKJiLARMwYsFgAADKOgU9');
end;
for I := 1 to 28 do
begin
Box := InvBox(I);
if FindDTM(DTM, X, Y, Box.X1, Box.Y1, Box.X2, Box.Y2) then
begin
Mouse(X, Y, 5, 5, False);
WaitOption('rop', 710);
end;
Wait(RandomRange(122, 180));
end;
FreeDTM(DTM);
if (InvFull) then ExitPlayer('We were unable to drop our inventory...');
end;
The procedure will search the inventory from slot 1 to slot 28 for a DTM. Every time it finds the DTM, it will drop it. Then it will continue from the slot it left off on.
If you want a simplified version:
Simba Code:procedure SimpleDrop;
var X, Y, DTM : Integer;
begin
if (not(LoggedIn)) then Exit;
FindNormalRandoms;
DTM := DTMFromString('');
if FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(X, Y, 5, 5, False);
ChooseOption('rop');
end;
FreeDTM(DTM);
end;
For your edit: You should never use capital letters in your text finding, try it that way. Also make sure everything is updated.
That's not true anymore. That hasn't been necessary for.. years, I believe. We were just so used to it we never changed tutorials or anything, even though there's no real reason to do it. Theoretically it's faster if you do use them, I think, because reading the first three letters is faster than just the lower case letters (which sometimes can be a bit down the line).
But that's a bit unrelated.
Try looking up and using chooseoptionmulti but that's odd chooseoption should work just fine.
Try downloading new Simba from here: http://villavu.com/forum/showthread.php?t=68477
Make sure your SRL and Simba are the latest due to the recent font change.
@RISK
instead of
Simba Code:for I := 1 to 28 do
begin
Box := InvBox(I);
if FindDTM(DTM, X, Y, Box.X1, Box.Y1, Box.X2, Box.Y2) then
begin
Mouse(X, Y, 5, 5, False);
WaitOption('rop', 710);
end;
// I'd Really suggest
FoundDTM: boolean;
FoundDTM := FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
while (FoundDTM) do
begin
Mouse(X, Y, 5, 5, False);
WaitOption('rop', 710);
FoundDTM := FindDTM(DTM, X, Y, MIX1, MIY1, MIX2, MIY2);
end;
Cus that might really save you a lot of DTM searches.
-RM
There are currently 1 users browsing this thread. (0 members and 1 guests)