Sign in to follow this  
Followers 0
DrLouie

Simple script Problem

3 posts in this topic

#1 ·  Posted (edited)

Well hi all i made a simple script for a fighting game which have to alot of combos and will make my arm tired after a while so i just have a little knowledge and wrote this to convert my keys

While 1
    HotKeySet("f","f")
    HotKeySet("r","r")
    hotkeyset("c","c")
    HotKeySet("v","v")
    hotkeyset("b","b")
    hotkeyset("t","t")
    HotKeySet("g","g")
    HotKeySet("{INSERT}","quit")
WEnd


Func f()
    send("{DOWN}")
    sleep(21)
    Send("{LEFT}")
    sleep(21)
    Send("e")
  
EndFunc

    Func r()
        send("{DOWN}")
        sleep(21)
        Send("{RIGHT}")
        sleep(21)
        Send("e")
    EndFunc
    

    Func g()
        Send("{DOWN}")
        sleep(20)
        Send("{LEFT}")
        sleep(20)
        Send("q")
        sleep(20)
        Send("w")
        
    EndFunc

    Func t()

        Send("{DOWN}")
        sleep(20)
        Send("{RIGHT}")
        sleep(20)
        Send("q")
        sleep(20)
        Send("w")
        
    EndFunc
    
        Func c()
        send("{DOWN}")
        sleep(15)
        send("{DOWN}")
        sleep(15)
        send("{UP}")

    EndFunc
    
        Func b()
        send("{DOWN}")
        sleep(19)
        Send("{left}")
        sleep(19)
        Send("q")
    EndFunc

    Func v()
        send("{DOWN}")
        sleep(19)
        Send("{right}")
        sleep(19)
        Send("q")
    EndFunc
    
    
    Func Quit()
        Exit
    EndFunc

But here is my problem when i use this it kind of lags a bit i think it's because when i hold R it keeps looping the R function (down forward E). so is there a way to let it active once when i press it? and not 1000 times when i hold it, and is there a way to make it a low-fi version cause i noticed when i Open the script my fps is around 22 and when i close it , its 40 (maximum) the game is www.streetfighteronline.com if anyone wanted to know

Many regards Louie

Edited by DrLouie

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

HotKeySet("f","f")
    HotKeySet("r","r")
    hotkeyset("c","c")
    HotKeySet("v","v")
    hotkeyset("b","b")
    hotkeyset("t","t")
    HotKeySet("g","g")
    HotKeySet("{INSERT}","quit")
While 1
sleep( 100 )
WEnd


Func f()
    send("{DOWN}")
    sleep(21)
    Send("{LEFT}")
    sleep(21)
    Send("e")
  
EndFunc

    Func r()
        send("{DOWN}")
        sleep(21)
        Send("{RIGHT}")
        sleep(21)
        Send("e")
    EndFunc
    

    Func g()
        Send("{DOWN}")
        sleep(20)
        Send("{LEFT}")
        sleep(20)
        Send("q")
        sleep(20)
        Send("w")
        
    EndFunc

    Func t()

        Send("{DOWN}")
        sleep(20)
        Send("{RIGHT}")
        sleep(20)
        Send("q")
        sleep(20)
        Send("w")
        
    EndFunc
    
        Func c()
        send("{DOWN}")
        sleep(15)
        send("{DOWN}")
        sleep(15)
        send("{UP}")

    EndFunc
    
        Func b()
        send("{DOWN}")
        sleep(19)
        Send("{left}")
        sleep(19)
        Send("q")
    EndFunc

    Func v()
        send("{DOWN}")
        sleep(19)
        Send("{right}")
        sleep(19)
        Send("q")
    EndFunc
    
    
    Func Quit()
        Exit
    EndFunc

Edited by ReaImDown

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites

Right, the most important thing to note there is not to run HotKeySet in a loop, and also include a sleep, even if only for about 10 milliseconds.

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  
Followers 0