- Joined
- May 1, 2007
- Sythe Gold
- 0
- Messages
- 84
Hey guys, I am an extreme noob at scripting, I just created a simpel script to look for an adamant axe, if it does not find it, it right clicks on a bank booth and clicks "use bank." If it finds the axe, I intend it to simply say "I have found the adamant axe." in the debug box, and cease working;however, if the axe is present on the screen, it states that the axe has been found, but it also right clicks on the bank booth and selects use. Here is the script that I wrote:
program AxeBanker;
var
x,y: Integer;
const
AxeColor= 4017213;
begin
if(FindColor(x,y,AxeColor,0,0,600,600)) then
begin
Writeln('I Found The Adamant Axe!'+chr(13))
end else
MoveMouseSmooth(347,285);
Wait(1000)
ClickMouse(347,285,false)
Wait(1000)
MoveMouseSmooth(338,316)
Wait(1000)
ClickMouse(338,317,true)
end.
____________
I am thinking that this has something to do with the "end else" that I have in there, but I am not sure, could someone tell me what I am doing wrong and present me with what the script should look like so that it does not access the bank even if it has found the axe?
Thanks,
Go L Den
program AxeBanker;
var
x,y: Integer;
const
AxeColor= 4017213;
begin
if(FindColor(x,y,AxeColor,0,0,600,600)) then
begin
Writeln('I Found The Adamant Axe!'+chr(13))
end else
MoveMouseSmooth(347,285);
Wait(1000)
ClickMouse(347,285,false)
Wait(1000)
MoveMouseSmooth(338,316)
Wait(1000)
ClickMouse(338,317,true)
end.
____________
I am thinking that this has something to do with the "end else" that I have in there, but I am not sure, could someone tell me what I am doing wrong and present me with what the script should look like so that it does not access the bank even if it has found the axe?
Thanks,
Go L Den


