Imagine Nation Forums
NextTarget - Printable Version

+- Imagine Nation Forums (https://in-uo.net/forums)
+-- Forum: Imagine Nation archive (https://in-uo.net/forums/forumdisplay.php?fid=6)
+--- Forum: Player Guides (https://in-uo.net/forums/forumdisplay.php?fid=29)
+--- Thread: NextTarget (/showthread.php?tid=5387)



NextTarget - Artur - 04-03-2012

Can anyone explain me how to do nexttarget macro in injection? UO nexttarget doesnt work :/ Razor target options work nice but in injection I have no idea how to make it.


NextTarget - Cana - 04-03-2012

No 3rd party app needed. TargetNext is in UO client. If you want it be part of longer script you could just simulate the key press with:

Code:
UO.Press(KeyCode[,Count[,Delay]]) - Simulate keypress.
         KeyCode    - Virtual key code.
         Count      - Optional. Number of keypresses.
         Delay      - Time in msec to wait between keypresses.



NextTarget - Artur - 04-03-2012

So how to make nexttarget working on injection? Have you got a good client?


NextTarget - Cana - 04-03-2012

If you install injection using IN patcher there's a client in there. Almost all others that I've tested either don't work, have something wrong with them or are just unstable in general. Client version is 5.0.1h. Just make a key inside UO for TargetNext and if you really need it in injection script just simulate the key press.


NextTarget - Artur - 04-03-2012

I use 5.0.1h client. But the thing is that the nexttarget in uo doesnt work, it only mark target but I still cant cast on it and thats not my target. If I do that simulate key will it somehow work? I dont understand


NextTarget - por corp wis - 04-03-2012

lasttarget - will cast after you've targeted your target.
laststatus - will cast on "nexttarget"


UO.Set('lasttarget','laststatus')
UO.WaitTargetObject('lasttarget')
this will mark your laststatus as lasttarget.


NextTarget - Artur - 04-03-2012

thank you por corp wis!


NextTarget - Artur - 04-03-2012

Por corp wis, It works, but I have to press key with your macro before every spell :/ it doesnt make my target permanent last target. Why is that?


NextTarget - Artur - 04-03-2012

I think it shpuld looks:

UO.Set('lasttarget','laststatus')
UO.WaitTargetObject('laststatus')


NextTarget - Gang - 04-03-2012

Artur Wrote:I think it shpuld looks:

UO.Set('lasttarget','laststatus')
UO.WaitTargetObject('laststatus')

nopeTongue

you bind the macro in uo options then u use it via uo.press in injection so your damn targetnext macros should look like :

sub z()
uo.press(BindedKeyCode)
wait(100)
UO.Set('lasttarget','laststatus')
endsub

That is ALL. no need to waittargetobject or anything. If you cast spells by last target after using that subroutine everything should be ok


NextTarget - Artur - 04-03-2012

thank you Wink


NextTarget - Mael - 04-03-2012

hmm i cant seem to get it to work ;/

so i tried that and it just crashes my uo with some crazy errors