also.. ^^
und deine variable $text, die bei deinem script net deklariert war , wollte er bei meinem fortgesetzten script auf einmal deklariert ham.. is wahrscheinlich alles falsch was ich bisher gmacht hab ich poste es trotzdem mal XD
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
$text="1"
$level=1
$pic=1
$monsterlevel=1
$monstername=1
Dim $map[3][3]
For $y=0 To 2
For $x=0 To 2
$map[$y][$x] = 'Raum'&$y*3+$x+1
Next
Next
#Region ### START Koda GUI section ### Form=
$karte = GUICreate("Karte", 558, 396, 196, 124)
$Lraum = GUICtrlCreateLabel("Du befindest dich im Raum 1", 360, 280, 140, 30)
$up= GUICtrlCreateButton("Hoch", 232, 16, 73, 145, BitOR($BS_BITMAP,$WS_GROUP))
GUICtrlSetImage(-1, "C:\Users\Jan\Pictures\abenteuerbilder\pfeilkleinhoch.bmp", -1)
$down = GUICtrlCreateButton("Runter", 232, 224, 73, 153, BitOR($BS_BITMAP,$WS_GROUP))
GUICtrlSetImage(-1, "C:\Users\Jan\Pictures\abenteuerbilder\pfeilkleinrunter.bmp", -1)
$left = GUICtrlCreateButton("Links", 96, 160, 137, 65, BitOR($BS_BITMAP,$WS_GROUP))
GUICtrlSetImage(-1, "C:\Users\Jan\Pictures\abenteuerbilder\pfeilkleinlinks.bmp", -1)
$right = GUICtrlCreateButton("Rechts", 304, 160, 161, 65, BitOR($BS_BITMAP,$WS_GROUP))
GUICtrlSetImage(-1, "C:\Users\Jan\Pictures\abenteuerbilder\pfeilkleinrechts.bmp", -1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
#Region ### START Koda GUI section ### Form=
$gegner = GUICreate("Gegner", 554, 387, 197, 126)
$Pgegner = GUICtrlCreatePic("C:\Users\Jan\Pictures\abenteuerbilder\ork.jpg", 24, 64, 193, 257, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("Ork Level1", 184, 16, 132, 36)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
$Bkampf = GUICtrlCreateButton("Kampf", 288, 80, 169, 57, $WS_GROUP)
$Bfliehen = GUICtrlCreateButton("Fliehen", 288, 200, 169, 65, $WS_GROUP)
GUISetState(@SW_HIDE)
#EndRegion ### END Koda GUI section ###
Global $x=0
Global $y=0
While 1
Switch GUIGetMsg()
Case -3
Exit
Case $up
$y-=1
Case $down
$y+=1
Case $right
$x+=1
Case $left
$x-=1
Case Else
SetButtons()
SetText($Lraum, 'Du befindest dich im Moment'&@CRLF&' im '&$map[$y][$x])
Setpicandtxt($pic,$monsterlevel,$monstername)
EndSwitch
WEnd
Func SetText($cid, $text)
If GUICtrlRead($cid) <> $text Then GUICtrlSetData($cid, $text)
EndFunc
Func Disable($cid)
If GUICtrlGetState($cid) <> 144 Then GUICtrlSetState($cid, 128)
EndFunc
Func Enable($cid)
If GUICtrlGetState($cid) = 144 Then GUICtrlSetState($cid, 64)
EndFunc
Func SetButtons()
If $x=0 Then
Disable($left)
Else
Enable($left)
EndIf
If $x=2 Then
Disable($right)
Else
Enable($right)
EndIf
If $y=0 Then
Disable($up)
Else
Enable($up)
EndIf
If $y=2 Then
Disable($down)
Else
Enable($down)
EndIf
EndFunc
Func Setpicandtxt($pic, $monsterlevel, $monstername)
If $y=0 And $x=0 Then
GUISetState(@SW_SHOW,$gegner)
$pic="C:\Users\Jan\Pictures\abenteuerbilder\goblin_officer.jpg"
$monsterlevel=1
$monstername="Goblin"
EndIf
EndFunc