Welches Skript beeindruckt euch am meisten? 27
-
eukalyptus (14) 52%
-
Marsi (9) 33%
-
Techmix (4) 15%
Nun die Abstimmung, die Skripte gibts unten, eukalyptus erhält 2 Extra Votes.
euka gewinnt mit 22 Stimmen!
Viel Spaß!
==Einsendungen============================================================
Techmix - 14.996
Func _4_($aj,$ak,$al,$am=-1)
Local $an=""
If $am=Default or $am=-1 then $an="(?i)"
Local $ao="(\.|\||\*|\?|\+|\(|\)|\{|\}|\[|\]|\^|\$|\\)"
$ak=StringRegExpReplace($ak,$ao,"\\$1")
$al=StringRegExpReplace($al,$ao,"\\$1")
If $ak=""then $ak="\A"
If $al=""then $al="\z"
Local $ap=StringRegExp($aj,"(?s)"&$an&$ak&"(.*?)"&$al,3)
If @error then Return SetError(1,0,0)
Return $ap
EndFunc
Func _5_(ByRef $aq,$ar)
If Not IsArray($aq)then Return SetError(1,0,0)
Local $as=_UB($aq,1)-1
If Not $as then
$aq=""
Return 0
EndIf
If $ar<0 then $ar=0
If $ar>$as then $ar=$as
Switch _UB($aq,0)
Case 1
For $at=$ar to $as-1
$aq[$at]=$aq[$at+1]
Next
ReDim $aq[$as]
Case 2
Local $au=_UB($aq,2)-1
For $at=$ar to $as-1
For $av=0 to $au
$aq[$at][$av]=$aq[$at+1][$av]
Next
Next
ReDim $aq[$as][$au+1]
Case Else
Return SetError(3,0,0)
EndSwitch
Return $as
EndFunc
Func _6_(Const ByRef $aq,$aw,$ax=0,$ay=0,$az=0,$a0_=0,$a10=1,$a11=-1)
If Not IsArray($aq)then Return SetError(1,0,-1)
If _UB($aq,0)>2 or _UB($aq,0)<1 then Return SetError(2,0,-1)
Local $as=_UB($aq)-1
If $ay<1 or $ay>$as then $ay=$as
If $ax<0 then $ax=0
If $ax>$ay then Return SetError(4,0,-1)
Local $a12=1
If Not $a10 then
Local $a13=$ax
$ax=$ay
$ay=$a13
$a12=-1
EndIf
Switch _UB($aq,0)
Case 1
If Not $a0_ then
If Not $az then
For $at=$ax to $ay Step $a12
If $aq[$at]=$aw then Return $at
Next
Else
For $at=$ax to $ay Step $a12
If $aq[$at]==$aw then Return $at
Next
EndIf
Else
For $at=$ax to $ay Step $a12
If StringInStr($aq[$at],$aw,$az)>0 then Return $at
Next
EndIf
Case 2
Local $a14=_UB($aq,2)-1
If $a11>$a14 then $a11=$a14
If $a11<0 then
$a11=0
Else
$a14=$a11
EndIf
For $av=$a11 to $a14
If Not $a0_ then
If Not $az then
For $at=$ax to $ay Step $a12
If $aq[$at][$av]=$aw then Return $at
Next
Else
For $at=$ax to $ay Step $a12
If $aq[$at][$av]==$aw then Return $at
Next
EndIf
Else
For $at=$ax to $ay Step $a12
If StringInStr($aq[$at][$av],$aw,$az)>0 then Return $at
Next
EndIf
Next
Case Else
Return SetError(7,0,-1)
EndSwitch
Return SetError(6,0,-1)
EndFunc
Global Const $a15=-3
Opt("GUIOnEventMode",1)
Opt("GUICloseOnESC",1)
Global $a1m[6][3]=[["Wald","14",0x008800],["Wiese","41",0x10ff00],["Wüste","00",0xffff00],["Steppe","10",0x88ff00],["Berge","05",0xaa8888],["Wasser","50",0x6666ff]],$a1n=20,$a1o=20,$a1p=40,$a1q=30,$a1r=20,$a1s=20,$a1t[20][20],$a1u[20][20],$a1v[20][20],$a1w[20][20],$a1x[20][20],$a1y[16][2],$a1z[1][2],$a1_[1][2],$a20[3],$a21[3],$a22=20000,$a23,$a24=0,$a25=0,$a26=0,$a27=0
Global $a28[4][3]=[["Basis","002020","010101"],["Wohnhaus","000810","020201"],["Kaserne","102010","050505"],["Kraftwerk","202000","0005-9"]],$a29=4,$a2a=80,$a2b=30,$a2c=20,$a2d=642,$a2e[4]
Global $a2f[4][3]=[["Arbeiter","01020001","010000"],["Kundschafter","03050003","020000"],["Soldat","05100505","030000"],["Ingeneur","10105002","030101"]],$a2g=4,$a2h=80,$a2i=30,$a2j=20,$a2k=694,$a2l[4]
Global $a2m[3][2]=[["Nahrung",30],["Material",50],["Energie",70]],$a2n=150,$a2o=30,$a2p=850,$a2q=20,$a2r[3]
Global $a2s[3]=["Nahrung","Material","Energie"],$a2t=150,$a2u=30,$a2v=850,$a2w=135,$a2x[3]
Global $a2y[7]=["Name: ","Nahrung: ","Material: ","Energie: ","Bewegung: ","Coord X: ","Coord Y: "],$a2z=150,$a2_=30,$a30=850,$a31=250,$a32[7],$a33=GUICreate('15K-Strategie',1024,768,-1,-1)
$a34=GUICtrlCreateGroup("",$a1r-15,$a1s-15,$a1p*$a1n+20,$a1q*$a1o+20)
for $a35=0 to 19
for $a36=0 to 19
$a37=Random(0,5,1)
$a1w[$a36][$a35]=$a1m[$a37][0]
$a1x[$a36][$a35]=$a1m[$a37][1]
$a1t[$a36][$a35]=GUICtrlCreateLabel("",15+($a36*40),17+($a35*30),40,30)
GUICtrlSetBkColor(-1,$a1m[$a37][2])
GUICtrlSetonEvent(-1,"_8_")
Next
Next
$a38=GUICtrlCreateGroup("Bauwerke",$a2c-15,$a2d-10,$a2a*$a29+20,$a2b+22)
for $a36=0 to 3
$a2e[$a36]=GUICtrlCreateLabel($a28[$a36][0],$a2c+($a36*$a2a),$a2d+10,$a2a,$a2b)
GUICtrlSetonEvent(-1,"_9_")
Next
$a38=GUICtrlCreateGroup("Einheiten",$a2j-15,$a2k-10,$a2h*$a2g+20,$a2i+22)
for $a36=0 to 3
$a2l[$a36]=GUICtrlCreateLabel($a2f[$a36][0],$a2j+($a36*$a2h),$a2k+10,$a2h,$a2i)
GUICtrlSetonEvent(-1,"_a_")
Next
$a39=GUICtrlCreateGroup("Ressourcen",$a2p-15,$a2q-15,$a2n+20,$a2o*3+25)
for $a35=0 to 2
$a2r[$a35]=GUICtrlCreateLabel($a2m[$a35][0]&": "&$a2m[$a35][1],$a2p,$a2q+($a2o*$a35)+8,$a2n,$a2o)
Next
$a39=GUICtrlCreateGroup("Produktion",$a2v-15,$a2w-15,$a2t+20,$a2u*3+25)
for $a35=0 to 2
$a2x[$a35]=GUICtrlCreateLabel($a2s[$a35]&": ",$a2v,$a2w+($a2u*$a35)+8,$a2t,$a2u)
Next
$a3a=GUICtrlCreateGroup("Info",$a30-15,$a31-15,$a2z+20,$a2_*7+25)
for $a35=0 to 6
$a32[$a35]=GUICtrlCreateLabel($a2y[$a35],$a30,$a31+($a2_*$a35)+8,$a2z,$a2_)
Next
$a3a=GUICtrlCreateGroup("Nächste Runde",$a30-15,$a31+$a2_*7+20,$a2z+20,95)
dim $a3b=GUICtrlCreateProgress($a30-5,$a31+$a2_*7+40,$a2z,20),$a3c=GUICtrlCreateButton("Weiter",$a30-5,$a31+$a2_*7+75,$a2z)
GUICtrlSetonEvent(-1,"_d_")
GUISetState(@SW_SHOW,$a33)
GUISetonEvent($a15,"_h_",$a33)
AdlibRegister("_d_",$a22)
dim $a23=TimerInit(),$a3d=TimerInit()
While 1
$a3e=TimerDiff($a23)
_SD($a3b,100/$a22*$a3e)
if $a24>2 then _d_()
Sleep(9)
WEnd
Func _8_()
dim $a3f=GUIGetCursorInfo($a33),$a36=int(($a3f[0]-$a1r) / $a1p),$a35=int(($a3f[1]-$a1s) / $a1q),$a3g=GUICtrlRead($a32[0])
if $a1u[$a36][$a35]<>""then
if StringInStr($a3g,"/",1)then
$a3g=_SS($a3g,"/ ",1)
$a3g=$a3g[2]
EndIf
_b_($a36,$a35,$a3g)
elseif StringInStr($a3g,"Versetze:",1)then
$a3g=_SS($a3g,"Versetze: ",1)
$a3g=$a3g[2]
_b_($a36,$a35,$a3g)
Else
$a3g=StringReplace($a3g,"Name: ","",1)
if _6_($a1m,$a3g)=-1 then _b_($a36,$a35,$a3g)
EndIf
dim $a3h[7]=[$a1w[$a36][$a35],_SM($a1x[$a36][$a35],1,1),_SM($a1x[$a36][$a35],2,1),"","",$a36,$a35]
if $a1v[$a36][$a35]<>""then $a3h[0]&=" / "&$a1v[$a36][$a35]
if $a1u[$a36][$a35]<>""then
$a3h[0]&=" / "&$a1u[$a36][$a35]
$a3h[4]=_SM($a2f[_6_($a2f,$a1u[$a36][$a35])][1],7,2)
EndIf
$a3g=GUICtrlRead($a32[0])
$a3g=StringReplace($a3g,"Name: ","",1)
if StringInStr($a3g,"Versetze:",1)then
$a3i=_SS($a3g,"Versetze: ",1)
$a3i=$a3i[2]
dim $a3h[7]=[$a3g,"","","",_SM($a2f[_6_($a2f,$a3i)][1],7,2),$a36,$a35]
EndIf
_i_($a3h)
EndFunc
Func _9_()
dim $a3f=GUIGetCursorInfo($a33),$a36=int(($a3f[0]-$a2j) / $a2a),$a3j=$a36,$a3h[7]=[$a28[$a3j][0],_SM($a28[$a3j][1],1,2),_SM($a28[$a3j][1],3,2),_SM($a28[$a3j][1],5,2),"","",""]
_i_($a3h)
EndFunc
Func _a_()
dim $a3f=GUIGetCursorInfo($a33),$a36=int(($a3f[0]-$a2c) / $a2h),$a3k=$a36
if($a2f[$a3k][0]=$a2f[0][0]and _6_($a1v,$a28[0][0])<>-1)or($a2f[$a3k][0]=$a2f[1][0]and _6_($a1v,$a28[1][0])<>-1)or($a2f[$a3k][0]=$a2f[2][0]and _6_($a1v,$a28[2][0])<>-1)or($a2f[$a3k][0]=$a2f[3][0]and _6_($a1v,$a28[1][0])<>-1 and _6_($a1v,$a28[2][0])<>-1 and _6_($a1v,$a28[3][0])<>-1)then
dim $a3h[7]=[$a2f[$a3k][0],_SM($a2f[$a3k][1],1,2),_SM($a2f[$a3k][1],3,2),_SM($a2f[$a3k][1],5,2),_SM($a2f[$a3k][1],7,2),"",""]
_i_($a3h)
EndIf
EndFunc
Func _b_($a3l,$a3m,$a3n)
$a3o=_6_($a2f,$a3n)
if $a3o<>-1 then
if $a1u[$a3l][$a3m]=""and $a1v[$a3l][$a3m]=""then
dim $a3g=GUICtrlRead($a32[0])
if StringInStr($a3g,"Versetze:",1)then
$a3g=_SS($a3g,"Versetze: ",1)
$a3g=$a3g[2]
$a3p=GUICtrlRead($a32[5])
$a3p=_SS($a3p,"Coord X: ",1)
$a3p=$a3p[2]
$a3q=GUICtrlRead($a32[6])
$a3q=_SS($a3q,"Coord Y: ",1)
$a3q=$a3q[2]
_c_($a3p,$a3q,$a3g)
dim $a3h[7]
_i_($a3h)
for $a3r=0 to 15
$a3s=_SS($a1y[$a3r][0],":",1)
if $a3s[0]=2 and $a3l=$a3s[1]and $a3m=$a3s[2]and $a3n=$a2f[2][0]then
$a1y[$a3r][0]=""
$a1y[$a3r][1]=""
GUICtrlSetBkColor($a1t[$a3l][$a3m],$a1m[_6_($a1m,$a1w[$a3l][$a3m])][2])
ExitLoop
EndIf
Next
EndIf
dim $a3t[3]=[_SM($a2f[$a3o][1],1,2),_SM($a2f[$a3o][1],3,2),_SM($a2f[$a3o][1],5,2)]
if $a2m[1][1]>=$a3t[1]and $a2m[2][1]>=$a3t[2]then
$a1u[$a3l][$a3m]=$a2f[$a3o][0]
$a1z[_UB($a1z)-1][0]=$a2f[$a3o][0]
$a1z[_UB($a1z)-1][1]=$a3l&":"&$a3m
ReDim $a1z[_UB($a1z)+1][2]
if not StringInStr($a3g,"Versetze:",1)then
for $at=0 to 2
$a2m[$at][1]-=$a3t[$at]
Next
$a24+=1
$a26+=1
for $a3r=0 to 15
$a3s=_SS($a1y[$a3r][1],":",1)
if $a3s[0]=2 then _f_($a3l,$a3m,$a3n,$a3s[1],$a3s[2])
Next
EndIf
EndIf
elseif $a1u[$a3l][$a3m]<>""then
dim $a3o=_6_($a1z,$a3l&":"&$a3m),$a3u=_6_($a2f,$a1z[$a3o][0])
$a1u[$a3l][$a3m]=""
$a1z[$a3o][1]=""
_SD($a1t[$a36][$a35],"")
dim $a3h[7]=["Versetze: "&$a1z[$a3o][0],"","","",_SM($a2f[$a3u][1],7,2),"",""]
_i_($a3h)
EndIf
EndIf
$a3v=_6_($a28,$a3n)
if $a3v<>-1 then
if $a1v[$a3l][$a3m]=""and $a1u[$a3l][$a3m]=""and $a1w[$a3l][$a3m]<>"Wasser"then
dim $a3t[3]=[_SM($a28[$a3v][1],1,2),_SM($a28[$a3v][1],3,2),_SM($a28[$a3v][1],5,2)],$a3u=_6_($a1u,$a2f[3][0])
if $a2m[0][1]>=$a3t[0]and $a2m[1][1]>=$a3t[1]then
if(_UB($a1_)-1>0 and $a28[$a3v][0]=$a28[0][0]and $a3u<>-1)or(_UB($a1_)-1=0 and $a28[$a3v][0]=$a28[0][0])or($a28[$a3v][0]<>$a28[0][0])then
$a1v[$a3l][$a3m]=$a28[$a3v][0]
for $at=0 to 2
$a2m[$at][1]-=$a3t[$at]
Next
$a24+=1
$a27+=1
$a1_[_UB($a1_)-1][0]=$a28[$a3v][0]
$a1_[_UB($a1_)-1][1]=$a3l&":"&$a3m
ReDim $a1_[_UB($a1_)+1][2]
EndIf
EndIf
EndIf
EndIf
for $a35=0 to $a1o-1
for $a36=0 to $a1n-1
if $a1v[$a36][$a35]<>""then _SD($a1t[$a36][$a35],$a1v[$a36][$a35])
if $a1u[$a36][$a35]<>""then _SD($a1t[$a36][$a35],$a1u[$a36][$a35])
Next
Next
for $a35=0 to 2
_SD($a2r[$a35],$a2m[$a35][0]&": "&$a2m[$a35][1])
Next
EndFunc
Func _c_($a3l,$a3m,$a3n)
dim $a3f=GUIGetCursorInfo($a33),$a36=int(($a3f[0]-$a1r) / $a1p),$a35=int(($a3f[1]-$a1s) / $a1q),$a3o=_6_($a2f,$a3n),$a3w=0
if $a36<$a3l then
$a3w+=$a3l-$a36
Else
$a3w+=$a36-$a3l
EndIf
if $a35<$a3m then
$a3w+=$a3m-$a35
Else
$a3w+=$a35-$a3m
EndIf
for $at=0 to _UB($a1z)-1
if $a1z[$at][0]<>""and $a1z[$at][1]=""then ExitLoop
Next
if $a3w<=number(_SM($a2f[$a3o][1],7,2))then
$a1z[$at][1]=$a36&":"&$a35
$a1u[$a36][$a35]=$a2f[$a3o][0]
$a24+=1
Else
$a1z[$at][1]=$a3l&":"&$a3m
$a1u[$a36][$a35]=""
$a1u[$a3l][$a3m]=$a2f[$a3o][0]
EndIf
$a1z[$at][0]=$a2f[$a3o][0]
EndFunc
Func _d_()
dim $a3x[3]
for $a35=0 to $a1o-1
for $a36=0 to $a1n-1
if $a1v[$a36][$a35]<>""or $a1u[$a36][$a35]<>""then
dim $a3t[2]=[_SM($a1x[$a36][$a35],1,1),_SM($a1x[$a36][$a35],2,1)]
for $at=0 to 1
$a2m[$at][1]+=$a3t[$at]
$a3x[$at]+=$a3t[$at]
Next
EndIf
Next
Next
for $at=0 to 2
$a21[$at]=0
$a20[$at]=0
next
for $at=0 to _UB($a1_)-1
if $a1_[$at][0]<>""then
$a3v=_6_($a28,$a1_[$at][0])
$a21[0]+=_SM($a28[$a3v][2],1,2)
$a21[1]+=_SM($a28[$a3v][2],3,2)
$a21[2]+=_SM($a28[$a3v][2],5,2)
EndIf
next
for $at=0 to _UB($a1z)-1
if $a1z[$at][0]<>""then
$a3o=_6_($a2f,$a1z[$at][0])
$a20[0]+=_SM($a2f[$a3o][2],1,2)
$a20[1]+=_SM($a2f[$a3o][2],3,2)
$a20[2]+=_SM($a2f[$a3o][2],5,2)
EndIf
next
for $at=0 to 2
$a2m[$at][1]-=$a21[$at]
$a2m[$at][1]-=$a20[$at]
$a3x[$at]-=$a21[$at]+$a20[$at]
_SD($a2x[$at],$a2s[$at]&": "&$a3x[$at])
_SD($a2r[$at],$a2m[$at][0]&": "&$a2m[$at][1])
next
if $a2m[0][1]<-10 then
if _UB($a1z)-1>0 then
dim $a3n=Random(0,_UB($a1z)-2,1),$a3y=_SS($a1z[$a3n][1],":",1)
if $a3y[0]=2 then
$a1u[$a3y[1]][$a3y[2]]=""
_5_($a1z,$a3n)
_SD($a1t[$a3y[1]][$a3y[2]],"")
$a2m[0][1]+=10
$a2m[1][1]+=5
$a2m[2][1]+=10
EndIf
Else
dim $a3n=Random(0,_UB($a1_)-2,1),$a3y=_SS($a1_[$a3n][1],":",1)
if $a3y[0]=2 then
$a1v[$a3y[1]][$a3y[2]]=""
_SD($a1t[$a3y[1]][$a3y[2]],"")
_5_($a1_,$a3n)
$a2m[0][1]+=10
$a2m[1][1]+=5
$a2m[2][1]+=30
EndIf
EndIf
EndIf
if $a2m[2][1]<-25 then
if _UB($a1_)-1>0 then
dim $a3n=Random(0,_UB($a1_)-2,1),$a3y=_SS($a1_[$a3n][1],":",1)
if $a3y[0]=2 then
$a1v[$a3y[1]][$a3y[2]]=""
_SD($a1t[$a3y[1]][$a3y[2]],"")
_5_($a1_,$a3n)
$a2m[0][1]+=20
$a2m[1][1]+=10
$a2m[2][1]+=30
EndIf
EndIf
EndIf
if $a2m[0][1]<-150 or $a2m[1][1]<-150 or $a2m[2][1]<-150 then _h_()
_e_()
dim $a23=TimerInit(),$a24=0
if $a24=0 then $a24=1
$a25+=$a24
EndFunc
Func _e_()
if Random(0,99,1)>=95 then
$a3z=_6_($a1y,"")
if _UB($a1_)-1>0 and $a3z<>-1 and $a3z<=14 then _g_(Random(0,_UB($a1_)-2,1),$a3z)
EndIf
for $at=0 to 15
if $a1y[$at][0]<>""or $a1y[$at][1]<>""then
dim $a3y=_SS($a1y[$at][0],":",1),$a3_=_SS($a1y[$at][1],":",1),$a40[2]=[$a3y[1],$a3y[2]],$a41=_6_($a1m,$a1w[$a3y[1]][$a3y[2]])
_SD($a1t[$a3y[1]][$a3y[2]],"")
GUICtrlSetBkColor($a1t[$a3y[1]][$a3y[2]],$a1m[$a41][2])
if Random(0,100,1)<60 then
if int($a3_[1])<int($a3y[1])then
$a40[0]-=1
else
$a40[0]+=1
EndIf
EndIf
if Random(0,100,1)<60 then
if int($a3_[2])<int($a3y[2])then
$a40[1]-=1
Else
$a40[1]+=1
EndIf
EndIf
$a1y[$at][0]=$a40[0]&":"&$a40[1]
$a3n=_6_($a1z,$a40[0]&":"&$a40[1])
if $a3n<>-1 then
_5_($a1z,$a3n)
$a1u[$a40[0]][$a40[1]]=""
_SD($a1t[$a40[0]][$a40[1]],"")
for $a3r=0 to 15
if $a1y[$a3r][0]=$a40[0]&":"&$a40[1]or $a1y[$a3r][1]=$a40[0]&":"&$a40[1]then
$a42=_SS($a1y[$a3r][0],":",1)
$a43=_6_($a1m,$a1w[$a42[1]][$a42[2]])
$a1y[$a3r][0]=""
$a1y[$a3r][1]=""
if $a43<>-1 then GUICtrlSetBkColor($a1t[$a40[0]][$a40[1]],$a1m[$a43][2])
if _UB($a1_)-1>0 then _g_(Random(0,_UB($a1_)-2,1),$a3r)
EndIf
Next
EndIf
for $a3r=0 to 99
if $a3r<=_UB($a1_)-1 and $a1_[$a3r][0]<>""and $a1_[$a3r][1]<>""then
$a3y=_SS($a1_[$a3r][1],":",1)
_f_($a3y[1],$a3y[2],$a1_[$a3r][0],$a40[0],$a40[1])
EndIf
if $a3r<=_UB($a1z)-1 and $a1z[$a3r][0]<>""and $a1z[$a3r][1]<>""then
$a3y=_SS($a1z[$a3r][1],":",1)
_f_($a3y[1],$a3y[2],$a1z[$a3r][0],$a40[0],$a40[1])
EndIf
Next
if $a40[0]=$a3_[1]and $a40[1]=$a3_[2]then
$a3n=_6_($a1_,$a3_[1]&":"&$a3_[2])
if $a3n<>-1 then
_SD($a1t[$a40[0]][$a40[1]],"")
GUICtrlSetBkColor($a1t[$a40[0]][$a40[1]],$a1m[$a41][2])
_5_($a1_,$a3n)
$a1v[$a3_[1]][$a3_[2]]=""
$a1y[$at][0]=""
$a1y[$at][1]=""
if _UB($a1_)-1>0 then _g_(Random(0,_UB($a1_)-2,1),$at)
EndIf
EndIf
if _UB($a1_)-1=0 and _UB($a1z)-1=0 then _h_()
EndIf
Next
EndFunc
Func _f_($a36,$a35,$a44,$a45,$a46)
dim $a3v=_6_($a1v,$a44),$a3o=_6_($a2f,$a44),$a47=0
if $a3v<>-1 or($a3o<>-1 and($a2f[$a3o][0]=$a2f[0][0]or $a2f[$a3o][0]=$a2f[3][0]))then $a47=2
If $a3o<>-1 and $a2f[$a3o][0]=$a2f[1][0]then $a47=4
If $a3o<>-1 and $a2f[$a3o][0]=$a2f[2][0]then $a47=3
if abs(int($a36)-int($a45))<=$a47 and abs(int($a35)-int($a46))<=$a47 then
GUICtrlSetBkColor($a1t[$a45][$a46],0xff0000)
_SD($a1t[$a45][$a46],"Gegner")
$a48=_6_($a1z,$a36&":"&$a35)
$a49=_6_($a1y,$a45&":"&$a46)
if $a49<>-1 then
$a1y[$a49][0]=$a45&":"&$a46
$a1y[$a49][1]=$a36&":"&$a35
EndIf
EndIf
EndFunc
Func _g_($a3_,$a3z)
if $a3_>=0 then
$a1y[$a3z][0]=$a1y[$a3z][1]
$a4a=_SS($a1_[$a3_][1],":",1)
if $a1y[$a3z][0]=""and $a4a[0]=2 then
if 19-$a4a[1]<10 then
$a4b=0
Else
$a4b=19
EndIf
$a4c=Random(0,19,1)
$a1y[$a3z][0]=$a4b&":"&$a4c
EndIf
$a1y[$a3z][1]=$a1_[$a3_][1]
EndIf
EndFunc
Func _h_()
GUIDelete($a33)
dim $a4d=Int(TimerDiff($a3d)/1000),$a4e=($a4d*3)+($a25*2)+($a26*8)+($a27*12),$a4f="Leider verloren!"&@CRLF&@CRLF&"Gespielte Zeit: "&$a4d&" Sekunden"&@CRLF&"Gemachte Züge: "&$a25&@CRLF&@CRLF&"Punktezahl: "&$a4e&@CRLF&@CRLF
MsgBox(0,"Game Over",$a4f)
Exit
EndFunc
Func _i_($a4g)
for $at=0 to 6
_SD($a32[$at],$a2y[$at]&$a4g[$at])
next
EndFunc
Func _SD(ByRef $a,$b)
GUICtrlSetData($a,$b)
EndFunc
Func _SS($a,$b,$c=1)
Return StringSplit($a,$b,$c)
EndFunc
Func _UB($a,$b=1)
Return UBound($a,$b)
EndFunc
Func _SM(byref $a,$b,$c)
Return StringMid($a,$b,$c)
EndFunc
Marsi - 14.997
#include<GDIPlus.au3>
#include<Memory.au3>
#include<Misc.au3>
#include<Array.au3>
Opt('GUICloseOnESC',0)
Opt('GUIOnEventMode',1)
Opt('MustDeclareVars',1)
_GDIPlus_Startup()
Global $1=Z('ntdll.dll'),$2=Z('gdi32.dll'),$3=Z('ole32.dll'),$4=Z('oleaut32.dll'),$5=Z('msimg32.dll'),$6=Z('GDIPlus.dll'),$7=Z('User32.dll'),$8=DllStructCreate('int64 time;'),$9=_Y($8),$J=_Q(),$K=GUICreate('15k',700,400,@DesktopWidth/2-350,@DesktopHeight/2-200,0x80000000,0x80000),$L=J(700,400),$M=_X($L,1,1),$O=J(700,400),$P=_X($O,1,1),$Q=_WinAPI_GetDC($K),$R=_GDIPlus_GraphicsCreateFromHDC($M),$U,$W,$Z=J(1,1)
DllCall($6,'uint','GdipSetTextRenderingHint','hwnd',$R,'int',4)
Global Enum $10,$11,$12,$13,$14,$15,$16,$17
Global $18[$17]
$18[$11]=J(700,400)
_D($18[$11],1)
$18[$10]=J(680,360)
_D($18[$10],0)
$18[$12]=K(_11(0))
$18[$13]=K(_11(1))
$18[$14]=K(_11(3))
$18[$15]=K(_11(2))
$18[$16]=K(_11(4))
Global $19=_GDIPlus_PenCreate(0xFF000000,3),$1A=_GDIPlus_FontFamilyCreate('Arial'),$1B=_GDIPlus_FontFamilyCreate('Comic Sans MS'),$1C=_GDIPlus_FontCreate($1A,12.5,1),$1D=_GDIPlus_FontCreate($1B,14,1),$1E=_GDIPlus_StringFormatCreate(),$1F=_GDIPlus_BrushCreateSolid(0xFFD0D0D0),$1G=_GDIPlus_BrushCreateSolid(0xFFFFFFFF),$1H=_GDIPlus_RectFCreate(396,8,97,18),$1I=_GDIPlus_RectFCreate(10,8,60,18),$1J=_GDIPlus_RectFCreate(70,3,70,23),$1K=_GDIPlus_RectFCreate(135,8,95,20),$1L=_GDIPlus_RectFCreate(228,3,80,23),$1M[1][4],$1N[2],$1O[2],$1P[2],$1Q=0,$1R,$1S=0,$1T=1,$1U=False,$1V=0,$1W=0,$1X=0,$1Y=_GDIPlus_FontCreate($1B,220),$1Z=_GDIPlus_RectFCreate(10,-10,680,350),$20=_GDIPlus_StringFormatCreate(),$21=_GDIPlus_BrushCreateSolid(0x05000000)
_GDIPlus_StringFormatSetAlign($20,1)
WinSetTrans($K,'',255)
GUISetOnEvent(-3,'_E',$K)
GUISetState(@SW_SHOW,$K)
GUIRegisterMsg(0x84,'_H')
GUIRegisterMsg(0xF,'_G')
OnAutoItExitRegister('_E')
While Not $1U
_1()
WEnd
_E()
Func _1()
Local $22=TimerInit(),$23=_IsPressed('1B'),$24,$25='Top.dat',$26=Int(FileRead($25))
$1V=0
$1Q=0
$1S=0
$1X=0
_5()
While 1 And Not $1U
$24=($24*40+_I(30))/41
If $1T<1 Then $1T+=0.025
If $1S<1 Then $1S+=0.001
$23=_IsPressed('1B')
$1R=_IsPressed('02')
If IsInt($1V/20) And $1W=0 And $1X=0 Then $1W=1.5
If Not IsInt($1V/20) Or $1V=0 Then $1W=0
If $1R And $1S> 0.5 And $1T>=1 Then
$1S-=0.5
$1T=0
EndIf
$1O=_6($K)
$1P[0]=($1P[0]*2+$1O[0]-13-$1W*10)/3
$1P[1]=($1P[1]*2+$1O[1]-13-$1W*10)/3
If TimerDiff($22)> 999 Then
_C()
$22=TimerInit()
EndIf
If $23 Then
If _B() Then Exit
EndIf
_U($M,0,0,$18[$11])
_U($M,10,30,$18[$10])
_2($R,$1V,$1Y,$1Z,$20,$21)
_S($M,492,7,197,17,0xFF7E7B8F,255)
_S($M,492,7,197*$1S,17,0xFFFF0000,255)
_T($M,$1N[0],$1N[1],$18[$13])
_7()
_3()
_GDIPlus_GraphicsDrawRect($R,10,30,700-20,400-40,$19)
_GDIPlus_GraphicsDrawRect($R,490,5,100,20,$19)
_GDIPlus_GraphicsDrawRect($R,590,5,100,20,$19)
_2($R,'Slow Time',$1C,$1H,$1E,$1F)
_2($R,'Points',$1C,$1I,$1E,$1F)
_2($R,$1Q,$1D,$1J,$1E,$1G)
_2($R,'Top Points',$1C,$1K,$1E,$1F)
_2($R,$26,$1D,$1L,$1E,$1G)
_WinAPI_BitBlt($P,0,0,700,400,$M,0,0,0x00CC0020)
_G()
WEnd
If MsgBox(5+32,'Leider Verloren......','Du hast eine Punktzahl von: '&$1Q&' erreicht.'&@CRLF&'Willst du nochmal spielen ?')=4 Then $1U=False
If $1Q> $26 Then
FileDelete($25)
FileWrite($25,$1Q)
EndIf
ReDim $1M[1][4]
EndFunc
Func _2($27,$28,$29,$2A,$2B,$2C)
_GDIPlus_GraphicsDrawStringEx($27,$28,$29,$2A,$2B,$2C)
EndFunc
Func _3()
If $1P[0]<=10 Then $1P[0]=10
If $1P[0]>=665-20*$1W Then $1P[0]=665-20*$1W
If $1P[1]<=30 Then $1P[1]=30
If $1P[1]>=365-20*$1W Then $1P[1]=365-20*$1W
If $1W=0 Then
If _4($1P[0]+13,$1P[1]+13,$1N[0]+23,$1N[1]+23,25,45) Then
_9()
_5()
$1Q+=10
$1V+=1
$1X=0
EndIf
_T($M,$1P[0],$1P[1],$18[$14])
Else
$1W-=0.015
If $1W<=0 Then
$1W=0
$1X=1
EndIf
_V($M,$1P[0],$1P[1],25+20*$1W,25+20*$1W ,_X($18[$15],1,1),0,0,45,45,$J[255])
EndIf
EndFunc
Func _4($2D,$2E,$2F,$2G,$2H,$2I)
Return (($2D-$2F)^2+($2E-$2G)^2)^0.5<($2H/2+$2I/2)
EndFunc
Func _5()
Do
$1N[0]=Random(10,700-10-58,1)
$1N[1]=Random(30,400-10-57,1)
Until Not _4($1P[0]+13,$1P[1]+13,$1N[0]+23,$1N[1]+23,25,200)
EndFunc
Func _6($2J)
Local $2K=MouseGetPos(),$2L=DllStructCreate('long X;long Y')
_W($2L,'X',$2K[0])
_W($2L,'Y',$2K[1])
DllCall($7,'bool','ScreenToClient','hwnd',$2J,'ptr',_Y($2L))
$2K[0]=_X($2L,'X')
$2K[1]=_X($2L,'Y')
Return $2K
EndFunc
Func _7()
Local $2M=UBound($1M,1),$2N[$2M]
For $2O=1 To $2M-1 Step 1
$1M[$2O][0]+=$1M[$2O][2]*$1T
$1M[$2O][1]+=$1M[$2O][3]*$1T
Select
Case $1M[$2O][0]<=10
$1M[$2O][2]=-$1M[$2O][2]
$1M[$2O][0]=10
Case $1M[$2O][0]>=700-35
$1M[$2O][2]=-$1M[$2O][2]
$1M[$2O][0]=700-35
Case $1M[$2O][1]<=30
$1M[$2O][3]=-$1M[$2O][3]
$1M[$2O][1]=30
Case $1M[$2O][1]>=400-35
$1M[$2O][3]=-$1M[$2O][3]
$1M[$2O][1]=400-35
EndSelect
If $1W=0 Then
_T($M,$1M[$2O][0],$1M[$2O][1],$18[$12])
If _4($1P[0]+13,$1P[1]+13,$1M[$2O][0]+13,$1M[$2O][1]+13,15,25) Then $1U=True
Else
_T($M,$1M[$2O][0],$1M[$2O][1],$18[$16])
If _4($1P[0]+13+$1W*10,$1P[1]+13+$1W*10,$1M[$2O][0]+13,$1M[$2O][1]+13,60*$1W+25,25) Then
$2N[$2O]=1
$1Q+=5
EndIf
EndIf
Next
_8($2N)
EndFunc
Func _8($2N)
Local $2P=0,$2Q=UBound($2N)
For $2O=1 To $2Q-1 Step 1
If $2N[$2O]=1 Then
_ArrayDelete($1M,$2O)
_ArrayDelete($2N,$2O)
$2P=1
ExitLoop
EndIf
Next
If $2P=1 Then _8($2N)
EndFunc
Func _9()
Local $2R=UBound($1M,1)
ReDim $1M[$2R+1][4]
Do
$1M[$2R][0]=Random(10,700-35,1)
$1M[$2R][1]=Random(30,400-35,1)
$1M[$2R][2]=_A(-1,1)
$1M[$2R][3]=_A(-1,1)
Until Not _4($1P[0]+13,$1P[1]+13,$1M[$2R][0]+13,$1M[$2R][1]+13,25,150)
EndFunc
Func _A($2S,$2T)
If Random(0,1,1) Then Return $2T
Return $2S
EndFunc
Func _B()
Local $2R=MsgBox(4+32,'Beenden ?','Willst du wirklich beenden ?')
If $2R=6 Then Return True
Return False
EndFunc
Func _C()
$U=$W
$W=0
While Not WinActive($K)
Sleep(20)
WEnd
EndFunc
Func _D($2U,$2V)
Local $2C,$2W=_GDIPlus_GraphicsCreateFromHDC(_X($2U,1,1))
Switch $2V
Case 0
$2C=_F(0,0,700-20,400-40,0xFFDDDDE0,0xFFC3C4D7)
_GDIPlus_GraphicsFillRect($2W,0,0,700-20,400-40,$2C)
Case 1
$2C=_F(0,0,700,400,0xFF311F3F,0xFF262648)
_GDIPlus_GraphicsFillRect($2W,0,0,700,400,$2C)
EndSwitch
_GDIPlus_BrushDispose($2C)
_GDIPlus_GraphicsDispose($2W)
EndFunc
Func _E()
_GDIPlus_FontFamilyDispose($1A)
_GDIPlus_FontFamilyDispose($1B)
_GDIPlus_FontDispose($1C)
_GDIPlus_FontDispose($1D)
_GDIPlus_StringFormatDispose($1E)
_GDIPlus_BrushDispose($1F)
_GDIPlus_PenDispose($19)
_GDIPlus_BrushDispose($1G)
_GDIPlus_FontDispose($1Y)
_GDIPlus_StringFormatDispose($20)
_GDIPlus_BrushDispose($21)
For $2O=0 To $17-1 Step 1
_L($18[$2O])
Next
_10($6)
_10($1)
_10($2)
_10($5)
_10($3)
_10($4)
_10($7)
_GDIPlus_GraphicsDispose($R)
_L($L)
_WinAPI_DeleteDC($Q)
_GDIPlus_Shutdown()
EndFunc
Func _F($2X,$2Y,$2Z,$30,$31,$32,$33=0)
Local $34,$35,$36,$37,$38
$34=DllStructCreate("float;float")
$35=_Y($34)
$36=DllStructCreate("float;float")
$37=_Y($36)
DllStructSetData($34,1,$2X)
DllStructSetData($34,2,$2Y)
DllStructSetData($36,1,$2Z)
DllStructSetData($36,2,$30)
$38=DllCall($6,"uint","GdipCreateLineBrush","ptr",$35,"ptr",$37,"uint",$31,"uint",$32,"int",$33,"int*",0)
Return $38[6]
EndFunc
Func _G()
$W+=1
_T($Q,0,0,$O)
EndFunc
Func _H($2J,$39,$3A,$3B)
If ($2J=$K) And ($39=0x84) Then Return 2
EndFunc
Func _I($3C)
Local Static $3D=TimerInit()
Local $3E=TimerDiff($3D),$3F=(1000/$3C-$3E)
If $3F<0 Then $3F=0
If $3F Then
_W($8,"time",-10000*$3F)
DllCall($1,"dword","ZwDelayExecution","int",0,"ptr",$9)
EndIf
$3D=TimerInit()
Return $3E/($3E+$3F)
EndFunc
Func J($3G,$2B)
Local $3H,$3I,$3J=_M($3G,$2B,$3H,$3I),$3K=DllStructCreate('int[5]')
_W($3K,1,$3J,1)
_W($3K,1,$3G,2)
_W($3K,1,$2B,3)
_W($3K,1,$3H,4)
_W($3K,1,$3I,5)
Return $3K
EndFunc
Func K($3L)
Local $3M=_O($3L),$3N=_N($3M),$3G=_GDIPlus_ImageGetWidth($3N),$2B=_GDIPlus_ImageGetHeight($3N),$3O=J($3G,$2B),$2W=_GDIPlus_GraphicsCreateFromHDC(_X($3O,1,1))
_GDIPlus_GraphicsDrawImage($2W,$3N,0,0)
_GDIPlus_GraphicsDispose($2W)
_GDIPlus_ImageDispose($3N)
Return $3O
EndFunc
Func _L(ByRef $3K)
_WinAPI_DeleteObject(_X($3K,1,5))
_WinAPI_DeleteDC(_X($3K,1,1))
$3K=0
EndFunc
Func _M($3P,$3Q,ByRef $3H,ByRef $3I)
Local $3R=_WinAPI_CreateCompatibleDC(0),$3S=DllStructCreate('dword Size;long Width;long Height;word Planes;word BitCount;dword Compression;dword SizeImage;long XPelsPerMeter;long YPelsPerMeter;dword ClrUsed;dword ClrImportant;dword RGBQuad')
_W($3S,"Size",DllStructGetSize($3S)-4)
_W($3S,"Width",$3P)
_W($3S,"Height",-$3Q)
_W($3S,"Planes",1)
_W($3S,"BitCount",32)
Local $3T=DllCall($2,'ptr','CreateDIBSection','hwnd',0,'ptr',_Y($3S),'uint',0,'ptr*',0,'ptr',0,'uint',0)
$3I=$3T[0]
$3H=$3T[4]
_WinAPI_SelectObject($3R,$3I)
Return $3R
EndFunc
Func _N($3U)
Local $38=DllCall($3,"int","CreateStreamOnHGlobal","handle",$3U,"bool",True,"ptr*",0),$18=_R($38[3]),$3V=DllStructCreate("word vt;word r1;word r2;word r3;ptr data; ptr"),$3W=DllCall($4,"long","DispCallFunc","ptr",$38[3],"dword",8+8*@AutoItX64,"dword",4,"dword",23,"dword",0,"ptr",0,"ptr",0,"ptr",_Y($3V))
Return $18
EndFunc
Func _O(Const $3X)
Local $3Y=BinaryLen($3X),$3M=_MemGlobalAlloc($3Y,0x0002)
_W(DllStructCreate("byte["&$3Y&"]",_MemGlobalLock($3M)),1,$3X)
_MemGlobalUnlock($3M)
Return $3M
EndFunc
Func _P($3Z=255)
Local $3K=DllStructCreate('byte Op;byte Flags;byte Alpha;byte Format')
_W($3K,1,0)
_W($3K,2,0)
_W($3K,3,$3Z)
_W($3K,4,1)
Local $40=DllStructCreate("dword",_Y($3K))
$40=_X($40,1)
Return $40
EndFunc
Func _Q()
Local $2R[256]
For $2O=0 To 255 Step 1
$2R[$2O]=_P($2O)
Next
Return $2R
EndFunc
Func _R($41)
Local $38=DllCall($6,"uint","GdipLoadImageFromStream","ptr",$41,"int*",0)
Return $38[2]
EndFunc
Func _S($42,$43,$44,$3G,$2B,$45,$46=255)
Local $3H=_X($Z,1,4),$28=DllStructCreate('int',$3H)
_W($28,1,$45)
_V($42,$43,$44,$3G,$2B,_X($Z,1,1),0,0,1,1,$J[Int($46)])
EndFunc
Func _T($3J,$43,$44,$3K)
_V($3J,$43,$44,_X($3K,1,2),_X($3K,1,3),_X($3K,1,1),0,0,_X($3K,1,2),_X($3K,1,3),$J[255])
EndFunc
Func _U($3J,$43,$44,$3K)
_WinAPI_BitBlt($3J,$43,$44,_X($3K,1,2),_X($3K,1,3),_X($3K,1,1),0,0,0x00CC0020)
EndFunc
Func _V($47,$48,$49,$4A,$4B,$4C,$4D,$4E,$4F,$4G,$4H)
DllCall($5,'int','AlphaBlend','ptr',$47,'int',$48,'int',$49,'int',$4A,'int',$4B,'ptr',$4C,'int',$4D,'int',$4E,'int',$4F,'int',$4G,'dword',$4H)
EndFunc
Func _W($28,$4I,$4J,$2O=False)
If $2O Then Return DllStructSetData($28,$4I,$4J,$2O)
Return DllStructSetData($28,$4I,$4J)
EndFunc
Func _X($28,$4I,$2O=False)
If $2O Then Return DllStructGetData($28,$4I,$2O)
Return DllStructGetData($28,$4I)
EndFunc
Func _Y($3K)
Return DllStructGetPtr($3K)
EndFunc
Func Z($2R)
Return DllOpen($2R)
EndFunc
Func _10($2R)
DllClose($2R)
EndFunc
Func _11($2R)
Local $3G='0x89504E470D0A1A0A0000000D49484452000000',$4K=''
Switch $2R
Case 0
$4K = '\>\=03>NCML><55=CK[6F726D:D6EC7FB/3-B2Z)/CYC6B9109N5LJ6DE(><7[24E53 40WI66>B24(441K6-E[9=1J8; V5A3E8/C 91UABE1-CFNA70G)B9<TFF08AS2&2CFA32FTD5F1H0C2G@U21(D(RL?2CBQL31?0995@8Y5)99A*M:RTR84ZM&3F1:D035WA*787JFFC4(F9C)DF3BIA69CPC*AZ05PBO7VO12;;K<776B&438S6FEAG;7G0M6P\I827DBY7-1C/A41JQBCB)1127/:0@I6:47A1-@5FBF46A5&71E5WB)<9O3BDF5BF9284&C3NE2FV*80D3*0&=F0E%%=(KE44UHS8200 E?46;H38?EB40104% D96HQ2D8165485793]B13D42960DCAEC0E]3C945196825'
Case 1
$4K = '2Dˆ2D0¯3ˆC83s®9ˆ1r0q54%6YqIW2EVp;1¬‡HAV397NNM7A7FLMK%4o*7L«5)nm9ˆ(7$r3 ¯lDH6OmV4†4415:kl/44D7G„(0HG3ƒD(6lpFIB6M‚4%o@Ÿ%1L;CB€/Lj8WA8@31i4E-U1E;ªnAB7WC9¨J®9E3J?s§T7©2)1¦:FF0Nm55¥SUBARCH5Bh>96)BgH¨)†ƒ`C¤1£]9-IF87ƒ¢:8¤ABU~kF1Ag¢A\Y/FCI/6F@7)q6529z@4¨R75*?E0E(A ¡B?žGl58œY1Y-6U›oFšiBD™Jq=s]9*06:D:4S5˜F%€4P9>89TByDBC(5Wy‡w„/1Q19B‡5€?›7UBP;>4D9<5vE&SDH«4Q61P06=&D~\DLSu8—2 3¡(B?3<Cz¥FC12v8s<–;0E•1EV1P”¯D•j7K4<2r-7Li2Ko`7J£9Y0Qw1ª©pF“[5A;%†7?@EkmAM¦4&=’%Ÿ;CD0‘E/SB>D«F>S1‚¥1‚1B~D)=DWCk4@En’¤:8KF[Ž4;\`(-I6N1(Fm=:2pt3t<91D=1]7v6–n¬k§iAn9;E9Dp-DVDG7F%K7€4q?8J1‘`MZ43]R8)o¢F:-34@w` 43Œ8ŒM§˜Dt809)j0CKUAj53‹ŠsŽiu‚@D(AIž‹70/g6&FIª*(747[8**N5=6hŠ57A[791T–‰‰0[DNR-›8R1&u05*E<N7Zj4”„05MC0H1/F)2;ŽlB(5HD3’]FDPTZ¬h0&FJzœ)Eh£)wuJIBŸ*\hA—“W„0&2G5%5™:˜7<96&E3EŠ‹*BDC3K2¦G5?C64921—D*Z-FYF2R85VCC9r3g\=<AGG7>3OO49%4TLT2>82004/80‰š“z35†>PgƒE1ZD868y•64A7699 BŒvtBE41C2C5~373CEEršDF‘ž88F8DE6021¡59yCE54F7E2‡0D6C4BFD”œF0®394B1O 13265EED956™D272A8&146637°0Ÿ8A2FB2Q9°6F5EAD©8516277B3ACFA403364'
Case 2
$4K = 'm‰m0w3‰Cl4®A9‰504ˆ-5 9@¬‡1))C†6%«%)90ª©;;ž„6E%5‚5LY3k29W„V>1B‰0=452U53 wE€866MK=j-T546J¨59-S*33iŸ6*6R80<6§4F77)EI&85‡¦5&¥S~3&z¦Q6YE4DCU-¬V4yC6¤~¢:¥êž*El)7E@¡LDAv475Q7œJAH›4š52h™HBW¦43A˜Bœ>8uBV–W7Dg¢~†D;B9`ˆ8~D4]Ck¬I2`¤ˆ4PC<>:;8J\©tE29&-¡[jOsA9H1O2>8B@D&D8rTA2kƒu7)4I11•35Y9KE3)F0H2”66“AiA1N8Jh =g%q6‚W*F9:DZšD1:(F0AC391r‡4¡FE&UI†8)11B54L(’3TYEQ09v=2y(7‘8Ž)-0:E1/”OJ[pF2/§oB/gn8([Œ=N–=(t-?E€09(Ÿ%™P7194OL07h(1(7‹PDw‘*G6z1yCG9m‹BZ(B7ŠorA3;25E<31›<Wp2(DFg<;pP[AQAyA[E«CD4=h&72@6tN5ZA%7 FJB<93i5G69CAoA0:“wkƒVGq3ˆGN60@673GnB3•EEA&2o4`W;6)BI5£0uBHYQ:RSTFP?/Ž•zS€L1S™*p`4DAŠ>:D6BmR‹@Œn=CjSCrK//EO3>B\Kª8%¢t2gDEBk6*DFKDJK719FACB1F5%zOYVR@AlªB68<5\TE9—L62-]„]„G50DI6RmAA¥6%7REUŠDC8@D`*3>vBKhC9IN<859DsšN/FT9L]4AQ‘£P5;7li4B€H7†LŸU31\*;4ZB©7>BDH®v F/1\H®i‡Bn4AEZV’B6MMj45U-AE4‚0?00AF5’EC73D9¤j7F˜ž7A58s4CF3F9]—257 BC3s61‚FDuqE213l6A7C“FB82C9EE§q99?832D5FB›F141ƒA5C7wF4ŽŒE8¨ƒ6D26C8˜CC5M AD5B7«3&¨”E3–—5D0CœB24FžŸ1087£79264B4¯70E69¯AB0CE1EFF8963'
Case 3
$4K = '`]`08\]F:H5/]:[Z5)[5 0H3222F90:43734Yƒ34‚W0435€~F-9z1Vy6H885H7GFUG9C999w7((D3ƒAFB&&2TCSvZtCY67s5D]@~;S ?E6D866*@0AR)4QP>A75OGrE; C)\2SCECD8qFFAvD3p4y/B5&8(%0=o6CF9N1EFn6FQ7rl;3-FkM8%vD:5M5B18¶5:3%6qQB(7983D2EHC0BD@680Ej1081LtC>DC=F)1r9G(5<0D9=231EV7DUK7E0jiKChB8EA(Q=TC<CBDz/8N<65C7B9FY1FFCGAz6C2FB41>6L6/EM<C1U@m1&~1:`5CnTAO-2%[>JVC6BCD0w2DCƒsn/53=5D29;1ADBA323DlCV)D<2)6L9P9F0ACJ7D95A&11S5AZAuP€Rh3-0ZKO-145KEAlE‚NI1WAMIC?J€AF0B[t5B16B2?u28E& 780EIW?A(iij@6I7>0OS0TPER99\;-F`WCFCpLo/?6k;0&4**R45%)JhoUg4E3BA‚4 5sF5pN9648D4g18y78AAEE27\9389Ym5491BBE826wB244C5g3* 1900424kqm2719„013F„E2uC57FE9AB75674DA84A6D63E'
Case 4
$4K = '19H1s403H3(79&H0W50V5/56GV-473r5pU;n@6@8C&Am39F6S97?5B7BV((4B9DDBEWFDR@H0Q4l4E53 40kD8OHFN9/4>4=DAjD?14E;301 O02F1>%3<0F4**isEBi3UU(5WR3%TCUM=06Lk30h*CQ68gB7CNETDk:DFA4FB6EF@F0>pEV4Np061WD>B1C7EAPKR55>AADj@7FJD%M1A;8E0J`F(08n=E?F9q]F6D6&C1F7&0C;B4\1FA&OB2FDRQ\Pr[D0D9\ES91r:7?7L*5j37CF=12<04`72IBET:(&2CE1&D63B6lmD-O1S7D01BF7sFLCC`4Fq;87JF%QCA3%ZE8Z?62G:î4imG//I*2;53Y(AM<I8S2o0EBF<7g 692--2GLE 20G1<h7BPDC03[ttI0lD735[B/JA9:FE3Y5-693=EM9))4]NE/oK60-0*9856C 09C3824K7AZ8150gK3) AF2]2AYB5P6461hTB9BA54C1EC267F55n48DB875A13DE6520o9Aq7E72E90F834'
EndSwitch
Return $3G&_12($4K)
EndFunc
Func _12($2R)
Local $4L=Int('0x'&StringRight($2R,2)),$4M=_13(),$4N=''
$2R=StringTrimRight($2R,2)
_ArrayReverse($4M,0,$4L-1)
For $2O=0 To $4L-1 Step 1
$4N=StringRight($2R,2)
$2R=StringTrimRight($2R,2)
$2R=StringReplace($2R,$4M[$2O],$4N,0,1)
Next
Return $2R
EndFunc
Func _13()
Local $4O=' %&()*;-/:<=>?@GHIJKLMNOPQRSTUVWYZ[\]`ghijklmnopqrstuvwyz~€‚ƒ„†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"',$4P=StringLen($4O),$3G[$4P]
For $2O=0 To $4P-1 Step 1
$3G[$2O]=StringLeft($4O,1)
$4O=StringTrimLeft($4O,1)
Next
Return $3G
EndFunc
eukalyptus - 11.554
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("MustDeclareVars", 1)
Opt("GUIOnEventMode", 1)
Global $iWidth = 400;@DesktopWidth
Global $iHeight = 400;@DesktopHeight
Global $fRX = 0.1
Global $fRY = 1.5
Global $fRZ = -0.3
Global Const $PI = ATan(1) * 4
Global Const $PI2 = $PI * 2
Global Const $Deg2Rad = $PI / 180
Global Const $Rad2Deg = 180 / $PI
_GDIPlus_Startup()
Global $hGui = GUICreate("3D Test by Eukalyptus", $iWidth, $iHeight)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui)
Global $hBmpBuffer = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphics)
Global $hGfxBuffer = _GDIPlus_ImageGetGraphicsContext($hBmpBuffer)
_GDIPlus_GraphicsSetSmoothingMode($hGfxBuffer, 2)
_GDIPlus_GraphicsClear($hGfxBuffer, 0xFF000000)
Global $hBmpScale = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphics)
Global $hGfxScale = _GDIPlus_ImageGetGraphicsContext($hBmpScale)
_GDIPlus_GraphicsClear($hGfxScale, 0xFF000000)
Global $fScale = 0.02
DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "hwnd", $hGfxScale, "int", 0)
DllCall($ghGDIPDll, "uint", "GdipTranslateWorldTransform", "hwnd", $hGfxScale, "float", -($iWidth / 2 * $fScale), "float", -($iHeight / 2 * $fScale), "int", 0)
DllCall($ghGDIPDll, "uint", "GdipScaleWorldTransform", "hwnd", $hGfxScale, "float", 1 + $fScale, "float", 1 + $fScale, "int", 0)
Global $hPenBG = _GDIPlus_PenCreate(0xFF005500, 1)
Global $hPenFG = _GDIPlus_PenCreate(0xFF00FF00, 2)
DllCall($ghGDIPDll, "uint", "GdipSetPenLineJoin", "hwnd", $hPenFG, "int", 2)
Global $hPenGL = _GDIPlus_PenCreate(0x2400AAFF, 1)
Global $hBrush = _GDIPlus_BrushCreateSolid(0x30000000)
GUIRegisterMsg($WM_PAINT, "WM_PAINT")
GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")
GUISetState()
[/autoit] [autoit][/autoit] [autoit]GUICreate("Rotate", 200, 100, 0, 0, -1, -1, $hGui)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
Global $cSliderX = GUICtrlCreateSlider(10, 10, 180, 30)
GUICtrlSetData(-1, 50 + ($fRX * 10))
GUICtrlSetOnEvent(-1, "_SetRotate")
Global $cSliderY = GUICtrlCreateSlider(10, 40, 180, 30)
GUICtrlSetData(-1, 50 + ($fRY * 10))
GUICtrlSetOnEvent(-1, "_SetRotate")
Global $cSliderZ = GUICtrlCreateSlider(10, 70, 180, 30)
GUICtrlSetData(-1, 50 + ($fRZ * 10))
GUICtrlSetOnEvent(-1, "_SetRotate")
GUISetState()
Global $aPnt = _CreateBall("GDI+ AutoIt Script|3D Text-Ball|by Eukalyptus", 0.65, 0.25, $iWidth, $iHeight, 0.7)
[/autoit] [autoit][/autoit] [autoit]While 1
_Draw()
;Sleep(10)
WEnd
Func _SetRotate()
Switch @GUI_CtrlId
Case $cSliderX
$fRX = (50 - GUICtrlRead($cSliderX)) / 10
Case $cSliderY
$fRY = (50 - GUICtrlRead($cSliderY)) / 10
Case $cSliderZ
$fRZ = (50 - GUICtrlRead($cSliderZ)) / 10
EndSwitch
EndFunc ;==>_SetRotate
Func _Draw()
[/autoit] [autoit][/autoit] [autoit]Local $iW2 = $iWidth / 2
Local $iH2 = $iHeight / 2
Local Static $fA = 0, $fB = 0, $fC = 0
$fA += $fRX
$fB += $fRY
$fC += $fRZ
If $fA >= 360 Then
$fA -= 360
ElseIf $fA <= 0 Then
$fA += 360
EndIf
If $fB >= 360 Then
$fB -= 360
ElseIf $fB <= 0 Then
$fB += 360
EndIf
If $fC >= 360 Then
$fC -= 360
ElseIf $fC <= 0 Then
$fC += 360
EndIf
_Rotate($aPnt[0], $aPnt[3], $aPnt[4], $aPnt[1], $aPnt[2], $fA, $fB, $fC, $iW2, $iH2)
[/autoit] [autoit][/autoit] [autoit]Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath2", "ptr", $aPnt[6], "ptr", $aPnt[7], "int", $aPnt[0], "int", 0, "int*", 0)
Local $hPath = $aResult[5]
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
Local $hPath_FG = $aResult[2]
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
Local $hPath_BG = $aResult[2]
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePathIter", "int*", 0, "hwnd", $hPath)
Local $hPathIter = $aResult[1]
Local $aIter = $aPnt[8]
For $i = 1 To $aIter[0][0]
DllCall($ghGDIPDll, "uint", "GdipPathIterNextSubpathPath", "hwnd", $hPathIter, "int*", 0, "hwnd", $aIter[$i][1], "int*", 0)
If DllStructGetData($aPnt[2], 1, ($aIter[$i][2]) + 1) > 20 Then
DllCall($ghGDIPDll, "uint", "GdipAddPathPath", "hwnd", $hPath_BG, "hwnd", $aIter[$i][1], "int", 1)
Else
DllCall($ghGDIPDll, "uint", "GdipAddPathPath", "hwnd", $hPath_FG, "hwnd", $aIter[$i][1], "int", 1)
EndIf
Next
DllCall($ghGDIPDll, "uint", "GdipDeletePathIter", "hwnd", $hPathIter)
[/autoit] [autoit][/autoit] [autoit]For $i = 1 To 3
_GDIPlus_GraphicsDrawImage($hGfxBuffer, $hBmpScale, 0, 0)
_GDIPlus_GraphicsFillRect($hGfxBuffer, 0, 0, $iWidth, $iHeight, $hBrush)
DllCall($ghGDIPDll, "uint", "GdipDrawPath", "hwnd", $hGfxBuffer, "hwnd", $hPenGL, "hwnd", $hPath)
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsDrawImage($hGfxScale, $hBmpBuffer, 0, 0)
Next
DllCall($ghGDIPDll, "uint", "GdipDrawPath", "hwnd", $hGfxBuffer, "hwnd", $hPenBG, "hwnd", $hPath_BG)
DllCall($ghGDIPDll, "uint", "GdipDrawPath", "hwnd", $hGfxBuffer, "hwnd", $hPenFG, "hwnd", $hPath_FG)
DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath)
DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath_BG)
DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath_FG)
_GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
EndFunc ;==>_Draw
Func _Rotate($iCount, ByRef $tP_O, ByRef $tPZ_O, ByRef $tP_N, ByRef $tPZ_N, $fA, $fB, $fC, $iW2, $iH2)
$fA *= $Deg2Rad
$fB *= $Deg2Rad
$fC *= $Deg2Rad
Local $fX, $fY, $fZ, $fPX, $fPY, $fPZ
[/autoit] [autoit][/autoit] [autoit]For $i = 0 To $iCount - 1
$fPX = DllStructGetData($tP_O, 1, $i * 2 + 1)
$fPY = DllStructGetData($tP_O, 1, $i * 2 + 2)
$fPZ = DllStructGetData($tPZ_O, 1, $i + 1)
$fY = $fPY * Cos($fA) - $fPZ * Sin($fA)
$fZ = $fPY * Sin($fA) + $fPZ * Cos($fA)
$fPY = $fY
$fPZ = $fZ
$fX = $fPX * Cos($fB) + $fPZ * Sin($fB)
$fZ = -$fPX * Sin($fB) + $fPZ * Cos($fB)
$fPX = $fX
DllStructSetData($tP_N, 1, $fPX * Cos($fC) - $fPY * Sin($fC) + $iW2, $i * 2 + 1)
DllStructSetData($tP_N, 1, $fPY * Cos($fC) + $fPX * Sin($fC) + $iH2, $i * 2 + 2)
DllStructSetData($tPZ_N, 1, $fZ, $i + 1)
Next
EndFunc ;==>_Rotate
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func _CreateBall($sText, $fScaleX, $fScaleY, $iW, $iH, $fBallSize, $sFont = "Arial", $fFlat = 5)
Local $aSplit = StringSplit($sText, "|")
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
Local $hPath = $aResult[2]
Local $hFormat = _GDIPlus_StringFormatCreate()
Local $hFamily = _GDIPlus_FontFamilyCreate($sFont)
Local $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
Local $tBounds = _GDIPlus_RectFCreate(0, 0, 0, 0)
For $i = 1 To $aSplit[0]
DllCall($ghGDIPDll, "uint", "GdipAddPathString", "hwnd", $hPath, "wstr", $aSplit[$i], "int", -1, "hwnd", $hFamily, "int", 0, "float", 50, "ptr", DllStructGetPtr($tLayout), "hwnd", $hFormat)
DllCall($ghGDIPDll, "uint", "GdipGetPathWorldBounds", "hwnd", $hPath, "ptr", DllStructGetPtr($tBounds), "hwnd", 0, "hwnd", 0)
DllStructSetData($tLayout, "Y", DllStructGetData($tBounds, "Y") + DllStructGetData($tBounds, "Height"))
Next
DllCall($ghGDIPDll, "uint", "GdipFlattenPath", "hwnd", $hPath, "hwnd", 0, "float", $fFlat)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
$aResult = DllCall($ghGDIPDll, "uint", "GdipGetPointCount", "hwnd", $hPath, "int*", 0)
Local $iCount = $aResult[2]
Local $tPathData = DllStructCreate("int;ptr;ptr")
Local $tPoints = DllStructCreate("float[" & $iCount * 2 & "]")
Local $tTypes = DllStructCreate("ubyte[" & $iCount & "]")
Local $tPointsZ = DllStructCreate("float[" & $iCount & "]")
DllStructSetData($tPathData, 1, $iCount)
DllStructSetData($tPathData, 2, DllStructGetPtr($tPoints))
DllStructSetData($tPathData, 3, DllStructGetPtr($tTypes))
DllCall($ghGDIPDll, "uint", "GdipGetPathData", "hwnd", $hPath, "ptr", DllStructGetPtr($tPathData))
[/autoit] [autoit][/autoit] [autoit]Local $fRad = $iH / 2 * $fBallSize
If $iH > $iW Then $fRad = $iW / 2 * $fBallSize
Local $fPIY = $PI * $fScaleY
[/autoit] [autoit][/autoit] [autoit]Local $fX, $fY, $fZ, $fA, $fB, $fPX, $fPY, $fPZ
Local $fBX = (DllStructGetData($tBounds, "X") + DllStructGetData($tBounds, "Width")) / $fScaleX
Local $fBY = (DllStructGetData($tBounds, "Y") + DllStructGetData($tBounds, "Height")) / $fScaleY
For $i = 0 To $iCount - 1
$fX = DllStructGetData($tPoints, 1, $i * 2 + 1)
$fY = DllStructGetData($tPoints, 1, $i * 2 + 2)
$fB = $PI - $fX * $PI2 / $fBX
$fA = $fPIY - $fY * $PI2 / $fBY
$fPX = 0
$fPY = 0
$fPZ = $fRad
$fY = $fPY * Cos($fA) - $fPZ * Sin($fA)
$fZ = $fPY * Sin($fA) + $fPZ * Cos($fA)
$fPY = $fY
$fPZ = $fZ
$fX = $fPX * Cos($fB) + $fPZ * Sin($fB)
$fZ = -$fPX * Sin($fB) + $fPZ * Cos($fB)
DllStructSetData($tPoints, 1, $fX, $i * 2 + 1)
DllStructSetData($tPoints, 1, $fY, $i * 2 + 2)
DllStructSetData($tPointsZ, 1, $fZ, $i + 1)
Next
Local $tPointsRotate = DllStructCreate("float[" & $iCount * 2 & "]")
Local $tPointsZRotate = DllStructCreate("float[" & $iCount & "]")
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePathIter", "int*", 0, "hwnd", $hPath)
Local $hPathIter = $aResult[1]
$aResult = DllCall($ghGDIPDll, "uint", "GdipPathIterGetSubpathCount", "hwnd", $hPathIter, "int*", 0)
Local $iSubCount = $aResult[2]
Local $aIter[$iCount + 1][3] = [[$iSubCount]]
For $i = 1 To $iSubCount
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
$aIter[$i][1] = $aResult[2]
$aResult = DllCall($ghGDIPDll, "uint", "GdipPathIterNextSubpath", "hwnd", $hPathIter, "int*", 0, "int*", 0, "int*", 0, "int*", 0)
$aIter[$i][2] = $aResult[3]
Next
DllCall($ghGDIPDll, "uint", "GdipDeletePathIter", "hwnd", $hPathIter)
DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath)
[/autoit] [autoit][/autoit] [autoit]Local $aReturn[9]
$aReturn[0] = $iCount
$aReturn[1] = $tPointsRotate
$aReturn[2] = $tPointsZRotate
$aReturn[3] = $tPoints
$aReturn[4] = $tPointsZ
$aReturn[5] = $tTypes
$aReturn[6] = DllStructGetPtr($tPointsRotate)
$aReturn[7] = DllStructGetPtr($tTypes)
$aReturn[8] = $aIter
Return $aReturn
EndFunc ;==>_CreateBall
Func WM_PAINT($hWnd, $uMsgm, $wParam, $lParam)
_GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_PAINT
Func WM_ERASEBKGND($hWnd, $uMsgm, $wParam, $lParam)
_GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_ERASEBKGND
Func _Exit()
Local $aIter = $aPnt[8]
For $i = 1 To $aIter[0][0]
DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $aIter[$i][1])
Next
_GDIPlus_PenDispose($hPenBG)
_GDIPlus_PenDispose($hPenFG)
_GDIPlus_PenDispose($hPenGL)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_GraphicsDispose($hGfxScale)
_GDIPlus_BitmapDispose($hBmpScale)
_GDIPlus_GraphicsDispose($hGfxBuffer)
_GDIPlus_BitmapDispose($hBmpBuffer)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>_Exit
Das wars fürs erste, Viel Spaß beim Proggen!
MfG, campweb