Mute Posted February 6, 2010 Share Posted February 6, 2010 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 Link to comment Share on other sites More sharing options...
Steveiwonder Posted February 6, 2010 Share Posted February 6, 2010 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 Link to comment Share on other sites More sharing options...
bogQ Posted February 6, 2010 Share Posted February 6, 2010 (edited) For what tupe of game r you trying to make it? Edit: Steveiwonder whas faster Edited February 6, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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. Link to comment Share on other sites More sharing options...
Mute Posted February 6, 2010 Author Share Posted February 6, 2010 (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 February 6, 2010 by Mute Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now