1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. stayawayknight

Beiträge von stayawayknight

  • Differenz von 10

    • stayawayknight
    • 7. Juni 2010 um 21:34

    weiß niemand sonst noch Rat? Wenn das nicht klappt ist mein Spiel Müll :(
    Wär nett wenn mir jemand helfen könnte! Das muss doch irgendwie zu schaffen sein

  • WICHTIGE FRAGE ZU gui!!

    • stayawayknight
    • 7. Juni 2010 um 20:36

    da das nun gelöst ist könnte man das Präfix auf gelöst setzen

  • Differenz von 10

    • stayawayknight
    • 7. Juni 2010 um 18:09

    Ok, alles geuploadet! Hoffe ihr könnt mir nun weiterhelfen...
    Siehe Anhang, ist geuploadet mit script etc.

  • WM-Tippspiel

    • stayawayknight
    • 7. Juni 2010 um 18:03

    achso ok :)

  • Diskriminierung durch Antiviren-Programme

    • stayawayknight
    • 7. Juni 2010 um 17:51

    war mal bei mir so, dass nach dem Obfuscater das Programm als Virus erkannt wurde, davor aber nicht ?(

  • Diskriminierung durch Antiviren-Programme

    • stayawayknight
    • 7. Juni 2010 um 17:48

    Versuch es mal damit, dass du den Obfuscater weglässt

  • Differenz von 10

    • stayawayknight
    • 7. Juni 2010 um 17:43
    Spoiler anzeigen
    [autoit]


    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <Array.au3>
    #include <Misc.au3>
    #include <GDIPlus.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Table Datas Section Start
    Global $player1sp = 0
    Global $player2sp = 0
    Global $player3sp = 0
    Global $player4sp = 0
    Global $player1vd = 5
    Global $player2vd = 5
    Global $player3vd = 5
    Global $player4vd = 5
    Global $player1vs = 4
    Global $player2vs = 4
    Global $player3vs = 4
    Global $player4vs = 4
    ;Table Datas Section Ende

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Ressis Section Start
    Global $player1getreide = 0
    Global $player1holz = 0
    Global $player1lehm = 0
    Global $player1stein = 0
    Global $player1wolle = 0
    Global $player2getreide = 0
    Global $player2holz = 0
    Global $player2lehm = 0
    Global $player2stein = 0
    Global $player2wolle = 0
    Global $player3getreide = 0
    Global $player3holz = 0
    Global $player3lehm = 0
    Global $player3stein = 0
    Global $player3wolle = 0
    Global $player4getreide = 0
    Global $player4holz = 0
    Global $player4lehm = 0
    Global $player4stein = 0
    Global $player4wolle = 0
    ;Ressis Section Ende

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Grafik Koords Section Start
    Global $turner1x = 818
    Global $turner2x = 818
    Global $turner3x = 818
    Global $turner4x = 818
    Global $turner1y = 58
    Global $turner2y = 128
    Global $turner3y = 198
    Global $turner4y = 268
    Global $turnerwidth = 10
    Global $turnerheight = 18
    ;Grafik Koords Section Ende

    [/autoit] [autoit][/autoit] [autoit]

    ;Sontiges Start
    Dim $fields[55][200]
    Global $turnerstate = 1
    Global $nextplayer = 0
    Global $clickdiff = 10
    ;Sonstiges Ende

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Spielplan Section Start
    $fields[1][0] = 0 ; 0 = nix, 1 =Dorf, 2 = Stadt
    $fields[1][1] = 183 ;x koord
    $fields[1][2] = 180;y koord
    $fields[1][3] = 1 ;spielernr
    $fields[2][0] = 0
    $fields[2][1] = 237
    $fields[2][2] = 205
    $fields[2][3] = 1
    $fields[3][0] = 0
    $fields[3][1] = 10
    $fields[3][2] = 280
    $fields[3][3] = 1
    $fields[4][0] = 0
    $fields[4][1] = 130
    $fields[4][2] = 215
    $fields[4][3] = 1
    $fields[5][0] = 0
    $fields[5][1] = 237
    $fields[5][2] = 280
    $fields[5][3] = 1
    $fields[6][0] = 0
    $fields[6][1] = 185
    $fields[6][2] = 315
    $fields[6][3] = 1
    $fields[7][0] = 0
    $fields[7][1] = 293
    $fields[7][2] = 315
    $fields[7][3] = 1
    $fields[8][0] = 0
    $fields[8][1] = 400
    $fields[8][2] = 315
    $fields[8][3] = 1
    $fields[9][0] = 0
    $fields[9][1] = 505
    $fields[9][2] = 315
    $fields[9][3] = 1
    $fields[10][0] = 0
    $fields[10][1] = 613
    $fields[10][2] = 310
    $fields[10][3] = 1
    $fields[11][0] = 0
    $fields[11][1] = 80
    $fields[11][2] = 320
    $fields[11][3] = 1
    $fields[12][0] = 0
    $fields[12][1] = 185
    $fields[12][2] = 390
    $fields[12][3] = 1
    $fields[13][0] = 0
    $fields[13][1] = 80
    $fields[13][2] = 390
    $fields[13][3] = 1
    $fields[14][0] = 0
    $fields[14][1] = 290
    $fields[14][2] = 390
    $fields[14][3] = 1
    $fields[15][0] = 0
    $fields[15][1] = 400
    $fields[15][2] = 390
    $fields[15][3] = 1
    $fields[16][0] = 0
    $fields[16][1] = 613
    $fields[16][2] = 310
    $fields[16][3] = 1
    $fields[17][0] = 0
    $fields[17][1] = 613
    $fields[17][2] = 385
    $fields[17][3] = 1
    $fields[18][0] = 0
    $fields[18][1] = 455
    $fields[18][2] = 420
    $fields[18][3] = 1
    $fields[19][0] = 0
    $fields[19][1] = 348
    $fields[19][2] = 420
    $fields[19][3] = 1
    $fields[20][0] = 0
    $fields[20][1] = 560
    $fields[20][2] = 420
    $fields[20][3] = 1
    $fields[21][0] = 0
    $fields[21][1] = 240
    $fields[21][2] = 420
    $fields[21][3] = 1
    $fields[22][0] = 0
    $fields[22][1] = 132
    $fields[22][2] = 425
    $fields[22][3] = 1
    $fields[23][0] = 0
    $fields[23][1] = 238
    $fields[23][2] = 75
    $fields[23][3] = 1
    $fields[24][0] = 0
    $fields[24][1] = 345
    $fields[24][2] = 72
    $fields[24][3] = 1
    $fields[25][0] = 0
    $fields[25][1] = 450
    $fields[25][2] = 72
    $fields[25][3] = 1
    $fields[26][0] = 0
    $fields[26][1] = 450
    $fields[26][2] = 205
    $fields[26][3] = 1
    $fields[27][0] = 0
    $fields[27][1] = 555
    $fields[27][2] = 205
    $fields[27][3] = 1
    $fields[28][0] = 0
    $fields[28][1] = 346
    $fields[28][2] = 205
    $fields[28][3] = 1
    $fields[29][0] = 0
    $fields[29][1] = 503
    $fields[29][2] = 170
    $fields[29][3] = 1
    $fields[30][0] = 0
    $fields[30][1] = 400
    $fields[30][2] = 172
    $fields[30][3] = 1
    $fields[31][0] = 0
    $fields[31][1] = 290
    $fields[31][2] = 172
    $fields[31][3] = 1
    $fields[32][0] = 0
    $fields[32][1] = 290
    $fields[32][2] = 105
    $fields[32][3] = 1
    $fields[33][0] = 0
    $fields[33][1] = 185
    $fields[33][2] = 105
    $fields[33][3] = 1
    $fields[34][0] = 0
    $fields[34][1] = 398
    $fields[34][2] = 102
    $fields[34][3] = 1
    $fields[35][0] = 0
    $fields[35][1] = 498
    $fields[35][2] = 102
    $fields[35][3] = 1
    $fields[36][0] = 0
    $fields[36][1] = 560
    $fields[36][2] = 272
    $fields[36][3] = 1
    $fields[37][0] = 0
    $fields[37][1] = 450
    $fields[37][2] = 275
    $fields[37][3] = 1
    $fields[38][0] = 0
    $fields[38][1] = 345
    $fields[38][2] = 275
    $fields[38][3] = 1
    $fields[39][0] = 0
    $fields[39][1] = 350
    $fields[39][2] = 495
    $fields[39][3] = 1
    $fields[40][0] = 0
    $fields[40][1] = 350
    $fields[40][2] = 636
    $fields[40][3] = 1
    $fields[41][0] = 0
    $fields[41][1] = 243
    $fields[41][2] = 636
    $fields[41][3] = 1
    $fields[42][0] = 0
    $fields[42][1] = 460
    $fields[42][2] = 636
    $fields[42][3] = 1
    $fields[43][0] = 0
    $fields[43][1] = 458
    $fields[43][2] = 492
    $fields[43][3] = 1
    $fields[44][0] = 0
    $fields[44][1] = 560
    $fields[44][2] = 492
    $fields[44][3] = 1
    $fields[45][0] = 0
    $fields[45][1] = 132
    $fields[45][2] = 492
    $fields[45][3] = 1
    $fields[46][0] = 0
    $fields[46][1] = 240
    $fields[46][2] = 495
    $fields[46][3] = 1
    $fields[47][0] = 0
    $fields[47][1] = 187
    $fields[47][2] = 530
    $fields[47][3] = 1
    $fields[48][0] = 0
    $fields[48][1] = 294
    $fields[48][2] = 530
    $fields[48][3] = 1
    $fields[49][0] = 0
    $fields[49][1] = 403
    $fields[49][2] = 530
    $fields[49][3] = 1
    $fields[50][0] = 0
    $fields[50][1] = 403
    $fields[50][2] = 602
    $fields[50][3] = 1
    $fields[51][0] = 0
    $fields[51][1] = 188
    $fields[51][2] = 602
    $fields[51][3] = 1
    $fields[52][0] = 0
    $fields[52][1] = 510
    $fields[52][2] = 602
    $fields[52][3] = 1
    $fields[53][0] = 0
    $fields[53][1] = 295
    $fields[53][2] = 604
    $fields[53][3] = 1
    $fields[54][0] = 0
    $fields[54][1] = 510
    $fields[54][2] = 527
    $fields[54][3] = 1
    ;Spielplan Section Ende

    [/autoit] [autoit][/autoit] [autoit]

    ;Start Gui Section Start
    $main = GUICreate("Siedler von Catan", 975, 691, 161, 0, $WS_SYSMENU)
    GUISetBkColor(0xFF8C00)
    GUISetState(@SW_SHOW)
    _GDIPlus_Startup()
    ;Start Gui Section Ende

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;Load Image Section Start
    $graphic = _GDIPlus_GraphicsCreateFromHWND($main)
    $background = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\pic\woodbackground.jpg")
    $wurfel1image = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\pic\wurfel1.jpg")
    $wurfel2image = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\pic\wurfel2.jpg")
    $wurfel3image = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\pic\wurfel3.jpg")
    $wurfel4image = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\pic\wurfel4.jpg")
    $wurfel5image = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\pic\wurfel5.jpg")
    $wurfel6image = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\pic\wurfel6.jpg")
    $fieldimage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\pic\field.jpg")
    $turner1path = @ScriptDir & "\pic\turner1.jpg"
    $turner2path = @ScriptDir & "\pic\turner2.jpg"
    $turner3path = @ScriptDir & "\pic\turner3.jpg"
    $turner4path = @ScriptDir & "\pic\turner4.jpg"
    ;Load Image Section Ende

    [/autoit] [autoit][/autoit] [autoit]

    ;Brush Section Start
    $brush1 = _GDIPlus_BrushCreateSolid(0xFFFF0000)
    $brush4 = _GDIPlus_BrushCreateSolid(0xFF0066CC)
    ;brush Section Ende

    [/autoit] [autoit][/autoit] [autoit]

    ;Design Gui Section Start
    _GDIPlus_GraphicsDrawImageRect($graphic, $background, 720, 0, 250, 673)
    _GDIPlus_GraphicsDrawString($graphic, "Spieler 1", 730, 56, "Arial", 15)
    _GDIPlus_GraphicsDrawString($graphic, "Spieler 2", 730, 126, "Arial", 15)
    _GDIPlus_GraphicsDrawString($graphic, "Spieler 3", 730, 196, "Arial", 15)
    _GDIPlus_GraphicsDrawString($graphic, "Spieler 4", 730, 266, "Arial", 15)
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel1image, 840, 375, 50, 50)
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel1image, 900, 375, 50, 50)
    _GDIPlus_GraphicsDrawImageRect($graphic, $fieldimage, 0, 0, 720, 720)

    [/autoit] [autoit][/autoit] [autoit]

    $turner = GUICtrlCreatePic($turner1path, $turner1x, $turner1y, $turnerwidth, $turnerheight)
    $turnerstate = 1
    $throwdice = GUICtrlCreateButton("Würfeln", 871, 440, 50, 30)
    $zugvollendet = GUICtrlCreateButton("Zug vollendet", 730, 440, 100, 30)
    $bauen = GUICtrlCreateButton("Bauen", 730, 360, 100, 30)
    $handeln = GUICtrlCreateButton("Handeln", 730, 400, 100, 30)
    $table = GUICtrlCreateListView("Spieler|SP|v. Dörfer|v. Städte", 730, 495, 230, 150)
    GUICtrlSetBkColor($table, 0x8B4513)
    GUICtrlCreateListViewItem("1|" & $player1sp & "|" & $player1vd & "|" & $player1vs, $table)
    GUICtrlCreateListViewItem("2|" & $player2sp & "|" & $player2vd & "|" & $player2vs, $table)
    GUICtrlCreateListViewItem("3|" & $player3sp & "|" & $player3vd & "|" & $player3vs, $table)
    GUICtrlCreateListViewItem("4|" & $player4sp & "|" & $player4vd & "|" & $player4vs, $table)

    [/autoit] [autoit][/autoit] [autoit]

    $ressispl1 = GUICtrlCreateCombo("Getreide: " & $player1getreide, 850, 56, 100, 20)
    $ressispl2 = GUICtrlCreateCombo("Getreide: " & $player2getreide, 850, 126, 100, 20)
    $ressispl3 = GUICtrlCreateCombo("Getreide: " & $player3getreide, 850, 196, 100, 20)
    $ressispl4 = GUICtrlCreateCombo("Getreide: " & $player4getreide, 850, 266, 100, 20)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetData($ressispl1, "Holz: " & $player1holz & "|Lehm: " & $player1lehm & "|Stein: " & $player1stein & "|Wolle: " & $player1wolle)
    GUICtrlSetData($ressispl2, "Holz: " & $player2holz & "|Lehm: " & $player2lehm & "|Stein: " & $player2stein & "|Wolle: " & $player2wolle)
    GUICtrlSetData($ressispl3, "Holz: " & $player3holz & "|Lehm: " & $player3lehm & "|Stein: " & $player3stein & "|Wolle: " & $player3wolle)
    GUICtrlSetData($ressispl4, "Holz: " & $player4holz & "|Lehm: " & $player4lehm & "|Stein: " & $player4stein & "|Wolle: " & $player4wolle)

    [/autoit] [autoit][/autoit] [autoit]

    ;Desgin Gui Section Ende

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #cs test
    _GDIPlus_GraphicsFillRect($graphic, 183, 180, 10, 10, $brush) ;Holz, Stein: 3, 5
    _GDIPlus_GraphicsFillRect($graphic, 237, 205, 10, 10, $brush) ;Holz, Wolle, Stein: 3, 3, 5
    _GDIPlus_GraphicsFillRect($graphic, 130, 280, 10, 10, $brush) ;Lehm, Holz: 6, 3
    _GDIPlus_GraphicsFillRect($graphic, 130, 215, 10, 10, $brush) ;Holz: 3
    _GDIPlus_GraphicsFillRect($graphic, 237, 280, 10, 10, $brush) ;Holz, Getreide, Wiese: 3, 9, 3
    _GDIPlus_GraphicsFillRect($graphic, 185, 315, 10, 10, $brush) ;Holz, Lehm, Getriede: 3, 6, 9
    _GDIPlus_GraphicsFillRect($graphic, 293, 315, 10, 10, $brush) ;Wüste, Getreide, Wolle: 9, 3
    _GDIPlus_GraphicsFillRect($graphic, 400, 315, 10, 10, $brush) ;Wüste, Stein, Getreide: 4, 2
    _GDIPlus_GraphicsFillRect($graphic, 505, 315, 10, 10, $brush) ;Stein, Holz, Lehm: 4, 12, 11
    _GDIPlus_GraphicsFillRect($graphic, 613, 310, 10, 10, $brush);Holz:12
    _GDIPlus_GraphicsFillRect($graphic, 80, 320, 10, 10, $brush);Lehm:
    _GDIPlus_GraphicsFillRect($graphic, 185, 390, 10, 10, $brush);Lehm, Holz, Getreide: 6, 11, 9
    _GDIPlus_GraphicsFillRect($graphic, 80, 390, 10, 10, $brush) ;Lehm :6
    _GDIPlus_GraphicsFillRect($graphic, 290, 390, 10, 10, $brush) ;Wüste, Getreide, Stein: 9, 10
    _GDIPlus_GraphicsFillRect($graphic, 400, 390, 10, 10, $brush) ;Wüste, Wolle, Stein: 10, 4
    _GDIPlus_GraphicsFillRect($graphic, 508, 388, 10, 10, $brush) ;Getreide, Stein, Holz:9, 4, 12
    _GDIPlus_GraphicsFillRect($graphic, 613, 385, 10, 10, $brush) ;Holz: 12
    _GDIPlus_GraphicsFillRect($graphic, 455, 420, 10, 10, $brush) ;Wolle, Getreide, Stein: 10, 9, 4
    _GDIPlus_GraphicsFillRect($graphic, 348, 420, 10, 10, $brush) ;Wüste, Stein, Wolle: 10, 10
    _GDIPlus_GraphicsFillRect($graphic, 560, 420, 10, 10, $brush) ;Getreide, Holz: 9, 12
    _GDIPlus_GraphicsFillRect($graphic, 240, 420, 10, 10, $brush) ;Getreide, Stein, Holz: 9, 10, 11
    _GDIPlus_GraphicsFillRect($graphic, 132, 425, 10, 10, $brush) ;Lehm, Holz: 6, 11
    _GDIPlus_GraphicsFillRect($graphic, 238, 75, 10, 10, $brush) ;Stein: 5
    _GDIPlus_GraphicsFillRect($graphic, 345, 72, 10, 10, $brush) ;Getreide: 8
    _GDIPlus_GraphicsFillRect($graphic, 450, 72, 10, 10, $brush) ;Wolle: 5
    _GDIPlus_GraphicsFillRect($graphic, 450, 205, 10, 10, $brush) ;Getreide, Lehm, Wolle: 2, 11, 5
    _GDIPlus_GraphicsFillRect($graphic, 555, 205, 10, 10, $brush) ;Lehm: 11
    _GDIPlus_GraphicsFillRect($graphic, 346, 205, 10, 10, $brush) ;Wolle, Getreide, Getreide: 3, 2, 8
    _GDIPlus_GraphicsFillRect($graphic, 503, 170, 10, 10, $brush) ;Wolle, Lehm: 5, 11
    _GDIPlus_GraphicsFillRect($graphic, 400, 172, 10, 10, $brush) ;Getreide, Getreide, Wolle: 2, 8, 5
    _GDIPlus_GraphicsFillRect($graphic, 290, 172, 10, 10, $brush) ;Wolle, Getreide, Stein: 3, 8, 5
    _GDIPlus_GraphicsFillRect($graphic, 290, 105, 10, 10, $brush) ;Stein, Getreide: 5, 8
    _GDIPlus_GraphicsFillRect($graphic, 185, 105, 10, 10, $brush);Stein: 5
    _GDIPlus_GraphicsFillRect($graphic, 398, 102, 10, 10, $brush) ;Getreide, Wolle: 8, 5
    _GDIPlus_GraphicsFillRect($graphic, 498, 102, 10, 10, $brush) ;Wolle: 5
    _GDIPlus_GraphicsFillRect($graphic, 560, 272, 10, 10, $brush) ;Lehm, Holz: 11:12
    _GDIPlus_GraphicsFillRect($graphic, 450, 275, 10, 10, $brush) ;Getreide, Lehm, Stein: 2, 11, 4
    _GDIPlus_GraphicsFillRect($graphic, 345, 275, 10, 10, $brush) ;Wüste, Wolle ,Getreide: 3, 2
    _GDIPlus_GraphicsFillRect($graphic, 350, 495, 10, 10, $brush) ;Stein, Wolle, Lehm: 10, 10, 4
    _GDIPlus_GraphicsFillRect($graphic, 350, 636, 10, 10, $brush) ;Lehm: 4
    _GDIPlus_GraphicsFillRect($graphic, 243, 636, 10, 10, $brush) ;Wolle : 6
    _GDIPlus_GraphicsFillRect($graphic, 460, 636, 10, 10, $brush) ;Holz: 8
    _GDIPlus_GraphicsFillRect($graphic, 458, 492, 10, 10, $brush) ;Wolle, Getreide, Holz: 10, 9, 8
    _GDIPlus_GraphicsFillRect($graphic, 560, 492, 10, 10, $brush) ;Getreide: 9
    _GDIPlus_GraphicsFillRect($graphic, 132, 492, 10, 10, $brush) ;Holz: 11
    _GDIPlus_GraphicsFillRect($graphic, 240, 495, 10, 10, $brush) ;Holz, Stein, Wolle: 11, 10, 6
    _GDIPlus_GraphicsFillRect($graphic, 187, 530, 10, 10, $brush) ;Holz, Wolle: 11, 6
    _GDIPlus_GraphicsFillRect($graphic, 294, 530, 10, 10, $brush) ;Stein, Wolle, Lehm: 10, 6, 4
    _GDIPlus_GraphicsFillRect($graphic, 403, 530, 10, 10, $brush) ;Wolle, Lehm, Holz: 10, 4, 8
    _GDIPlus_GraphicsFillRect($graphic, 403, 602, 10, 10, $brush) ;Lehm, Holz: 4, 8
    _GDIPlus_GraphicsFillRect($graphic, 188, 602, 10, 10, $brush) ;Wolle: 6
    _GDIPlus_GraphicsFillRect($graphic, 510, 602, 10, 10, $brush) ;Holz: 8
    _GDIPlus_GraphicsFillRect($graphic, 295, 604, 10, 10, $brush) ;Wolle, Lehm: 6, 4
    _GDIPlus_GraphicsFillRect($graphic, 510, 527, 10, 10, $brush) ;Holz, Getreide: 8, 9

    [/autoit] [autoit][/autoit] [autoit]

    #ce test ende

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    GUIRegisterMsg($WM_MOVE, 'WM_MOVE')

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    ende()

    [/autoit] [autoit][/autoit] [autoit]

    Case $throwdice
    throwdice()

    [/autoit] [autoit][/autoit] [autoit]

    Case $zugvollendet
    zugvollendet()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Case $bauen
    bauen()

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func bauen()
    While 1
    If _IsPressed(01) Then
    $mousecoords = MouseGetPos()
    ExitLoop
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    $search = 1
    Do

    [/autoit] [autoit][/autoit] [autoit]

    $search = $search + 1
    If $search >= 55 Then
    MsgBox(0, "Fehler", "Da kann ich nicht hinbauen!")
    ExitLoop
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Until sqrt(($fields[$search][1] - $mousecoords[0])^2+($fields[$search][2] - $mousecoords[1])^2) <= 30

    [/autoit] [autoit][/autoit] [autoit]

    If $search <= 54 Then

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsFillEllipse($graphic, $fields[$search][1], $fields[$search][2], 15, 15, $brush1)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]


    EndFunc ;==>bauen

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func throwdice()
    $wurfel1random = Random(1, 6, 1)
    $wurfel2random = Random(1, 6, 1)
    $nextplayer = 1

    [/autoit] [autoit][/autoit] [autoit]

    Switch $wurfel1random

    [/autoit] [autoit][/autoit] [autoit]

    Case 1
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel1image, 840, 375, 50, 50)
    $wurfel1sum = 1

    [/autoit] [autoit][/autoit] [autoit]

    Case 2
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel2image, 840, 375, 50, 50)

    [/autoit] [autoit][/autoit] [autoit]

    $wurfel1sum = 2
    Case 3
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel3image, 840, 375, 50, 50)
    $wurfel1sum = 3

    [/autoit] [autoit][/autoit] [autoit]

    Case 4
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel4image, 840, 375, 50, 50)
    $wurfel1sum = 4

    [/autoit] [autoit][/autoit] [autoit]

    Case 5
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel5image, 840, 375, 50, 50)
    $wurfel1sum = 5

    [/autoit] [autoit][/autoit] [autoit]

    Case 6
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel6image, 840, 375, 50, 50)
    $wurfel1sum = 6

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndSwitch

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Switch $wurfel2random

    [/autoit] [autoit][/autoit] [autoit]

    Case 1
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel1image, 900, 375, 50, 50)
    $wurfel2sum = 1

    [/autoit] [autoit][/autoit] [autoit]

    Case 2
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel2image, 900, 375, 50, 50)
    $wurfel2sum = 2

    [/autoit] [autoit][/autoit] [autoit]

    Case 3
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel3image, 900, 375, 50, 50)
    $wurfel2sum = 3

    [/autoit] [autoit][/autoit] [autoit]

    Case 4
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel4image, 900, 375, 50, 50)
    $wurfel2sum = 4

    [/autoit] [autoit][/autoit] [autoit]

    Case 5
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel5image, 900, 375, 50, 50)
    $wurfel2sum = 5

    [/autoit] [autoit][/autoit] [autoit]

    Case 6
    _GDIPlus_GraphicsDrawImageRect($graphic, $wurfel6image, 900, 375, 50, 50)
    $wurfel2sum = 6

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    $wurfelsumme = $wurfel1sum + $wurfel2sum
    GUICtrlSetState($throwdice, $GUI_DISABLE)

    [/autoit] [autoit][/autoit] [autoit]

    auswertung()

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>throwdice

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func auswertung()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>auswertung

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func zugvollendet()

    [/autoit] [autoit][/autoit] [autoit]

    If $nextplayer = 1 Then

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($throwdice, $GUI_ENABLE)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlDelete($turner)
    If $turnerstate = 1 Then
    $turner = GUICtrlCreatePic($turner2path, $turner2x, $turner2y, $turnerwidth, $turnerheight)
    $turnerstate = 2

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $turnerstate = 2 Then
    $turner = GUICtrlCreatePic($turner3path, $turner3x, $turner3y, $turnerwidth, $turnerheight)
    $turnerstate = 3

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $turnerstate = 3 Then
    $turner = GUICtrlCreatePic($turner4path, $turner4x, $turner4y, $turnerwidth, $turnerheight)
    $turnerstate = 4

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $turnerstate = 4 Then
    $turner = GUICtrlCreatePic($turner1path, $turner1x, $turner1y, $turnerwidth, $turnerheight)
    $turnerstate = 1

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Else
    MsgBox(0, "Würfeln nicht vergessen!", "Du musst erst würfeln! Erst danach kann der nächste Spieler drankommen!")

    [/autoit] [autoit][/autoit] [autoit]

    EndIf
    $nextplayer = 0
    EndFunc ;==>zugvollendet

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func ende()
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>ende

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func WM_MOVE()
    MsgBox(0, "Fehler", "Fenster bitte nicht verschieben - Grafiken gehen verloren!")
    $wingetpos = WinGetPos("Siedler von Catan")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    If $wingetpos[0] <= 0 Then
    WinMove("Siedler von Catan", "", 0, $wingetpos[1]) ;links

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $wingetpos[1] + $wingetpos[3] >= @DesktopHeight Then
    WinMove("Siedler von Catan", "", $wingetpos[0], @DesktopHeight - $wingetpos[3]) ;Runter

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $wingetpos[0] + $wingetpos[2] >= @DesktopWidth Then
    WinMove("Siedler von Catan", "", @DesktopWidth - $wingetpos[2], $wingetpos[1]) ;rechts

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $wingetpos[1] <= 0 Then ;hoch
    WinMove("Siedler von Catan", "", $wingetpos[0], 0)

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>WM_MOVE

    [/autoit]

    Zum Teil noch Notlösungen drin, falls du die Bilder brauchst sags


    meine ersten versuche mit GDi

  • StringBetween?

    • stayawayknight
    • 7. Juni 2010 um 17:41
    Zitat von Ineluki

    Ich wollte gerade für ein Script die Funktion StringBetween nutzen und merke, dass es die nicht mehr gibt ?(

    z.B. im Autoit Editor die ersten Buchstaben eingeben, dann kommen die Schnellwahlbefehle da....

    ist eigentlich auch egal

  • WM-Tippspiel

    • stayawayknight
    • 7. Juni 2010 um 17:37

    ich hab das Goal! heft gemeint, das ist auch von kicker...
    da gibts duplo aufkleber :)

  • Differenz von 10

    • stayawayknight
    • 7. Juni 2010 um 17:33

    Danke erstmal für eure schnellen Antworten,
    jedoch funktioniert da noch fast nichts, die punkte werden auf dem spielbrett an komplett falschen Punkten erstellt.

    [autoit]


    Func bauen()
    While 1
    If _IsPressed(01) Then
    $mousecoords = MouseGetPos()
    ExitLoop
    EndIf
    WEnd

    [/autoit][autoit][/autoit][autoit]

    $search = 1
    Do

    [/autoit][autoit][/autoit][autoit]

    $search = $search + 1
    If $search >= 55 Then
    MsgBox(0, "Fehler", "Da kann ich nicht hinbauen!")
    ExitLoop
    EndIf

    [/autoit][autoit][/autoit][autoit]

    Until sqrt(($fields[$search][1] - $mousecoords[0])^2+($fields[$search][2] - $mousecoords[1])^2) <= 30

    [/autoit][autoit][/autoit][autoit]

    If $search <= 54 Then

    [/autoit][autoit][/autoit][autoit]

    _GDIPlus_GraphicsFillEllipse($graphic, $fields[$search][1], $fields[$search][2], 15, 15, $brush1)

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    EndIf

    EndFunc

    [/autoit]


    dabei ist z.B. $fields[1][1] = die X-koordinate, $fields[1][2] die y.

    Ich häng da gerade irgendwie...
    Es geht darum das er auf einem Spielbrett an der geklickten Stelle eine Elipse hinmalt.
    nur brauch man natürlich eine gewisse Differenz da man nur schwer auf exakt einen Punkt klicken kann.
    Nur zeichnet er Momentan den Punkt zwar auf den vorgegebenen Stellen, jedoch auf den Falschen.
    Vielleicht könnt ihr mir nochmals helfen!
    Danke!

    Ach ja, ich kenn mich mit For-Schleifen nicht wirklich gut aus, benutz lieber Until... Ich glaub ich les mal die Hilfe

  • Differenz von 10

    • stayawayknight
    • 7. Juni 2010 um 16:58

    ne klar hatten wir schon (9.Kl.)
    Nur ich steh grad total aufm schlauch wie ich aus 2 koordinaten mit Phytago einen Abstand ermitteln soll,
    ich hab ansonsten keinen festen Punkt..
    Sry kann mir jemand da auf die Sprünge helfen?

  • Differenz von 10

    • stayawayknight
    • 7. Juni 2010 um 16:44

    Stimmt der ging doch a²+b² = c²...
    auf jeden Fall vielen Dank hoffe das klappt werds gleich testen!
    Bleibt dann glaub nur noch die Frage wie ich die Hypotenuse ermittel...

  • Differenz von 10

    • stayawayknight
    • 7. Juni 2010 um 16:19

    Hallo Leute,
    leider muss ich euch wieder mit einer Frage belästigen.
    Ich frage die Mauskoordinaten ab und möchte sie mit in einem Array gespeicherten abgleichen. Dabei dürfen die Mauskoordinaten nicht mehr
    als plus mius 10 von denen im Array abweichen.

    Scriptausschnitt:

    [autoit]


    While 1
    if _isPressed(01) Then
    $mousecoords = MouseGetPos()
    ExitLoop
    EndIf
    WEnd

    [/autoit][autoit][/autoit][autoit]

    $search = 1
    Do

    [/autoit][autoit][/autoit][autoit]

    $search = $search + 1
    if $search >= 55 Then
    MsgBox(0, "Fehler", "Fehler!")
    ExitLoop
    EndIf

    [/autoit][autoit][/autoit][autoit]

    Until $fields[$search][1] - $mousecoords[0] <= 10 And $fields[$search][2] - $mousecoords[1] >= 10 ;Hier ist das böse Problem, er soll das
    ;solange tun, bis er ein passendes Array gefunden hat, das +- 10 mit den Mousecoordinaten übereinstimmt!

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    ;Hier kommt dann in einer If-Abfrae noch hin, was passiert falls das until erreicht wurde.
    ;Tut aber nichts zur Sache denk ich

    [/autoit][autoit][/autoit][autoit][/autoit]


    Hoffe ihr könnt mir erneut Helfen! Vielen Dank im Voraus!

    PS: falls jemand auf die Idee kommt, das das ein Bot wird: Das wird ein Spiel, bei dem auch gewisse Dinge gebaut werden müssen!

  • Splash Ladebildschirm (ähnlich wie bei Office 2010)

    • stayawayknight
    • 7. Juni 2010 um 16:10

    auf jeden Fall super Sache! Der Aufwand ist echt gleich Null

  • else if then... Kann ich nach dem then mehrer Befehle eingeben?

    • stayawayknight
    • 7. Juni 2010 um 16:08

    überhaupt nicht ganz im Gegenteil :D
    Neue viel einfachere Befehle, du bist nur das falsche gwöhnt denk ich mal :D

  • StringBetween?

    • stayawayknight
    • 7. Juni 2010 um 16:07

    naja aber wenn du weißt das es das nicht mehr gibt (oder zumindest glaubst das es das nicht mehr gibt) wirst du wohl kaum die Hilfe nach einem nicht existenten Befehl durchsuchen

  • WM-Tippspiel

    • stayawayknight
    • 6. Juni 2010 um 13:59

    jo den kicker dafür hab ich auch schon mit fast allen Aufklebern xD

  • Gui nicht außerhalb des Desktops

    • stayawayknight
    • 6. Juni 2010 um 13:57

    Danke euch beiden, Problem gelöst!

  • WM-Tippspiel

    • stayawayknight
    • 6. Juni 2010 um 12:38

    Deutschland wird Weltmeister :D

  • Gui nicht außerhalb des Desktops

    • stayawayknight
    • 6. Juni 2010 um 12:35

    Hallo,
    ich frag mal wieder was, hoffe ihr könnt mir helfen!
    Ich hab eine Gui, auf die ich was mit GDI gezeichnet hab, was sich immer verändert. (Ist eigentlich egal)
    Jetzt meine Frage:
    Kann ich die Gui zwar verschieben lassen, jedoch so das sie nicht außerhalb des Desktops bewegt werden kann? Das heißt also das kein teil der Gui
    zu keiner Zeit sich außerhalb des Desktops befindet? Gibts da einen Style oder so was?
    Durch googlen hab ich nix gefunden, weiß auch leider nicht was ich da eingeben soll...

    hoffe auf Hilfe!
    Danke im Vorraus!

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™