Author Topic: ENs - Subs - Buff/Debuff Bar Subs. (oEUO & EUO)  (Read 152790 times)

0 Members and 2 Guests are viewing this topic.

Offline Endless NightTopic starter

  • 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: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #45 on: December 09, 2010, 12:49:41 PM »
0
EUOX VERSION 18b

- FOR BARS IN ALL DIRECTIONS: - script no longer reopens, or refocuses the buffbar as long as its still in the same postion as the first time the script opened it (Auto accomidates for expansion and reductions). This change elimates all bar flashing and interruptions to user actions... purly passive scanning. (The bar is opended on the first scan all future scans are passive unless the bar gets covered then reopening is attempted next scan).

thanks to Twinkle McNugget for bringing this to my attention and thus giving me the motivation to implement it.

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."

Scrripty

  • Guest
Re: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #46 on: December 09, 2010, 12:59:08 PM »
0
I went over the EUO version and saw this change, haven't tested, might run a bit faster tho.  Not sure.  Eliminated an if, not even sure it works actually.  Should tho.  I just combined the if statements into one line instead of 2.  I was already working on something similar.

Code: [Select]
  While !Count < %BuffBarIconsCount && %BuffBarFoundTheIcon = NO
  {
    set !Count !Count + 1
    set !temp  %BuffBarIconCol1_ . !count
    set !High !Temp + %BuffBarColorRange
    set !Low  !Temp - %BuffBarColorRange
    if %BuffBarScanPixcol1 >= !Low && %BuffBarScanPixcol1 <= !High && %BuffBarScanPixcol2 >= !Low && %BuffBarScanPixcol2 <= !High
    {
      set !temp  %BuffBarIconCol2_ . !count
      set !High !Temp + %BuffBarColorRange
      set !Low  !Temp - %BuffBarColorRange
      set !t %BuffBarIconName_ . !Count
      If !t <> Blank
      {
        Set %BuffBarIconsFound %BuffBarIconsFound + 1
        set %BuffBarIconNames %BuffBarIconNames , !t , _
        set %BuffBarFoundTheIcon !t
        set %BuffBarIconsNotFoundInArow 0
      }
    }
  }

Offline Endless NightTopic starter

  • 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: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #47 on: December 09, 2010, 01:04:39 PM »
0
I like that idea a ton.  You could still use all the same info and just scan for the one thing.  I rarely am scanning for more than 4 or 5 things at a time... how about you make it able to take any number of names?  :)  Like scanbuffbar clumsy weaken curse

Unfortunatly thinking about it a bit more... unless i use the forced reopen method this wont work.  Reason i will never know how long the bar is as currently i detect the end of the bar by 2 unknown icons in a row. If i only scan for xyz  then abc and will trigger end of bar condition.

Of course i could add this to the OpenEUO version but seems like a waste of time considering the code executes in approx 1ms.


I added a few new memory vars in the current version you can see them running via this code snippet:
Code: [Select]
set %BuffBarRecordAllIcons NO
Call ScanBuffBar  ; Presumes file is in same location as euo
Display ok %BuffBarCalls : %BuffBarTime : %BuffBarScanMethod - BAR: %BuffbarDirection - Icons: %BuffBarIconsFound - %BuffBarIconNames
display ok you have 2 seconds to change the cont focus... and test it doesnt setback to buffbar
wait 50
for %x 1 5
  {
  Call ScanBuffBar  ; Presumes file is in same location as euo
  Display ok %BuffBarCalls : %BuffBarTime : %BuffBarScanMethod - BAR: %BuffbarDirection - Icons: %BuffBarIconsFound - %BuffBarIconNames
  }
Halt

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 Endless NightTopic starter

  • 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: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #48 on: December 09, 2010, 01:07:01 PM »
0
I went over the EUO version and saw this change, haven't tested, might run a bit faster tho.  Not sure.  Eliminated an if, not even sure it works actually.  Should tho.  I just combined the if statements into one line instead of 2.  I was already working on something similar.

Code: [Select]
  While !Count < %BuffBarIconsCount && %BuffBarFoundTheIcon = NO
  {
    set !Count !Count + 1
    set !temp  %BuffBarIconCol1_ . !count
    set !High !Temp + %BuffBarColorRange
    set !Low  !Temp - %BuffBarColorRange
    if %BuffBarScanPixcol1 >= !Low && %BuffBarScanPixcol1 <= !High && %BuffBarScanPixcol2 >= !Low && %BuffBarScanPixcol2 <= !High
    {
      set !temp  %BuffBarIconCol2_ . !count
      set !High !Temp + %BuffBarColorRange
      set !Low  !Temp - %BuffBarColorRange
      set !t %BuffBarIconName_ . !Count
      If !t <> Blank
      {
        Set %BuffBarIconsFound %BuffBarIconsFound + 1
        set %BuffBarIconNames %BuffBarIconNames , !t , _
        set %BuffBarFoundTheIcon !t
        set %BuffBarIconsNotFoundInArow 0
      }
    }
  }


Change wont work... and shouldnt make a diff  .. reason wont work is high low isnt the same range for both pixel colors... a little editing and it would work... but i think it would actually be slightly slower
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."

Scrripty

  • Guest
Re: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #49 on: December 09, 2010, 01:12:47 PM »
0
I was just going to post that.  But yours definately does work, I just tested.  Now all my icon names are populating the variable. :)  I need to go back and read why you say yours wont work?  Just so we're on the same page, the way I was going to do it, was scan both pixel locations, then just set a high/low scan like you did, and every scan, do a 2 pixel scan of the bar itself to ensure it hadn't moved or become covered and if so, THEN reopen it.  But the length of the bar shouldn't effect the #contpos + 20/7 (+ distance to next icon).  So you use a quick scan of the button/bar to ensure it's in the same spot, then scan as normal.  Your way of scanning I dont know if it works, but my way would definately work the way I'm describing.  At least facing left. :)  I dont know/care about up/down/right personally. heh

Scrripty

  • Guest
Re: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #50 on: December 09, 2010, 01:22:01 PM »
0
It's a definate slow down...  I'm going to set a timer so it only scans every half second or so.  See what that does. :)  Thanks man, this is nearly exactly what I need.  I might go back finish writing one the way I like tho, just to see how I can do with it.  If I do, I'll still hand it to ya. :)

Offline Endless NightTopic starter

  • 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: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #51 on: December 09, 2010, 01:29:03 PM »
0
Editted your change so would work and tested it .. takes approx 15ms longer.  Simple  setcondition1 setcondition2 if cond1 and cont2  takes longer than setcond1 if cond1 setcond2 if cond2  as  99% of the time the script doesnt have to setcond2 vars as fails on condition1.  with 42 icons this means not setting cond2 vars 42 x number icons on bar.

Currently i do this
first pass- open bar  and scan using contsize
2nd pass onwards
- check bar for presence if exists scan bar without opening.
otherwise do as firstpass

...  Scanning with a pixelrange has slowed 2nd+ scans by approx 30ms a scan.. that is quiet significant.. but i can account for that by all the extra ifs and sets.

Using a pixel range has required many extra ifs and sets per icon... and rember thiers a min of 2 icons scanned even if nothing on the bar if 1 one on the bar = 3 scans.
ifs  - min +1 max + 41     per icon scanned
sets  - min +4 max +164  per icon scanned

I could potentially remove the sets but this would elimate realtime adjusting of the pixelrange. After testing eliminating the sets by using sorted memore vars does not make any difference possibly due to using a var. var combo.



« Last Edit: December 09, 2010, 01:41:26 PM by Endless Night »
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."

Scrripty

  • Guest
Re: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #52 on: December 09, 2010, 01:56:10 PM »
0
The bar still resets itself to the topmost gump when it loses focus.  That's something that needs to go also.  There's really no need for it.  It's a billion times less annoying, but if you're trying to loot or something, it makes scanning for anything else impossible.  The ONLY time it should be resetting the gump is if it is moved or cant be seen.  And you can easily test for that by scanning the buff bar image to see if it has moved.  That's the last hurdle. :)  Once that's done it's the best script since sliced bread. heh  I'm already LOVING how easily I can scan for all the different things.  Cast eoo, is eoo on the bar now?  No, cast again.  Is it there?  Yes.  Set timer. :)  So simple.  Thanks brother.  I wasn't looking forward to writing it myself.  PLEASE change the way it refocus' the gump.  That's the only thing left.  Then it's in every script I got. hah  At a half second scans, I can scan for anything easily still, and it's VERY fast even with the additions.  At a half second scan I'm barely noticing any slow downs.  I'll have to go through and organize the icons based on my preferences to wring out a few millis here and there. :)

Scrripty

  • Guest
Re: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #53 on: December 09, 2010, 02:10:27 PM »
0
Another issue I just found.  If you cover the screen, the script now loses the bar completely and doesn't update the icons.  On windows 7 it IS possible to scan the buff bar and cover it up.  Same with vista I believe.  As long as you don't minimize the gameplay window.  So this is a big limitation.  I think it's probly because you set your variables every time you lose the gump.  (haven't looked)  but if you keep the variables the same, you can just scan the position without even actually knowing it's there and still get the info.  Should be easy to fix.  It doesn't recover after you move a window covering the gameplay window either.  Just spams _ over and over. :(

Offline Endless NightTopic starter

  • 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: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #54 on: December 09, 2010, 03:00:53 PM »
0
EUOX VERSION 18c

- Speed increase and glitch fixes.
  Max speed gotten on Left bar (Left+down = fastest) is 15ms.
  Fastest speed Right/up is 47ms.. approx +30ms for these directions no matter how many icons.


ps Not running win7 script so cannot test that... but it should work it only try's to reopen if it cannot read it. Try latest version 18c... i had corrected some logical errors in 18b.. might have been one of them. And it should reset focus when it looses it.. thats the whole point... download latest see if issues still exist.
« Last Edit: December 09, 2010, 03:07:29 PM by Endless Night »
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 Endless NightTopic starter

  • 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: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #55 on: December 09, 2010, 04:27:23 PM »
0
EUOX VERSION 19

-- Multi client aware... scan as many clients from the same script .. without having to reopen the bar on any of them after each first scan.

Test code
Quote
Repeat
  UOXL SWAP
  wait 10
  Call ScanBuffBar
  Display ok %BuffBarCalls : %BuffBarTime : %BuffBarScanMethod - BAR: %BuffbarDirection - Icons: %BuffBarIconsFound - %BuffBarIconNames $
     + Contwith focus: #contname
until #true = #false
Halt
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."

Scrripty

  • Guest
Re: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #56 on: December 09, 2010, 04:30:57 PM »
0
*bows* :)

Offline Endless NightTopic starter

  • 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: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #57 on: December 09, 2010, 05:15:58 PM »
0
EUOX VERSION 19B

- fix for minor typo with big effects.  The bar will now reinitialize if covered and uncovered.
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."

Scrripty

  • Guest
Re: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #58 on: December 10, 2010, 11:05:15 AM »
0
I've been running into occasional false positives when playing normally with the buff bar over the actual gameplay window.  Not sure if it would be fixed putting the bar in the black area.  Probly.  Just thought I'd mention it. :)  It seems to only happen once every 30 minutes to 2 hours.  So it's not even remotely close to annoying for the benefit. :) 

Offline Endless NightTopic starter

  • 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: ENs - Buff/Debuff Bar Subs. (oEUO & EUO)
« Reply #59 on: December 10, 2010, 01:15:02 PM »
0
I've been running into occasional false positives when playing normally with the buff bar over the actual gameplay window.  Not sure if it would be fixed putting the bar in the black area.  Probly.  Just thought I'd mention it. :)  It seems to only happen once every 30 minutes to 2 hours.  So it's not even remotely close to annoying for the benefit. :)  

Umm thats because i no longer know how many icons are on the bar, and will only happen whens scaning without refreshing the bar.  If it was over the black area that would definatly fix it.  Is it one Icon thats giving the false positives if so what icon/s

Interestingly .. i believe i could get rid of the false positives with the up/right bars.. but would require a bit of work... I could also probably get rid of the false positives by using mre pixels points to id the icon.

Try reducing the pixcel color range down from 1024- to say 520 that would also reduce the amout of false positives, below line must be set prior to the first scanbuffbar call in your script.

    set %BuffBarColorRange 520

 
« Last Edit: December 10, 2010, 01:20:55 PM by Endless Night »
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."

Tags: