You need to wait for your target curser to appear before you click.
finditem %Pole C_, #backpackID
set #lobjectID #findID
event macro 17 0
set #targcurs = 1
while #targcurs = true
{
wait 1
}
click %waterX %waterY
wait 8s
Edit #1
After I submitted this I looked at what I wrote, and since you only have one line after the 'while #targcurs = true', you should be able to take out the { and } and have this:
finditem %Pole C_, #backpackID
set #lobjectID #findID
event macro 17 0
set #targcurs = 1
while #Targcurs = true
wait 1
click %waterX %waterY
wait 8s
Which looks cleaner and has 2 less lines. You'll appreciate the ability to shorten your scripts once you get one that goes over 1000 lines.
That is how I would look to work it.
Edit #2
Thinking post submit again. You probably don't understand some of what is there. After you have a statement like 'while blah blah blah' anything that is within the { and } will be what is performed until your 'while' statement comes true.
So if you set your '#targcurs = 1' that will give you a target curser. Anything in the { and } will be performed until you target something to make it = 0.
So if you did:
finditem %Pole C_, #backpackID
set #lobjectID #findID
event macro 17 0
set #targcurs = 1
while #Targcurs = true
{
wait 1
event macro 1 0 I love fishing... ; (Event Macro 1 0 lets you 'say')
event macro 19 0 ; (this will make you salute)
}
click %waterX %waterY
wait 8s
This will set your curser as 1, and while waiting for you to target it will pause 1 second, say "I love fishing..." and salute over and over and over until you target. Now I don't recommend this, but you get the idea of what the purpose is.