;========================================================================================
; Script Name: ENs BuffBarScanner
; Author: JosephAJ, AKA Endless Night AKA EN
; Version: V38
; Client Tested with: ...
; EUO version tested with: 1.5 (TV...)
; Revision Date: 10/11
; Public Release: 10-06, 09,10-08, 07,9-09, 9,11,12-10, 3,4,8/9/10-11
; Purpose: Scan and Manipulate The Buff/Debuff Bar (No Retrictions)
;========================================================================================
; (C) 2006-2010 All Rights Reserved JosephAJ
; See end of script for License/Disclaimers
;========================================================================================
Set %ENbb372 #LPC
Set #LPC  20000 
set %BuffBarCalls %BuffBarCalls + 1
namespace push
namespace local ENs_BuffBarSubs . #charid
set !ENbb180
for !ENbb234 !ENbb138 !ENbb195
{
savePix !ENbb240 . !ENbb234  !ENbb243 . !ENbb234 %ENbb339
set !ENbb180 !ENbb180 , _ , #pixcol
}
SavePix !ENbb102 !ENbb108 %ENbb339
if %0 > 0 || !ENbb153 <> #true || ( #pixcol <> !ENbb87 && %BuffBariconsFound = 0 ) || !ENbb180 <> !ENbb183 || ( #systime - !ENbb141 > 500 && !ENbb144 )
gosub ENbb66 %0 %1 %2 %3
set !ENbb141 #systime
namespace pop
Set #LPC %ENbb372
exit
sub ENbb66
if %1 > 0  || !ENbb153 <> #true || #pixcol <> !ENbb87
goSub ENbb60  %1 %2 %3 %4
if ( #systime - !ENbb141 > 500 && !ENbb144 = #true ) 8
set !ENbb186
for !ENbb234 1 !ENbb195
{
savePix !ENbb240 . !ENbb234 !ENbb243 . !ENbb234 %ENbb339
set !ENbb186 !ENbb186 , _ , #pixcol 
}
if !ENbb186 = !ENbb189
return
set %BuffBarIconsFound 0
set %BuffBarIconNames _
set %BuffbarDirection !ENbb135
set !ENbb132 !ENbb132 + 1
set !ENbb93 0
set !ENbb147 !ENbb129
set !ENbb195 0
set !ENbb189
repeat
set !ENbb195 !ENbb195 + 1
if !ENbb195 = 3
set !ENbb147  1
Set !ENbb240 . !ENbb195 !ENbb3781 + ( %ENbb345 . !ENbb135 * !ENbb195 ) - %ENbb345 . !ENbb135
set !ENbb243 . !ENbb195 !ENbb3811 + ( %ENbb348 . !ENbb135 * !ENbb195 ) - %ENbb348 . !ENbb135
savePix !ENbb240 . !ENbb195 !ENbb243 . !ENbb195 %ENbb339
set !ENbb189 !ENbb189 , _ , #pixcol
if #Pixcol <> !ENbb207 . !ENbb195
gosub ENbb75
set !ENbb93 !ENbb93 + !ENbb177 . !ENbb195
set %BuffBarIconNames    %BuffBarIconNames , !ENbb156 . !ENbb195
until !ENbb93 >= !ENbb147 || #CliLogged = 0
set %BuffBarIconsFound !ENbb195 - !ENbb93
set !ENbb138 1
if !ENbb195 > 4 || ( !ENbb195 > 1 && !ENbb129 = 1 )
set !ENbb138  !ENbb195 - 1
set !ENbb144 %BuffbarIconsFound > 3
set !ENbb183
for !ENbb234 !ENbb138 !ENbb195
{
savePix !ENbb240 . !ENbb234  !ENbb243 . !ENbb234 %ENbb339
set !ENbb183 !ENbb183 , _ , #pixcol
}
return
Sub ENbb57
if %BuffBarDirection in UP_LEFT 7
set !ENbb252 %BuffBarIconsFound
if  !ENbb252 < 3
set !ENbb252 3
set !ENbb159 ( !ENbb252 * %ENbb348 . !ENbb135 ) + %ENbb345 . !ENbb135
set !ENbb162 ( !ENbb252 * %ENbb348 . !ENbb135 ) + %ENbb348 . !ENbb135
set !ENbb102 %ENbb363 . !ENbb135 + !ENbb201 + ( %ENbb390 . !ENbb135 * ( !ENbb159 - !ENbb90 ) ) - 3
set !ENbb108 %ENbb366 . !ENbb135 + !ENbb204 + ( %ENbb387 . !ENbb135 * ( !ENbb162 - !ENbb90 ) ) - 3
SavePix !ENbb102 !ENbb108 %ENbb339
set !ENbb153 #pixcol <> !ENbb87
return
sub ENbb75
set !ENbb177 . !ENbb195 1
set !ENbb207 . !ENbb195 #Pixcol
set !ENbb156 . !ENbb195
if #pixcol = 0 || #CliLogged = 0
return
Set !ENbb246 !ENbb3782 + ( %ENbb345 . !ENbb135 * !ENbb195 ) - %ENbb345 . !ENbb135
set !ENbb249 !ENbb3812 + ( %ENbb348 . !ENbb135 * !ENbb195 ) - %ENbb348 . !ENbb135
savePix !ENbb246 !ENbb249 %ENbb339
set !ENbb252  !ENbb207 . !ENbb195 , _ , #pixcol
if %ENbb375 . !ENbb252  <> N/A 3
set !ENbb156 . !ENbb195   %ENbb375 . !ENbb252
set !ENbb177   . !ENbb195 0
return
set !ENbb219 0
Repeat
set !ENbb219 !ENbb219 + 1
IF !ENbb150 . !ENbb219 <> #True 3
if !ENbb207 . !ENbb195 >= %ENbb297 . !ENbb219 && !ENbb207 . !ENbb195 <= %ENbb291 . !ENbb219 2
if #Pixcol >= %ENbb300 . !ENbb219 && #Pixcol <= %ENbb294 . !ENbb219 1
set !ENbb177   . !ENbb195 0
Until !ENbb177 . !ENbb195 = 0 || !ENbb219 >= %ENbb321 || %ENbb258 = 0
if !ENbb177 . !ENbb195 = 0
{
set !ENbb150 . !ENbb219 #true
set %ENbb258 %ENbb258 - 1
set  %ENbb375 . !ENbb252  %ENbb327 . !ENbb219  ,  _   
set !ENbb156 . !ENbb195 %ENbb327 . !ENbb219  ,  _
}
return
sub ENbb54 
If %1 >= 2 && %2 <> !ENbb201 && %3 <> !ENbb204 4
set !ENbb153 #false
set %ENbb312 #true
set %ENbb315 %2
set %ENbb318 %3
If %1 = 3 && %4 <> !ENbb135  2
set !ENbb153 #false
Set %ENbb261 %4
If %1 = 1 && %2 <> !ENbb135 2
set !ENbb153 #false
Set %ENbb261 %2
return
Sub ENbb60
if %1 > 0
gosub ENbb54
If %ENbb384 = N/A
Gosub ENbb51
if !ENbb132 = N/A
set !ENbb132 1
set !ENbb153 #False
if #Clilogged = 0
return
set %ENbb408 5
if !ENbb120 = #true 2
event macro 57
gosub ENbb81 20
While #Contname <> BuffIcons_Gump && #Clilogged <> 0 && %ENbb408 > 0
{
set %ENbb408 %ENbb408 - 1
event macro 57
set !ENbb252 #systime + 15
repeat
until  #Systime > !ENbb252 || #Contname = BuffIcons_Gump
if #contname = Bufficons_gump 2
repeat
until  #Systime > !ENbb252 + 15 
}
if #Contname <> BuffIcons_Gump || #Clilogged = 0
return
set !ENbb90 31     
If #Contsize = 120_60 || #Contsize = 60_120
Set !ENbb90 11
set !ENbb201 #Contposx
set !ENbb204 #Contposy
set !ENbb171 #contsize
str pos !ENbb171 _
Set !ENbb225 #strres - 1
Str Len !ENbb171
set !ENbb222 #strres - !ENbb225 - 1
Str Left !ENbb171 !ENbb225
set !ENbb159 #StrRes
Str Right !ENbb171 !ENbb222
set !ENbb162 #StrRes
set !ENbb96 !ENbb135
set !ENbb135 RIGHT
If !ENbb159 <= !ENbb162
set !ENbb135 DOWN
set %ENbb408 2
Repeat
set %ENbb408 %ENbb408 - 1
set !ENbb102 %ENbb363 . !ENbb135 + !ENbb201 + ( %ENbb390 . !ENbb135 * ( !ENbb159 - !ENbb90 ) ) - 3
set !ENbb105 !ENbb102 + 6
set !ENbb108 %ENbb366 . !ENbb135 + !ENbb204 + ( %ENbb387 . !ENbb135 * ( !ENbb162 - !ENbb90 ) ) - 3
set !ENbb111 !ENbb108 + 6
savePix  !ENbb102 !ENbb108 %ENbb339
set !ENbb87 #pixcol
savePix  !ENbb105 !ENbb111 %ENbb339
set !ENbb153 !ENbb87 >= %ENbb273 . !ENbb135 && !ENbb87 <= %ENbb267 . !ENbb135 && #pixcol >= %ENbb276 . !ENbb135 && #pixcol <= %ENbb270 . !ENbb135
If !ENbb153 = #False && !ENbb135 = DOWN
set !ENbb153  ( !ENbb87 >= %ENbb288 && !ENbb87 <= %ENbb285 && #pixcol >= %ENbb276 . !ENbb135 && #pixcol <= %ENbb270 . !ENbb135 )
If !ENbb153 = #False
set !ENbb135 %ENbb264 . !ENbb135
until !ENbb153 || %ENbb408 < 1 || #Clilogged = 0
set !ENbb120 ! !ENbb153
if !ENbb153 = #false
return
if !ENbb135 <> %ENbb261 && %ENbb261 <> N/A && !ENbb153 = #true
gosub ENbb63
if %ENbb312 && %ENbb315 <> #ContposX && %ENbb318 <> #ContposY 4
contpos %ENbb315 %ENbb318
gosub ENbb81 40
set !ENbb201 #Contposx
set !ENbb204 #Contposy
set %BuffBarDirection !ENbb135
Set !ENbb3781 %ENbb378 . !ENbb135  + !ENbb201 + %ENbb351 - 1
set !ENbb3811 %ENbb381 . !ENbb135  + !ENbb204 + %ENbb357 - 1
Set !ENbb3782 %ENbb378 . !ENbb135  + !ENbb201 + %ENbb354 - 1
set !ENbb3812 %ENbb381 . !ENbb135  + !ENbb204 + %ENbb360 - 1
set %ENbb261 N/A
set %ENbb312 #false
set !ENbb129 1
if  !ENbb135 in _LEFT_UP_
set !ENbb129 3
Return
sub ENbb63
set !ENbb192 3
set !ENbb174 !ENbb171
Repeat
Set !ENbb192 !ENbb192 - 1
set !ENbb126         %ENbb363 . !ENbb135 + !ENbb201 + ( %ENbb390 . !ENbb135 * ( !ENbb159 - !ENbb90 ) )
set !ENbb123         %ENbb366 . !ENbb135 + !ENbb204 + ( %ENbb387 . !ENbb135 * ( !ENbb162 - !ENbb90 ) )
click !ENbb126 !ENbb123 f
gosub ENbb81 40 
IF #Contsize <> !ENbb174 && #Contname = BuffIcons_Gump
{
set !ENbb192 0
Set !ENbb135  %ENbb255 . !ENbb135
set !ENbb174 #Contsize
gosub ENbb81 40 
}
Until !ENbb192 <= 0  || #Clilogged = 0
set !ENbb201 #Contposx
set !ENbb204 #Contposy
set !ENbb102 %ENbb363 . !ENbb135 + !ENbb201 + ( %ENbb390 . !ENbb135 * ( !ENbb159 - !ENbb90 ) ) - 3
set !ENbb105 !ENbb102 + 6
set !ENbb108 %ENbb366 . !ENbb135 + !ENbb204 + ( %ENbb387 . !ENbb135 * ( !ENbb162 - !ENbb90 ) ) - 3
set !ENbb111 !ENbb108 + 6
savePix  !ENbb102 !ENbb108 %ENbb339
set !ENbb87 #pixcol
return
Sub ENbb78 
if %ENbb321 = N/A
set %ENbb321 0
set %ENbb321  %ENbb321 + 1
set %ENbb333     . %ENbb321 %3
set %ENbb297  . %ENbb321 %3 - %ENbb282
set %ENbb291 . %ENbb321 %3 + %ENbb282
set %ENbb336     . %ENbb321 %4
set %ENbb300  . %ENbb321 %4 - %ENbb282
set %ENbb294 . %ENbb321 %4 + %ENbb282
set %ENbb342      . %ENbb321 %3  , ~ , %4
set %ENbb324     . %ENbb321 %1
set %ENbb327     . %ENbb321 %2
set %ENbb330     . %ENbb321 #False
return
sub ENbb48
set %ENbb279    . %1 %1
set %ENbb264   . %1 %2
set %ENbb363            . %1 %3
set %ENbb366            . %1 %4
set %ENbb378              . %1 %5
set %ENbb381              . %1 %6
set %ENbb345           . %1 %7
set %ENbb348           . %1 %8
set %ENbb390               . %1 %9
set %ENbb387               . %1 %10
set %ENbb255 . %1 %11
set %ENbb303       . %1 %12
set %ENbb306       . %1 %13
set %ENbb273    . %1 %12 - %ENbb282
set %ENbb267   . %1 %12 + %ENbb282
set %ENbb276    . %1 %13 - %ENbb282
set %ENbb270   . %1 %13 + %ENbb282
return
Sub ENbb51
set !ENbb129 1
IF %BuffBarColorRange = N/A
set %BuffBarColorRange 1024
if %BuffBarPixelScanMemoryLocation = N/A
set %BuffBarPixelScanMemoryLocation 916
set %BuffBarCalls 1
set %ENbb384 1234
set %ENbb282  %BuffBarColorRange
gosub ENbb48 RIGHT LEFT  10 47 20  7  31   0 0 0 LEFT  16777215 15707532
gosub ENbb48 LEFT  RIGHT  0 47 10  7  31   0 1 0 UP    16250871 15172674
gosub ENbb48 UP    DOWN  47  0  7 10   0  31 0 1 DOWN  15722429 15705434
gosub ENbb48 DOWN  UP    10 10 25 25   0  31 0 0 RIGHT 8680258 8088410 
set %ENbb288   9208922 - %ENbb282     
set %ENbb285  9208922 + %ENbb282
Set %ENbb351 7    
set %ENbb357 5
Set %ENbb354 24
set %ENbb360 19
gosub ENbb78 MageIcon_Lvl2 Protection 7069266 7071562
gosub ENbb78 MageIcon_Lvl5 MagicReflection 2748217 1632041
gosub ENbb78 MageIcon_Lvl1 ReactiveArmour 12445638 9217420
gosub ENbb78 MageIcon_Lvl1 NightSight 13553374 3270424
gosub ENbb78 MageIcon_Lvl5 Incognito 16751632 5392986
gosub ENbb78 MageIcon_Lvl1 Clumsy 528400 2179641
gosub ENbb78 MageIcon_Lvl1 Feeblemind 1052911 9747918
gosub ENbb78 MageIcon_Lvl1 Weaken 1052853 3750366
gosub ENbb78 MageIcon_Lvl2 Agility 8710011 10270133
gosub ENbb78 MageIcon_Lvl2 Cunning 7065187 2056
gosub ENbb78 MageIcon_Lvl2 Strength 4337977 7574693
gosub ENbb78 MageIcon_Lvl2 Bless 7065096 6540841
gosub ENbb78 MageIcon_Lvl3 Poison 526534 1052903
gosub ENbb78 MageIcon_Lvl4 Curse 1052911 1579255
gosub ENbb78 MageIcon_Lvl5 Paralyze 10855935 4868855
gosub ENbb78 MageIcon_Lvl6 Invisibility 3792441 3792441
gosub ENbb78 MageIcon_Lvl7 Polymorph 10853532 7048365
gosub ENbb78 Misc Hidden/Stealthing 16764597 2703946
gosub ENbb78 Misc Healing 1088520 9229956
gosub ENbb78 Misc Meditation 15157793 16777215
gosub ENbb78 SpeacilMoves BleedAttack 1579230 526575
gosub ENbb78 SpeacilMoves TalonStrike 526468 526468
gosub ENbb78 SpeacilMoves MortalStrike 9211111 1052886
gosub ENbb78 SpeacilMoves HitLowerAttack 1579032 11908533
gosub ENbb78 SpeacilMoves HitLowerDefense 4344394 526476
gosub ENbb78 SpeacilMoves Block 558088 558088
gosub ENbb78 SpeacilMoves Feint 560144 2188114
gosub ENbb78 SpeacilMoves DefenseMastery 1608728 1092880
gosub ENbb78 SpeacilMoves PsychicAttack 528606 8101037
gosub ENbb78 SpeacilMoves Disarm  8092663 1052919
gosub ENbb78 SpeacilMoves DualWield 562184 1052696
gosub ENbb78 SpeacilMoves ForceArrow 2693252 5388676
gosub ENbb78 SpeacilMoves Dismount 4342511 1579255
gosub ENbb78 SpellWeaving GiftOfRenewal 1625616 2741784
gosub ENbb78 SpellWeaving Attunement 13035387 5929868
gosub ENbb78 SpellWeaving GiftOfLife 16777215 15204327
gosub ENbb78 SpellWeaving ArcaneEmpowerment_AcceleratedSkillGain 3257600 2724897
gosub ENbb78 SpellWeaving Thunderstorm 11388630 13555406
gosub ENbb78 SpellWeaving EssenseOfWind 9211135 10274526
gosub ENbb78 SpellWeaving EtherealVoyage 10870346 7578962
gosub ENbb78 Gargoyle Flying 11902100 5395026
gosub ENbb78 Gargoyle Berserk 8107470 5963602
gosub ENbb78 Chivalry DivineFury 5950984 5951009
gosub ENbb78 Chivalry EnemyOfOne 9217445 1096960
gosub ENbb78 Chivalry ConsecrateWeapon 558088 560144
gosub ENbb78 Ninjitsu AnimalForm 13546999 8
gosub ENbb78 Mysticism Sleep 1050747 2173217
gosub ENbb78 Mysticism StoneForm 10272206 1579041
gosub ENbb78 Mysticism SpellPlague 13035503 5407900
gosub ENbb78 Necromancy CorpseSkin 1059327 1579263
gosub ENbb78 Necromancy EvilOmen 2171375 11908607
gosub ENbb78 Necromancy MindRot 7046267 16775143
gosub ENbb78 Necromancy PainSpike 1052870 7566319
gosub ENbb78 Necromancy Strangle 12434943 11392743
gosub ENbb78 Necromancy CasterBloodOath 2741776 2217472
gosub ENbb78 Necromancy CurseBloodOath 2171342 1579230
gosub ENbb78 Bard_Peacemaking Resilience 8103291 9234316
gosub ENbb78 Bard_Peacemaking Preservance 12447677 11885138
gosub ENbb78 Bard_Provocation Inspire 2177346 3259681
gosub ENbb78 Bard_Provocation Invigorate 8714116 11919029
gosub ENbb78 Bard_Discordance Tribulation 1052820 1052820
gosub ENbb78 Bard_Discordance Despair 3223890 1052837
gosub ENbb78 Bard_Discordance DespairCaster 14056291 9189656
gosub ENbb78 Bard_Discordance TribulationCaster 2056 528400
gosub ENbb78 Item FishPie 50754 3754586
gosub ENbb78 Item SpellFocusing 50721 52777
gosub ENbb78 Item FocusingWeapons 6276 12799
gosub ENbb78 Item ProtectiveWard 14589035 14060626     
set %ENbb339        %BuffBarPixelScanMemoryLocation
set %ENbb258 %ENbb321
set %ENbb369  |
set %ENbb393 0
return
;========================================================================================
; Disclaimer:  By downloading, copying, running or otherwise using this script, you
; accept the contents of this limited personal use licence agreement. This limited
; personal use license agreement can be changed at any time for any reason; without any
; notice.
; This script is only authorized to be distributed on www.Scriptuo.com and/or
; www.EasyUo.com . If you purchase this script, or acquire it from any other source, it
; is not considered an authorized copy and should be deleted immediately. Endless Night
; AKA JosephAJ(Author) provides no warranty for use, function, or safe interaction with
; any software or hardware. User downloads and runs this script at his-her own risk.
; User shall hold Author and the distribution sites www.scriptuo.com and or
; www.easyuo.com harmless for any loss of items, accounts, money, virtual currency or
; items associated with the use of this script. User shall hold the author harmless for
; any consequences that may result from the use of this script as intended. Furthermore,
; you promise not to distribute or sell this script to anyone without the express
; written permission of the author, Endless Night AKA JosephAJ. You further promise NOT
; to modify and repost, post on other websites, post as part of a script or work you
; yourself have created, email or transfer to another person by any method, or
; otherwise distribute without written permision from the author. This Applies to the
; script as a whole and any given part of the script.
;
; Commercial usage of any kind requires written permission from the author.
;
; Violation of this agreement will result in one or more of the following: litigation,
; www.scriptuo.com account termination, bad karma for your next life, and most
; definitely causing a black mark placed on your soul.
;
; This Script will never become by any definition of the words "Abandon ware",
; this script will always remain the property of the author unless rights are
; transfered by auther in writing (not email Writing).
;
; I worked very hard to bring this script to you, so please use it responisibily and
; respectfully.  If you have any questions, please reach me at Joseph@Technobods.com
;
; (c) 2007-2010 JosephAJ, All Rights Reserved
; Please respect my property rights.. :)
;========================================================================================
; If in doubt dont do it contact the author.
;========================================================================================
; NOTE: My scripts or any derivative of them are *not* for use in other players script!
;========================================================================================