Sign in to follow this  
Followers 0
Backnor

Need to know

6 posts in this topic

#1 ·  Posted (edited)

Hey guys I am setting up a little bot and was wondering what will work better I am at work and I do not have the game in front of me so....

Would it be better to use

Func Fight()
    $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
    If @error Then
        skill4()
        $nbg = PixelGetColor($bg_x, $gg_y) <> $bg_Color
        If @error Then
            skill5()
            $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
            If @error Then
                skill6()
                $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                If @error Then
                    skill7()
                    $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                    If @error Then
                        skill8()
                        $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                        If @error Then
                            skill9()
                            $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                            If @error Then
                                skill0()
                            EndIf
                        EndIf
                    EndIf
                EndIf
            EndIf
        EndIf
    EndIf
        $nbg = Not $nbg
    While $nbg
        Sleep(100)
        ToolTip('No Bad Guy To Pull', 100, 100)
    WEnd
    ToolTip("")
EndFunc ;==>Pause

Or

Func skill4()
    $SKL4 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{4}")
        Sleep($b)
        Send("{3}")
        Sleep($b)
        Send("{1}")
    EndIf
EndFunc ;==>skill4

Func skill5()
    $SKL5 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{5}")
        Sleep($b)
        Send("{3}")
        Sleep($b)
        Send("{1}")
    EndIf
EndFunc ;==>skill5

Func skill6()
    $SKL6 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{6}")
        Sleep($b)
        Send("{1}")
        Sleep($b)
        Send("{2}")
    EndIf
EndFunc ;==>skill6

Func skill7()
    $SKL7 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{7}")
        Sleep($b)
        Send("{2}")
    EndIf
EndFunc ;==>skill7

Func skill8()
    $SKL8 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{8}")
        Sleep($b)
        Send("{2}")
    EndIf
EndFunc ;==>skill8

Func skill9()
    $SKL9 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{9}")
        Sleep($b)
        Send("{3}")
    EndIf
EndFunc ;==>skill9

Func skill0()
    $SKL0 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{0}")
        Sleep($b)
        Send("{1}")
        Sleep($b)
        Send("{3}")
    EndIf
EndFunc ;==>skill0

Func Pause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('TestMacro is currently paused.', 100, 100)
    WEnd
    ToolTip("")
EndFunc ;==>Pause

now when useing the first example I will remove the first and second line, just leaving the function that will hit keys

Hope to get an answer on this one, Thanks in advance

Edited by Backnor

Share this post


Link to post
Share on other sites



Hey guys I am setting up a little bot and was wondering what will work better I am at work and I do not have the game in front of me so....

Would it be better to use

Func Fight()
    $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
    If @error Then
        skill4()
        $nbg = PixelGetColor($bg_x, $gg_y) <> $bg_Color
        If @error Then
            skill5()
            $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
            If @error Then
                skill6()
                $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                If @error Then
                    skill7()
                    $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                    If @error Then
                        skill8()
                        $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                        If @error Then
                            skill9()
                            $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                            If @error Then
                                skill0()
                            EndIf
                        EndIf
                    EndIf
                EndIf
            EndIf
        EndIf
    EndIf
        $nbg = Not $nbg
    While $nbg
        Sleep(100)
        ToolTip('No Bad Guy To Pull', 100, 100)
    WEnd
    ToolTip("")
EndFunc;==>Pause

Or

Func skill4()
    $SKL4 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{4}")
        Sleep($b)
        Send("{3}")
        Sleep($b)
        Send("{1}")
    EndIf
EndFunc;==>skill4

Func skill5()
    $SKL5 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{5}")
        Sleep($b)
        Send("{3}")
        Sleep($b)
        Send("{1}")
    EndIf
EndFunc;==>skill5

Func skill6()
    $SKL6 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{6}")
        Sleep($b)
        Send("{1}")
        Sleep($b)
        Send("{2}")
    EndIf
EndFunc;==>skill6

Func skill7()
    $SKL7 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{7}")
        Sleep($b)
        Send("{2}")
    EndIf
EndFunc;==>skill7

Func skill8()
    $SKL8 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{8}")
        Sleep($b)
        Send("{2}")
    EndIf
EndFunc;==>skill8

Func skill9()
    $SKL9 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{9}")
        Sleep($b)
        Send("{3}")
    EndIf
EndFunc;==>skill9

Func skill0()
    $SKL0 = PixelGetColor($bg_x, $bg_y) = $bg_Color
    If Not @error Then
        Send("{0}")
        Sleep($b)
        Send("{1}")
        Sleep($b)
        Send("{3}")
    EndIf
EndFunc;==>skill0

Func Pause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('TestMacro is currently paused.', 100, 100)
    WEnd
    ToolTip("")
EndFunc;==>Pause

now when useing the first example I will remove the first and second line, just leaving the function that will hit keys

Hope to get an answer on this one, Thanks in advance

The question is meaningless because the 2 pieces of code are not equivalent.

You are asking us to put time into something to save you doing it so it's not the sort of post that would get any help from me.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I do not want any of your time at all there is no reason to be an ass. I was asking a question and sorry if my skills are not as good as yours. So plz if you have nothing good to say don't say anything at all, I am sorry you are having a bad day becouse I posted on the help forum.

I thought I wanted some input from others but if its a problem for an oppinion then forget it.

Did I ask for code???? no do I want code????? no

Sorry to others that are will to say "hey I would use......" or "dude u need to work on it becouse neather way will work"

elitest turds make me upset.

Share this post


Link to post
Share on other sites

I do not want any of your time at all there is no reason to be an ass. I was asking a question and sorry if my skills are not as good as yours. So plz if you have nothing good to say don't say anything at all, I am sorry you are having a bad day becouse I posted on the help forum.

I thought I wanted some input from others but if its a problem for an oppinion then forget it.

Did I ask for code???? no do I want code????? no

Sorry to others that are will to say "hey I would use......" or "dude u need to work on it becouse neather way will work"

elitest turds make me upset.

No reason to get upset. You posted some code which called functions which weren't part of the code, and you asked us to say whether the second example, which was just a list of the functions, was better. It doesn't make any sense to me.

Then you say that you can't try it yourself because you are at work, suggesting that otherwise you would try it and then not need to ask which way was better. So I read that as "I'm at work so could someone do this for me".

If you gave a sensible question in the first place it would help. I think it's easy to demonstrate that I'm more than willing to help people within my abilities, but my post was simply giving my opinion that your post was not a good one.

You'll be delighted to know that I've had quite a good day. :)

Did you ask for code? Not as far as I can see and I didn't suggest you did either.

If elitist turds make you upset then I suggest you stop eating them.

But I didn't intend to upset you so you can call me anything you like if it makes you feel better.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

UUUG now I really hate u becouse I feel stupid...... Sorry

You mean to tell me you can see what I am thinking????

Sorry I did not word what I was thinking.

I want know the code is differant I wrote one last night half asleep and then one today, I want the same result.

The top one calls $Skill1 - $Skill0 and they in turn call the func 1 - 0, top one (I think if I wrote it correctly) looks at X,Y and if it see's the color it calls the function.

Bottom one is just the functions with a pixelcheck built in

I was hoping to get an answer to what would be the cleanest and mabie the fastest way to accomplish calling function 1 - 0 and checking before each function to see if he Bad Guy was still alive. The way I had it last night all the fight functions would run to the end before it would check for "bad guy"

Ok headed home thanks for making me look like an ass.... I needed it

Share this post


Link to post
Share on other sites

I would say keep the pixelchecking in the skill# functions, looks better imo..

Func Fight()
    $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
    If @error Then
        skill4()
        $nbg = PixelGetColor($bg_x, $gg_y) <> $bg_Color
        If @error Then
            skill5()
            $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
            If @error Then
                skill6()
                $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                If @error Then
                    skill7()
                    $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                    If @error Then
                        skill8()
                        $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                        If @error Then
                            skill9()
                            $nbg = PixelGetColor($bg_x, $bg_y) <> $bg_Color
                            If @error Then
                                skill0()
                            EndIf
                        EndIf
                    EndIf
                EndIf
            EndIf
        EndIf
    EndIf
        $nbg = Not $nbg
    While $nbg
        Sleep(100)
        ToolTip('No Bad Guy To Pull', 100, 100)
    WEnd
    ToolTip("")
EndFunc;==>Pause

Looks scary in my eyes. :|

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