ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Coragin on January 06, 2014, 02:13:02 AM

Title: What is wrong with this Enemy of One Sub and Curse Weapon?
Post by: Coragin on January 06, 2014, 02:13:02 AM
Enemy of One sub works for the first time, next time it goes to cast, it just casts over and over and over.

And curse weapon is not doing anything.  I know I got #hits wrong.

Thanks in advance ;)

Enemy Of One
Code: [Select]
set %scanbuffbar C:\EUO
gosub enemyofone

sub enemyofone
  Call ScanBuffBar
  if _EnemyOfOne_ in %BuffBarIconNames
     {
      Return
     }
  event macro 15 206
  wait 1s
Return

Curse Weapon
Code: [Select]
 if #hits < 80
     {
     gosub curseweapon
     }

sub curseweapon
  event macro 15 104
  wait 1s
Return
Title: Re: What is wrong with this Enemy of One Sub and Curse Weapon?
Post by: Alpha on January 06, 2014, 09:14:29 AM
Well..  you have the event macro's correct and they work for me....   It could be a Timing thing in that 1 Second isn't long enough Between beginning to cast EEO and the icon to update to the buff bar.    Hmm...   as far as curse weapon goes do you have a necro book in your backpack?   Just Tab through and see what's going on bc there isn't a lot of spots for those to break heh.
Title: Re: What is wrong with this Enemy of One Sub and Curse Weapon?
Post by: ximan on January 06, 2014, 11:10:16 AM
Yeah, I am thinking same things.   Are you using EN's scanner?  Wondering if you have the call for the bar scanner set up correctly and the bar is unobstructed for pixel scanning purposes.

set %scanbuffbar C:\EUO  ; placeholder for your example, or what you actually have?

Title: Re: What is wrong with this Enemy of One Sub and Curse Weapon?
Post by: ximan on January 07, 2014, 08:50:12 AM
also, regarding the curse weapon call condition, if the character's status bar is not open then #hits won't be valid. Pretty sure that will cause the whole expression to evaluate as #false, thus skipping over calling the curse weapon sub.

Title: Re: What is wrong with this Enemy of One Sub and Curse Weapon?
Post by: Coragin on January 08, 2014, 05:19:47 AM
Thanks guys, the entire issue was timing and the directory...

C:\EUO\
not
C:\EUO

Got it all worked out.  Now got another Im gonna post on... :)