Author Topic: What to add to prevent the script from toggling off ability too soon.  (Read 2569 times)

0 Members and 1 Guest are viewing this topic.

Offline vanzelusTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Activity:
    0%
  • Reputation Power: 1
  • vanzelus has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Hi,

I currently have this in my attack sub,

Code: [Select]
If #mana >= 45 && %cast_wait_timer <= #scnt2
{
  Event Macro 36 0 ; secondary weapon ability
  Set %cast_wait_timer #scnt2 + 20
}

My question is, what do I need to input besides that code so that when my sampire misses, the ability is still on until it hits the mob?  Currently, it toggles on, if he hits then everything's fine but if he misses, then it'll toggle off, and then back on in a few seconds.  It's not really a problem, just more or less I want it to be as efficient as possible.  Am currently learning how to script properly so any inputs will be of great help.  Thanks.
« Last Edit: January 05, 2014, 09:55:57 AM by vanzelus »

Offline Alpha

  • Hero Member
  • *
  • Posts: 583
  • Activity:
    0%
  • Reputation Power: 10
  • Alpha barely matters.Alpha barely matters.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: What to add to prevent the script from toggling off ability too soon.
« Reply #1 on: January 05, 2014, 10:42:18 AM »
0
You need to use the Savepix Command to check the COLOR of your icon which also means you will need to know the Exact location of the icon...

http://wiki.easyuo.com/index.php?title=SavePix

Offline vanzelusTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Activity:
    0%
  • Reputation Power: 1
  • vanzelus has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: What to add to prevent the script from toggling off ability too soon.
« Reply #2 on: January 05, 2014, 12:02:30 PM »
0
if that's the only way to do it, then that means I'd have to write a "gosub setpix" and implement the pixel scanning?

Offline dxrom

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: What to add to prevent the script from toggling off ability too soon.
« Reply #3 on: January 05, 2014, 12:18:09 PM »
0
In startup you can automate the process (Unlike how I have it in LAME) via knowing where the icons are (EUO has a screen coords thing for where your cursor is) just mouse over, write the coords down and do something like:

Code: [Select]
sub setpixel-secondary
    event macro 36 0 //toggles it on
    wait 2
    savePix 900 300 3 //saves the color @ 900,300 to variable 3
    event macro 36 0 //toggles off
return

Or you can do it the way I did it in LAME:
Code: [Select]
sub setpixel-secondary
    event macro 36 0
    display ok move the mouse to the BOTTOM LEFT CORNER of the secondary Weapon Move button. you have 2 seconds
    wait 2s
    savePix #CURSORX #CURSORY 3
    wait 5
    event macro 36 0
return

And taking it one more level you can research how to save a configuration thus allowing you to not have to re-setup the colors everytime you load your script. Personally I opted out for that as I've never had any success with my own or even other people's scripts and saving settings.

Then it's as simple as a sub like this to execute secondary ability.

Code: [Select]
sub execSec
    cmppix 3 f
       {
       event macro 36 0 ;Use Seconday
       wait 5
       }
return
« Last Edit: January 05, 2014, 12:21:00 PM by dxrom »



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline vanzelusTopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Activity:
    0%
  • Reputation Power: 1
  • vanzelus has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: What to add to prevent the script from toggling off ability too soon.
« Reply #4 on: January 05, 2014, 12:31:22 PM »
0
Wow, awesome; yea i'd want to have the config saved so i won't need to input the pixel color every time running the script.  Thanks for showing me the options available.  Didn't think of pixel scanning as a method, learn something every time I try to implement new stuffs :)

Tags: