Sign in to follow this  
Followers 0
Evil_Has_Survived

Help Please

4 posts in this topic

hi, ok this will sound funny but is there away to do this, with out having to right it out, I need this for a game to create different servers,

example,

send(mygame1)

send(mygame2)

send(mygame3)

what I want this to do is create game names through 1 to 100, then it will start back at 1 once it's done 100

so my game would ask for this

Create game name; mygame1

setpass:...............

then it will type mygame1

make 2,3, and so on

so I would like a script sorta of like this please

if

mygame1 then

..................

..................

...................

mygame100

I have looked at loop but it won't type all the different numbers :think:


Thanks in advance

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

what do you want to do?

Something like... ? :think:

;For $i = 0 To 100
;Send("mygame$"&$i&",")
;Next

Dim $gamesArray = StringSplit("mygame$0,mygame$1,mygame$2,mygame$3,mygame$4,mygame$5,mygame$6,mygame$7,mygame$8,mygame$9,mygame$10,mygame$11,mygame$12,mygame$13,mygame$14,mygame$15,mygame$16,mygame$17,mygame$18,mygame$19,mygame$20,mygame$21,mygame$22,mygame$23,mygame$24,mygame$25,mygame$26,mygame$27,mygame$28,mygame$29,mygame$30,mygame$31,mygame$32,mygame$33,mygame$34,mygame$35,mygame$36,mygame$37,mygame$38,mygame$39,mygame$40,mygame$41,mygame$42,mygame$43,mygame$44,mygame$45,mygame$46,mygame$47,mygame$48,mygame$49,mygame$50,mygame$51,mygame$52,mygame$53,mygame$54,mygame$55,mygame$56,mygame$57,mygame$58,mygame$59,mygame$60,mygame$61,mygame$62,mygame$63,mygame$64,mygame$65,mygame$66,mygame$67,mygame$68,mygame$69,mygame$70,mygame$71,mygame$72,mygame$73,mygame$74,mygame$75,mygame$76,mygame$77,mygame$78,mygame$79,mygame$80,mygame$81,mygame$82,mygame$83,mygame$84,mygame$85,mygame$86,mygame$87,mygame$88,mygame$89,mygame$90,mygame$91,mygame$92,mygame$93,mygame$94,mygame$95,mygame$96,mygame$97,mygame$98,mygame$99,mygame$100", ",")
Dim $commandArray = StringSplit("huhu,Haha,Hihi",",")
For $i = 1 To UBound($commandArray)-1
    MsgBox(0, $i & " " & $gamesArray[$i], $commandArray[$i])
Next

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi,

what do you want to do?

Something like... ? :think:

;For $i = 0 To 100
;Send("mygame$"&$i&",")
;Next

Dim $gamesArray = StringSplit("mygame$0,mygame$1,mygame$2,mygame$3,mygame$4,mygame$5,mygame$6,mygame$7,mygame$8,mygame$9,mygame$10,mygame$11,mygame$12,mygame$13,mygame$14,mygame$15,mygame$16,mygame$17,mygame$18,mygame$19,mygame$20,mygame$21,mygame$22,mygame$23,mygame$24,mygame$25,mygame$26,mygame$27,mygame$28,mygame$29,mygame$30,mygame$31,mygame$32,mygame$33,mygame$34,mygame$35,mygame$36,mygame$37,mygame$38,mygame$39,mygame$40,mygame$41,mygame$42,mygame$43,mygame$44,mygame$45,mygame$46,mygame$47,mygame$48,mygame$49,mygame$50,mygame$51,mygame$52,mygame$53,mygame$54,mygame$55,mygame$56,mygame$57,mygame$58,mygame$59,mygame$60,mygame$61,mygame$62,mygame$63,mygame$64,mygame$65,mygame$66,mygame$67,mygame$68,mygame$69,mygame$70,mygame$71,mygame$72,mygame$73,mygame$74,mygame$75,mygame$76,mygame$77,mygame$78,mygame$79,mygame$80,mygame$81,mygame$82,mygame$83,mygame$84,mygame$85,mygame$86,mygame$87,mygame$88,mygame$89,mygame$90,mygame$91,mygame$92,mygame$93,mygame$94,mygame$95,mygame$96,mygame$97,mygame$98,mygame$99,mygame$100", ",")
Dim $commandArray = StringSplit("huhu,Haha,Hihi",",")
For $i = 1 To UBound($commandArray)-1
    MsgBox(0, $i & " " & $gamesArray[$i], $commandArray[$i])
Next

So long,

Mega

hi sorry for the long code

Run("C:\Program Files\Diablo II\Diablo II.exe", "", @SW_MAXIMIZE)
sleep(7000)
WinSetState("Diablo II", "", @SW_MAXIMIZE)
MouseClick("left")
MouseClick("left")
sleep(1000)
MouseClick("left", 377, 350, 2)
sleep(1000)
send("mypass")
send("{enter}")
sleep(3000)
MouseClick("left" , 150, 387, 2) 
send("{enter}")
sleep(5000)
MouseClick("left" , 565 , 460, 2)
send("Eldritch is Fun 1")
send("{tab}")
send("az")
send("{Enter}")
WinSetState("Diablo II", "", @SW_MAXIMIZE)
send("{.}")
mouseclick("right")
sleep(1000)
send("{,}")
mouseclick("right")
send("{/}")
; SAFER VERSION of Double click at 0,500

Opt ("MouseClickDelay", 0)
Opt ("MouseClickDownDelay", 1)

Dim $primary
Dim $secondary
;Determine if user has swapped right and left mouse buttons
$k = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")

; It's okay to NOT check the success of the RegRead operation
If $k = 1 Then
    $primary = "right"
    $secondary = "left"
Else;normal (also case if could not read registry key)
    $primary = "left"
    $secondary = "right"
EndIf
;Moves
sleep(1000)
MouseClick($primary, 136, 518, 2, 0)
sleep(1000)
MouseClick($primary, 197, 478, 2, 0)
sleep(1000)
MouseClick($primary, 249, 452, 2, 0)
sleep(1000)
MouseClick($primary, 302, 326, 2, 0)
sleep(1000)
MouseClick($primary,  373, 352, 2, 0)
sleep(1000)
MouseClick($primary, 105, 172, 2, 1)
sleep(1000)
MouseClick($primary, 401, 292, 2, 0)
sleep(1000)
MouseClick($primary, 260, 0, 2, 0)
sleep(2000)
MouseClick($primary, 139, 128, 2, 0)
sleep(1000)


;Cloak 
Send("m")
mouseclick("right")

;SET main Weapon
send("/")
mouseclick("right")

;Attack
MouseClick($secondary, 498, 15, 2)
sleep(100)
MouseClick($secondary, 445, 250, 2)
sleep(100)
MouseClick($secondary, 644, 152, 2)
sleep(100)
MouseClick($secondary, 503, 81, 2)
sleep(100)
MouseClick($secondary, 316, 239, 2) 
sleep(100)
MouseClick($secondary, 498, 15, 2)
sleep(100)
MouseClick($secondary, 445, 250, 2)
sleep(100)
MouseClick($secondary, 644, 152, 2)
sleep(100)
MouseClick($secondary, 503, 81, 2)
sleep(100)
MouseClick($secondary, 316, 239, 2) 
send("{exit}'")
MouseClick("left" , 565 , 460, 2)
send("Eldritch is Fun 2")
send("{tab}")
send("az")
send("{Enter}")
WinSetState("Diablo II", "", @SW_MAXIMIZE)
send("{.}")
mouseclick("right")
sleep(1000)
send("{,}")
mouseclick("right")
send("{/}")
; SAFER VERSION of Double click at 0,500

Opt ("MouseClickDelay", 0)
Opt ("MouseClickDownDelay", 1)

Dim $primary
Dim $secondary
;Determine if user has swapped right and left mouse buttons
$k = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")

; It's okay to NOT check the success of the RegRead operation
If $k = 1 Then
    $primary = "right"
    $secondary = "left"
Else;normal (also case if could not read registry key)
    $primary = "left"
    $secondary = "right"
EndIf
;Moves
sleep(1000)
MouseClick($primary, 136, 518, 2, 0)
sleep(1000)
MouseClick($primary, 197, 478, 2, 0)
sleep(1000)
MouseClick($primary, 249, 452, 2, 0)
sleep(1000)
MouseClick($primary, 302, 326, 2, 0)
sleep(1000)
MouseClick($primary,  373, 352, 2, 0)
sleep(1000)
MouseClick($primary, 105, 172, 2, 1)
sleep(1000)
MouseClick($primary, 401, 292, 2, 0)
sleep(1000)
MouseClick($primary, 260, 0, 2, 0)
sleep(2000)
MouseClick($primary, 139, 128, 2, 0)
sleep(1000)


;Cloak 
Send("m")
mouseclick("right")

;SET main Weapon
send("/")
mouseclick("right")

;Attack
MouseClick($secondary, 498, 15, 2)
sleep(100)
MouseClick($secondary, 445, 250, 2)
sleep(100)
MouseClick($secondary, 644, 152, 2)
sleep(100)
MouseClick($secondary, 503, 81, 2)
sleep(100)
MouseClick($secondary, 316, 239, 2) 
sleep(100)
MouseClick($secondary, 498, 15, 2)
sleep(100)
MouseClick($secondary, 445, 250, 2)
sleep(100)
MouseClick($secondary, 644, 152, 2)
sleep(100)
MouseClick($secondary, 503, 81, 2)
sleep(100)
MouseClick($secondary, 316, 239, 2) 
send("{exit}'")
MouseClick("left" , 565 , 460, 2)
send("Eldritch is Fun 3")
send("{tab}")
send("az")
send("{Enter}")

See were it says Eldritch is fun 1, 2, 3, and so on it needs to do that 100 times once it hits 100 it will start back at 1

the code you gave me seems great but how would i add it thanks

Edited by Evil_Has_Survived

Thanks in advance

Share this post


Link to post
Share on other sites

Hi,

cannot test it. :">

Opt("MouseClickDelay", 0)
Opt("MouseClickDownDelay", 1)

HotKeySet("{pause}", "end")

Dim $primary
Dim $secondary

checkMouse()
start()
For $i = 1 To 100
    game($i)
    If $i = 100 Then
        $i = 0
    EndIf
Next

Func start()
    Run(@ProgramFilesDir & "\Diablo II\Diablo II.exe", "", @SW_MAXIMIZE)
    Sleep(7000)
    WinSetState("Diablo II", "", @SW_MAXIMIZE)
    MouseClick("left")
    MouseClick("left")
    Sleep(1000)
    MouseClick("left", 377, 350, 2)
    Sleep(1000)
    Send("mypass")
    Send("{enter}")
    Sleep(3000)
    MouseClick("left", 150, 387, 2)
    Send("{enter}")
    Sleep(5000)
    MouseClick("left", 565, 460, 2)
    Send("Eldritch is Fun 1")
    Send("{tab}")
    Send("az")
    Send("{Enter}")
    WinSetState("Diablo II", "", @SW_MAXIMIZE)
    Send("{.}")
    MouseClick("right")
    Sleep(1000)
    Send("{,}")
    MouseClick("right")
    Send("{/}")
; SAFER VERSION of Double click at 0,500
EndFunc  ;==>start

Func game($i)
;Moves
    Sleep(1000)
    MouseClick($primary, 136, 518, 2, 0)
    Sleep(1000)
    MouseClick($primary, 197, 478, 2, 0)
    Sleep(1000)
    MouseClick($primary, 249, 452, 2, 0)
    Sleep(1000)
    MouseClick($primary, 302, 326, 2, 0)
    Sleep(1000)
    MouseClick($primary, 373, 352, 2, 0)
    Sleep(1000)
    MouseClick($primary, 105, 172, 2, 1)
    Sleep(1000)
    MouseClick($primary, 401, 292, 2, 0)
    Sleep(1000)
    MouseClick($primary, 260, 0, 2, 0)
    Sleep(2000)
    MouseClick($primary, 139, 128, 2, 0)
    Sleep(1000)
;Cloak
    Send("m")
    MouseClick("right")
;SET main Weapon
    Send("/")
    MouseClick("right")
;Attack
    MouseClick($secondary, 498, 15, 2)
    Sleep(100)
    MouseClick($secondary, 445, 250, 2)
    Sleep(100)
    MouseClick($secondary, 644, 152, 2)
    Sleep(100)
    MouseClick($secondary, 503, 81, 2)
    Sleep(100)
    MouseClick($secondary, 316, 239, 2)
    Sleep(100)
    MouseClick($secondary, 498, 15, 2)
    Sleep(100)
    MouseClick($secondary, 445, 250, 2)
    Sleep(100)
    MouseClick($secondary, 644, 152, 2)
    Sleep(100)
    MouseClick($secondary, 503, 81, 2)
    Sleep(100)
    MouseClick($secondary, 316, 239, 2)
    Send("{exit}'")
    MouseClick("left", 565, 460, 2)
    Send("Eldritch is Fun " & $i)
    Send("{tab}")
    Send("az")
    Send("{Enter}")
    WinSetState("Diablo II", "", @SW_MAXIMIZE)
    Send("{.}")
    MouseClick("right")
    Sleep(1000)
    Send("{,}")
    MouseClick("right")
    Send("{/}")
; SAFER VERSION of Double click at 0,500
EndFunc  ;==>game

Func checkMouse()
;Determine if user has swapped right and left mouse buttons
    $k = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")
; It's okay to NOT check the success of the RegRead operation
    If $k = 1 Then
        $primary = "right"
        $secondary = "left"
    Else;normal (also case if could not read registry key)
        $primary = "left"
        $secondary = "right"
    EndIf
EndFunc  ;==>checkMouse

Func end()
Exit(0)
EndFunc

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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