Author Topic: Target Cursor Detection  (Read 2760 times)

0 Members and 1 Guest are viewing this topic.

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Target Cursor Detection
« on: October 13, 2009, 11:52:52 AM »
0
Is there a way to detect the presence of a target cursor?

I would like to put together a target cursor check/wait sub to replace standard wait intervals before selecting a target and I need a way to know whether I have a target cursor or not.  I have been reading up on it and I can't find anything on point.

Any help greatly appreciated!

-P
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline _C2_

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: Target Cursor Detection
« Reply #1 on: October 13, 2009, 11:57:51 AM »
0
#targetcurskind  or something close to that tells what kind of cursor.

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Target Cursor Detection
« Reply #2 on: October 13, 2009, 12:04:26 PM »
0
if #targCurs = 1 ; active
if #targCurs = 0 ; inactive
Value     Description
0    Cursor is a normal cursor.
1    Cursor is a target cursor.

#cursKind tells you where you are.
Value     Description
0    Felucca
1    Trammel
2    Ilshenar
3    Malas
4    Tokuno

Code: [Select]
if #targCurs = 0 ; NOT a target cursor, so you can cast your spell
{
event macro 15 28
while #targCurse = 0 ; wait for target cursor to become a 1 or active
  wait 0
event macro 23 0 ; target self
wait 10 ; or whatever your cast recovery is
}
« Last Edit: October 13, 2009, 12:09:46 PM by Cerveza »
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Target Cursor Detection
« Reply #3 on: October 13, 2009, 12:07:26 PM »
0
Awesome, thanks for pointing that guys.  Now I don't have to use a wait 10 or some such.   I appreciate it.
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Target Cursor Detection
« Reply #4 on: October 13, 2009, 12:10:37 PM »
0
Also, you can use

Code: [Select]
; This will pause the script until either the target cursor is displayed,
; or 3 seconds passes.
; Set the timout just over what you expect the delay to take, otherwise
; you may miss the target cursor and cause errors in your script.
target 3s

Which is what most people use.

All is in the docs over at easyuo ;)
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Target Cursor Detection
« Reply #5 on: October 13, 2009, 12:26:29 PM »
0
Thanks guys. I am going to try using the following instead of the wait 10 after I hit something that should bring up a target cursor:

set %targetcursorwait 1

          gosub WaitForTargetCursor
          if ! #result
             {
             display -Target Cursor did not come up. [Bring up related cursor] and hit play
             pause
             }

;================== Wait for Target Cursor Sub======================

sub WaitForTargetCursor

set %timeout #scnt + 30

Repeat
      wait %targetcursorwait
      if #scnt > %timeout
         return #false
Until #TARGCURS = 1

return #true
« Last Edit: October 13, 2009, 12:28:24 PM by Paulonius »
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline _C2_

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: Target Cursor Detection
« Reply #6 on: October 13, 2009, 04:01:39 PM »
0
thank you cerv!  I was at work and still am.  I could not look in the variables to see it.

Tags: