Jump to content
Sign in to follow this  
Dragon10660

Maybe Someone can help me

Recommended Posts

Dragon10660

This is my Script For a game useing scrolls for diff things not buffs just scrolls

Global $Paused
Global $Start1
Global $Start2
Global $Start3

HotKeySet("{f5}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F1}", "DodgeStart")
HotKeySet("{F2}", "DrugStart")
HotKeySet("{F3}", "ExpStart")

While 1
        ToolTip('F5=Pause ESC=Exit F1=Dodge F2=Drug F3=Sp"',0,0)
WEnd       


Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc


Func Terminate()
    Exit 0
EndFunc


Func DodgeStart()
    $Start1 = NOT $Start1
    While $Start1
        WinActivate("SRO_Client")
        ToolTip('Dodge Started"',0,0)
            Send("{F4}")
            Sleep("1500")
            Send("7")
            Sleep(365000)       
    WEnd
            ToolTip("")
EndFunc 
        
            
Func DrugStart()
    $Start2 = NOT $Start2
    While $Start2
        WinActivate("SRO_Client")
        ToolTip('Drug Started"',0,0)
           Send("{F4}")
            Sleep("1500")
            Send("8")
            Sleep(185000)       
    WEnd
            ToolTip("")
EndFunc         
    
    Func ExpStart()
    $Start3 = NOT $Start3
    While $Start3
        WinActivate("SRO_Client")
        ToolTip('Sp Started"',0,0)
           Send("{F4}")
            Sleep("1500")
            Send("9")
            Sleep(125000)       
    WEnd
            ToolTip("")
EndFunc

I need To make it so that if i start lets say Func ExpStart() And i activate it and it does the scroll for that then

i want it to do the Func DodgeStart() and i activate than then it cancels out the Func ExpStart()

can someone help me fix this

I saw this

$Time_1 = TimerInit()
$Time_2 = TimerInit()

While 1
    If TimerDiff($Time_1) > 15000 Then
       Send("8")
        $Time_1 = TimerInit()
    EndIf
   
    If TimerDiff($Time_2) > 8000 Then
        Send("9")
        $Time_2 = TimerInit()
    EndIf
   
    Sleep(20)
WEnd

But How or can someone help me convert ?

Or Any Other Ideas

Pls And ty

Share this post


Link to post
Share on other sites
andybiochem

If I understand you correctly, you want to be able to do more than one action at a time?

i.e. if you press F1 and then F2 you want both "dodge" and "drug" actions to happen?

if so, this may help get you started:

Global $Paused = False
Global $Dodge = False
Global $Drug = False
Global $Exp = False

HotKeySet("{F5}", "_Switch");"TogglePause"
HotKeySet("{F1}", "_Switch");"DodgeStart"
HotKeySet("{F2}", "_Switch");"DrugStart"
HotKeySet("{F3}", "_Switch");"ExpStart"

HotKeySet("{ESC}", "Terminate");"Terminate" / Exit

ToolTip('F5=Pause ESC=Exit F1=Dodge F2=Drug F3=Sp"', 0, 0)

While 1
    
    Sleep(100);Always put a Sleep in your main loop, otherwise the CPU is stressed

    _PerformActions()

WEnd

Func _Switch()
    
;----- Toggle actions -----
    Switch @HotKeyPressed;which hotkey was pressed?...
        Case "{F5}";toggle pause
            $Paused = Not $Paused
        Case "{F1}";toggle Dodge
            $Dodge = Not $Dodge
        Case "{F2}";toggle Drug
            $Drug = Not $Drug
        Case "{F3}";toggle Exp
            $Exp = Not $Exp
    EndSwitch

EndFunc  ;==>_Switch


Func _PerformActions()

;----- Check Paused -----
    If $Paused = True Then
        ToolTip('Script is "Paused"', 0, 0)
        Return
    EndIf

;----- Check Dodge -----
    If $Dodge = True Then
        WinActivate("SRO_Client")
        ToolTip('Dodge Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("7")
        Sleep(365000)
    EndIf

;----- Check Drug -----
    If $Drug = True Then
        WinActivate("SRO_Client")
        ToolTip('Drug Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("8")
        Sleep(185000)
    EndIf

;----- Check Exp -----
    If $Exp = True Then
        WinActivate("SRO_Client")
        ToolTip('Sp Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("9")
        Sleep(125000)
    EndIf
    
EndFunc  ;==>_PerformActions


Func Terminate()
    Exit 0
EndFunc  ;==>Terminate

Not properly tested.


- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

Share this post


Link to post
Share on other sites
Dragon10660

Wow Ok I Think i Get What U Mean TY So Much

But Will It Keep The Sleep Of both or even the three ?

btw when i press dodge it says dodge started

but when i do to try to press f2 for drug it wont cast ?

And cant pause once one is pressed

Or remove Paused when it was pressed

got any ideas?

Edited by Dragon10660

Share this post


Link to post
Share on other sites
andybiochem

I think it's because of the crazy long sleeps at the end of your actions:

;----- Check Dodge -----
    If $Dodge = True Then
        WinActivate("SRO_Client")
        ToolTip('Dodge Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("7")
        Sleep(365000);<========LONG sleep!
    EndIf

I copied them directly from your code because I thought they were essential ?

Here, if you press Dodge then the action will occur and sleep for 6mins!

Try removing the long sleeps at the end of each action.

Edited by andybiochem

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

Share this post


Link to post
Share on other sites
Dragon10660

but thats how long the scroll lasts

dodge last 1hr

and

Drug lasts 30mins

and exp last 20mins

can we make it run on a sort of timer that keeps track of both or the three of them ?>

Edited by Dragon10660

Share this post


Link to post
Share on other sites
andybiochem

Ahhhh, ok.

So you only want the actions to be called every so often?

Note that:

1hr = 3600000ms

30mins = 1800000ms

20mins = 1200000ms

Global $Paused = False
Global $Dodge = False
Global $Drug = False
Global $Exp = False

Global $DodgeTimer, $DrugTimer, $ExpTimer

HotKeySet("{F5}", "_Switch");"TogglePause"
HotKeySet("{F1}", "_Switch");"DodgeStart"
HotKeySet("{F2}", "_Switch");"DrugStart"
HotKeySet("{F3}", "_Switch");"ExpStart"

HotKeySet("{ESC}", "Terminate");"Terminate" / Exit

ToolTip('F5=Pause ESC=Exit F1=Dodge F2=Drug F3=Sp"', 0, 0)

While 1
    
    Sleep(100);Always put a Sleep in your main loop, otherwise the CPU is stressed

    _PerformActions()

WEnd

Func _Switch()
    
;----- Toggle actions -----
    Switch @HotKeyPressed;which hotkey was pressed?...
        Case "{F5}";toggle pause
            $Paused = Not $Paused
        Case "{F1}";toggle Dodge
            $Dodge = Not $Dodge
        Case "{F2}";toggle Drug
            $Drug = Not $Drug
        Case "{F3}";toggle Exp
            $Exp = Not $Exp
    EndSwitch

EndFunc;==>_Switch


Func _PerformActions()

;----- Check Paused -----
    If $Paused = True Then
        ToolTip('Script is "Paused"', 0, 0)
        Return
    EndIf

;----- Check Dodge -----
    If $Dodge = True And TimerDiff($DodgeTimer) > 3600000 Then
        $DodgeTimer = TimerInit()
        WinActivate("SRO_Client")
        ToolTip('Dodge Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("7")
    EndIf

;----- Check Drug -----
    If $Drug = True And TimerDiff($DrugTimer) > 1800000 Then
        $DrugTimer = TimerInit()
        WinActivate("SRO_Client")
        ToolTip('Drug Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("8")
    EndIf

;----- Check Exp -----
    If $Exp = True And TimerDiff($ExpTimer) > 1200000 Then
        $ExpTimer = TimerInit()
        WinActivate("SRO_Client")
        ToolTip('Sp Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("9")
    EndIf
    
EndFunc;==>_PerformActions


Func Terminate()
    Exit 0
EndFunc;==>Terminate

...again, untested.

[EDIT] oops left the long loops in, now removed.

Edited by andybiochem

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

Share this post


Link to post
Share on other sites
Dragon10660

testing now BTW Working Greate thnx

i got one question can i make it so that i can see a timer like on a tooltip beside like say i start dodging then drug

can i see the both timer just put the tooltip at diff places or no?

Edited by Dragon10660

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.