Voisiko joku auttaa...
Code: Select all
alku:
SCREEN 320,240,32,cbsizable
SetWindow "Adventure of Simalir",3
crosshair=LoadObject("Media\crosshair.bmp")
text1=LoadObject ("Media\startgame.bmp")
text4=LoadObject ("Media\exitgame.bmp")
menu=PlaySound ("Media\stage_1.mid")
PositionObject text1, 0,50
PositionObject text4, 0,-30
playing=ON
Repeat
ShowMouse OFF
PositionObject crosshair,MouseWX(),MouseWY()
If ObjectsOverlap (crosshair,text1) And MouseHit (1) Then
playing=Not playing
If playing Then
StopSound menu
Gosub pelialku
EndIf
EndIf
If ObjectsOverlap (crosshair,text4) And MouseHit (1) Then
End
EndIf
DrawScreen
Forever
pelialku:
SCREEN 320,240,32,cbsizable
FrameLimit 40
mappi=LoadImage ("Media\map.bmp")
plc=LoadObject ("Media\place1.bmp")
ResizeImage mappi, 250,250
PositionObject plc, 69,41
Repeat
DrawImage mappi,30,0
DrawGame
Text 10,10, "Level 1: Evergreen town"
If MouseHit (1) Then Goto taso1
DrawScreen
Until EscapeKey ()
taso1:
FrameLimit 40
ruoho = MakeObjectFloor ()
nurmikko = LoadImage ("Media\grass.bmp")
PaintObject ruoho, nurmikko
vihu = LoadObject("Media\car2.bmp",72)
ukko = LoadObject ("Media\guy.bmp",72)
musa=PlaySound("Media\space_2.xm")
AddText "Destroy car in 10 hits!"
AddText "(A) Attack"
PositionObject ukko,0,192
PositionObject vihu,0,-160
ShowObject plc,OFF
Repeat
If LeftKey() Then TurnObject ukko,5
If RightKey() Then TurnObject ukko,-5
If UpKey() Then MoveObject ukko,2
If DownKey() Then MoveObject ukko,-2
If ObjectX(ukko)<-200 Then PositionObject ukko,-200,ObjectY(ukko)
If ObjectX(ukko)>200 Then PositionObject ukko,200,ObjectY(ukko)
If ObjectY(ukko)<-150 Then PositionObject ukko,ObjectX(ukko),-150
If ObjectY(ukko)>150 Then PositionObject ukko,ObjectX(ukko),150
If ObjectX(vihu)<-200 Then PositionObject vihu,-200,ObjectY(vihu)
If ObjectX(vihu)>200 Then PositionObject vihu,200,ObjectY(vihu)
If ObjectY(vihu)<-150 Then PositionObject vihu,ObjectX(vihu),-150
If ObjectY(vihu)>150 Then PositionObject vihu,ObjectX(vihu),150
MoveObject vihu, 4
If Timer() > vihuaika + 1500 Then
vihuaika = Timer()
kaantoframet = 9
EndIf
If kaantoframet Then
TurnObject vihu,16
kaantoframet -1
EndIf
UpdateGame
DrawGame
If ObjectsOverlap (ukko, vihu,3) And KeyHit(cbkeyA) Then
counter+1
EndIf
Text 0,40,"Hits: "+counter
If counter=>10 Then
ShowObject vihu, OFF
Text 50,50,"You destroyed the car."
Text 50,70,"Continue your quest (space)"
EndIf
If KeyHit (cbkeyspace) Then
Goto palku2
EndIf
CloneCameraPosition ukko
DrawScreen
Forever
palku2:
FrameLimit 40
playing=OFF
mappi2=LoadImage ("Media\map.bmp")
plc=LoadObject ("Media\place1.bmp")
ResizeImage mappi2, 250,250
PositionObject plc, 50,11
Repeat
DrawImage mappi2,30,0
DrawGame
Text 10,10, "Level 2: Evergreen Center"
Text 10,30,"Choose your partner"
If KeyHit (cbkeyspace) Then Goto taso2
DrawScreen
Until EscapeKey ()
taso2:
SCREEN 500,350
ShowObject plc2,OFF
ShowObject plc,OFF
jobs = 24 : Dim job$(jobs)
races = 26 : Dim race$(races)
sukus = 2 : Dim suku$(sukus)
suku(1) = "Poika"
suku(2) = "Tyttö"
job(1) = "Soturi"
job(2) = "Maagi"
job(3) = "Varas"
job(4) = "Metsästäjä"
job(5)="Pappi"
job(6)="Ritari"
job(7)="Noita"
job(8)= "Haudanryöstäjä"
job(9)= "Poppamies"
job(10)="Illusionisti"
job(11)="Pommialan expertti"
job(12)="Pedonkesyttäjä"
job(13)="Pyssymies"
job(14)="Ninja"
job(15)="Seppä"
job(16)="Viikinki"
job(17)="Piraatti"
job(18)="Pyromaani"
job(19)="Kalastaja"
job(20)="Hypnotisoija"
job(21)="Sotilas"
job(22)="Voimamies"
job(23)="Kemisti"
job(24)="Mekaanikko"
race(1) = "Ihminen"
race(2) = "Peikko"
race(3) = "Kääpiö"
race(4) = "Demoni"
race(5) = "Maahinen"
race(6) = "Epäkuollut"
race(7) = "Haltia"
race(8) = "Luuranko"
race(9) = "Jätti"
race(10)= "Mutantti"
race(11)= "Puolihaltia"
race(12)= "Peto"
race(13)= "Keiju"
race(14)= "Zombi"
race(15)= "Kyborgi"
race(16)= "Vampyyri"
race(17)= "Henki"
race(18)= "Ihmissusi"
race(19)= "Tonttu"
race(20)= "Piru"
race(21)= "Alien"
race(22)= "Gargoili"
race(23)= "Lumimies"
race(24)= "Alien"
race(25)= "Merenneito"
race(26)= "Mönjä"
vaihe = 1
Repeat
Locate 100,100
Select vaihe
case 1
Color cbwhite
Locate 10,30
omanimi$=Input(" Nimesi: ")
If KeyHit(cbkeyreturn)
CloseInput
ClearKeys
vaihe+1
EndIf
Case 2
For i=1 To sukus
Text 10,i*10,i+") "+suku(i)
Next i
lol = Input(" Valitse sukupuolesi: ")
If KeyHit(cbkeyreturn) And lol>0 And lol<sukus+1 Then
omasuku$ = suku(lol)
CloseInput()
ClearKeys()
vaihe + 1
EndIf
Case 3
For i=1 To races
Text 10,i*10,i+") "+race(i)
Next i
lol = Input(" Valitse lajisi: ")
If KeyHit(cbkeyreturn) And lol>0 And lol<races+1 Then
omarace$ = race(lol)
CloseInput()
ClearKeys()
vaihe + 1
EndIf
Case 4
For a=1 To jobs
Text 10,a*10,a+") "+job(a)
Next a
lol = Input(" Valitse ammattisi: ")
If KeyHit(cbkeyreturn) And lol>0 And lol<jobs+1 Then
omajob$ = job(lol)
CloseInput()
ClearKeys()
MakeError "Tervetuloa peliin "+omanimi+", olet "+omasuku+", olet "+omarace+" ja ammattisi on "+omajob+""
EndIf
EndSelect
DrawScreen
Forever