Author Topic: Pixel Scanning for Icons  (Read 3376 times)

0 Members and 1 Guest are viewing this topic.

Offline CervezaTopic starter

  • 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
Pixel Scanning for Icons
« on: April 07, 2011, 06:38:36 AM »
0
Here's a couple of subs to ease the pain of pixel scanning to see changes (or lack of change) for icons. Could be used for other things also... not sure what.

SETUP
Code: [Select]
; ***** sub set_pixel *****
; %1 - pixel number
; %2 - name
; %3 - event macro 1
; %4 - event macro 2
; gosub set_pixel 1 LightningStrike 15 149 ; lightning strike

sub set_pixel
event macro %3 %4
display ok Move mouse to your %2 Button.$You have 2 seconds
wait 2s
savePix #cursorX #cursorY %1
wait 5
display ok Pixel saved as # %1 $Do NOT move that icon!
return

CHECK - returns #true if pixel matches and #false if it doesn't
Code: [Select]
; ***** sub check_pixel *****
; %1 - pixel number
; %2 - t/f true or false
; gosub check_pixel 1 f

sub check_pixel
cmppix %1 %2
  return #true
return #false
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 Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Pixel Scanning for Icons
« Reply #1 on: April 07, 2011, 07:27:03 AM »
0
This is one of the things OpenEUO would have greatly improved upon.  This its commands to quickly scan and identify gumps from a list  you would always be able to find the right spell/speacil gump and chack its status without worries of it moving or being covered.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Pixel Scanning for Icons
« Reply #2 on: April 07, 2011, 07:33:18 AM »
0
Definitely.  With EUO, you are limited to the fixed parse speed, but running native Lua and what is probably nearly raw GDI calls, you can expect that code to run at near native-speed.
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: