Das schiff bewegt sich nicht ueber den Bildschrim sondern
das Steht in der Mitte des Bildschrims fest und der Hintergrund bewegt sich "im prinzip" unterm
raumschiff hinweg
Die Maus soll das Schiff in alle richtungen steuern sprich :
Wenn die Maus unterm Schiff ist solls nach unten fliegen etc
Und es soll also im Prinzip her zur Maus fliegen D
EDIT 3:
Da der Link gelöscht wurde/entfernt
lade ich hier mal den Sourcecode hoch D
BlitzBasic: [AUSKLAPPEN] [EINKLAPPEN] SetGfxDriver 1 Print ("Gib zuerst deinen Usernamen ein !") Print ("Danach einfach ENTER drücken aber schliesse dieses Fenster NICHT!")
Graphics 640,480,32,2 AppTitle "LightOrbit by Bobo2040" SetBuffer BackBuffer()
Global Ankathete,Gegenkathete Global WinkelSpieler
Global connection,trash_buffer
Global ms=MilliSecs()
Global Ship_1=LoadImage("images/ship_normal.png")
Global Ship_2=LoadImage("images/ship_left_top.png")
Global Ship_3=LoadImage("images/ship_right_top.png")
Global Ship_4=LoadImage("images/ship_left.png")
Global Ship_5=LoadImage("images/ship_right.png")
Global Ship_6=LoadImage("images/ship_left_bottom.png")
Global Ship_7=LoadImage("images/ship_bottom.png")
Global Ship_8=LoadImage("images/ship_right_bottom.png") Global Gate_1=LoadImage("images/gate1.png") Global Map_1=LoadImage("images/map.png") Global Map_2=LoadImage("images/map2.jpg") Global Map=Map_1
Global Minimap_1=LoadImage("images/minimap/minimap1.png") Global Minimap_2=LoadImage("images/minimap/minimap2.png") Global Minimap=Minimap_1 Global WaitMap=0
Global AiLog=0 Global AiDown=LoadImage("images/ai/streunerD.png") Global AiDefault=LoadImage("images/ai/streuner.png") Global AiImage=AiDefault Global Schaden=0 Global AiHP=450000 Global AiSchild=450000 Global AiTimer=0 Global AiMap=Rand(1,2) Global AiSchaden=0 Global NewAi=0 Global AiX=100 Global AiY=100
Global KameraX Global kameraY
Global SpielerX=900 Global SpielerY=900 Global SpielerShip=Ship_1 Global username$=Input$() Global hitpoints=306000 Global schild1=250000 Global schild2=250000 Global schild=schild1 Global confi=1 Global diff Global Ehre=0 Global EP=0 Global Level=1 Global KillCount=0 Global SzDMGTimer=0 Global RepairTimer=0 Global AutoRepair=0 Global Move=0
Global RP=1
Global Rang1=LoadImage("images/rank/rank_1.png") Global Rang2=LoadImage("images/rank/rank_2.png") Global Rang3=LoadImage("images/rank/rank_3.png") Global Rang4=LoadImage("images/rank/rank_4.png") Global Rang5=LoadImage("images/rank/rank_5.png") Global Rang6=LoadImage("images/rank/rank_6.png") Global Rang7=LoadImage("images/rank/rank_7.png") Global Rang8=LoadImage("images/rank/rank_8.png") Global Rang9=LoadImage("images/rank/rank_9.png") Global Rang10=LoadImage("images/rank/rank_10.png") Global Rang11=LoadImage("images/rank/rank_11.png") Global Rang12=LoadImage("images/rank/rank_12.png") Global Rang13=LoadImage("images/rank/rank_13.png") Global Rang14=LoadImage("images/rank/rank_14.png") Global Rang15=LoadImage("images/rank/rank_15.png") Global Rang16=LoadImage("images/rank/rank_16.png") Global Rang17=LoadImage("images/rank/rank_17.png") Global Rang18=LoadImage("images/rank/rank_18.png") Global Rang19=LoadImage("images/rank/rank_19.png") Global Rang20=LoadImage("images/rank/rank_20.png") Global Rang21=LoadImage("images/rank/rank_21.png")
Global RangImage=Rang1
Global FPSTimer=CreateTimer(27)
Global LaserX,LaserY Global LaserTimer=0 Global Laser1=0 Global Laser2=0 Global Laser3=0 Global AutoShootTimer=0 Global AutoShoot=0 Global ShowLaser=0 Global Counter=1 Global CounterY=1 Global Counter2=1 Global CounterY2=1 Global LaserWay=1 Global LaserXCounter=0 Global LaserYCounter=0 Global Winkel,speed,x_speed,y_speed
Global ShowDmg=0 Global ShowDmgTimer=0 Global ShowInfo=0 Global InfoTimer=1
Global rounds=1 Global Animation = LoadAnimImage("images/ai/exploFrame1.png", 128, 128, 0, 8) Global Black = LoadImage("images/ai/Black.png") Global gfxSparks = Animation Global DrawBlack = 0 Global frmSparks=0 Global tmrSparks
Global Active1=LoadImage("images/slot/Active1.png") Global Active2=LoadImage("images/slot/Active2.png") Global Active3=LoadImage("images/slot/Active3.png")
Global InActive1=LoadImage("images/slot/InActive1.png") Global InActive2=LoadImage("images/slot/InActive2.png") Global InActive3=LoadImage("images/slot/InActive3.png")
Global LaserImage1=Active3 Global LaserImage2=InActive1 Global LaserImage3=InActive2
Global AiShowSchadenTimer=0 Global UserShowSchadenTimer=0 Global Schaden2=0
Global UCBmunition=1001 Global RSBmunition=1001 Global MCBmunition=2500 Global MuniAlert=LoadSound("sounds/MuniAlert.mp3")
Global BackgroundSound=LoadSound("sounds/bg_sound.mp3") Global JumpSound=LoadSound("sounds/jump_sound.mp3") Global Warning=LoadSound("sounds/Warning.mp3") Global EnemyDown=LoadSound("sounds/EnemyDown.mp3") Global UCB100Sound=LoadSound("sounds/UCB100.mp3") Global RSB75Sound=LoadSound("sounds/RSB.mp3") Global MCB10Sound=LoadSound("sounds/MCB10.mp3") Global MoveSound=LoadSound("sounds/MoveSound.mp3")
Global DrawBox=1 Global BlueBoxTimer=0 Global Belohnung=6 Global BlueBox=LoadImage("images/boxes/Box_1.png")
Global NewStarsTimer=0
bigFont=LoadFont("Veranda",20,1) font=LoadFont("Veranda",15,1)
LoopSound BackgroundSound PlaySound BackgroundSound
SetFont font Repeat MaskImage InActive1,255,255,255 MaskImage InActive2,255,255,255 MaskImage InActive3,255,255,255 MaskImage AiDown,255,255,255 MaskImage AiDefault,255,255,255 MaskImage gfxSparks, 255, 255, 255 MaskImage BlueBox,0,0,0 Maus2() UserDMG() ChangeMap() Minimap() AutoShoot() UserDMG() ActiveLasers() MoveSound() Cls NewNPC() KameraX=SpielerX-GraphicsWidth()/2 KameraY=SpielerY-GraphicsHeight()/2 Repair() MaskImage Map,0,0,0 DrawImage Map,1-KameraX,1-KameraY StarField() DrawImage Gate_1,150-KameraX,150-KameraY SetFont bigFont MakeAi() SetFont font BlueBox() Color 255,255,255 Rect 480,400,25,25 MaskImage Minimap,255,255,255 DrawImage Minimap,440,350
RedDot() ShowCoor() Ehre() ShipRotation()
Color 255,255,255 MaskImage RangImage,255,255,255 DrawImage RangImage,292,327 Text 310,325,username$,False,False Text 300,460,"LightOrbit Alpha Version. 0.0.9 by Bobo ",True,False Color 100,240,50 Text 10,10,"HP:"+hitpoints,False,False Color 0,191,255 Text 10,30,"SH:"+schild,False,False Quest() Confi() Rang() DrawLaser() Hitpoints() MaskImage SpielerShip,255,255,255 DrawImage SpielerShip,SpielerX-KameraX-25,SpielerY-KameraY-25 DrawImage LaserImage3,GraphicsWidth()/2-57,420 DrawImage LaserImage1,GraphicsWidth()/2-25,420 DrawImage LaserImage2,GraphicsWidth()/2+7,420 Munition() DeadScreen() WaitTimer(FpsTimer) Flip 1 Until KeyHit(1)
Function Maus() y=MouseY() x=MouseX() If MouseDown(1) Then If y<160 And x<218 Then SpielerX=SpielerX-2.5 SpielerY=SpielerY-1.5
SpielerShip=Ship_2 Move=1
ElseIf y<160 And x<436 Then SpielerY=SpielerY-3
SpielerShip=Ship_1 Move=1
ElseIf y<160 And x<640 Then SpielerX=SpielerX+2.5 SpielerY=SpielerY-2.5 SpielerShip=Ship_3 Move=1 ElseIf y<320 And x<218 Then SpielerX=SpielerX-3
SpielerShip=Ship_4 Move=1
ElseIf y<320 And x<436 Then SpielerX=SpielerX+2.5 SpielerY=SpielerY-2.5 SpielerShip=Ship_1 Move=1 ElseIf y<320 And x<640 Then SpielerX=SpielerX+3
SpielerShip=Ship_5 Move=1
ElseIf y<480 And x<218 Then SpielerX=SpielerX-2.5 SpielerY=SpielerY+2.5
SpielerShip=Ship_6 Move=1
ElseIf y<480 And x<436 Then SpielerY=SpielerY+3 SpielerShip=Ship_7 Move=1 ElseIf y<480 And x<640 Then SpielerX=SpielerX+2.5 SpielerY=SpielerY+2.5 SpielerShip=Ship_8 Move=1 EndIf Else Move=0 EndIf End Function
Function Maus2() If MouseDown(1) Then Speed=2 Rotation=ATan2(240-MouseY(),320-MouseX()) SpielerX=SpielerX + Sin(Rotation)*Speed SpielerY=SpielerY + Cos(Rotation)*Speed EndIf End Function
Function Maus3() FixpunktX=320 FixpunktY=240
WinkelSpieler=ATan2(Gegenkathete,Ankathete) Gegenkathete=FixpunktY-MouseY() Ankathete=FixpunktX-MouseX() Gegenkathete=Abs(Gegenkathete) Ankathete=Abs(Ankathete) End Function
Function UserDMG() If KeyHit(2) Then Laser1=0 Laser2=0 Laser3=1 If AutoShoot=1 Then AutoShoot=0 Else AutoShoot=1 EndIf ElseIf KeyHit(3) Then Laser1 = 1 Laser2 = 0 If AutoShoot=1 Then AutoShoot=0 Else AutoShoot=1 EndIf ElseIf KeyHit(4) Then Laser2 = 1 Laser1 = 0 If AutoShoot=1 Then AutoShoot=0 Else AutoShoot=1 EndIf EndIf End Function
Function ChangeMap() If KeyHit(36) Then If WaitMap < MilliSecs() Then WaitMap = MilliSecs()+3000 If -250-KameraX < SpielerX And 750-KameraX > SpielerX Then If -250-KameraY < SpielerY And 750-KameraY > SpielerY Then PlaySound JumpSound If Map=Map_2 Then Map=Map_1 AiLog=0 ElseIf Map=Map_1 Then Map=Map_2 AiLog=0 EndIf EndIf EndIf EndIf EndIf End Function Function Minimap() If Map=Map_1 Then Minimap=Minimap_1 ElseIf Map=Map_2 Then Minimap=Minimap_2 EndIf End Function
Function ShowCoor() x=SpielerX/10+440 y=SpielerY/10+352 If x<442 Then x=442 If SzDMGTimer<MilliSecs() Then SzDMGTimer = MilliSecs()+1500 hitpoints=hitpoints-Rand(8000,13000) PlaySound Warning EndIf EndIf If y<350 Then y=350 If SzDMGTimer<MilliSecs() Then SzDMGTimer = MilliSecs()+1500 hitpoints=hitpoints-Rand(8000,13000) PlaySound Warning EndIf EndIf If x>637 Then x=637 If SzDMGTimer<MilliSecs() Then SzDMGTimer = MilliSecs()+1500 hitpoints=hitpoints-Rand(8000,13000) PlaySound Warning EndIf EndIf If y>477 Then y=477 If SzDMGTimer<MilliSecs() Then SzDMGTimer = MilliSecs()+1500 hitpoints=hitpoints-Rand(8000,13000) PlaySound Warning EndIf EndIf Color 255,255,0 Rect x,y,3,3,1 Color 255,255,255 Oval 459,371,9,9,0 Rect 462.8,374.7,2,2 End Function
Function Hitpoints() xS=312 yS=195 breiteS=schild/3280 x=312 y=190 breite=hitpoints/4000 hoehe=3 Color 100,240,50 Rect x,y,breite,hoehe,1 Color 0,191,255 Rect xS,yS,breiteS,hoehe,1 End Function
Function Alien() If AiLog=1 Then If AiSchild>=1 Then If Schaden>0 Then AiHP=AiHP-0.4*Schaden AiSchild=AiSchild-0.6*Schaden Print Schaden EndIf Else AiHP=AiHP-Schaden EndIf If AiHP > 1 Then Color 205,0,0 Oval (AiX-13)-KameraX,(AiY-18)-KameraY,100,100,0 Oval (AiX-14)-KameraX,(AiY-19)-KameraY,98,98,0 Oval (AiX-15)-KameraX,(AiY-20)-KameraY,96,96,0 EndIf If AiHP <= 1 Then Schaden2=0 If AiLog=1 Then PlaySound EnemyDown AiImage=AiDown AiLog=0 KillCount=KillCount+1 EndIf EndIf EndIf End Function
Function AiLog() If MouseHit(1) Then If MouseX() > (AiX-80)-KameraX And MouseX() < (AiX+60)-KameraX Then If MouseY() > (AiY-80)-KameraX And MouseY() < (AiY+60)-KameraY Then If AiHP >= 1 Then AiImage=AiDefault AiLog=1 EndIf EndIf EndIf EndIf ShowDMG() Schaden=0 End Function
Function DefendAi() If AiLog=1 And AiHP > 1 Then If AiTimer < MilliSecs() Then AiTimer = MilliSecs()+1000 AiSchaden=Rand(3500,4500) If schild>=AiSchaden Then hitpoints=hitpoints-0.2*AiSchaden If confi=1 Then schild=schild1-0.8*AiSchaden schild1=schild1-0.8*AiSchaden ElseIf confi=2 Then schild=schild2-0.8*AiSchaden schild2=schild2-0.8*AiSchaden EndIf Else If schild<=AiSchaden Then If schild>0 Then schild=schild-AiSchaden SecondDmg=schild*(-1) hitpoints=hitpoints-SecondDmg schild=0 SecondDmg=0 EndIf EndIf hitpoints=hitpoints-AiSchaden EndIf ShowDmg=1 Else ShowDmg=0 EndIf EndIf End Function
Function DrawLaser() If AiLog=1 And AiHP>=1 Then If ShowLaser=1 And AutoShoot=1 Then If SpielerShip=Ship_1 Then LaserX = (SpielerX-1)-KameraX+45 LaserY = (SpielerY-1)-KameraY-25 EndIf Rect LaserX,LaserY,10,10 EndIf EndIf End Function
Function TCPconn() If MilliSecs()>=ms+100 tcp = OpenTCPStream("127.0.0.1", 80) WriteLine(tcp, "GET /test/index.php?username1="+username$+"&x="+SpielerX+"&y="+SpielerY+"&hp="+hitpoints+"&from= HTTP/1.0") WriteLine(tcp, Chr$(10)) CloseTCPStream tcp EndIf End Function
Function DynamicEnemies(x,y,hp) If hp>0 Then If MouseX()>x-30 And MouseX()<x+30 Then If MouseY()>y-30 And MouseY()<y+30 Then If MouseHit(1) Then GegnerLog=1 If Attack1=1 Then hp=hp-AttackSchaden1 Attack1=0 ElseIf Attack2=1 Then hp=hp-AttackSchaden2 Attack2=0 ElseIf Attack3=1 Then hp=hp-AttackSchaden3 Attack3=0 EndIf EndIf EndIf EndIf Else Text 300,110,"Gegner "+gegner+" zerstört",True,False GegnerLog=0 EndIf End Function
Function DeadScreen() If hitpoints<=0 Then Color 0,0,0 Rect 0,0,GraphicsWidth(),GraphicsHeight(),1 Color 255,255,255 Text GraphicsWidth()/2,GraphicsHeight()/2,"Sie wurden zerstört zum Beenden drücken Sie die ESC-Taste",True,False AiLog=0 EndIf End Function
Function DrawExplosion() If MilliSecs() > tmrSparks + 50 Then tmrSparks = MilliSecs() If rounds=8 Then gfxSparks=Black DrawBlack = 1 Else frmSparks = (frmSparks + 1) Mod 8 rounds = rounds+1 EndIf EndIf If DrawBlack=0 Then DrawImage gfxSparks, (AiX-25)-KameraX, (AiY-25)-KameraY, frmSparks Else DrawImage gfxSparks, 0, 0 EndIf End Function
Function Confi() If KeyHit(46) Then If confi=1 Then confi=2 schild=schild2 Else confi=1 schild=schild1 EndIf EndIf Color 255,255,255 Text 10,50,"Konfi: "+confi,False,False End Function
Function Repair() If Not hitpoints=306000 Then If Not AiLog=1 Then If KeyHit(5) Then AutoRepair=1 EndIf EndIf Else AutoRepair=0 EndIf If AutoRepair=1 Then If Move=0 Then If AiLog=0 Then If RepairTimer<MilliSecs() Then RepairTimer=MilliSecs()+1500 hitpoints=hitpoints+Rand(6000,8000) EndIf EndIf EndIf EndIf If hitpoints>306000 Then diff=hitpoints-306000 hitpoints=hitpoints-diff EndIf If Not schild>=250000 Then If Not AiLog=1 Then If KeyHit(6) Then If confi=1 Then schild=schild1+5000 schild1=schild1+5000 ElseIf confi=2 Then schild=schild2+5000 schild2=schild2+5000 EndIf EndIf EndIf If schild1>=250000 Then diff=schild1-250000 schild1=schild1-diff EndIf If schild2>=250000 Then diff=schild2-250000 schild2=schild2-diff EndIf EndIf End Function
Function Flee() If AiHP > 1 Then If AiLog=1 Then EndIf EndIf End Function
Function AutoShoot() randDMG=Rand(14,40) LF3=110+randDMG If AiLog = 1 Then If AutoShoot=1 Then If Laser1 = 1 And Laser2 = 0 Then If MilliSecs()>AutoShootTimer+750 Then If UCBmunition>=31 Then AutoShootTimer=MilliSecs() If RangImage=Rang21 Then Schaden = (LF3*31*4*2)*1.15 Else Schaden = LF3*31*4*2 EndIf UCBmunition=UCBmunition-31 PlaySound UCB100Sound ShowLaser=1 Else AutoShoot=0 ShowLaser=0 PlaySound MuniAlert EndIf EndIf ElseIf Laser2 = 1 And Laser1 = 0 Then If MilliSecs()>AutoShootTimer+1250 Then If RSBmunition>=31 Then AutoShootTimer=MilliSecs() If RangImage=Rang21 Then Schaden = (LF3*32*5*3)*1.15 Else Schaden = LF3*32*5*3 EndIf RSBmunition=RSBmunition-31 PlaySound RSB75Sound ShowLaser=1 Else AutoShoot=0 ShowLaser=0 PlaySound MuniAlert EndIf EndIf ElseIf Laser1=0 And Laser2=0 And Laser3=1 Then If MilliSecs()>AutoShootTimer+800 Then If MCBmunition>=31 Then AutoShootTimer=MilliSecs() If RangImage=Rang21 Then Schaden=(LF3*31)*1.15 Else Schaden=LF3*31 EndIf MCBmunition=MCBmunition-31 PlaySound MCB10Sound ShowLaser=1 Else AutoShoot=0 ShowLaser=0 PlaySound MuniAlert EndIf EndIf EndIf EndIf EndIf End Function
Function NewNPC() If AiHp<=1 Then AiLog=0 If MilliSecs()>AiTimer+1000 Then rounds=1 AiX=Rand(100,600) AiY=Rand(100,600) DrawBlack=0 gfxSparks=Animation frmSparks=0 AiTimer=MilliSecs() AiHP=450000 AiSchild=450000 AiImage=AiDefault AiMap=Rand(1,2) EndIf EndIf End Function
Function Ehre() If AiHP<1 Then Ehre=Ehre+128 EP=EP+51200 AiHP=1 EndIf Text 105,10,"Ehre: "+Ehre,False,False Text 105,30,"EP: "+EP,False,False If EP>=30000 Then Level=2 ElseIf EP>=80000 Then Level=3 ElseIf EP>=160000 Then Level=4 ElseIf EP>=320000 Then Level=5 ElseIf EP>=640000 Then Level=6 ElseIf EP>=1280000 Then Level=7 EndIf Text 105,50,"LvL: "+Level,False,False End Function
Function Rang() RP=EP/10+Ehre*15 If RP<=2000 Then RangImage=Rang1 ElseIf RP<=8000 Then RangImage=Rang2 ElseIf RP<=11000 Then RangImage=Rang3 ElseIf RP<=14000 Then RangImage=Rang4 ElseIf RP<=16000 Then RangImage=Rang5 ElseIf RP<=19000 Then RangImage=Rang6 ElseIf RP<=25000 Then RangImage=Rang7 ElseIf RP<=32000 Then RangImage=Rang8 ElseIf RP<=40000 Then RangImage=Rang9 ElseIf RP<=49000 Then RangImage=Rang10 ElseIf RP<=59000 Then RangImage=Rang11 ElseIf RP<=70000 Then RangImage=Rang12 ElseIf RP<=82000 Then RangImage=Rang13 ElseIf RP<=95000 Then RangImage=Rang14 ElseIf RP<=109000 Then RangImage=Rang15 ElseIf RP<=124000 Then RangImage=Rang16 ElseIf RP<=139000 Then RangImage=Rang17 ElseIf RP<=156000 Then RangImage=Rang18 ElseIf RP<=173000 Then RangImage=Rang19 ElseIf RP<=192000 Then RangImage=Rang20 ElseIf RP<=212000 Then RangImage=Rang21 Else RangImage=Rang21 EndIf End Function
Function MakeAi() If AiMap=1 And Map=Map_1 Then DefendAi() Alien() Color 100,240,50 breiteAi=AiHP/6300 hoeheAi=3 breiteAiS=AiSchild/6300 hoeheAiS=3 Rect AiX-KameraX,(AiY-10)-KameraY,breiteAi,hoeheAi Color 0,191,255 Rect AiX-KameraX,(AiY-6)-KameraY,breiteAiS,hoeheAiS DrawImage AiImage,AiX-KameraX,AiY-KameraY If AiImage=AiDown Then drawExplosion() EndIf If AiHP>1 Then AiLog() EndIf ElseIf AiMap=2 And Map=Map_2 Then Alien() DefendAi() Color 100,240,50 breiteAi=AiHP/6300 hoeheAi=3 breiteAiS=AiSchild/6300 hoeheAiS=3 Rect AiX-KameraX,(AiY-10)-KameraY,breiteAi,hoeheAi Color 0,191,255 Rect AiX-KameraX,(AiY-6)-KameraY,breiteAiS,hoeheAiS DrawImage AiImage,AiX-KameraX,AiY-KameraY If AiImage=AiDown Then drawExplosion() EndIf If AiHP>1 Then AiLog() EndIf EndIf End Function
Function Quest() If KillCount=500 Then EP=EP+0 Ehre=Ehre+0 KillCount=KillCount+1 EndIf End Function
Function MoveSound() If Move=1 Then PlaySound MoveSound EndIf End Function
Function ActiveLasers() If Laser1=1 And Laser2=0 Then LaserImage1=Active1 LaserImage2=InActive2 LaserImage3=InActive3 ElseIf Laser1=0 And Laser2=1 Then LaserImage1=InActive1 LaserImage2=Active2 LaserImage3=InActive3 ElseIf Laser1=0 And Laser2=0 And Laser3=1 Then LaserImage1=InActive1 LaserImage2=InActive2 LaserImage3=Active3 Else Laser1=0 Laser2=0 Laser3=1 EndIf End Function
Function RedDot() If AiHP>1 Then If AiMap=1 And Map=Map_1 Then RedDotX=AiX/8+436 RedDotY=AiY/8+346 Color 205,0,0 Rect RedDotX,RedDotY,4,4 ElseIf AiMap=2 And Map=Map_2 Then RedDotX=AiX/8+435 RedDotY=AiY/8+345 Color 205,0,0 Rect RedDotX,RedDotY,4,4 EndIf EndIf End Function
Function BlueBox()
If DrawBox=1 Then DrawImage BlueBox,50-KameraX,50-KameraY EndIf If DrawBox=1 Then If MouseX()>25-KameraX And MouseX()<250-KameraX Then If MouseY()>25-KameraY And MouseY()<250-KameraY Then If MouseHit(1) Then Belohnung=Rand(1,5) DrawBox=0 Print "Belohung" EndIf EndIf EndIf EndIf If Belohnung=1 Then Schaden=Schaden*1.10 Belohnung=6 ElseIf Belohnung=2 Then EP=EP*2 Belohnung=6 ElseIf Belohnung=3 Then Ehre=Ehre*2 Belohnung=6 ElseIf Belohnung=4 Then hitpoints=336000 Belohnung=6 ElseIf Belohnung=5 Then schild=300000 Belohnung=6 EndIf If BlueBoxTimer<MilliSecs() Then BlueBoxTimer=MilliSecs()+2500 DrawBox=1 EndIf End Function
Function StarField() If NewStarsTimer<MilliSecs() Then NewStarsTimer=MilliSecs()+15 For i=1 To 4 Step 1 Color Rand(150,255),Rand(150,255),Rand(150,255) Rect Rand(0,640),Rand(0,480),Rand(1,2),Rand(1,2) Next EndIf End Function
Function Munition() If UCBmunition>=751 Then Color 0,191,255 ElseIf UCBmunition<=750 And UCBmunition>=251 Then Color 255,127,36 ElseIf UCBmunition<=250 Then Color 255,64,64 EndIf Text GraphicsWidth()/2-25,405,UCBmunition,False,False If RSBmunition>=751 Then Color 0,191,255 ElseIf RSBmunition<=750 And RSBmunition>=251 Then Color 255,127,36 ElseIf RSBmunition<=250 Then Color 255,64,64 EndIf Text GraphicsWidth()/2+7,405,RSBmunition,False,False If MCBmunition>=751 Then Color 0,191,255 ElseIf MCBmuntion<=750 And MCBmuntion>=251 Then Color 255,127,36 ElseIf MCBmuntion<=250 Then Color 255,64,64 EndIf Text GraphicsWidth()/2-58,405,MCBmunition,False,False End Function
Function ShowDMG() If Not Schaden=0 Then Schaden2=Schaden EndIf If Schaden2>1 Then If UserShowSchadenTimer<MilliSecs() Then UserShowSchadenTimer=MilliSecs()+700 EndIf If UserShowSchadenTimer>MilliSecs() Then Color 255,64,64 Text (AiX+40)-KameraX,(AiY-35)-KameraY,"- "+Schaden2,True,False EndIf EndIf If AiSchaden>1 And AiLog=1 Then If AiShowSchadenTimer<MilliSecs() Then AiShowSchadenTimer=MilliSecs()+700 EndIf If AiShowSchadenTimer>MilliSecs() Then Color 255,64,64 Text 345,170,"- "+AiSchaden,True,False EndIf EndIf End Function
Function ShipRotation() Winkel=ATan2(SpielerY-AiY,SpielerX-AiX)
If AutoShoot=1 And AiLog=1 Then
If Winkel>(-157) And Winkel<(-112) Then SpielerShip=Ship_8
ElseIf Winkel>(-112) And Winkel<(-67) Then SpielerShip=Ship_7
ElseIf Winkel>(-67) And Winkel<(-22) Then SpielerShip=Ship_6
ElseIf Winkel>(-22) And Winkel<22 Then SpielerShip=Ship_4
ElseIf Winkel>22 And Winkel<67 Then SpielerShip=Ship_2
ElseIf Winkel>67 And Winkel<112 Then SpielerShip=Ship_1
ElseIf Winkel>112 And Winkel<157 Then SpielerShip=Ship_3
ElseIf Winkel>157 And Winkel<(180) Then SpielerShip=Ship_5
ElseIf Winkel<(-157) And Winkel>(-180) SpielerShip=Ship_5
EndIf EndIf Text 315,130,Winkel,True,False End Function
|