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. Nakroma

Beiträge von Nakroma

  • MsgBox mit eigenem Bild

    • Nakroma
    • 1. März 2012 um 17:28

    Hey,
    ich möchte wie im Titel beschrieben ein Bild rechts oder links IN der MsgBox drinne haben, also nicht dieses kleine Shortcut oben sondern beim Text. Wie kann ich das machen?
    Mfg

  • Anfänger benötigt kleinen Schubs

    • Nakroma
    • 19. Februar 2012 um 15:34

    also zu deinem problem mit dem button 1 hab ich was:

    [autoit]

    Func list1()
    $search = FileFindFirstFile(".\music\*.*")
    While 1
    $file = FileFindNextFile($search)
    If @error Then ExitLoop
    GUICtrlSetData($list1,$file)
    WEnd
    FileClose($search)
    EndFunc

    [/autoit]

    Es findet alle Files in /music und kopiert sie in list1 bis keine datei mehr vorhanden ist :)

  • Bilder vor andere Positionieren

    • Nakroma
    • 18. Februar 2012 um 17:26
    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.3.6.1
    Author: Nakroma

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

    Script Function:
    FightEnginge for Wave RPG

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

    #ce ----------------------------------------------------------------------------
    Opt("GUIOnEventMode", 1)
    #include <./au3/GDIpProgress.au3>

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

    $p_x = 300
    $p_y = 300

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

    $e_x = 800
    $e_y = 300

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

    $action = False
    $stand = "right"
    $enemystate = "live"

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

    HotKeySet("{ESC}", "close")
    HotKeySet("d", "walk_right")
    HotKeySet("a", "walk_left")
    HotKeySet("w", "walk_up")
    HotKeySet("s", "walk_down")
    HotKeySet("{SPACE}", "sword")
    HotKeySet("r", "fireball")

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

    $gui = GUICreate("Wave FightEngine", 1000, 864)
    GUISetBkColor(0xFFFFFF)
    $player = GUICtrlCreatePic("./poses/stand_right.gif", $p_x, $p_y, 24, 62)
    $balken = GUICtrlCreatePic("./img/balken.gif", 0, 800, 1000, 64)
    $w = GUICtrlCreatePic("./img/w.gif", 0, 800, 64, 64)
    $progress1 = _ProgressCreate(70, 800, 200, 32, 0x3cb371)
    $progress2 = _ProgressCreate(70, 832, 200, 32, 0x6495ed, 0x6495ed)
    _ProgressSet($progress1, IniRead("./ini/stats.ini", "allgemein", "leben", 100))
    _ProgressSet($progress2, IniRead("./ini/stats.ini", "allgemein", "mana", 100))
    GUISetState(@SW_SHOW)
    $mana = IniRead("./ini/stats.ini", "allgemein", "mana", 100)
    $life = IniRead("./ini/stats.ini", "allgemein", "leben", 100)
    read()
    terrain_secretiland()

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

    While 1
    WEnd

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

    Func close()
    Exit
    EndFunc

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

    Func walk_right()
    If $action = False Then
    $action = True
    $p_x += 10
    If $p_x > 976 Then $p_x = 976
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/walk_right_right.gif", $p_x, $p_y, 24, 62)
    $p_x += 10
    If $p_x > 976 Then $p_x = 976
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/walk_right_left.gif", $p_x, $p_y, 24, 62)
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/stand_right.gif", $p_x, $p_y, 24, 62)
    $stand = "right"
    $action = False
    Else
    Return
    EndIf
    EndFunc

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

    Func walk_left()
    If $action = False Then
    $action = True
    $p_x -= 10
    If $p_x < 0 Then $p_x = 0
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/walk_left_right.gif", $p_x, $p_y, 24, 62)
    $p_x -= 10
    If $p_x < 0 Then $p_x = 0
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/walk_left_left.gif", $p_x, $p_y, 24, 62)
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/stand_left.gif", $p_x, $p_y, 24, 62)
    $stand = "left"
    $action = False
    Else
    Return
    EndIf
    EndFunc

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

    Func walk_up()
    If $action = False Then
    $action = True
    $p_y -= 10
    If $p_y < 0 Then $p_y = 0
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/walk_up_right.gif", $p_x, $p_y, 32, 62)
    $p_y -= 10
    If $p_y < 0 Then $p_y = 0
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/walk_up_left.gif", $p_x, $p_y, 32, 62)
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/stand_up.gif", $p_x, $p_y, 32, 62)
    $stand = "up"
    $action = False
    Else
    Return
    EndIf
    EndFunc

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

    Func walk_down()
    If $action = False Then
    $action = True
    $p_y += 10
    If $p_y > 738 Then $p_y = 738
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/walk_down_right.gif", $p_x, $p_y, 32, 62)
    $p_y += 10
    If $p_y > 738 Then $p_y = 738
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/walk_down_left.gif", $p_x, $p_y, 32, 62)
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/stand_down.gif", $p_x, $p_y, 32, 62)
    $stand = "down"
    $action = False
    Else
    Return
    EndIf
    EndFunc

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

    Func sword()
    If $action = False Then
    If $stand = "left" Then
    $action = True
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/left_sword1.gif", $p_x, $p_y, 52, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/left_sword2.gif", $p_x, $p_y, 48, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/left_sword3.gif", $p_x, $p_y, 32, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/left_sword4.gif", $p_x - 25, $p_y, 60, 62)
    get_sword($p_x - 25, $p_y, 60, 62, $e_x, $e_y, 24, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/left_sword5.gif", $p_x - 29, $p_y, 64, 62)
    get_sword($p_x - 29, $p_y, 64, 62, $e_x, $e_y, 24, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/left_sword6.gif", $p_x - 23, $p_y, 58, 62)
    get_sword($p_x - 23, $p_y, 58, 62, $e_x, $e_y, 24, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/stand_left.gif", $p_x, $p_y, 24, 62)
    $action = False
    ElseIf $stand = "right" Then
    $action = True
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/right_sword1.gif", $p_x - 27, $p_y, 52, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/right_sword2.gif", $p_x - 21, $p_y, 48, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/right_sword3.gif", $p_x, $p_y, 32, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/right_sword4.gif", $p_x, $p_y, 60, 62)
    get_sword($p_x, $p_y, 60, 62, $e_x, $e_y, 24, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/right_sword5.gif", $p_x, $p_y, 64, 62)
    get_sword($p_x, $p_y, 64, 62, $e_x, $e_y, 24, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/right_sword6.gif", $p_x, $p_y, 58, 62)
    get_sword($p_x, $p_y, 58, 62, $e_x, $e_y, 24, 62)
    Sleep(80)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/stand_right.gif", $p_x, $p_y, 24, 62)
    $action = False
    EndIf
    Else
    Return
    EndIf
    EndFunc

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

    Func fireball()
    If $action = False Then
    If mana_take(10) = False Then Return
    If $stand = "right" Then
    $action = "true"
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/right_fire.gif", $p_x, $p_y, 40, 62)
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/stand_right.gif", $p_x, $p_y, 24, 62)
    $s_x = $p_x + 24
    $spell = GUICtrlCreatePic("./poses/attack/fireball_right.gif", $s_x, $p_y, 51, 31)
    For $i = 0 To 20
    Sleep(20)
    $s_x += 10
    GUICtrlSetPos($spell, $s_x, $p_y)
    Next
    GUICtrlDelete($spell)
    ElseIf $stand = "left" Then
    $action = "true"
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/attack/left_fire.gif", $p_x, $p_y, 40, 62)
    Sleep(100)
    GUICtrlDelete($player)
    $player = GUICtrlCreatePic("./poses/stand_left.gif", $p_x, $p_y, 24, 62)
    $s_x = $p_x - 24
    $spell = GUICtrlCreatePic("./poses/attack/fireball_left.gif", $s_x, $p_y, 51, 31)
    For $i = 0 To 20
    Sleep(20)
    $s_x -= 10
    GUICtrlSetPos($spell, $s_x, $p_y)
    Next
    GUICtrlDelete($spell)
    EndIf
    $action = False
    Else
    Return
    EndIf
    EndFunc

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

    ;~ Func zombie()
    ;~ If $enemystate = "live" Then
    ;~ $e_x -= 10
    ;~ If $e_x < 0 Then $e_x = 0
    ;~ GUICtrlDelete($enemy)
    ;~ $enemy = GUICtrlCreatePic("./poses/enemy/zombie/walk_left_right.gif", $e_x, $e_y, 24, 62)
    ;~ $e_x -= 10
    ;~ If $e_x < 0 Then $e_x = 0
    ;~ Sleep(150)
    ;~ GUICtrlDelete($enemy)
    ;~ $enemy = GUICtrlCreatePic("./poses/enemy/zombie/walk_left_left.gif", $e_x, $e_y, 24, 62)
    ;~ Sleep(150)
    ;~ GUICtrlDelete($enemy)
    ;~ $enemy = GUICtrlCreatePic("./poses/enemy/zombie/stand_left.gif", $e_x, $e_y, 24, 62)
    ;~ Sleep(1000)
    ;~ Else
    ;~ Return
    ;~ EndIf
    ;~ EndFunc

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

    Func get_sword($x1, $y1, $b1, $h1, $x2, $y2, $b2, $h2)
    If ($x1 + $b1 > $x2 And $y1 + $h1 > $y2 And $x1 < $x2 + $b2 And $y1 < $y2 + $h2) Then
    If $enemystate = "live" Then
    GUICtrlDelete($enemy)
    $enemy = GUICtrlCreatePic("./poses/enemy/zombie/death1.gif", $e_x, $e_y + 42, 64, 24)
    $enemystate = "death"
    EndIf
    Else
    Return
    EndIf
    EndFunc

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

    Func mana_take($take)
    If $mana - $take < 0 Then
    Return False
    Else
    Return True
    $mana -= $take
    write()
    EndIf
    EndFunc

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

    Func read()
    $mana = IniRead("./ini/stats.ini", "allgemein", "mana", 100)
    $life = IniRead("./ini/stats.ini", "allgemein", "leben", 100)
    EndFunc

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

    Func write()
    IniWrite("./ini/stats.ini", "allgemein", "mana", $mana)
    IniWrite("./ini/stats.ini", "allgemein", "leben", $life)
    _ProgressSet($progress1, IniRead("./ini/stats.ini", "allgemein", "leben", 100))
    _ProgressSet($progress2, IniRead("./ini/stats.ini", "allgemein", "mana", 100))
    EndFunc

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

    Func terrain_secretiland()
    $house1 = GUICtrlCreatePic("./terrain/haus1.gif", 500, 500, 152, 272)
    EndFunc

    [/autoit]

    Ich will das Männchen(Player)vor House1 haben

  • Bilder vor andere Positionieren

    • Nakroma
    • 18. Februar 2012 um 11:58

    Das Problem ist, ich erstell die Bilder(Wegen Laufbewegung)ja immer neu, also eig. immer NACH dem Gebäude, allerdings ist das Gebäude trotzdem immer vor der Figur

  • Bilder vor andere Positionieren

    • Nakroma
    • 18. Februar 2012 um 11:32

    Und was wenn ich fragen darf?

  • Bilder vor andere Positionieren

    • Nakroma
    • 17. Februar 2012 um 22:56

    Steht da, in einer GUI

  • Bilder vor andere Positionieren

    • Nakroma
    • 17. Februar 2012 um 22:45

    Hey,
    Ich hätte gerne das meine Figur IMMER vor allen anderen Bildern in der GUI steht. Also das die Figur im Vordergrund ist.
    Gibts da irgendwas dafür?
    Mfg

  • Bilderkollision

    • Nakroma
    • 12. Februar 2012 um 22:25

    Danke, das funktioniert nun

  • Bilderkollision

    • Nakroma
    • 12. Februar 2012 um 17:16

    was sind in deinem beispiel h und b?

  • Bilderkollision

    • Nakroma
    • 12. Februar 2012 um 16:49

    Also bei mir funktionierts nicht, wenn du willst kann ich dir meinen code schicken :/

  • Bilderkollision

    • Nakroma
    • 12. Februar 2012 um 16:15

    Bei mir leider nicht

  • Bilderkollision

    • Nakroma
    • 12. Februar 2012 um 16:05

    PosX1 ist Bild 1
    PosX2 ist Bild 2
    Mit Size genauso oder?

  • Bilderkollision

    • Nakroma
    • 12. Februar 2012 um 15:49

    Ja, die befinden sich auf einer GUI. Größe und so sind natürlich vorhanden.

  • Bilderkollision

    • Nakroma
    • 12. Februar 2012 um 15:41

    Hey,
    gibt es eine einfache Möglichkeit zu kontrollieren ob 2 Bilder sich berühren? Z.b. dein Schwert und ein Zombie?
    Ich hab schon mehrere Sachen ausprobiert, allerdings funktioniert das nicht ganz recht.
    Hilfe wäre nett,
    Mfg

  • Error in Expression

    • Nakroma
    • 18. Oktober 2011 um 13:31

    Code:

    [autoit]


    Func wavehit()
    If $sWavehit = True Then
    Sleep(1)
    Else
    $sWavehit = True
    $mWavehit_x = $move_x - 2.25
    $mWavehit_y = $move_y - 2.1
    $iWavehit = GUICtrlCreatePic("./img/spells/wavehit.bmp", $move_x - 2.25, $move_y - 2.1, 25, 25)
    Sleep(1000)
    GUICtrlDelete($iWavehit)
    $sWavehit = False
    If $mWavehit_x < $hEnemy1max_x && > $hEnemy1min_x && $mWavehit_y > $hEnemy1min_y && $mWavehit_y < $hEnemy1max_y Then
    MsgBox(0, "", "HIT")
    EndIf
    EndIf
    EndFunc

    [/autoit]

    Fehlermeldung:

    Code
    >"S:\AutoIt\AutoItInstall\install\SciTe\..\autoit3.exe" /ErrorStdOut "S:\AutoIt\Yuna RPG\game.au3"	
    S:\AutoIt\Yuna RPG\game.au3 (73) : ==> Error in expression.:
    If $mWavehit_x < $hEnemy1max_x && > $hEnemy1min_x && $mWavehit_y > $hEnemy1min_y && $mWavehit_y < $hEnemy1max_y Then
    If ^ ERROR
    >Exit code: 1	Time: 6.902

    weis echt nicht woran das liegt...
    hilfe wär nett
    mfg Nakroma

  • GDIpProgress und Whiles Fragen

    • Nakroma
    • 21. September 2011 um 14:55
    Zitat von Schnitzel

    )


    Ja,
    Und wenn man dann startet und -20 macht gehts trotzdem auf 80%.

    @Marsi:
    Einfach Func Main und die erste Zeile dann in die While 1 oder was?

    Sorry bin noch nicht so bewandert in AutoIt

  • GDIpProgress und Whiles Fragen

    • Nakroma
    • 21. September 2011 um 14:42

    Ich mein, wo füg ich den dreisatz ein?

  • GDIpProgress und Whiles Fragen

    • Nakroma
    • 21. September 2011 um 14:26
    Zitat von Schnitzel

    1. Autoit kann kein Multithreading. Gleichzeitiges ausführen is nicht möglich.
    Evtl hilft dir aber Adlibregister ;)

    2. So wie ich das sehe suchst du nen einfachen Dreisatz :D
    Wenn 30 Leben = 100%
    dann ist 1 Leben 3,333 %
    oder nicht?^^

    Also einfach die GDIpProgess auf ($aktuellesLeben/30)*100 setzen ;)


    Wie ist der Befehl dafür? ich mein, wenn man
    _ProgressSet macht kommt ja am ende wieder 100 raus...

  • GDIpProgress und Whiles Fragen

    • Nakroma
    • 21. September 2011 um 13:54

    Hi,
    Meine erste Frage. Geht es quasi mehrere Whiles gleichzeitig nebeneinander zu haben? Also will das machen:

    [autoit]


    If $cooldown = True Then
    $cooldown = $cooldown -1
    If $cooldown = 0 Then
    $cooldown = False
    EndIf
    Sleep(500)
    EndIf
    ;;;;;;;;;;;;;;;;
    If $mana < 100 Then
    $mana = $mana + 1
    Sleep(500)
    EndIf
    ;;;;;;;;;;;;;;;
    If $life < 100 Then
    $life = $life + 1
    Sleep(500)
    EndIf

    [/autoit]

    Wie krieg ichs hin das die 3 Sachen nebeneinander in einer While funktionieren und auch gleichzeitig ausführen.

    2. Frage:
    http://www.autoitscript.com/forum/topic/74…r-with-gdiplus/
    Geht es bei GDIpProgess einen anderen Wert als 100 einzustellen aber das es trotzdem prozentual ist. Also das 30 Life trotzdem 100% sind?

    Mfg Nakroma

  • Bewegung

    • Nakroma
    • 25. Mai 2011 um 14:46

    Also in so etwa oder?

    [autoit]


    While 1
    _IsPressed(Taste)
    Mache dies und dass
    Wend

    [/autoit]

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™