Sign in to follow this  
Followers 0
Mute

A few questions.

4 posts in this topic

Hello, i'm working on a new project for a new game I play.

I have a few questions that should be pretty easy to sort out.

1. Is it possible to generate multiple tool tips in differnt locations?

(Not make a single tooltip display multiple lines, I have that. )

2. In the code below, is a shorter version of a piece of my While statement. My character targets a monster and attacks it, there is also a random chance that my character will use one or more differnt skills ( Skill() ).

This works fine except if I were to disable the hotkey in the middle of the script, say at "Sleep (2000)" the script continues until it hits WEnd and checks to see if the hotkey is still enabled. If I deactivate the hotkey, I want to script to stop "attacking".

While True

    If $AuS = True Then
        send("{Tab}" )
        sleep ( 2000 )
        send ( "{2}" )
        Sleep ( 2000 )
        Skill()
        sleep ( 3000 )

    EndIf

The Skill() func is below:

Func Skill()
    $Skill1 = Random ( 1 , 100 , 1)
    $Skill2 = Random (1 , 110 , 1 )
    If $Skill1 < 60 Then  ;60% chance
        send ( "{3}" )
        sleep ( 600 )
    EndIf
    If $Skill2 < 19 Then ;19% chance
        send ( "{4}" )
        sleep (600)
    EndIf
EndFunc

Would it be better to make the Skill() func check if the hotkey is enabled?

Example:

Func Skill()
If $AuS = True Then
    $Skill1 = Random ( 1 , 100 , 1)
    $Skill2 = Random (1 , 110 , 1 )
    If $Skill1 < 60 Then  ;60% chance
        send ( "{3}" )
        sleep ( 600 )
    EndIf
    If $Skill2 < 19 Then ;19% chance
        send ( "{4}" )
        sleep (600)
    EndIf
EndIf
EndFunc

Thanks guys

Mute

Share this post


Link to post
Share on other sites



I can't help you but make sure you don't violate this.

http://www.autoitscript.com/forum/index.php?showannouncement=11&f=2


They call me MrRegExpMan

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

For what tupe of game r you trying to make it?

Edit: Steveiwonder whas faster :D

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

This is a single player game my friend made.. >.>

Edit: Is there a reason there is no edit button on my first post?

Edited by Mute

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