Littma
2011-12-02 12:55:22
MOD PLEASE READ: Move to Scripting Help, thank you!
I'm attempting to make my first script and I'm having a difficult time getting all of my procedures that require moving to work correctly seeing it will preform the action and continue to search > click/right click the color before the player even gets to the object.
Hopefully there is a solution to this–I am assuming it's the way I've scripted some of my procedures so I will give out one as my example on picking something up.
It might be because I'm having a hard time understanding some of the advanced scripting methods available to me. I'd prefer not to use bitmaps when finding objects to pick up–instead pure color would flow a lot easier from my understanding.
My main objective in this procedure is to pick something up to fill the users inventory up with the item and then simply stop. I've tested multiple methods that I've come up with and nothing has seemed to work and this is what I've come down to. As I've said before, throughout my testing it does not detect when the player is moving (which I'd like it to sleep while the player is moving) though there's no way to accurately obtain how many ms it would take to get from object A to object B.
Seeing this is a RuneScape script and I'd hope to release it to the public one day (when it's fully done and ready) I'd just like to make sure it doesn't spam click and just wait while the character moves. I'm just not sure how–any assistance will be greatly appreciated :D
I'm attempting to make my first script and I'm having a difficult time getting all of my procedures that require moving to work correctly seeing it will preform the action and continue to search > click/right click the color before the player even gets to the object.
Hopefully there is a solution to this–I am assuming it's the way I've scripted some of my procedures so I will give out one as my example on picking something up.
procedure Example;
var
x, y : Integer;
begin
while (InvCount < 28) do
begin
if(FindColorSpiralTolerance(x, y, 12345, MSX1, MSY1, MSX2, MSY2, 41)) then
Mouse(x, y, 0, 0, False);
ChooseOption('Take');
end;
end;
It might be because I'm having a hard time understanding some of the advanced scripting methods available to me. I'd prefer not to use bitmaps when finding objects to pick up–instead pure color would flow a lot easier from my understanding.
My main objective in this procedure is to pick something up to fill the users inventory up with the item and then simply stop. I've tested multiple methods that I've come up with and nothing has seemed to work and this is what I've come down to. As I've said before, throughout my testing it does not detect when the player is moving (which I'd like it to sleep while the player is moving) though there's no way to accurately obtain how many ms it would take to get from object A to object B.
Seeing this is a RuneScape script and I'd hope to release it to the public one day (when it's fully done and ready) I'd just like to make sure it doesn't spam click and just wait while the character moves. I'm just not sure how–any assistance will be greatly appreciated :D