Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Made by yt/FireDiver
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Icon=icon.ico
- #AutoIt3Wrapper_UseUpx=y
- #AutoIt3Wrapper_Res_Description=PandaRunner
- #AutoIt3Wrapper_Res_Fileversion=0.3.1.1
- #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
- #AutoIt3Wrapper_Res_LegalCopyright=Alle Rechte liegen bei FireDiver (yt/FireDiver)
- #AutoIt3Wrapper_Res_Language=1031
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include "G:\A2D\A2D.au3"
- #include <Misc.au3>
- #include <Crypt.au3>
- #include <Array.au3>
- #include <Zip.au3>
- #include <INet.au3>
- #include <Math.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <ButtonConstants.au3>
- #include <SliderConstants.au3>
- #include <WindowsConstants.au3>
- Opt("GUIOnEventMode", 1)
- $settingsform = GUICreate("Einstellungen", 314, 437, 192, 124, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE))
- $Label1 = GUICtrlCreateLabel("Spielgeschwindigkeit", 8, 8, 131, 20)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- $Label2 = GUICtrlCreateLabel("Sollte nur umgestellt werden, wenn das Spiel zu langsam läuft", 8, 32, 293, 17)
- $Slider1 = GUICtrlCreateSlider(8, 64, 302, 29)
- GUICtrlSetLimit(-1, 17, 2)
- GUICtrlSetData(-1, 10)
- GUICtrlSetOnEvent(-1, "SliderMoved")
- $Label3 = GUICtrlCreateLabel("<-- Schneller", 16, 96, 63, 17)
- $Label4 = GUICtrlCreateLabel("100 FPS", 136, 96, 45, 17)
- $Label5 = GUICtrlCreateLabel("Langsamer -->", 232, 96, 71, 17)
- $Button1 = GUICtrlCreateButton("Übernehmen", 8, 400, 147, 25)
- GUICtrlSetOnEvent(-1, "ApplyPressed")
- $Button2 = GUICtrlCreateButton("Zurücksetzen", 160, 400, 147, 25)
- GUICtrlSetOnEvent(-1, "ResetPressed")
- $Label7 = GUICtrlCreateLabel("Cheats", 8, 200, 46, 20)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- $Label8 = GUICtrlCreateLabel("Bei allen Cheats ist das speichern der Highscore deaktiviert", 8, 224, 283, 17)
- $Checkbox1 = GUICtrlCreateCheckbox("Unbesiegbarkeit", 8, 240, 97, 17)
- GUICtrlSetOnEvent(-1, "InfLPressed")
- $Checkbox2 = GUICtrlCreateCheckbox("Unendlich Jumpboost", 8, 256, 121, 17)
- GUICtrlSetOnEvent(-1, "InfJPressed")
- $Checkbox3 = GUICtrlCreateCheckbox("Unendlich Speedboost", 8, 272, 129, 17)
- GUICtrlSetOnEvent(-1, "InfBPressed")
- $Checkbox4 = GUICtrlCreateCheckbox("Mond", 160, 240, 97, 17)
- GUICtrlSetOnEvent(-1, "MoonPressed")
- $Button3 = GUICtrlCreateButton("Auf Update prüfen", 8, 160, 99, 33)
- GUICtrlSetOnEvent(-1, "UpdatePressed")
- $Checkbox5 = GUICtrlCreateCheckbox("MLG-Mode", 160, 256, 97, 17)
- GUICtrlSetOnEvent(-1, "MLGPressed")
- $Label9 = GUICtrlCreateLabel("Update", 8, 136, 49, 20)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- #cs
- $Label6 = GUICtrlCreateLabel("Feedback", 208, 136, 66, 20)
- GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
- $Button4 = GUICtrlCreateButton("Feedback senden", 207, 159, 99, 33)
- GUICtrlSetOnEvent(-1, "FeedBack")
- #ce
- GUISetState(@SW_HIDE, $settingsform)
- If FileExists(@TempDir & "\pandar_upd.bat") Then FileDelete(@TempDir & "\pandar_upd.bat")
- If Not FileExists(@ScriptDir & "\Data") Then
- SplashTextOn("Entpacke...", "Dateien werden Entpackt...", 200, 70)
- FileInstall("G:\A2D\Panda\d.zip", @TempDir & "\panda_d.zip", 1)
- _Zip_UnzipAll(@TempDir & "\panda_d.zip", @ScriptDir & "\", 1)
- Sleep(7500) ;Nur zur Sicherheit
- SplashOff()
- EndIf
- If Not FileExists(@ScriptDir & "\Data\Images\rain.png") Then FileInstall("G:\A2D\Panda\Data\Images\rain.png", @ScriptDir & "\Data\Images\rain.png")
- If Not FileExists(@ScriptDir & "\Data\Images\fisch.png") Then
- If FileExists(@ScriptDir & "\Data\Images\tr1.jpg") Then FileDelete(@ScriptDir & "\Data\Images\tr1.jpg")
- FileInstall("G:\A2D\Panda\Data\Images\tr1.png", @ScriptDir & "\Data\Images\tr1.png")
- FileInstall("G:\A2D\Panda\Data\Images\fisch.png", @ScriptDir & "\Data\Images\fisch.png")
- FileInstall("G:\A2D\Panda\Data\Images\mfisch.png", @ScriptDir & "\Data\Images\mfisch.png")
- FileInstall("G:\A2D\Panda\Data\Images\mbfisch.png", @ScriptDir & "\Data\Images\mbfisch.png")
- FileInstall("G:\A2D\Panda\Data\Images\vfische.png", @ScriptDir & "\Data\Images\vfische.png")
- FileInstall("G:\A2D\Panda\Data\Images\vfische2.png", @ScriptDir & "\Data\Images\vfische2.png")
- EndIf
- If FileExists(@ScriptDir & "\Data\settings.ini") Then FileDelete(@ScriptDir & "\Data\settings.ini")
- Dim $gsp = 10, $anti_t, $lasttree = 1, $MaxTerrObj = 30, $TerrObj[1000][10], $hscore = 0, $injump = 0, $jumpvel = 0, $Step = 0, $t, $Gravity = 0.3, $MaxJumpVel, $bla, $score = 0, $standardJumpValue = 8, $OldJumpValue = 8, $pause = 0, $scorecount = 0, $StageSpeed = 5, $ExtraTerrActive = 0, $ExtraTerr
- Dim $Invincible = 0, $falling = 0, $Timer = 0, $OldStageSpeed, $SpawnSpeed = 1650, $panda_an = 0, $panda1, $LastGenerated = 0, $SPPOS[10], $Zahl, $lZahl = 0, $HighScore = 0, $HighScoreName = "", $line[10], $tree[10][10], $size[5], $SSpeed, $BossFight = 0
- Dim $down = 0, $pause = 0, $RemJump, $RemBoost, $panda_m = 3, $inm = 0, $p_enter = 0, $GameVersion = "Beta v1.3.1", $Active = 1, $baggerAn[6], $Bagger[6], $bosscount = 0, $ban = 1, $throw = 0, $tt, $bla2, $SGravity = 0.3, $Sjumpvel, $StoneX, $StoneY, $rev = 0, $laying = 0, $ll = 0
- Dim $RainY = -1300, $RainY2 = -1000, $RainH = 1300, $raining = 0, $rpf[100][100], $MaxRpf = 0, $rfall = 0, $infiniteBoost = 0, $infiniteJump = 0, $moon = 0, $throwAN = 0, $lcount = 0, $running = 0,$WaterY = 721,$rcount = 0,$spoint = 1000,$WaterDone = 0,$WaterCount = 0
- Dim $WaterCountdown = 0,$ResetWaterObjects = 0,$MLG = 0,$degr = 0
- $anti_t = Random(30, 90, 1)
- $HighScore = _A2D_Decrypt(@ScriptDir & "\Data\score.a2d")
- AdlibRegister("_Resize", 500)
- _A2D_Startup("PandaRunner", 900, 720, 900, 720, 2, 1, 5)
- $clear = _A2D_LoadImage(@ScriptDir & "\Data\Images\clear.jpg")
- $Logo = _A2D_LoadImage(@ScriptDir & "\Data\Images\BG.jpeg")
- _A2D_MapDraw($clear, 900, 720, 1)
- _A2D_DrawBitMap($Logo, 0, 0, 900, 720)
- _A2D_Buffer()
- For $count = 1 To 3 Step +1
- Assign("panda" & $count, _A2D_LoadImage(@ScriptDir & "\Data\Images\panda\panda" & $count & ".jpg"))
- Next
- $hHsc = $HighScore * $anti_t
- $lfisch = _A2D_LoadImage(@ScriptDir & "\Data\Images\fisch.png")
- $vfische1 = _A2D_LoadImage(@ScriptDir & "\Data\Images\vfische.png")
- $vfische2 = _A2D_LoadImage(@ScriptDir & "\Data\Images\vfische2.png")
- $mfisch = _A2D_LoadImage(@ScriptDir & "\Data\Images\mfisch.png")
- $mbfisch = _A2D_LoadImage(@ScriptDir & "\Data\Images\mbfisch.png")
- $stone = _A2D_LoadImage(@ScriptDir & "\Data\Images\stone.png")
- $rain = _A2D_LoadImage(@ScriptDir & "\Data\Images\rain.png")
- $matsch = _A2D_LoadImage(@ScriptDir & "\Data\Images\matsch.jpg")
- $grass = _A2D_LoadImage(@ScriptDir & "\Data\Images\grass.jpg")
- $pandaj = _A2D_LoadImage(@ScriptDir & "\Data\Images\panda\pandaj.jpg")
- $pandab = _A2D_LoadImage(@ScriptDir & "\Data\Images\pandab.jpg")
- $boden = _A2D_LoadImage(@ScriptDir & "\Data\Images\boden.jpg")
- $jumpb = _A2D_LoadImage(@ScriptDir & "\Data\Images\jumpb.jpg")
- $schlucht = _A2D_LoadImage(@ScriptDir & "\Data\Images\schlucht.jpg")
- $tr_ex = _A2D_LoadImage(@ScriptDir & "\Data\Images\tr_ex.jpg")
- $tr1 = _A2D_LoadImage(@ScriptDir & "\Data\Images\tr1.png")
- $tr2 = _A2D_LoadImage(@ScriptDir & "\Data\Images\tr2.jpg")
- $size[1] = 550 * 0.5
- $size[2] = 550 * 0.5
- $size[3] = 550 * 0.5
- $size[4] = 250 * 0.5
- For $count = 1 To 5 Step +1
- $baggerAn[$count] = _A2D_LoadImage(@ScriptDir & "\Data\Images\bagger\bagger" & $count & ".png")
- Next
- For $count = 1 To 4 Step +1
- $tree[$count][0] = _A2D_LoadImage(@ScriptDir & "\Data\Images\tree" & $count & ".png")
- $tree[$count][4] = $size[$count]
- Next
- _A2D_ObjCreate($panda1, 100, 380, 25, 50, "Panda")
- _A2D_ObjStatus("Panda", 1)
- $Bagger[1] = 540 ;X
- $Bagger[2] = 157 ;Y
- $Bagger[3] = 350 ;Width
- $Bagger[4] = 300 ;Height
- _A2D_ObjCreate($baggerAn[1], $Bagger[1], $Bagger[2], $Bagger[3], $Bagger[4], "Bagger")
- _A2D_ObjStatus("Bagger", 1)
- $PandaW = 25
- $PandaH = 50
- $PandaX = 100
- $PandaY = 380
- For $count = 1 To 4 Step +1
- $tree[$count][2] = $count * 1000
- Next
- ;Sleep(5000)
- _GenTerrain()
- $hDLL = DllOpen("user32.dll")
- AdlibRegister("_GenTerrain", $SpawnSpeed)
- ;AdlibRegister("_Animate", 100)
- $running = 0
- $ch = 1
- HotKeySet("{ESC}", "_go")
- ;_Boss()
- AdlibRegister("_Draw", 10)
- Func _pause()
- If $running = 0 Or $falling = 1 Then Return -1
- Switch $pause
- Case 0
- AdlibUnRegister("_GenTerrain")
- $OldStageSpeed = $StageSpeed
- $StageSpeed = 0
- $pause = 1
- Case 1
- $StageSpeed = $OldStageSpeed
- $pause = 0
- AdlibRegister("_GenTerrain", $SpawnSpeed)
- EndSwitch
- EndFunc ;==>_pause
- Func _stopboost()
- If $infiniteBoost = 0 Then $RemBoost -= 10
- If $RemBoost = 0 Then
- $StageSpeed = $OldStageSpeed
- $Invincible = 0
- AdlibRegister("_GenTerrain", $SpawnSpeed)
- AdlibUnRegister("_stopgen")
- AdlibUnRegister("_stopboost")
- EndIf
- EndFunc ;==>_stopboost
- Func _stopgen()
- AdlibUnRegister("_GenTerrain")
- EndFunc ;==>_stopgen
- Func _jump()
- If $injump = 1 Then Return -1
- $t = 0
- $bla = 0
- $injump = 1
- $spoint = $PandaY + 3
- $jumpvel = $standardJumpValue
- ;$Gravity = 0.3
- EndFunc ;==>_jump
- Func _Difference($1, $2)
- If $1 > $2 Then
- Return $1 - $2
- ElseIf $2 > $1 Then
- Return $2 - $1
- ElseIf $2 = $1 Then
- Return 0
- EndIf
- EndFunc ;==>_Difference
- Func _ReCalcDistance($rcd = 1)
- Switch $rcd
- Case 1
- $oX = Random(901, 2901, 1)
- $exit = 0
- While $exit = 0
- $n = 0
- For $tcount = 1 To $MaxTerrObj Step +1
- Switch $TerrObj[$tcount][0]
- Case 1 To 5
- If _Difference($oX, $TerrObj[$tcount][1]) < 60 And _Difference($oX, $TerrObj[$tcount][1] + $TerrObj[$tcount][2]) < 60 Then
- $oX = Random(901, 2901, 1)
- $n = 1
- EndIf
- Case 7 to 10
- If _Difference($oX, $TerrObj[$tcount][1]) < 60 And _Difference($oX, $TerrObj[$tcount][1] + $TerrObj[$tcount][2]) < 60 Then
- $oX = Random(901, 2901, 1)
- $n = 1
- EndIf
- EndSwitch
- Next
- If $n = 0 Then
- Return $oX
- EndIf
- WEnd
- Case 2
- $oX = Random(1, 2901, 1)
- $exit = 0
- While $exit = 0
- $n = 0
- For $tcount = 1 To $MaxTerrObj Step +1
- Switch $TerrObj[$tcount][0]
- Case 1 To 5
- If _Difference($oX, $TerrObj[$tcount][1]) < 60 And _Difference($oX, $TerrObj[$tcount][1] + $TerrObj[$tcount][2]) < 60 Then
- $oX = Random(1, 2901, 1)
- $n = 1
- EndIf
- Case 7 to 10
- If _Difference($oX, $TerrObj[$tcount][1]) < 60 And _Difference($oX, $TerrObj[$tcount][1] + $TerrObj[$tcount][2]) < 60 Then
- $oX = Random(1, 2901, 1)
- $n = 1
- EndIf
- EndSwitch
- Next
- If $n = 0 Then
- Return $oX
- EndIf
- WEnd
- EndSwitch
- EndFunc ;==>_ReCalcDistance
- Func _CheckType($tp)
- Switch $tp
- Case 1 To 10
- Return 2
- Case Else
- Return 1
- EndSwitch
- EndFunc ;==>_CheckType
- Func _TerrCreate($bm, $y, $w, $h, $it, $t, $e1,$abc = 1)
- If $abc = 1 Then
- $oX = _ReCalcDistance()
- Else
- $oX = _ReCalcDistance(2)
- EndIf
- For $tcount = 1 To $MaxTerrObj Step +1
- If _CheckType($TerrObj[$tcount][0]) = 1 Then
- If $TerrObj[$tcount][0] = -1 Then
- _A2D_ObjUpdate("tr" & $tcount, $bm, $oX, $y, $w, $h, $t, $e1, $tcount)
- _A2D_ObjStatus("tr" & $tcount, 1)
- Else
- _A2D_ObjCreate($bm, $oX, $y, $w, $h, "tr" & $tcount, $t, $e1, $tcount)
- _A2D_ObjStatus("tr" & $tcount, 1)
- EndIf
- $TerrObj[$tcount][0] = $it
- $TerrObj[$tcount][1] = $oX
- $TerrObj[$tcount][2] = $w ;width
- $TerrObj[$tcount][3] = $h ;height
- $TerrObj[$tcount][4] = $y ;y
- $TerrObj[$tcount][6] = False
- ExitLoop
- EndIf
- Next
- EndFunc ;==>_TerrCreate
- Func _idle()
- AdlibUnRegister("_Draw")
- $Active = 0
- Do
- If WinGetState("PandaRunner") = 5 Then
- _A2D_Shutdown()
- Exit
- EndIf
- Sleep(100)
- Until WinActive("PandaRunner")
- $Active = 1
- GUISetState(@SW_HIDE, $settingsform)
- AdlibRegister("_Draw", $gsp)
- EndFunc ;==>_idle
- Func _Resize()
- If Not WinActive("PandaRunner") Then _idle()
- $size2 = WinGetClientSize("PandaRunner")
- If $size2[0] <> 900 Or $size2[1] <> 720 Then
- $pos = WinGetPos("PandaRunner")
- WinMove("PandaRunner", "", $pos[0], $pos[1], 900, 720)
- EndIf
- EndFunc ;==>_Resize
- Func _GenTerrain()
- If Not WinActive("PandaRunner") Then _idle()
- If $WaterY <= 129 Then
- If Random(1,3,1) = 1 Then _TerrCreate($lfisch, Random(140,600,1), 50, 30, 7, 2, 2)
- _TerrCreate($mfisch, Random(140,600,1), 150, 75, 8, 2, 1)
- For $gencount = 1 to 2 Step +1
- Switch Random(1,2,1)
- Case 1
- _TerrCreate($vfische1, Random(140,600,1), 150, 75, 10, 2, 2)
- Case 2
- _TerrCreate($vfische2, Random(140,600,1), 150, 75, 10, 2, 2)
- EndSwitch
- Next
- If Random(1,4,1) = 1 Then _TerrCreate($mbfisch, Random(140,600,1), 200, 100, 9, 2, 2)
- Return
- EndIf
- If Random(1, 3, 1) = 1 Then ;Bäume
- $oX = Random(901, 2901, 1)
- $exit = 0
- While $exit = 0
- $n = 0
- For $count = 1 To 4 Step +1
- If $tree[$count][1] = 1 And _Difference($oX, $tree[$count][2]) < 250 Then
- $oX = Random(901, 2901, 1)
- $n = 1
- ElseIf $count = 4 And $n = 0 Then
- $exit = 1
- EndIf
- Next
- WEnd
- $lasttree = $oX
- For $count = 1 To 4 Step +1
- If $tree[$count][1] <> 1 Then
- $tree[$count][1] = 1
- $tree[$count][2] = $oX
- ExitLoop
- EndIf
- Next
- EndIf
- If Random(1, 30, 1) = 1 Then ;Speedboost
- _TerrCreate($tr_ex, 400, 23, 30, 2, 2, 2)
- EndIf
- If Random(1, 20, 1) = 1 Then ;JumpBoost
- _TerrCreate($jumpb, 400, 23, 30, 5, 2, 2)
- EndIf
- If Random(1, 3, 1) = 1 Then ;Babypandas
- _TerrCreate($pandab, 400, 23, 30, 3, 2, 3)
- EndIf
- If Random(1, 17, 1) = 1 And $raining = 0 And $rfall = 0 And $WaterY > 429 Then ;Regen
- $rcount = 0
- $rfall = 1
- $raining = 1
- $RainY = -1600
- $RainY2 = -1600
- AdlibRegister("_disRain", Random(8000, 20000, 1))
- EndIf
- If Random(1, 5, 1) = 1 Then ;Schlucht
- $oX = _ReCalcDistance()
- For $tcount = 1 To $MaxTerrObj Step +1
- If _CheckType($TerrObj[$tcount][0]) = 1 Then
- If $TerrObj[$tcount][0] = -1 Then
- _A2D_ObjUpdate("tr" & $tcount, $schlucht, $oX, 430, 75, 290, 2, 1, $tcount)
- _A2D_ObjStatus("tr" & $tcount, 1)
- Else
- _A2D_ObjCreate($schlucht, $oX, 430, 75, 290, "tr" & $tcount, 2, 1, $tcount)
- _A2D_ObjStatus("tr" & $tcount, 1)
- EndIf
- $TerrObj[$tcount][0] = 4
- $TerrObj[$tcount][1] = $oX + ($PandaW - 1) ;x + pandawidth
- $TerrObj[$tcount][2] = 75 - ($PandaW - 1);width - pandawidth
- $TerrObj[$tcount][3] = 290 ;height
- $TerrObj[$tcount][4] = 429 ;y
- $TerrObj[$tcount][7] = 0 ;y
- ExitLoop
- EndIf
- Next
- EndIf
- If $raining = 1 Then ;Matsch
- _TerrCreate($matsch, 429, 75, 10, 6, 2, 3,2)
- EndIf
- $NorTerr = Random(1, 2, 1) ;Hindernis
- _TerrCreate(Eval("tr" & $NorTerr), 400, 50, 30, 1, 2, 1)
- EndFunc ;==>_GenTerrain
- Func _MoveTerrain()
- ;ConsoleWrite(@CRLF & $WaterCount)
- For $count = 1 To 4 Step +1
- If $tree[$count][1] = 1 Then
- If $tree[$count][2] >= ($tree[$count][4] * -1) Then
- $tree[$count][2] -= $StageSpeed
- ;ConsoleWrite(@CRLF & $count)
- If $MLG = 1 Then _QuickDraw_RotateNext( $tree[$count][2]+($tree[$count][4]/2), 120+(330/2), $degr )
- _A2D_DrawBitMap($tree[$count][0], $tree[$count][2], 120, $tree[$count][4], 330);$tree[$count][3],$tree[$count][4])
- Else
- $tree[$count][1] = -1
- EndIf
- EndIf
- Next
- $gx = 0
- ;For $count = 1 to 18 Step +1
- If $WaterY > 420 Then
- If $MLG = 1 Then _QuickDraw_RotateNext( 450, 420, $degr )
- _A2D_DrawBitMap($grass, 0, 410, 900, 20)
- ;$gx += 50
- ;Next
- For $count = 1 To $MaxTerrObj Step +1
- If $TerrObj[$count][0] >= 1 And $TerrObj[$count][0] <> 4 And $TerrObj[$count][0] <> 6 Then
- If $TerrObj[$count][1] > -150 Then
- $TerrObj[$count][1] -= $StageSpeed
- If $MLG = 1 Then _QuickDraw_RotateNext( $TerrObj[$count][1]+($TerrObj[$count][2]/2), $TerrObj[$count][4]+($TerrObj[$count][3]/2), $degr )
- _A2D_ObjDraw("tr" & $count, 1, $TerrObj[$count][1], $TerrObj[$count][4], $TerrObj[$count][2], $TerrObj[$count][3], 2, $TerrObj[$count][0], $count)
- Else
- _A2D_ObjStatus("tr" & $count, -1)
- $TerrObj[$count][0] = -1
- EndIf
- EndIf
- Next
- If $raining = 1 Then
- $rcount += 1
- _Rain()
- ElseIf $raining = 0 And $RainY >= -1200 And $RainY <= 430 Then
- $RainY += 5
- $RainY2 += 5
- _Rain()
- Else
- $rfall = 0
- EndIf
- _A2D_DrawBitMap($boden, 0, 430, 900, 290)
- For $count = 1 To $MaxTerrObj Step +1
- If $TerrObj[$count][0] = 4 Then
- If $TerrObj[$count][1] > -150 Then
- $TerrObj[$count][1] -= $StageSpeed
- _A2D_ObjUpdate("tr" & $count, $schlucht, $TerrObj[$count][1], $TerrObj[$count][4], $TerrObj[$count][2] - ($PandaW + 1), $TerrObj[$count][3], 2, $TerrObj[$count][0], $count)
- _A2D_DrawBitMap($schlucht, $TerrObj[$count][1] - ($PandaW - 1), $TerrObj[$count][4] + 1, $TerrObj[$count][2] + ($PandaW + 1), $TerrObj[$count][3])
- #cs
- If $raining = 1 Or $TerrObj[$count][6] = True Then
- If $TerrObj[$count][1] < 901 Then $TerrObj[$count][6] = True
- If $TerrObj[$count][7] < 21 And $TerrObj[$count][1] < 901 Then $TerrObj[$count][7] += 0.05
- _A2D_DrawBitMap(-1, $TerrObj[$count][1] - ($PandaW - 1), $TerrObj[$count][4] + 292 - $TerrObj[$count][7], $TerrObj[$count][2] + ($PandaW + 1), 20, 0xFF4B68B3)
- EndIf
- #ce
- Else
- _A2D_ObjStatus("tr" & $count, -1)
- $TerrObj[$count][0] = -1
- EndIf
- EndIf
- Next
- For $count = 1 To $MaxTerrObj Step +1
- If $TerrObj[$count][0] = 6 Then
- If $TerrObj[$count][1] > -150 Then
- If $MLG = 1 Then _QuickDraw_RotateNext( $TerrObj[$count][1]+($TerrObj[$count][2]/2), $TerrObj[$count][4]+($TerrObj[$count][3]/2), $degr )
- $TerrObj[$count][1] -= $StageSpeed
- _A2D_ObjDraw("tr" & $count, 1, $TerrObj[$count][1], $TerrObj[$count][4], $TerrObj[$count][2], $TerrObj[$count][3], 2, $TerrObj[$count][0], $count)
- Else
- _A2D_ObjStatus("tr" & $count, -1)
- $TerrObj[$count][0] = -1
- EndIf
- EndIf
- Next
- EndIf
- If ($raining = 1 and $running = 1 and $rfall = 1 and $rcount >= 200) or ($WaterY < 720 and $running = 1) Then
- If $WaterY > 129 and $raining = 1 and $WaterDone = 0 or _Check22() Then
- If $rcount >= 200 and $WaterDone = 0 and $WaterCountdown = 0 Then $WaterY -= 0.2
- EndIf
- If $WaterY <= 129 or $WaterDone = 1 Then
- ;If $Invincible = 1 Then $Invincible = 0
- $WaterDone = 1
- If $WaterCount <= 9999 Then $WaterCount += 1
- If $WaterCount >= 10000 Then
- If $WaterY < 720 Then
- If $PandaY < 380 Then $PandaY += 0.4
- $WaterY += 0.4
- Else
- If $PandaY > 381 Then
- _Die()
- Else
- For $tcount = 1 To $MaxTerrObj Step +1
- If $TerrObj[$tcount][0] >= 1 Then
- $TerrObj[$tcount][0] = -1
- EndIf
- Next
- $WaterDone = 0
- $WaterCount = 0
- $ResetWaterObjects = 0
- $WaterCountdown = 10000
- EndIf
- EndIf
- EndIf
- EndIf
- _A2D_DrawBitMap(-1,0, $WaterY, 900, 700, 0xFF4B68B3)
- ;_A2D_DrawBitMap(-1,0,$WaterY+500,900,100,0xFFc2b280)
- If $WaterY <= 129 Then
- For $count = 1 To $MaxTerrObj Step +1
- Switch $TerrObj[$count][0]
- Case 7 to 8
- If $MLG = 1 Then _QuickDraw_RotateNext( $TerrObj[$count][1]+($TerrObj[$count][2]/2), $TerrObj[$count][4]+($TerrObj[$count][3]/2), $degr )
- If $TerrObj[$count][1] > -150 Then
- $TerrObj[$count][1] -= $StageSpeed
- _A2D_ObjDraw("tr" & $count, 1, $TerrObj[$count][1], $TerrObj[$count][4], $TerrObj[$count][2], $TerrObj[$count][3], 2, $TerrObj[$count][0], $count)
- Else
- _A2D_ObjStatus("tr" & $count, -1)
- $TerrObj[$count][0] = -1
- EndIf
- Case 9
- If $MLG = 1 Then _QuickDraw_RotateNext( $TerrObj[$count][1]+($TerrObj[$count][2]/2), $TerrObj[$count][4]+($TerrObj[$count][3]/2), $degr )
- If $TerrObj[$count][1] > -200 Then
- $TerrObj[$count][1] -= $StageSpeed*0.75
- _A2D_ObjDraw("tr" & $count, 1, $TerrObj[$count][1], $TerrObj[$count][4], $TerrObj[$count][2], $TerrObj[$count][3], 2, $TerrObj[$count][0], $count)
- Else
- _A2D_ObjStatus("tr" & $count, -1)
- $TerrObj[$count][0] = -1
- EndIf
- Case 10
- If $MLG = 1 Then _QuickDraw_RotateNext( $TerrObj[$count][1]+($TerrObj[$count][2]/2), $TerrObj[$count][4]+($TerrObj[$count][3]/2), $degr )
- If $TerrObj[$count][1] > -150 Then
- $TerrObj[$count][1] -= $StageSpeed*1.25
- _A2D_ObjDraw("tr" & $count, 1, $TerrObj[$count][1], $TerrObj[$count][4], $TerrObj[$count][2], $TerrObj[$count][3], 2, $TerrObj[$count][0], $count)
- Else
- _A2D_ObjStatus("tr" & $count, -1)
- $TerrObj[$count][0] = -1
- EndIf
- EndSwitch
- Next
- EndIf
- EndIf
- If $injump = 1 And $running = 1 Then
- _A2D_ObjDraw("Panda", 1, $PandaX, $PandaY, $PandaW, $PandaH, 1, 0, 0, $pandaj)
- ElseIf $running = 1 Then
- _A2D_ObjDraw("Panda", 1, $PandaX, $PandaY, $PandaW, $PandaH, 1, 0, 0, Eval("panda" & $panda_an))
- If $panda_an >= 3 Then $panda_an = 0
- EndIf
- EndFunc ;==>_MoveTerrain
- Func _Check22()
- If $WaterDone = 1 Then Return -1
- If $WaterY < 429 and $WaterY > 129 Then
- If $ResetWaterObjects = 0 Then
- $ResetWaterObjects = 1
- $RemBoost = 0
- $RemJump = 0
- For $tcount = 1 To $MaxTerrObj Step +1
- If $TerrObj[$tcount][0] >= 1 Then
- $TerrObj[$tcount][0] = -1
- EndIf
- Next
- EndIf
- Return 1
- EndIf
- If $WaterY < 720 and $raining = 0 And $RainY >= -1200 And $RainY <= 430 Then Return 1
- EndFunc
- Func _Die()
- _CheckHS()
- AdlibUnRegister("_Animate")
- AdlibUnRegister("_stopgen")
- AdlibUnRegister("_stopboost")
- AdlibUnRegister("_DisJump")
- If $moon = 0 Then $Gravity = 0.3
- $RemJump = 0
- $PandaH = 50
- $PandaY = 380
- $RemBoost = 0
- $running = 0
- $bosscount = 0
- $scorecount = 0
- $PandaX = 100
- $falling = 0
- $standardJumpValue = $OldJumpValue
- AdlibUnRegister("_GenTerrain")
- AdlibRegister("_GenTerrain", $SpawnSpeed)
- EndFunc ;==>_Die
- Func _CheckHS()
- If $Invincible = 1 Or $moon = 1 Or $infiniteBoost = 1 Or $infiniteJump = 1 Then Return -1
- If $score > $HighScore Then
- If $hscore / $anti_t <> $score Or $hHsc / $anti_t <> $HighScore Then
- MsgBox(64, "Info", "Nice Hax but no", 5)
- Exit
- EndIf
- _A2D_Encrypt($score, @ScriptDir & "\Data\score.a2d")
- $HighScore = $score
- $hHsc = $HighScore * $anti_t
- EndIf
- EndFunc ;==>_CheckHS
- Func _CollCheck()
- $collnum = _A2D_CCollision("objM:single", 0, 2, $PandaX, $PandaY, $PandaW, $PandaH)
- If $Invincible = 1 Then Return -1
- If $StageSpeed <> 12 And $collnum <> 6 And $inm = 1 Then
- $StageSpeed = 5
- $panda_m = 3
- $inm = 0
- EndIf
- ConsoleWrite(@CRLF & $TerrObj[$collnum][0])
- Switch $TerrObj[$collnum][0]
- Case 1
- _Die()
- Case 2
- $OldStageSpeed = $StageSpeed
- $StageSpeed = 12
- $Invincible = 1;$BegInvincible
- $ExtraTerrActive = 0
- AdlibRegister("_stopgen", 2000)
- $RemBoost = 4000
- AdlibRegister("_stopboost", 10)
- $collnum = 0
- Return
- Case 3
- ConsoleWrite(@CRLF & "COLL WITH LFISH")
- $TerrObj[$collnum][0] = -1
- _A2D_ObjStatus("tr" & $collnum, -1)
- $score += 100
- $scorecount += 100
- $hscore += $anti_t * 100
- _A2D_ObjUpdate("tr" & $collnum, 0)
- $collnum = 0
- Return
- Case 4
- AdlibUnRegister("_Draw")
- AdlibUnRegister("_GenTerrain")
- AdlibUnRegister("_Animate")
- $falling = 1
- While 1
- $PandaY += 10
- If $PandaY > 720 Then
- _Die()
- EndIf
- If $running = 0 Then
- $PandaY = 380
- ExitLoop
- EndIf
- _A2D_MapDraw($clear, 900, 430, 1)
- For $count = 1 To 4 Step +1
- If $tree[$count][1] = 1 Then
- If $tree[$count][2] >= ($tree[$count][4] * -1) Then
- _A2D_DrawBitMap($tree[$count][0], $tree[$count][2], 120, $tree[$count][4], 330);$tree[$count][3],$tree[$count][4])
- EndIf
- EndIf
- Next
- $gx = 0
- ;For $count = 1 to 18 Step +1
- _A2D_DrawBitMap($grass, 0, 410, 900, 20)
- ;$gx += 50
- ;Next
- For $count = 1 To $MaxTerrObj Step +1
- If $TerrObj[$count][0] >= 1 And $TerrObj[$count][0] <> 4 And $TerrObj[$count][0] <> 6 Then
- If $TerrObj[$count][1] > -150 Then
- _A2D_ObjDraw("tr" & $count, 1, $TerrObj[$count][1], $TerrObj[$count][4], $TerrObj[$count][2], $TerrObj[$count][3], 2, $TerrObj[$count][0], $count)
- EndIf
- EndIf
- Next
- If $raining = 1 Then
- _Rain()
- ElseIf $raining = 0 And $RainY >= -1200 And $RainY <= 430 Then
- $RainY += 5
- $RainY2 += 5
- _Rain()
- Else
- $rfall = 0
- EndIf
- _A2D_DrawBitMap($boden, 0, 430, 900, 290)
- For $count = 1 To $MaxTerrObj Step +1
- If $TerrObj[$count][0] = 4 Then
- If $TerrObj[$count][1] > -150 Then
- _A2D_ObjUpdate("tr" & $count, $schlucht, $TerrObj[$count][1], $TerrObj[$count][4], $TerrObj[$count][2] - ($PandaW + 1), $TerrObj[$count][3], 2, $TerrObj[$count][0], $count)
- _A2D_DrawBitMap($schlucht, $TerrObj[$count][1] - ($PandaW - 1), $TerrObj[$count][4] + 1, $TerrObj[$count][2] + ($PandaW + 1), $TerrObj[$count][3])
- #cs
- If $raining = 1 Or $TerrObj[$count][6] = True Then
- If $TerrObj[$count][1] < 901 Then $TerrObj[$count][6] = True
- If $TerrObj[$count][7] < 21 And $TerrObj[$count][1] < 901 Then $TerrObj[$count][7] += 0.05
- _A2D_DrawBitMap(-1, $TerrObj[$count][1] - ($PandaW - 1), $TerrObj[$count][4] + 292 - $TerrObj[$count][7], $TerrObj[$count][2] + ($PandaW + 1), 20, 0xFF4B68B3)
- EndIf
- #ce
- EndIf
- EndIf
- Next
- For $count = 1 To $MaxTerrObj Step +1
- If $TerrObj[$count][0] = 6 Then
- If $TerrObj[$count][1] > -150 Then
- _A2D_ObjDraw("tr" & $count, 1, $TerrObj[$count][1], $TerrObj[$count][4], $TerrObj[$count][2], $TerrObj[$count][3], 2, $TerrObj[$count][0], $count)
- EndIf
- EndIf
- Next
- _A2D_DrawBitMap(-1,0, $WaterY, 900, 700, 0xFF4B68B3)
- _A2D_DrawBitMap(-1,0,$WaterY+500,900,100,0xFFc2b280)
- _A2D_ObjDraw("Panda", 1, $PandaX, $PandaY, $PandaW, $PandaH, 1, 0, 0, Eval("panda" & $panda_an))
- _A2D_DrawString("Punkte: " & $score, 30, 650, 30)
- _A2D_DrawString("Highscore: " & $HighScore, 30, 650, 50)
- _A2D_DrawString($GameVersion, 10, 2, 718)
- _A2D_DrawString("Made for my best Bruh",10,800,718)
- _A2D_FPS()
- _A2D_Buffer()
- Sleep($gsp)
- WEnd
- AdlibRegister("_Draw", $gsp)
- Case 5 ;JumpBoost
- ;ConsoleWrite("go")
- $TerrObj[$collnum][0] = -1
- _A2D_ObjStatus("tr" & $collnum, -1)
- _A2D_ObjUpdate("tr" & $collnum, 0)
- $collnum = 0
- $OldJumpValue = $standardJumpValue
- $standardJumpValue = 11
- If $moon = 0 Then $Gravity = 0.2
- $RemJump = 10000
- AdlibRegister("_DisJump", 10)
- Case 6 ;Matsch
- $StageSpeed = 2
- $panda_m = 1.5
- $inm = 1
- Case 7
- ConsoleWrite(@CRLF & "COLL WITH LFISH")
- $TerrObj[$collnum][0] = -1
- _A2D_ObjStatus("tr" & $collnum, -1)
- $score += 100
- $scorecount += 100
- $hscore += $anti_t * 100
- _A2D_ObjUpdate("tr" & $collnum, 0)
- $collnum = 0
- Return
- Case 8
- _Die()
- Case 9
- _Die()
- EndSwitch
- EndFunc ;==>_CollCheck
- Func _DisJump()
- If $infiniteJump = 0 Then $RemJump -= 10
- If $RemJump = 0 Then
- $standardJumpValue = 8
- If $moon = 0 Then $Gravity = 0.3
- AdlibUnRegister("_DisJump")
- EndIf
- EndFunc ;==>_DisJump
- Func _Animate()
- ;If $pause = 1 Then Return -1
- $panda_an += 1
- EndFunc ;==>_Animate
- HotKeySet("{UP}", "_up")
- HotKeySet("{DOWN}", "_down")
- HotKeySet("{ENTER}", "_enter")
- Func _up()
- If $running = 1 Or $Active = 0 Then Return -1
- If $ch > 1 Then $ch -= 1
- EndFunc ;==>_up
- Func _down()
- If $running = 1 Or $Active = 0 Then Return -1
- If $ch < 4 Then $ch += 1
- EndFunc ;==>_down
- Func FeedBack()
- EndFunc ;==>FeedBack
- Func ApplyPressed()
- $gsp = GUICtrlRead($Slider1)
- GUISetState(@SW_HIDE, $settingsform)
- $sloop = 0
- AdlibRegister("_Draw", $gsp)
- EndFunc ;==>ApplyPressed
- Func MLGPressed()
- $degr = 0
- If $MLG = 0 Then
- $MLG = 1
- Else
- $MLG = 0
- EndIf
- EndFunc
- Func ResetPressed()
- GUICtrlSetData($Slider1, 10)
- $gsp = 10
- EndFunc ;==>ResetPressed
- Func UpdatePressed()
- $source = _INetGetSource("http://firediver.bplaced.net/PandaRunner/vs.php")
- $SoSplit = StringSplit($source, "|")
- If @error Then
- MsgBox(16, "Fehler", "Fehler beim Lesen der Antwort!")
- Else
- If $GameVersion <> $SoSplit[1] Then
- $choice = MsgBox(4, "Info", $SoSplit[2])
- If $choice = 6 Then
- ShellExecute("www.firediver.bplaced.net/PandaRunner/Patchnotes.txt")
- EndIf
- SplashTextOn("Info", "Update wird heruntergeladen...", 300, 150)
- InetGet("http://firediver.bplaced.net/PandaRunner/upd.exe", @TempDir & "\upd_pr.exe")
- SplashOff()
- If Not FileExists(@TempDir & "\pandar_upd.bat") Then
- FileWriteLine(@TempDir & "\pandar_upd.bat", "@echo off")
- FileWriteLine(@TempDir & "\pandar_upd.bat", "echo Bitte warten...")
- FileWriteLine(@TempDir & "\pandar_upd.bat", "ping -n 04 localhost>nul")
- FileWriteLine(@TempDir & "\pandar_upd.bat", "MOVE /Y upd_pr.exe " & @ScriptDir & "\PandaRunner.exe")
- FileWriteLine(@TempDir & "\pandar_upd.bat", "echo Update erfolgreich beendet!")
- FileWriteLine(@TempDir & "\pandar_upd.bat", "ping -n 10 localhost>nul")
- ShellExecute(@TempDir & "\pandar_upd.bat", "", @TempDir)
- Exit
- EndIf
- Else
- MsgBox(64, "Info", "PandaRunner ist auf dem neuestem stand! (" & $GameVersion & ")")
- EndIf
- EndIf
- EndFunc ;==>UpdatePressed
- Func SliderMoved()
- GUICtrlSetData($Label4, Round(1000 / GUICtrlRead($Slider1)) & " FPS")
- EndFunc ;==>SliderMoved
- Func InfLPressed()
- If $Invincible = 0 Then
- $Invincible = 1
- Else
- $Invincible = 0
- EndIf
- EndFunc ;==>InfLPressed
- Func InfJPressed()
- If $infiniteJump = 0 Then
- $infiniteJump = 1
- Else
- $infiniteJump = 0
- EndIf
- EndFunc ;==>InfJPressed
- Func InfBPressed()
- If $infiniteBoost = 0 Then
- $infiniteBoost = 1
- Else
- $infiniteBoost = 0
- EndIf
- EndFunc ;==>InfBPressed
- Func MoonPressed()
- If $moon = 0 Then
- $Gravity = 0.05
- $SGravity = 0.05
- $moon = 1
- Else
- $Gravity = 0.3
- $SGravity = 0.3
- $moon = 0
- EndIf
- EndFunc ;==>MoonPressed
- Func _enter()
- ;ConsoleWrite(@CRLF & $p_enter & @CRLF & $Active)
- If $running = 1 Or $Active = 0 Then Return -1
- If $p_enter = 1 Then
- Return -1
- Else
- $p_enter = 1
- EndIf
- ;ConsoleWrite("a")
- Switch $ch
- Case 1
- $standardJumpValue = $OldJumpValue
- $score = 0
- $hscore = 0
- $WaterY = 721
- $WaterDone = 0
- $WaterCount = 0
- $ResetWaterObjects = 0
- $WaterCountdown = 0
- $bosscount = 0
- $panda_an = 0
- $StageSpeed = 5
- For $tcount = 1 To $MaxTerrObj Step +1
- If $TerrObj[$tcount][0] >= 1 Then
- $TerrObj[$tcount][0] = -1
- EndIf
- Next
- For $treec = 1 To 4 Step +1
- $tree[$treec][1] = -1
- Next
- $running = 1
- ;AdlibRegister("_Animate", 100)
- Case 2
- MsgBox(64, "Info", "Funktion noch in Entwicklung")
- Case 3
- AdlibUnRegister("_Draw")
- GUICtrlSetData($Slider1, $gsp)
- If $MLG = 1 Then GUICtrlSetState($Checkbox5, $GUI_CHECKED)
- If $moon = 1 Then GUICtrlSetState($Checkbox4, $GUI_CHECKED)
- If $infiniteBoost = 1 Then GUICtrlSetState($Checkbox3, $GUI_CHECKED)
- If $infiniteJump = 1 Then GUICtrlSetState($Checkbox2, $GUI_CHECKED)
- If $Invincible = 1 Then GUICtrlSetState($Checkbox1, $GUI_CHECKED)
- GUISetState(@SW_SHOW, $settingsform)
- Case 4
- _A2D_Shutdown()
- Exit
- EndSwitch
- $p_enter = 0
- EndFunc ;==>_enter
- Func _MoveBossTerrain()
- For $count = 1 To 4 Step +1
- If $tree[$count][1] = 1 Then
- If $tree[$count][2] >= ($tree[$count][4] * -1) Then
- ;ConsoleWrite(@CRLF & $count)
- If $MLG = 1 Then _QuickDraw_RotateNext( $tree[$count][2]+($tree[$count][4]/2), 120+(330/2), $degr )
- _A2D_DrawBitMap($tree[$count][0], $tree[$count][2], 120, $tree[$count][4], 330);$tree[$count][3],$tree[$count][4])
- EndIf
- EndIf
- Next
- _A2D_DrawBitMap($grass, 0, 410, 900, 20)
- _A2D_DrawBitMap($boden, 0, 430, 900, 290)
- If $raining = 1 and $running = 1 and $rfall = 1 and $rcount > 200 or $WaterY < 720 Then
- _A2D_DrawBitMap(-1,0, $WaterY, 900, 700, 0xFF4B68B3)
- EndIf
- EndFunc ;==>_MoveBossTerrain
- Func _go()
- AdlibRegister("_throwAN", 50)
- EndFunc ;==>_go
- Func _throwAN()
- If $ban = 5 Then $rev = 1
- If $ban = 1 And $rev = 1 Then
- $rev = 0
- AdlibUnRegister("_throwAN")
- EndIf
- If $rev = 0 Then
- $ban += 1
- $StoneX += 1
- $StoneY -= 10
- ElseIf $rev = 1 Then
- $ban -= 1
- EndIf
- If $ban = 3 And $ll = 0 Then _throw()
- EndFunc ;==>_throwAN
- Func _throw()
- $ll = 1
- $tt = 0
- $Sjumpvel = Random(12, 17)
- ;$SGravity = 0.3
- $bla2 = 0
- $StoneY = 380
- $SSpeed = Random(5, 10)
- $throw = 1
- $StoneX = 513
- EndFunc ;==>_throw
- Func _Boss()
- AdlibUnRegister("_Animate")
- AdlibUnRegister("_GenTerrain")
- $BossFight = 1
- $StoneX = 513
- $PandaX = 100
- $RemBoost = 0
- $RemJump = 0
- $standardJumpValue = $OldJumpValue
- $StoneY = 380
- $StimeM = Random(1500, 3500, 1)
- $StimeC = 0
- $throwed = 0
- While $BossFight = 1
- If $MLG = 1 Then
- If $degr <= 360 Then
- $degr += 1
- Else
- $degr = 0
- EndIf
- EndIf
- $lcount += 1
- If $throwed = 5 Then
- $PandaH = 50
- For $tcount = 1 To $MaxTerrObj Step +1
- If $TerrObj[$tcount][0] >= 1 Then
- $TerrObj[$tcount][0] = -1
- EndIf
- Next
- $PandaY = 380
- AdlibRegister("_GenTerrain", $SpawnSpeed)
- $BossFight = 0
- Return 1
- EndIf
- Sleep($gsp)
- ;ConsoleWrite(@CRLF & "C:" & $StimeC & " M:" & $StimeM)
- $StimeC += 10
- If $StimeC >= $StimeM Then
- $StimeM = Random(1500, 3500)
- $StimeC = 0
- $laying = 0
- $throwAN = 1
- EndIf
- If $ban = 5 Then $rev = 1
- If $throwAN = 1 And $lcount >= 5 Then
- $lcount = 0
- If $ban = 1 And $rev = 1 Then
- $rev = 0
- $throwAN = 0
- EndIf
- If $rev = 0 Then
- $ban += 1
- $StoneX += 1
- $StoneY -= 10
- ElseIf $rev = 1 Then
- $ban -= 1
- EndIf
- If $ban = 3 And $ll = 0 Then _throw()
- EndIf
- If _IsPressed("26", $hDLL) Then _jump()
- If _IsPressed("25", $hDLL) Then
- If $PandaX - $panda_m > 3 Then
- $PandaX -= $panda_m ;links
- EndIf
- EndIf
- If _IsPressed("27", $hDLL) Then
- If $PandaX + $panda_m < 220 Then
- $panda_an += 1
- $PandaX += $panda_m ;rechts
- EndIf
- EndIf
- If _IsPressed("28", $hDLL) Then
- $PandaH = 25
- If $injump = 1 Then
- If $down = 0 Then $PandaY += 25
- If $moon = 0 Then $Gravity = 0.5
- $down = 1
- Else
- $PandaY = 405
- EndIf
- ElseIf $PandaH <> 50 Then
- $down = 0
- $PandaH = 50
- $PandaY = 380
- EndIf
- _A2D_MapDraw($clear, 900, 430, 1)
- If $throw = 1 Then
- If $StoneY >= 380 And $tt >= 0.10 Then
- $laying += 1
- $StoneY = 380
- If $laying = 40 Then
- $throw = 0
- $ll = 0
- $throwed += 1
- $StoneX = 513
- EndIf
- ElseIf $laying = 0 Then
- $tt += 0.10
- $StoneX = $StoneX - $SSpeed
- $StoneY -= $Sjumpvel * $tt
- $Sjumpvel -= $SGravity * $tt
- If $Sjumpvel < 0 And $bla2 = 0 Then
- $bla2 = 1
- $tt = -0.5
- $Sjumpvel = 0
- Else
- $Sjumpvel -= $SGravity * $tt
- EndIf
- If _A2D_CCollision("custom", 0, 0, $PandaX, $PandaY, $PandaW, $PandaH, $StoneX, $StoneY, 50, 50) And $Invincible = 0 Then
- AdlibRegister("_GenTerrain", $SpawnSpeed)
- $BossFight = 0
- $ll = 0
- _Die()
- Return 1
- EndIf
- EndIf
- EndIf
- If $injump = 1 Then
- $t += 0.08
- $PandaY -= $jumpvel * $t
- $jumpvel -= $Gravity * $t
- If $jumpvel < 0 And $bla = 0 Then
- $bla = 1
- $t = -0.5
- $jumpvel = 0
- Else
- $jumpvel -= $Gravity * $t
- EndIf
- If Not $down = 1 And $PandaY >= 380 Then
- $PandaY = 380
- $injump = 0
- ElseIf $down = 1 And $PandaY >= 405 Then
- $PandaY = 405
- $injump = 0
- EndIf
- EndIf
- _MoveBossTerrain()
- If $MLG = 1 Then _QuickDraw_RotateNext( $Bagger[1]+($Bagger[3]/2), $Bagger[2]+($Bagger[4]/2), $degr )
- _A2D_ObjDraw("Bagger", 1, $Bagger[1], $Bagger[2], $Bagger[3], $Bagger[4], 2, 0, 0, $baggerAn[$ban])
- If $injump = 1 Then
- _A2D_ObjDraw("Panda", 1, $PandaX, $PandaY, $PandaW, $PandaH, 1, 0, 0, $pandaj)
- Else
- _A2D_ObjDraw("Panda", 1, $PandaX, $PandaY, $PandaW, $PandaH, 1, 0, 0, Eval("panda" & $panda_an))
- If $panda_an >= 3 Then $panda_an = 0
- EndIf
- If $MLG = 1 Then _QuickDraw_RotateNext( $StoneX+(50/2), $StoneY+(50/2), $degr )
- _A2D_DrawBitMap($stone, $StoneX, $StoneY, 50, 50)
- _A2D_DrawString("Punkte: " & $score, 30, 650, 30)
- _A2D_DrawString("Highscore: " & $HighScore, 30, 650, 50)
- _A2D_DrawString($GameVersion, 10, 2, 718)
- _A2D_DrawString("Made for my best Bruh",10,800,718)
- _A2D_FPS()
- _A2D_Buffer()
- WEnd
- EndFunc ;==>_Boss
- Func _Rain()
- If $raining = 1 Then
- If $RainY > 0 Then
- $RainY = -450
- Else
- $RainY += 5
- EndIf
- If $RainY2 > 0 Then
- $RainY2 = -450
- Else
- $RainY2 += 5
- EndIf
- EndIf
- _A2D_DrawBitMap($rain, 0, $RainY, 100, $RainH)
- _A2D_DrawBitMap($rain, 100, $RainY2, 100, $RainH)
- _A2D_DrawBitMap($rain, 200, $RainY, 100, $RainH)
- _A2D_DrawBitMap($rain, 300, $RainY2, 100, $RainH)
- _A2D_DrawBitMap($rain, 400, $RainY, 100, $RainH)
- _A2D_DrawBitMap($rain, 500, $RainY2, 100, $RainH)
- _A2D_DrawBitMap($rain, 600, $RainY, 100, $RainH)
- _A2D_DrawBitMap($rain, 700, $RainY2, 100, $RainH)
- _A2D_DrawBitMap($rain, 800, $RainY, 100, $RainH)
- ;_A2D_DrawBitMap($rain,00,$RainY2,100,$RainH)
- EndFunc ;==>_Rain
- Func _disRain()
- $raining = 0
- AdlibUnRegister("_disRain")
- EndFunc ;==>_disRain
- Func _Draw()
- If $MLG = 1 Then
- If $degr <= 360 Then
- $degr += 1
- Else
- $degr = 0
- EndIf
- EndIf
- ;ConsoleWrite(@CRLF & $raining & " " & $rfall)
- If $running = 1 And $pause = 0 and $WaterY - $PandaY >= 50 Then
- If _IsPressed("26", $hDLL) Then _jump()
- If _IsPressed("25", $hDLL) Then
- If $PandaX - $panda_m > 3 Then
- $PandaX -= $panda_m ;links
- $score -= 1
- $scorecount -= 1
- $hscore -= $anti_t
- EndIf
- EndIf
- If _IsPressed("27", $hDLL) Then
- If $PandaX + $panda_m < 875 Then
- $panda_an += 1
- $PandaX += $panda_m ;rechts
- $score += 1
- $scorecount += 1
- $hscore += $anti_t
- EndIf
- EndIf
- $score += 2
- $hscore += $anti_t * 2
- $scorecount += 2
- ElseIf $running = 1 and $pause = 0 and $WaterY - $PandaY < 50 Then
- $pr = 0
- If _IsPressed("26", $hDLL) Then
- $PandaY -= $panda_m/1.5
- $pr = 1
- EndIf
- If _IsPressed("28", $hDLL) Then
- If $PandaY + $panda_m <= 580 Then
- $PandaY += $panda_m/1.5
- $pr = 1
- EndIf
- EndIf
- If _IsPressed("25", $hDLL) Then
- If $PandaX - $panda_m > 3 Then
- $PandaX -= $panda_m/1.5 ;links
- $score -= 1
- $scorecount -= 1
- $pr = 1
- $hscore -= $anti_t
- EndIf
- EndIf
- If _IsPressed("27", $hDLL) Then
- If $PandaX + $panda_m < 875 Then
- $panda_an += 1
- $PandaX += $panda_m/1.5 ;rechts
- $score += 1
- $pr = 1
- $scorecount += 1
- $hscore += $anti_t
- EndIf
- EndIf
- If $PandaY - 0.4 < 679 Then $PandaY += 0.4
- $score += 2
- $hscore += $anti_t * 2
- $scorecount += 2
- EndIf
- If $WaterCountdown > 0 Then $WaterCountdown -= 1
- If $scorecount >= 1000 And $running = 1 Then
- $bosscount += 1
- $scorecount = 0
- EndIf
- If $bosscount >= 10 And $RemBoost = 0 And $RemJump = 0 And $WaterY > 430 Then
- $bosscount = 0
- AdlibUnRegister("_Draw")
- _Boss()
- AdlibRegister("_Draw", $gsp)
- EndIf
- _A2D_MapDraw($clear, 900, 430, 1)
- If $injump = 1 Then
- $t += 0.08
- $PandaY -= $jumpvel * $t
- $jumpvel -= $Gravity * $t
- If $jumpvel < 0 And $bla = 0 Then
- $bla = 1
- $t = -0.5
- $jumpvel = 0
- Else
- $jumpvel -= $Gravity * $t
- EndIf
- If Not $down = 1 And $PandaY >= 380 And $WaterY - $PandaY >= 50 Then
- $PandaY = 380
- $injump = 0
- ElseIf $down = 1 And $PandaY >= 405 And $WaterY - $PandaY >= 50 Then
- $PandaY = 405
- $injump = 0
- ElseIf $PandaY >= $spoint And $WaterY - $PandaY <= 50 Then
- $PandaY = $spoint
- $injump = 0
- $spoint = 1000
- EndIf
- EndIf
- If $running = 1 Then _CollCheck()
- _MoveTerrain()
- _A2D_DrawString("Punkte: " & $score, 30, 650, 30)
- _A2D_DrawString("Highscore: " & $HighScore, 30, 650, 50)
- If $RemJump > 0 Then _A2D_DrawBitMap($jumpb, 650, 70, 0.02 * $RemJump, 20)
- If $RemBoost > 0 Then _A2D_DrawBitMap($tr_ex, 650, 90, 0.05 * $RemBoost, 20)
- If $running = 0 Then
- _A2D_DrawString("SPIELEN", 40, 360, 200)
- _A2D_DrawString("HILFE", 40, 385, 250)
- _A2D_DrawString("EINSTELUNGEN", 40, 305, 300)
- _A2D_DrawString("VERLASSEN", 40, 340, 350)
- If $ch = 1 Then
- _A2D_DrawString("---> <---", 30, 230, 200)
- ElseIf $ch = 2 Then
- _A2D_DrawString("---> <---", 30, 230, 250)
- ElseIf $ch = 3 Then
- _A2D_DrawString("---> <---", 30, 230, 300)
- ElseIf $ch = 4 Then
- _A2D_DrawString("---> <---", 30, 230, 350)
- EndIf
- EndIf
- _A2D_DrawString($GameVersion, 10, 2, 718)
- _A2D_DrawString("Made for my best Bruh",10,800,718)
- _A2D_FPS()
- _A2D_Buffer()
- EndFunc ;==>_Draw
- While 1
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement