Log in

View Full Version : Need help picking items up!



laakerules
01-01-2012, 07:23 PM
procedure PickupBones;
begin
if PickupBone = 'Regular' then
begin
FindObjSimple_F([13422806, 14014175], ['ake','Bones'], MSCX, MSCY);
writeln('Picking up Bones!');
While IsMoving do
wait(1);
FindNormalRandoms;
wait(randomrange(1400,2000));
end;
end;


Now how would i turn that to only pick up bones! Rite now it just clicks the pile until it is just the bones!

Gushers
01-01-2012, 08:32 PM
You need to set it to right click and select take. I'm not sure if this would work, but give it a shot?
Also you might just need to find the perfect color.
Edit this into yours and place a wait time for however long it takes to walk and grab the bones.
If FindObj(x,y,'ones',14014175,5) then
begin
writeln('Picking Up Bones');
GetMousePos(x, y);
Mouse(X, Y, 5, 5, False);
WaitOption('ake', 500);

laakerules
01-01-2012, 08:55 PM
Nope that didnt work

Gushers
01-01-2012, 09:16 PM
Did you change it up to match your script? And what did it do? As in not working..

Grihmm
01-01-2012, 09:20 PM
procedure PickupBones;
begin
if PickupBone = 'Regular' then
begin
FindObjSimple_F([13422806, 14014175], ['ake','Bones'], MSCX, MSCY);
Mouse(MSCX, MSCY);
Writeln('Picking up Bones!');
While IsMoving do
Wait(1000);
FindNormalRandoms;
Wait(RandomRange(1400,2000));
end;
end;

Try that? And work on standards please.

Gushers
01-01-2012, 09:29 PM
Got it to work:
Function PickupBones:Boolean;
Var
X, Y: Integer;
Begin
FindNormalRandoms;
If FindObj(x,y,'Bones',14014430,10) then
x:=MSCX;
y:=MSCY;
Begin
writeln('Hooray, we picked up some bones');
GetMousePos(x, y);
Mouse(X, Y, 5, 5, False);
WaitOption('Take', 500);
End;

laakerules
01-01-2012, 09:46 PM
It is saying that the xs and ys functions are out of bounds

Gushers
01-01-2012, 09:53 PM
It's something about the function, it's no big deal.. It's just annoying but it doesn't effect the script.
Does it work for you though?

Brandon
01-01-2012, 09:57 PM
Function PickupBones:Boolean;
Var
X, Y: Integer;
Begin
FindNormalRandoms;
If FindObj(x,y,'Bones',14014430,10) then
x:=MSCX;
y:=MSCY;
Begin
writeln('Hooray, we picked up some bones');
GetMousePos(x, y);
Mouse(X, Y, 5, 5, False);
WaitOption('Take', 500);
End;



Problems with this function..


X:= MSCX, Y:= MSCY... Will make it only hover over items that are in the center of the screen.. Matter of fact, it won't hover over items at all.. it'll just always move the mouse to that pos.
GetMousePos(X, Y); Overrides the values X and Y.. thus whever the mouse is, it will stay there if asked to move to X, Y..
If FindObj(x,y,'Bones',14014430,10) then needs a begin and and end; If you don't put that, it only executes the first line after it.. Thus it only does X:= MSCX.. Seems to need a lot of revision. I would write it but... I actually would like to see you guys either A: Fix it OR B: Write something else and then if it still does nothing, I'll be glad to help or give you a push.

laakerules
01-01-2012, 10:00 PM
Ahhh, just give me a damn push ive been trying to incorporate this into my script for weeks. All it does no mater what direction i try it only clicks on the top item. Some kid said something about the isuptext part of the script so i messed with that and it still did nothing!

Gushers
01-01-2012, 10:01 PM
Problems with this function..


X:= MSCX, Y:= MSCY... Will make it only hover over items that are in the center of the screen.. Matter of fact, it won't hover over items at all.. it'll just always move the mouse to that pos.
GetMousePos(X, Y); Overrides the values X and Y.. thus whever the mouse is, it will stay there if asked to move to X, Y..
If FindObj(x,y,'Bones',14014430,10) then needs a begin and and end; If you don't put that, it only executes the first line after it.. Thus it only does X:= MSCX.. Seems to need a lot of revision. I would write it but... I actually would like to see you guys either A: Fix it OR B: Write something else and then if it still does nothing, I'll be glad to help or give you a push.


Thanks for that lesson about X:= MSCX, Y:= MSCY, and GetMousePos(X, Y) ...
I finished the whole function with more stuff and ended it the right way, but I only posted the part of which he needed to just find the bones.

Brandon
01-01-2012, 10:13 PM
Modify it to find the colours near the mouse to make it more accurate..


Function FindItems(var X, Y: Integer; Uptext: TStringArray): Boolean;
var
TPA: TPointArray;
Item: TPoint;
begin
TPA:= GetMMDotsOnMS('Item');
Item:= MMToMS(TPA[0]);
MMouse(Item.X, Item.Y, 0, 0);

Result:= IsUptextMultiCustom(Uptext);

if Result then
GetMousePos(X, Y);
end;

laakerules
01-01-2012, 10:20 PM
omg, I am failing at this part!!!!!!!!!!!!!!!!!!!! KMN

laakerules
01-01-2012, 10:46 PM
So far gushers worked the best. ggzz i tried to use that and figure it out but it didnt work.

begginer
01-02-2012, 12:42 AM
Can you tell me when you get this one working. I might copy this and make a pick-up for fire runes

Gushers
01-02-2012, 09:10 AM
Can you tell me when you get this one working. I might copy this and make a pick-up for fire runes

Try using the second one I posted but change the colors and uptext for fire runes instead of bones.

laakerules
01-02-2012, 03:53 PM
hey begginer check out my script, i got it working even though error pops up down below. It still clicks it, and im adding runes to it in a day or 2

begginer
01-02-2012, 07:04 PM
I'll be doing that as soon as I get home.