Jump to content
Sign in to follow this  
silvermice

New To AU3 Scripting

Recommended Posts

silvermice

ok so i can do basic running a prog from specific loc. reading the ini. click/type so on so forth but some other trickier things have stopped me from the newest script I was hoping to piece together. its for Diablo II what I was wanting to end up with is a script that loads d2 / opens b.net on specified realm ( I can code all that with minor questions on some things like how would I make the Run command read the ini for the file path ) or make it so the compiled ending reads from the ini in same dir rather then needing exact path to the file.

in this the main difficulties I will have is:

A: randomising after a preffix'd name such as: silvermice- then it would be say 001 counting up to 010 or how ever many read in the ini

B: randomising character name

for that one thats about it.

I have another script I want to do a dclone killing bot. I need it to load d2, log in join game specified in the ini which I can do all that, the part I'll have issues with is getting the clone killed due to probably needing a form of detection idk I've seen some interesting things with mmbot which I know to be autoit. If anyone can help me in these writings I would greatly appreciate it as I said I can already do the clicks/delays setup the variables for the ini I just don't know the in depth coding for more complicated things >.<

Share this post


Link to post
Share on other sites
silvermice

not as easy as I thought? the 2 scripts will be 1 a clone killer as described, and 1 a mule maker.

Share this post


Link to post
Share on other sites
silvermice

I seek help ;)

Share this post


Link to post
Share on other sites
LongBowNZ

Please don't bump your thread within 24 hours of your last post/bump.

Someone will get to your topic when they can.

Share this post


Link to post
Share on other sites
silvermice

Please don't bump your thread within 24 hours of your last post/bump.

Someone will get to your topic when they can.

;) its been over 24 hours now and still no help :| can anyone atleast help me with the randomizing code? that can't be to horribly hard to put in is it?

it would be like:

run prog,

connect,

click a button,

type, this one would have like preffix -001 then preffix -002 going up with each round ( EDIT: preffix would be designated in the .ini )

type,

button/enter,

button,

button,

button,

random text a-z between 5-9 chars long

button.

I can do all but the randomizing :D

oh the other thing I wanted is a way for the .au3 or .exe to search for the .ini in parent dir of the .exe/.au3

Edited by silvermice

Share this post


Link to post
Share on other sites
oMBRa

;) its been over 24 hours now and still no help :| can anyone atleast help me with the randomizing code? that can't be to horribly hard to put in is it?

it would be like:

run prog,

connect,

click a button,

type, this one would have like preffix -001 then preffix -002 going up with each round ( EDIT: preffix would be designated in the .ini )

type,

button/enter,

button,

button,

button,

random text a-z between 5-9 chars long

button.

I can do all but the randomizing :D

oh the other thing I wanted is a way for the .au3 or .exe to search for the .ini in parent dir of the .exe/.au3

explain better this: "random text a-z between 5-9 chars long"

Share this post


Link to post
Share on other sites
ludocus

; #FUNCTION# ==============================================================================================
; Name...........: _RandomStr
; Description....: Creates a random string
; Syntax.........: _RandomStr([$iLen = 10])
; Parameters ....: $iLen      - Length of string to return
; Return values .: Success    - Returns a string of random letters (a~z)
; Author ........: RazerM
; =========================================================================================================
Func _RandomStr($iLen = 10)
    Local $sTmp = ''
    For $i = 1 To $iLen
        $sTmp &= Chr(Random(97, 122, 1))
    Next
    Return $sTmp
EndFunc   ;==>_RandomStr

;) ludous

Share this post


Link to post
Share on other sites
infernothebest

this code will count (your name 0 till 400)

$i=0
do
$name="your name "&$i
msgbox(0,"",$name)
$i=$i+1

until $i = 400

Share this post


Link to post
Share on other sites
ludocus

loll.... he didn't ask for that..

and a better way is:

$name='Stupid guy seeking for a life'
For $i = 1 to 400
msgbox(0, 'counting: '&$i&' to 400', 'Hello '&$name)
Next
msgbox(0, 'What???', 'never.. did you click ok for 400 times??, get a life..')

Share this post


Link to post
Share on other sites
silvermice

explain better this: "random text a-z between 5-9 chars long"

um like. it gets in game and goes to create char, and doing that it types 5-9 chars so 5,6,7,8, or 9 total letters ( randomizing between 5 - 9 in length )

so it would be like:

go through 1 of script: woein ( 5 chars )

go through 2 of script: eoinslk ( 7 chars ) all random a-z

; #FUNCTION# ==============================================================================================
; Name...........: _RandomStr
; Description....: Creates a random string
; Syntax.........: _RandomStr([$iLen = 10])
; Parameters ....: $iLen      - Length of string to return
; Return values .: Success  - Returns a string of random letters (a~z)
; Author ........: RazerM
; ====================================================================================================


=====
Func _RandomStr($iLen = 10)
    Local $sTmp = ''
    For $i = 1 To $iLen
        $sTmp &= Chr(Random(97, 122, 1))
    Next
    Return $sTmp
EndFunc  ;==>_RandomStr

this I shal try to see if I can get this working right between now and my next look at these forums ;)

Share this post


Link to post
Share on other sites
auto-it-tous

um like. it gets in game and goes to create char, and doing that it types 5-9 chars so 5,6,7,8, or 9 total letters ( randomizing between 5 - 9 in length )

so it would be like:

go through 1 of script: woein ( 5 chars )

go through 2 of script: eoinslk ( 7 chars ) all random a-z

; #FUNCTION# ==============================================================================================
; Name...........: _RandomStr
; Description....: Creates a random string
; Syntax.........: _RandomStr([$iLen = 10])
; Parameters ....: $iLen      - Length of string to return
; Return values .: Success  - Returns a string of random letters (a~z)
; Author ........: RazerM
; ====================================================================================================



=====
Func _RandomStr($iLen = 10)
    Local $sTmp = ''
    For $i = 1 To $iLen
        $sTmp &= Chr(Random(97, 122, 1))
    Next
    Return $sTmp
EndFunc ;==>_RandomStr

this I shal try to see if I can get this working right between now and my next look at these forums ;)

You just fixup the line 1...

Func _RandomStr($iLen = Random(5, 9, 1))

Local $sTmp = ''

For $i = 1 To $iLen

$sTmp &= Chr(Random(97, 122, 1))

Next

Return $sTmp

EndFunc ;==>_RandomStr


-Everything are starting by the dreams.-Everybody is working with computer.-Everydays will auto because we need it. Come on..Let's doing...AUTOIT....^^"..just a little idea..a little A.D.

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  

×