Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BAM thingies in the works
#1
Currently in the works (click here for details; click here to try the test version of BASIC Anywhere Machine)
  • Documentation: setup the architectural components for syntax diagrams, and start using/testing syntax diagrams with the statements/functions/operators below
  • Enhanced debugging: added generic code issue notification and viewing mechanism, and specific catching missing definitions for SUB and FUNCTION declarations
  • Added UrlQueryString$ function
  • Added UrlKey$ function
  • Added IFF function
  • Added MIN and MAX functions
  • Added BIN$ keyword (alternative name for already existing _BIN$ function)
  • Added DAY$ function
  • Added DIV keyword (alternative for the already existing "\", i.e. integer division, operator)
  • Added FRAC function
  • Added BETWEEN function
  • Added CHOOSE function
  • Enhanced compatibility of DEFtype statements
  • Enhanced compatibility of _BIN$, HEX$, OCT$ functions
  • Enhanced compatibility of SLEEP statement
  • Enhanced compatibility of INSTR function 
  • Enhanced compatibility of RANDOMIZE function 
  • Enhanced compatibility of INTEGER data type
  • Fixed the WIDTH statement: fixed a little glitch and documented behaviour
  • Added the HEIGHT statement (WIDTH specifying the number of text columns, why not be able to specify the number of rows?)
  • Added PUTSTRING statement
  • Added SCROLL statement
Reply
#2
Hi Charlie,

What does BAM mean?

I feel like I have asked this before.
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply
#3
B(ASIC)
A(nywhere)
M(achine)
Reply
#4
(06-03-2023, 10:22 PM)mnrvovrfc Wrote: B(ASIC)
A(nywhere)
M(achine)

Hey, thanks for jumping in!  I am just as scattered as my brains, so I can miss these types of things on a dime.
Reply
#5
(06-03-2023, 10:16 PM)grymmjack Wrote: Hi Charlie,

What does BAM mean?

I feel like I have asked this before.

Whatever else you want to know, you'll probably find it on the project website (or in the always-a-work-in-progress documentation).  If you find it a drag to dig into, ask about anything right here.

If you want to give it a spin (or just quickly explore some sample programs), you'll find that it is a different critter.  

It's a pet project of mine that merges things I find wildly interesting (BASIC tugs at my heart strings something silly): TiddlyWiki, BASIC, documentation, everything "software development process (aka SDLC)", componentization and taming intertwingularity.
Reply
#6
I had planned on just the first two functions, and then scope-creep happened ...
Reply
#7
do you think there's anyway I could get this QB program to run in BAM?

Code: (Select All)
Screen 13 ': _FullScreen
Print "Sir Knight Vile"
Print "Press any key to start game"
Print "Find the 8 stars to win!"
Sleep

rab = 1
ras = 1
spellcr = 1
crosso = 1
heart1 = 1
heart2 = 1
star1 = 1
star2 = 1
star3 = 1
star4 = 1
star5 = 1
star6 = 1
star7 = 1
star8 = 1
strhou = 0
hlth = 1300
Randomize Timer
10
star1x = Int(Rnd * 100)
star1y = Int(Rnd * 50)
star2x = Int(Rnd * 100)
star2y = Int(Rnd * 50)
star3x = Int(Rnd * 100)
star3y = Int(Rnd * 50)
star4x = Int(Rnd * 100)
star4y = Int(Rnd * 50)
star5x = Int(Rnd * 100)
star5y = Int(Rnd * 50)
star6x = Int(Rnd * 100)
star6y = Int(Rnd * 50)
star7x = Int(Rnd * 100)
star7y = Int(Rnd * 50)
star8x = Int(Rnd * 100)
star8y = Int(Rnd * 50)
If star1x = 0 GoTo 10
If star1y = 0 GoTo 10
If star2x = 0 GoTo 10
If star2y = 0 GoTo 10
If star3x = 0 GoTo 10
If star3y = 0 GoTo 10
If star4x = 0 GoTo 10
If star4y = 0 GoTo 10
If star5x = 0 GoTo 10
If star5y = 0 GoTo 10
If star6x = 0 GoTo 10
If star6y = 0 GoTo 10
If star7x = 0 GoTo 10
If star7y = 0 GoTo 10
If star8x = 0 GoTo 10
If star8y = 0 GoTo 10

plmx = 50
plmy = 25
pldir = 2
bcclr = 2
plx = 100
ply = 100
100
Color 15, bcclr
_Display
Cls


If spella > 0 Then sp$ = "(Got SP)" Else sp$ = ""
If cross > 0 Then cro$ = "(Got crosses)" Else cro$ = ""
Print "health:"; hlth; "|bombs:"; bmbs; "|spears:"; sprs
Print "STARS:"; strto; cro$; sp$

If pldir = 1 Then
    Line (plx, ply + 1)-(plx, ply + 4), 7
    Line (plx + 1, ply)-(plx + 1, ply + 5), 7
    Line (plx + 3, ply + 1)-(plx + 3, ply + 4), 7
    Line (plx + 2, ply)-(plx + 2, ply + 5), 7
    Line (plx, ply + 2)-(plx, ply + 3), 6
    Line (plx + 1, ply + 1)-(plx + 1, ply + 4), 6
    Line (plx + 3, ply + 2)-(plx + 3, ply + 3), 6
    Line (plx + 2, ply + 1)-(plx + 2, ply + 4), 6

End If
If pldir = 4 Then
    Line (plx, ply + 1)-(plx, ply + 3), 7
    Line (plx + 1, ply)-(plx + 1, ply + 4), 7
    Line (plx + 3, ply + 1)-(plx + 3, ply + 3), 7
    Line (plx + 2, ply)-(plx + 2, ply + 4), 7
    Line (plx, ply + 2)-(plx, ply + 3), 6
    Line (plx + 1, ply + 1)-(plx + 1, ply + 4), 6
    Line (plx + 3, ply + 2)-(plx + 3, ply + 3), 6
    Line (plx + 2, ply + 1)-(plx + 2, ply + 4), 6

End If
If pldir = 2 Then
    Line (plx + 1, ply)-(plx + 4, ply), 7
    Line (plx, ply + 1)-(plx + 5, ply + 1), 7
    Line (plx + 1, ply + 3)-(plx + 4, ply + 3), 7
    Line (plx, ply + 2)-(plx + 5, ply + 2), 7
    Line (plx, ply + 2)-(plx, ply + 3), 6
    Line (plx + 1, ply + 1)-(plx + 1, ply + 4), 6
    Line (plx + 3, ply + 2)-(plx + 3, ply + 3), 6
    Line (plx + 2, ply + 1)-(plx + 2, ply + 4), 6

End If
If pldir = 3 Then
    Line (plx + 1, ply)-(plx + 4, ply), 7
    Line (plx, ply + 1)-(plx + 5, ply + 1), 7
    Line (plx + 1, ply + 3)-(plx + 4, ply + 3), 7
    Line (plx, ply + 2)-(plx + 5, ply + 2), 7
    Line (plx, ply + 2)-(plx, ply + 3), 6
    Line (plx + 1, ply + 1)-(plx + 1, ply + 4), 6
    Line (plx + 3, ply + 2)-(plx + 3, ply + 3), 6
    Line (plx + 2, ply + 1)-(plx + 2, ply + 4), 6

End If


If strhou = 1 GoTo 220
If em1set = 0 Then emet1 = Int(Rnd * 5): plat1 = 0
If em2set = 0 Then emet2 = Int(Rnd * 5): plat2 = 0
If em3set = 0 Then emet3 = Int(Rnd * 5): plat3 = 0
If em4set = 0 Then emet4 = Int(Rnd * 5): plat4 = 0
If em5set = 0 Then emet5 = Int(Rnd * 5): plat5 = 0
If em6set = 0 Then emet6 = Int(Rnd * 5): plat6 = 0
If em7set = 0 Then emet7 = Int(Rnd * 5): plat7 = 0
If em8set = 0 Then emet8 = Int(Rnd * 5): plat8 = 0
If em1set = 0 Then
    If emet1 = 0 Then
        em1ht = 7
        em1kt = 4
    End If
    If emet1 = 1 Then
        em1ht = 3
        em1kt = 2
    End If
    If emet1 = 2 Then
        em1ht = 5
        em1kt = 3
    End If
    If emet1 = 3 Then
        em1ht = 4
        em1kt = 2
    End If
    If emet1 = 4 Then
        em1ht = 10
        em1kt = 5
    End If
End If
If em2set = 0 Then
    If emet2 = 0 Then
        em2ht = 7
        em2kt = 4
    End If
    If emet2 = 1 Then
        em2ht = 3
        em2kt = 2
    End If
    If emet2 = 2 Then
        em2ht = 5
        em2kt = 3
    End If
    If emet2 = 3 Then
        em2ht = 4
        em2kt = 2
    End If
    If emet2 = 4 Then
        em2ht = 10
        em2kt = 5
    End If
End If
If em3set = 0 Then
    If emet3 = 0 Then
        em3ht = 7
        em3kt = 4
    End If
    If emet3 = 1 Then
        em3ht = 3
        em3kt = 2
    End If
    If emet3 = 2 Then
        em3ht = 5
        em3kt = 3
    End If
    If emet3 = 3 Then
        em3ht = 4
        em3kt = 2
    End If
    If emet3 = 4 Then
        em3ht = 10
        em3kt = 5
    End If
End If
If em4set = 0 Then
    If emet4 = 0 Then
        em4ht = 7
        em4kt = 4
    End If
    If emet4 = 1 Then
        em4ht = 3
        em4kt = 2
    End If
    If emet4 = 2 Then
        em4ht = 5
        em4kt = 3
    End If
    If emet4 = 3 Then
        em4ht = 4
        em4kt = 2
    End If
    If emet4 = 4 Then
        em4ht = 10
        em4kt = 5
    End If
End If
If em5set = 0 Then
    If emet5 = 0 Then
        em5ht = 7
        em5kt = 4
    End If
    If emet5 = 1 Then
        em5ht = 3
        em5kt = 2
    End If
    If emet5 = 2 Then
        em5ht = 5
        em5kt = 3
    End If
    If emet5 = 3 Then
        em5ht = 4
        em5kt = 2
    End If
    If emet5 = 4 Then
        em5ht = 10
        em5kt = 5
    End If
End If
If em6set = 0 Then
    If emet6 = 0 Then
        em6ht = 7
        em6kt = 4
    End If
    If emet6 = 1 Then
        em6ht = 3
        em6kt = 2
    End If
    If emet6 = 2 Then
        em6ht = 5
        em6kt = 3
    End If
    If emet6 = 3 Then
        em6ht = 4
        em6kt = 2
    End If
    If emet6 = 4 Then
        em6ht = 10
        em6kt = 5
    End If
End If
If em7set = 0 Then
    If emet7 = 0 Then
        em7ht = 7
        em7kt = 4
    End If
    If emet7 = 1 Then
        em7ht = 3
        em7kt = 2
    End If
    If emet7 = 2 Then
        em7ht = 5
        em7kt = 3
    End If
    If emet7 = 3 Then
        em7ht = 4
        em7kt = 2
    End If
    If emet7 = 4 Then
        em7ht = 10
        em7kt = 5
    End If
End If
If em8set = 0 Then
    If emet8 = 0 Then
        em8ht = 7
        em8kt = 4
    End If
    If emet8 = 1 Then
        em8ht = 3
        em8kt = 2
    End If
    If emet8 = 2 Then
        em8ht = 5
        em8kt = 3
    End If
    If emet8 = 3 Then
        em8ht = 4
        em8kt = 2
    End If
    If emet8 = 4 Then
        em8ht = 10
        em8kt = 5
    End If
End If



If em1set = 0 Then eme1s = Int(Rnd * 4): plat1 = 0: plas1 = 0
If em2set = 0 Then eme2s = Int(Rnd * 4): plat2 = 0: plas2 = 0
If em3set = 0 Then eme3s = Int(Rnd * 4): plat3 = 0: plas3 = 0
If em4set = 0 Then eme4s = Int(Rnd * 4): plat4 = 0: plas4 = 0
If em5set = 0 Then eme5s = Int(Rnd * 4): plat5 = 0: plas5 = 0
If em6set = 0 Then eme6s = Int(Rnd * 4): plat6 = 0: plas6 = 0
If em7set = 0 Then eme7s = Int(Rnd * 4): plat7 = 0: plas7 = 0
If em8set = 0 Then eme8s = Int(Rnd * 4): plat8 = 0: plas8 = 0

If em1set = 0 Then If eme1s = 0 Then em1x = -12: em1y = Int(Rnd * 200): eme1d = 3: em1set = 1
If em1set = 0 Then If eme1s = 1 Then em1y = -12: em1x = Int(Rnd * 300): eme1d = 2: em1set = 1
If em1set = 0 Then If eme1s = 2 Then em1x = 325: em1y = Int(Rnd * 200): eme1d = 0: em1set = 1
If em1set = 0 Then If eme1s = 3 Then em1y = 225: em1x = Int(Rnd * 300): eme1d = 1: em1set = 1
If em2set = 0 Then If eme2s = 0 Then em2x = -12: em2y = Int(Rnd * 200): eme1d = 3: em2set = 1
If em2set = 0 Then If eme2s = 1 Then em2y = -12: em2x = Int(Rnd * 300): eme1d = 2: em2set = 1
If em2set = 0 Then If eme2s = 2 Then em2x = 325: em2y = Int(Rnd * 200): eme1d = 0: em2set = 1
If em2set = 0 Then If eme2s = 3 Then em2y = 225: em2x = Int(Rnd * 300): eme1d = 1: em2set = 1
If em3set = 0 Then If eme3s = 0 Then em3x = -12: em3y = Int(Rnd * 200): eme1d = 3: em3set = 1
If em3set = 0 Then If eme3s = 1 Then em3y = -12: em3x = Int(Rnd * 300): eme1d = 2: em3set = 1
If em3set = 0 Then If eme3s = 2 Then em3x = 325: em3y = Int(Rnd * 200): eme1d = 0: em3set = 1
If em3set = 0 Then If eme3s = 3 Then em3y = 225: em3x = Int(Rnd * 300): eme1d = 1: em3set = 1
If em4set = 0 Then If eme4s = 0 Then em4x = -12: em4y = Int(Rnd * 200): eme1d = 3: em4set = 1
If em4set = 0 Then If eme4s = 1 Then em4y = -12: em4x = Int(Rnd * 300): eme1d = 2: em4set = 1
If em4set = 0 Then If eme4s = 2 Then em4x = 325: em4y = Int(Rnd * 200): eme1d = 0: em4set = 1
If em4set = 0 Then If eme4s = 3 Then em4y = 225: em4x = Int(Rnd * 300): eme1d = 1: em4set = 1
If em5set = 0 Then If eme5s = 0 Then em5x = -12: em5y = Int(Rnd * 200): eme1d = 3: em5set = 1
If em5set = 0 Then If eme5s = 1 Then em5y = -12: em5x = Int(Rnd * 300): eme1d = 2: em5set = 1
If em5set = 0 Then If eme5s = 2 Then em5x = 325: em5y = Int(Rnd * 200): eme1d = 0: em5set = 1
If em5set = 0 Then If eme5s = 3 Then em5y = 225: em5x = Int(Rnd * 300): eme1d = 1: em5set = 1
If em6set = 0 Then If eme6s = 0 Then em6x = -12: em6y = Int(Rnd * 200): eme1d = 3: em6set = 1
If em6set = 0 Then If eme6s = 1 Then em6y = -12: em6x = Int(Rnd * 300): eme1d = 2: em6set = 1
If em6set = 0 Then If eme6s = 2 Then em6x = 325: em6y = Int(Rnd * 200): eme1d = 0: em6set = 1
If em6set = 0 Then If eme6s = 3 Then em6y = 225: em6x = Int(Rnd * 300): eme1d = 1: em6set = 1
If em7set = 0 Then If eme7s = 0 Then em7x = -12: em7y = Int(Rnd * 200): eme1d = 3: em7set = 1
If em7set = 0 Then If eme7s = 1 Then em7y = -12: em7x = Int(Rnd * 300): eme1d = 2: em7set = 1
If em7set = 0 Then If eme7s = 2 Then em7x = 325: em7y = Int(Rnd * 200): eme1d = 0: em7set = 1
If em7set = 0 Then If eme7s = 3 Then em7y = 225: em7x = Int(Rnd * 300): eme1d = 1: em7set = 1
If em8set = 0 Then If eme8s = 0 Then em8x = -12: em8y = Int(Rnd * 200): eme1d = 3: em8set = 1
If em8set = 0 Then If eme8s = 1 Then em8y = -12: em8x = Int(Rnd * 300): eme1d = 2: em8set = 1
If em8set = 0 Then If eme8s = 2 Then em8x = 325: em8y = Int(Rnd * 200): eme1d = 0: em8set = 1
If em8set = 0 Then If eme8s = 3 Then em8y = 225: em8x = Int(Rnd * 300): eme1d = 1: em8set = 1



200
emcnt = emcnt + 1
If emcnt = 1 Then
    emet = emet1
    emed = eme1d
    emx = em1x
    emy = em1y


End If
If emcnt = 2 Then
    emet = emet2
    emed = eme2d
    emx = em2x
    emy = em2y

End If
If emcnt = 3 Then
    emet = emet3
    emed = eme3d
    emx = em3x
    emy = em3y

End If
If emcnt = 4 Then
    emet = emet4
    emed = eme4d
    emx = em4x
    emy = em4y

End If
If emcnt = 5 Then
    emet = emet5
    emed = eme5d
    emx = em5x
    emy = em5y

End If
If emcnt = 6 Then
    emet = emet6
    emed = eme6d
    emx = em6x
    emy = em6y

End If
If emcnt = 7 Then
    emet = emet7
    emed = eme7d
    emx = em7x
    emy = em7y

End If
If emcnt = 8 Then
    emet = emet8
    emed = eme8d
    emx = em8x
    emy = em8y

End If

If emet = 0 Then
    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 5), 4
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 4
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 4
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 4
        Line (emx, emy + 2)-(emx - 3, emy + 2), 4
        Line (emx, emy + 4)-(emx - 3, emy + 4), 4
    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 5), 4
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 4
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 4
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 4
        Line (emx + 4, emy + 2)-(emx + 7, emy + 2), 4
        Line (emx + 4, emy + 4)-(emx + 7, emy + 4), 4
    End If
    If emed = 1 Then
        Line (emx + 1, emy)-(emx + 5, emy), 4
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 4
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 4
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 4
        Line (emx + 2, emy)-(emx + 2, emy - 3), 4
        Line (emx + 4, emy)-(emx + 4, emy - 3), 4
    End If
    If emed = 2 Then
        Line (emx + 1, emy)-(emx + 5, emy), 4
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 4
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 4
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 4
        Line (emx + 2, emy + 4)-(emx + 2, emy + 7), 4
        Line (emx + 4, emy + 4)-(emx + 4, emy + 7), 4
    End If
End If
If emet = 1 Then

    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 5), 6
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 6
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 6
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 6
        Line (emx, emy + 2)-(emx - 3, emy + 2), 6
        Line (emx, emy + 4)-(emx - 3, emy + 4), 6
        Line (emx - 1, emy + 3)-(emx, emy + 3), 6
    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 5), 6
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 6
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 6
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 6
        Line (emx + 4, emy + 2)-(emx + 7, emy + 2), 6
        Line (emx + 4, emy + 4)-(emx + 7, emy + 4), 6
        Line (emx + 5, emy + 3)-(emx + 4, emy + 3), 6
    End If
    If emed = 1 Then
        Line (emx + 1, emy)-(emx + 5, emy), 6
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 6
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 6
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 6
        Line (emx + 2, emy)-(emx + 2, emy - 3), 6
        Line (emx + 4, emy)-(emx + 4, emy - 3), 6
        Line (emx + 3, emy - 1)-(emx + 3, emy), 6
    End If
    If emed = 2 Then
        Line (emx + 1, emy)-(emx + 5, emy), 6
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 6
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 6
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 6
        Line (emx + 2, emy + 4)-(emx + 2, emy + 7), 6
        Line (emx + 4, emy + 4)-(emx + 4, emy + 7), 6
        Line (emx + 3, emy + 5)-(emx + 3, emy + 4), 6
    End If
End If
If emet = 2 Then

    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 5), 0
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 0
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 0
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 0
        Line (emx, emy + 2)-(emx - 5, emy + 2), 0
        Line (emx, emy + 4)-(emx - 5, emy + 4), 0
    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 5), 0
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 0
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 0
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 0
        Line (emx + 4, emy + 2)-(emx + 9, emy + 2), 0
        Line (emx + 4, emy + 4)-(emx + 9, emy + 4), 0
    End If
    If emed = 1 Then
        Line (emx + 1, emy)-(emx + 5, emy), 0
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 0
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 0
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 0
        Line (emx + 2, emy)-(emx + 2, emy - 5), 0
        Line (emx + 4, emy)-(emx + 4, emy - 5), 0
    End If
    If emed = 2 Then
        Line (emx + 1, emy)-(emx + 5, emy), 0
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 0
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 0
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 0
        Line (emx + 2, emy + 4)-(emx + 2, emy + 9), 0
        Line (emx + 4, emy + 4)-(emx + 4, emy + 9), 0
    End If
End If
If emet = 3 Then

    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 4), 10
        Line (emx + 4, emy + 1)-(emx + 4, emy + 4), 10
        Line (emx + 2, emy + 2)-(emx + 2, emy + 3), 10
        Line (emx + 3, emy + 2)-(emx + 3, emy + 3), 10
        Line (emx, emy + 1)-(emx - 5, emy + 1), 10
        Line (emx, emy + 4)-(emx - 5, emy + 4), 10
    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 4), 10
        Line (emx + 4, emy + 1)-(emx + 4, emy + 4), 10
        Line (emx + 2, emy + 2)-(emx + 2, emy + 3), 10
        Line (emx + 3, emy + 2)-(emx + 3, emy + 3), 10
        Line (emx + 4, emy + 1)-(emx + 9, emy + 1), 10
        Line (emx + 4, emy + 4)-(emx + 9, emy + 4), 10
    End If
    If emed = 1 Then
        Line (emx + 1, emy)-(emx + 4, emy), 10
        Line (emx + 1, emy + 4)-(emx + 4, emy + 4), 10
        Line (emx + 2, emy + 2)-(emx + 3, emy + 2), 10
        Line (emx + 2, emy + 3)-(emx + 3, emy + 3), 10
        Line (emx + 1, emy)-(emx + 1, emy - 5), 10
        Line (emx + 4, emy)-(emx + 4, emy - 5), 10
    End If
    If emed = 2 Then
        Line (emx + 1, emy)-(emx + 4, emy), 10
        Line (emx + 1, emy + 4)-(emx + 4, emy + 4), 10
        Line (emx + 2, emy + 2)-(emx + 3, emy + 2), 10
        Line (emx + 2, emy + 3)-(emx + 3, emy + 3), 10
        Line (emx + 1, emy + 4)-(emx + 1, emy + 9), 10
        Line (emx + 4, emy + 4)-(emx + 4, emy + 9), 10
    End If
End If
If emet = 4 Then

    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 2), 15
        Line (emx + 4, emy + 1)-(emx + 4, emy + 2), 15
        Line (emx + 2, emy + 2)-(emx + 2, emy + 1), 15
        Line (emx + 3, emy + 2)-(emx + 3, emy + 1), 15

    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 2), 15
        Line (emx + 4, emy + 1)-(emx + 4, emy + 2), 15
        Line (emx + 2, emy + 2)-(emx + 2, emy + 1), 15
        Line (emx + 3, emy + 2)-(emx + 3, emy + 1), 15

    End If
    If emed = 1 Then
        Line (emx, emy + 1)-(emx, emy + 2), 15
        Line (emx + 4, emy + 1)-(emx + 4, emy + 2), 15
        Line (emx + 2, emy + 2)-(emx + 2, emy + 1), 15
        Line (emx + 3, emy + 2)-(emx + 3, emy + 1), 15

    End If
    If emed = 2 Then
        Line (emx, emy + 1)-(emx, emy + 2), 15
        Line (emx + 4, emy + 1)-(emx + 4, emy + 2), 15
        Line (emx + 2, emy + 2)-(emx + 2, emy + 1), 15
        Line (emx + 3, emy + 2)-(emx + 3, emy + 1), 15

    End If
End If
If emcnt = 8 Then emcnt = 0: GoTo 220
GoTo 200
220

If plstx >= em1x And plstx <= em1x + 7 Then
    If plsty >= em1y And plstx <= em1y + 7 Then
        em1kt = em1kt - 2
        plspt = 0
        If em1kt <= 0 Then em1set = 0
    End If
End If
If plstx >= em2x And plstx <= em2x + 7 Then
    If plsty >= em2y And plstx <= em2y + 7 Then
        em2kt = em2kt - 2
        plspt = 0
        If em2kt <= 0 Then em2set = 0
    End If
End If
If plstx >= em3x And plstx <= em3x + 7 Then
    If plsty >= em3y And plstx <= em3y + 7 Then
        em3kt = em3kt - 2
        plspt = 0
        If em3kt <= 0 Then em3set = 0
    End If
End If
If plstx >= em4x And plstx <= em4x + 7 Then
    If plsty >= em4y And plstx <= em4y + 7 Then
        em4kt = em4kt - 2
        plspt = 0
        If em4kt <= 0 Then em4set = 0
    End If
End If
If plstx >= em5x And plstx <= em5x + 7 Then
    If plsty >= em5y And plstx <= em5y + 7 Then
        em5kt = em5kt - 2
        plspt = 0
        If em5kt <= 0 Then em5set = 0
    End If
End If
If plstx >= em6x And plstx <= em6x + 7 Then
    If plsty >= em6y And plstx <= em6y + 7 Then
        em6kt = em6kt - 2
        plspt = 0
        If em6kt <= 0 Then em6set = 0
    End If
End If
If plstx >= em7x And plstx <= em7x + 7 Then
    If plsty >= em7y And plstx <= em7y + 7 Then
        em7kt = em7kt - 2
        plspt = 0
        If em7kt <= 0 Then em7set = 0
    End If
End If
If plstx >= em8x And plstx <= em8x + 7 Then
    If plsty >= em8y And plstx <= em8y + 7 Then
        em8kt = em8kt - 2
        plspt = 0
        If em8kt <= 0 Then em8set = 0
    End If
End If

If sprs > 0 Then
    If plspt = 1 Then
        If plspdr = 1 Then
            Line (plstx, plsty)-(plstx, plsty - 5), 6
            plstx = plstx - 1
        End If
        If plspdr = 4 Then
            Line (plstx, plsty)-(plstx, plsty + 5), 6
            plstx = plstx + 1
        End If
        If plspdr = 2 Then
            Line (plstx, plsty)-(plstx - 5, plsty), 6
            plsty = plsty - 1
        End If
        If plspdr = 3 Then
            Line (plstx, plsty)-(plstx + 5, plsty), 6
            plsty = plsty + 1
        End If
    End If
End If

If plstx > 325 Then plspt = 0
If plstx < -12 Then plspt = 0
If plsty > 225 Then plspt = 0
If plsty < -12 Then plspt = 0

If bmbs > 0 Then
    If bmbset = 1 Then
        bmbpx = plx
        bmbpy = ply
        bmbset = 0
        bmbp = 1
        bmbtdo = 1
    End If
    If bmbp = 1 Then
        Line (bmbpx, bmbpy + 1)-(bmbpx, bmbpy + 2), 8
        Line (bmbpx + 3, bmbpy + 1)-(bmbpx + 3, bmbpy + 2), 8
        Line (bmbpx + 1, bmbpy)-(bmbpx + 1, bmbpy + 3), 8
        Line (bmbpx + 2, bmbpy)-(bmbpx + 2, bmbpy + 3), 8
        Line (bmbpx + 2, bmbpy)-(bmbpx + 2, bmbpy - 4), 15
        PSet (bmbpx + 2, bmbpy - 4), 4
    End If
    If bmbtdo = 1 Then bmbt = bmbt + 1
    If bmbt = 650 Then
        bmbex = 1
        bmbp = 0
    End If
    If bmbex = 1 Then
        Circle (bmbpx, bmbpy), 25, 4
        If pla = 0 Then
            If plx >= bmbpx - 15 And plx <= bmbpx + 15 Then
                If ply >= bmbpy - 15 And ply <= bmbpy + 15 Then
                    hlth = hlth - 4
                    pla = 1
                    If hlth <= 0 GoTo 50000
                End If
            End If
        End If

        If em1a = 0 Then
            If em1x >= bmbpx - 15 And em1x <= bmbpx + 15 Then
                If em1y >= bmbpy - 15 And em1y <= bmbpy + 15 Then
                    em1kt = em1kt - 4
                    em1a = 1
                    If em1kt <= 0 Then em1set = 0
                End If
            End If
        End If
        If em2a = 0 Then
            If em2x >= bmbpx - 15 And em2x <= bmbpx + 15 Then
                If em2y >= bmbpy - 15 And em2y <= bmbpy + 15 Then
                    em2kt = em2kt - 4
                    em2a = 1
                    If em2kt <= 0 Then em2set = 0
                End If
            End If
        End If
        If em3a = 0 Then
            If em3x >= bmbpx - 15 And em3x <= bmbpx + 15 Then
                If em3y >= bmbpy - 15 And em3y <= bmbpy + 15 Then
                    em3kt = em3kt - 4
                    em3a = 1
                    If em3kt <= 0 Then em3set = 0
                End If
            End If
        End If
        If em4a = 0 Then
            If em4x >= bmbpx - 15 And em4x <= bmbpx + 15 Then
                If em4y >= bmbpy - 15 And em4y <= bmbpy + 15 Then
                    em4kt = em4kt - 4
                    em4a = 1
                    If em4kt <= 0 Then em4set = 0
                End If
            End If
        End If
        If em15a = 0 Then
            If em5x >= bmbpx - 15 And em5x <= bmbpx + 15 Then
                If em5y >= bmbpy - 15 And em5y <= bmbpy + 15 Then
                    em5kt = em5kt - 4
                    em5a = 1
                    If em5kt <= 0 Then em5set = 0
                End If
            End If
        End If
        If em6a = 0 Then
            If em6x >= bmbpx - 15 And em6x <= bmbpx + 15 Then
                If em6y >= bmbpy - 15 And em6y <= bmbpy + 15 Then
                    em6kt = em6kt - 4
                    em6a = 1
                    If em6kt <= 0 Then em6set = 0
                End If
            End If
        End If
        If em7a = 0 Then
            If em7x >= bmbpx - 15 And em7x <= bmbpx + 15 Then
                If em7y >= bmbpy - 15 And em7y <= bmbpy + 15 Then
                    em7kt = em7kt - 4
                    em7a = 1
                    If em7kt <= 0 Then em7set = 0
                End If
            End If
        End If
        If em8a = 0 Then
            If em8x >= bmbpx - 15 And em8x <= bmbpx + 15 Then
                If em8y >= bmbpy - 15 And em8y <= bmbpy + 15 Then
                    em8kt = em8kt - 4
                    em8a = 1
                    If em8kt <= 0 Then em8set = 0
                End If
            End If
        End If
    End If
    If bmbt = 660 Then
        bmbex = 0
        bmbtdo = 0
        bmbt = 0
        em1a = 0
        em2a = 0
        em3a = 0
        em4a = 0
        em5a = 0
        em6a = 0
        em7a = 0
        em8a = 0
        pla = 0
    End If

End If




If crossu = 1 Then
    If cross > 0 Then
        If ftim < 10 And ftim <> 0 Then bcclr = 15 Else bcclr = 2
        ftim = ftim + 1
        em1set = 0
        em2set = 0
        em3set = 0
        em4set = 0
        em5set = 0
        em6set = 0
        em7set = 0
        em8set = 0

        If ftim = 12 Then
            crossu = 0
            ftim = 0
        End If
    End If
End If

If plswo = 1 Then
    plswot = plswot + 1
    If pldir = 1 Then Line (plswx, plswy)-(plswx - 5, plswy), 15
    If pldir = 4 Then Line (plswx, plswy)-(plswx + 5, plswy), 15
    If pldir = 2 Then Line (plswx, plswy)-(plswx, plswy - 5), 15
    If pldir = 3 Then Line (plswx, plswy)-(plswx, plswy + 5), 15

    If plswot = 5 Then plswo = 0: plswot = 0
    If pldir = 1 Then
        em1a = 0
        If plswx >= em1x And plswx - 5 <= em1x + 7 Then
            If plswy >= em1y And plswy <= em1y + 7 GoTo 905
        End If
    End If
    If pldir = 4 Then
        em1a = 0
        If plswx >= em1x And plswx + 5 <= em1x + 7 Then
            If plswy >= em1y And plswy <= em1y + 7 GoTo 905
        End If
    End If
    If pldir = 2 Then
        em1a = 0
        If plswx >= em1x And plswx <= em1x + 7 Then
            If plswy >= em1y And plswy - 5 <= em1y + 7 GoTo 905
        End If
    End If
    If pldir = 3 Then
        em1a = 0
        If plswx >= em1x And plswx <= em1x + 7 Then
            If plswy >= em1y And plswy + 5 <= em1y + 7 GoTo 905
        End If
    End If
    If pldir = 1 Then
        em2a = 0
        If plswx >= em2x And plswx - 5 <= em2x + 7 Then
            If plswy >= em2y And plswy <= em2y + 7 GoTo 910
        End If
    End If
    If pldir = 4 Then
        em2a = 0
        If plswx >= em2x And plswx + 5 <= em2x + 7 Then
            If plswy >= em2y And plswy <= em2y + 7 GoTo 910
        End If
    End If
    If pldir = 2 Then
        em2a = 0
        If plswx >= em2x And plswx <= em2x + 7 Then
            If plswy >= em2y And plswy - 5 <= em2y + 7 GoTo 910
        End If
    End If
    If pldir = 3 Then
        em2a = 0
        If plswx >= em2x And plswx <= em2x + 7 Then
            If plswy >= em2y And plswy + 5 <= em2y + 7 GoTo 910
        End If
    End If
    If pldir = 1 Then
        em3a = 0
        If plswx >= em3x And plswx - 5 <= em3x + 7 Then
            If plswy >= em3y And plswy <= em3y + 7 GoTo 915
        End If
    End If
    If pldir = 4 Then
        em3a = 0
        If plswx >= em3x And plswx + 5 <= em3x + 7 Then
            If plswy >= em3y And plswy <= em3y + 7 GoTo 915
        End If
    End If
    If pldir = 2 Then
        em3a = 0
        If plswx >= em3x And plswx <= em3x + 7 Then
            If plswy >= em3y And plswy - 5 <= em3y + 7 GoTo 915
        End If
    End If
    If pldir = 3 Then
        em3a = 0
        If plswx >= em3x And plswx <= em3x + 7 Then
            If plswy >= em3y And plswy + 5 <= em3y + 7 GoTo 915
        End If
    End If
    If pldir = 1 Then
        em4a = 0
        If plswx >= em4x And plswx - 5 <= em4x + 7 Then
            If plswy >= em4y And plswy <= em4y + 7 GoTo 920
        End If
    End If
    If pldir = 4 Then
        em4a = 0
        If plswx >= em4x And plswx + 5 <= em4x + 7 Then
            If plswy >= em4y And plswy <= em4y + 7 GoTo 920
        End If
    End If
    If pldir = 2 Then
        em4a = 0
        If plswx >= em4x And plswx <= em4x + 7 Then
            If plswy >= em4y And plswy - 5 <= em4y + 7 GoTo 920
        End If
    End If
    If pldir = 3 Then
        em4a = 0
        If plswx >= em4x And plswx <= em4x + 7 Then
            If plswy >= em4y And plswy + 5 <= em4y + 7 GoTo 920
        End If
    End If
    If pldir = 1 Then
        em5a = 0
        If plswx >= em5x And plswx - 5 <= em5x + 7 Then
            If plswy >= em5y And plswy <= em5y + 7 GoTo 925
        End If
    End If
    If pldir = 4 Then
        em5a = 0
        If plswx >= em5x And plswx + 5 <= em5x + 7 Then
            If plswy >= em5y And plswy <= em5y + 7 GoTo 925
        End If
    End If
    If pldir = 2 Then
        em5a = 0
        If plswx >= em5x And plswx <= em5x + 7 Then
            If plswy >= em5y And plswy - 5 <= em5y + 7 GoTo 925
        End If
    End If
    If pldir = 3 Then
        em5a = 0
        If plswx >= em5x And plswx <= em5x + 7 Then
            If plswy >= em5y And plswy + 5 <= em5y + 7 GoTo 925
        End If
    End If
    If pldir = 1 Then
        em6a = 0
        If plswx >= em6x And plswx - 5 <= em6x + 7 Then
            If plswy >= em6y And plswy <= em6y + 7 GoTo 930
        End If
    End If
    If pldir = 4 Then
        em6a = 0
        If plswx >= em6x And plswx + 5 <= em6x + 7 Then
            If plswy >= em6y And plswy <= em6y + 7 GoTo 930
        End If
    End If
    If pldir = 2 Then
        em6a = 0
        If plswx >= em6x And plswx <= em6x + 7 Then
            If plswy >= em6y And plswy - 5 <= em6y + 7 GoTo 930
        End If
    End If
    If pldir = 3 Then
        em6a = 0
        If plswx >= em6x And plswx <= em6x + 7 Then
            If plswy >= em6y And plswy + 5 <= em6y + 7 GoTo 930
        End If
    End If
    If pldir = 1 Then
        em7a = 0
        If plswx >= em7x And plswx - 5 <= em7x + 7 Then
            If plswy >= em7y And plswy <= em7y + 7 GoTo 935
        End If
    End If
    If pldir = 4 Then
        em7a = 0
        If plswx >= em7x And plswx + 5 <= em7x + 7 Then
            If plswy >= em7y And plswy <= em7y + 7 GoTo 935
        End If
    End If
    If pldir = 2 Then
        em7a = 0
        If plswx >= em7x And plswx <= em7x + 7 Then
            If plswy >= em7y And plswy - 5 <= em7y + 7 GoTo 935
        End If
    End If
    If pldir = 3 Then
        em7a = 0
        If plswx >= em7x And plswx <= em7x + 7 Then
            If plswy >= em7y And plswy + 5 <= em7y + 7 GoTo 935
        End If
    End If
    If pldir = 1 Then
        em8a = 0
        If plswx >= em8x And plswx - 5 <= em8x + 7 Then
            If plswy >= em8y And plswy <= em8y + 7 GoTo 940
        End If
    End If
    If pldir = 4 Then
        em8a = 0
        If plswx >= em8x And plswx + 5 <= em8x + 7 Then
            If plswy >= em8y And plswy <= em8y + 7 GoTo 940
        End If
    End If
    If pldir = 2 Then
        em8a = 0
        If plswx >= em8x And plswx <= em8x + 7 Then
            If plswy >= em8y And plswy - 5 <= em8y + 7 GoTo 940
        End If
    End If
    If pldir = 3 Then
        em8a = 0
        If plswx >= em8x And plswx <= em8x + 7 Then
            If plswy >= em8y And plswy + 5 <= em8y + 7 GoTo 940
        End If
    End If
End If

GoTo 990


905
If em1a = 0 Then
    em1kt = em1kt - 1
    If em1kt <= 0 Then em1set = 0
    em1a = 1
End If
GoTo 990
910
If em2a = 0 Then
    em2kt = em2kt - 1
    If em2kt <= 0 Then em2set = 0
    em2a = 1
End If
GoTo 990
915
If em3a = 0 Then
    em3kt = em3kt - 1
    If em3kt <= 0 Then em3set = 0
    em3a = 1
End If
GoTo 990
920
If em4a = 0 Then
    em4kt = em4kt - 1
    If em4kt <= 0 Then em4set = 0
    em2a = 1
End If
GoTo 990
925
If em5a = 0 Then
    em5kt = em5kt - 1
    If em5kt <= 0 Then em5set = 0
    em5a = 1
End If
GoTo 990
930
If em6a = 0 Then
    em6kt = em6kt - 1
    If em6kt <= 0 Then em6set = 0
    em6a = 1
End If
GoTo 990
935
If em7a = 0 Then
    em7kt = em7kt - 1
    If em7kt <= 0 Then em7set = 0
    em7a = 1
End If
GoTo 990
940
If em8a = 0 Then
    em8kt = em8kt - 1
    If em8kt <= 0 Then em8set = 0
    em8a = 1
End If
GoTo 990

990



emmov = emmov + 1

If spell = 1 GoTo 780
If emmov = 15 Then
    emmov = 0
    If plx > em1x Then em1x = em1x + 1
    If plx < em1x Then em1x = em1x - 1
    If ply > em1y Then em1y = em1y + 1
    If ply < em1y Then em1y = em1y - 1
    If plx > em2x Then em2x = em2x + 1
    If plx < em2x Then em2x = em2x - 1
    If ply > em2y Then em2y = em2y + 1
    If ply < em2y Then em2y = em2y - 1
    If plx > em3x Then em3x = em3x + 1
    If plx < em3x Then em3x = em3x - 1
    If ply > em3y Then em3y = em3y + 1
    If ply < em3y Then em3y = em3y - 1
    If plx > em4x Then em4x = em4x + 1
    If plx < em4x Then em4x = em4x - 1
    If ply > em4y Then em4y = em4y + 1
    If ply < em4y Then em4y = em4y - 1
    If plx > em5x Then em5x = em5x + 1
    If plx < em5x Then em5x = em5x - 1
    If ply > em5y Then em5y = em5y + 1
    If ply < em5y Then em5y = em5y - 1
    If plx > em6x Then em6x = em6x + 1
    If plx < em6x Then em6x = em6x - 1
    If ply > em6y Then em6y = em6y + 1
    If ply < em6y Then em6y = em6y - 1
    If plx > em7x Then em7x = em7x + 1
    If plx < em7x Then em7x = em7x - 1
    If ply > em7y Then em7y = em7y + 1
    If ply < em7y Then em7y = em7y - 1
    If plx > em8x Then em8x = em8x + 1
    If plx < em8x Then em8x = em8x - 1
    If ply > em8y Then em8y = em8y + 1
    If ply < em8y Then em8y = em8y - 1
End If
GoTo 790
780

If spella > 0 Then
    If sbbx = 0 Then spltim = spltim + 1
    If spltim < 10 And spltim <> 0 Then bcclr = 0 Else bcclr = 2
    If spltim = 10 Then sbbx = 1: spltim = 0
    emmov = 0
    If plx < em1x Then em1x = em1x + 1
    If plx > em1x Then em1x = em1x - 1
    If ply < em1y Then em1y = em1y + 1
    If ply > em1y Then em1y = em1y - 1
    If plx < em2x Then em2x = em2x + 1
    If plx > em2x Then em2x = em2x - 1
    If ply < em2y Then em2y = em2y + 1
    If ply > em2y Then em2y = em2y - 1
    If plx < em3x Then em3x = em3x + 1
    If plx > em3x Then em3x = em3x - 1
    If ply < em3y Then em3y = em3y + 1
    If ply > em3y Then em3y = em3y - 1
    If plx < em4x Then em4x = em4x + 1
    If plx > em4x Then em4x = em4x - 1
    If ply < em4y Then em4y = em4y + 1
    If ply > em4y Then em4y = em4y - 1
    If plx < em5x Then em5x = em5x + 1
    If plx > em5x Then em5x = em5x - 1
    If ply < em5y Then em5y = em5y + 1
    If ply > em5y Then em5y = em5y - 1
    If plx < em6x Then em6x = em6x + 1
    If plx > em6x Then em6x = em6x - 1
    If ply < em6y Then em6y = em6y + 1
    If ply > em6y Then em6y = em6y - 1
    If plx < em7x Then em7x = em7x + 1
    If plx > em7x Then em7x = em7x - 1
    If ply < em7y Then em7y = em7y + 1
    If ply > em7y Then em7y = em7y - 1
    If plx < em8x Then em8x = em8x + 1
    If plx > em8x Then em8x = em8x - 1
    If ply < em8y Then em8y = em8y + 1
    If ply > em8y Then em8y = em8y - 1
End If
790


If plas1 = 0 And plat1 = 1 Then
    If plx = em1x And ply = em1y Then
        hlth = hlth - em1ht
        If hlth <= 0 GoTo 40000


        plas1 = 1
    End If
End If
If plas2 = 0 And plat2 = 1 Then
    If plx = em2x And ply = em2y Then
        hlth = hlth - em2ht
        If hlth <= 0 GoTo 40000


        plas2 = 1
    End If
End If


If plas3 = 0 And plat3 = 1 Then
    If plx = em3x And ply = em3y Then
        hlth = hlth - em3ht
        If hlth <= 0 GoTo 40000


        plas3 = 1
    End If
End If
If plas4 = 0 And plat4 = 1 Then
    If plx = em4x And ply = em4y Then
        hlth = hlth - em4ht
        If hlth <= 0 GoTo 40000


        plas4 = 1
    End If
End If
If plas5 = 0 And plat5 = 1 Then
    If plx = em5x And ply = em5y Then
        hlth = hlth - em5ht
        If hlth <= 0 GoTo 40000


        plas5 = 1
    End If
End If
If plas6 = 0 And plat6 = 1 Then
    If plx = em6x And ply = em6y Then
        hlth = hlth - em6ht
        If hlth <= 0 GoTo 40000


        plas6 = 1
    End If
End If
If plas7 = 0 And plat7 = 1 Then
    If plx = em7x And ply = em7y Then
        hlth = hlth - em7ht
        If hlth <= 0 GoTo 40000


        plas7 = 1
    End If
End If
If plas8 = 0 And plat8 = 1 Then
    If plx = em8x And ply = em8y Then
        hlth = hlth - em8ht
        If hlth <= 0 GoTo 40000


        plas8 = 1
    End If
End If

If em1set = 1 Then plat1 = 1
If em2set = 1 Then plat2 = 1
If em3set = 1 Then plat3 = 1
If em4set = 1 Then plat4 = 1
If em5set = 1 Then plat5 = 1
If em6set = 1 Then plat6 = 1
If em7set = 1 Then plat7 = 1
If em8set = 1 Then plat8 = 1



If rab <> 0 Then rab = Int(Rnd * 1000)
If ras <> 0 Then ras = Int(Rnd * 1000)
If rabs = 0 Then
    If rab = 0 Then

        bmbpipx = Int(Rnd * 290)
        bmbpipy = Int(Rnd * 190)
        rabs = 1
    End If
End If
If rass = 0 Then
    If ras = 0 Then
        sprpipx = Int(Rnd * 290)
        sprpipy = Int(Rnd * 190)
        rass = 1
    End If
End If

If rabs = 1 Then
    Line (bmbpipx, bmbpipy + 1)-(bmbpipx, bmbpipy + 2), 8
    Line (bmbpipx + 3, bmbpipy + 1)-(bmbpipx + 3, bmbpipy + 2), 8
    Line (bmbpipx + 1, bmbpipy)-(bmbpipx + 1, bmbpipy + 3), 8
    Line (bmbpipx + 2, bmbpipy)-(bmbpipx + 2, bmbpipy + 3), 8
    Line (bmbpipx + 2, bmbpipy)-(bmbpipx + 2, bmbpipy - 4), 15
End If


If rass = 1 Then Line (sprpipx, sprpipy)-(sprpipx, sprpipy + 5), 6
If rabs = 1 Then
    If plx >= bmbpipx And plx <= bmbpipx + 5 Then
        If ply >= bmbpipy And ply <= bmbpipy + 5 Then
            bmbs = bmbs + 3
            rab = 1: rabs = 0
        End If
    End If
End If
If rass = 1 Then
    If plx >= sprpipx And plx <= sprpipx + 7 Then
        If ply >= sprpipy And ply <= sprpipy + 1 Then
            sprs = sprs + 5
            ras = 1: rass = 0
        End If
    End If
End If

If plx < -14 Then
    plx = 350
    plmx = plmx - 1
    em1set = 0
    em2set = 0
    em3set = 0
    em4set = 0
    em5set = 0
    em6set = 0
    em7set = 0
    em8set = 0
    rab = 1: rabs = 0
    ras = 1: rass = 0
    spell = 0
    GoTo 100
End If
If plx > 354 Then
    plx = -12
    plmx = plmx + 1
    em1set = 0
    em2set = 0
    em3set = 0
    em4set = 0
    em5set = 0
    em6set = 0
    em7set = 0
    em8set = 0
    rab = 1: rabs = 0
    ras = 1: rass = 0
    spell = 0
    GoTo 100
End If
If ply < -14 Then
    ply = 200
    plmy = plmy - 1
    em1set = 0
    em2set = 0
    em3set = 0
    em4set = 0
    em5set = 0
    em6set = 0
    em7set = 0
    em8set = 0
    rab = 1: rabs = 0
    ras = 1: rass = 0
    spell = 0
    GoTo 100
End If
If ply > 204 Then
    ply = -12
    plmy = plmy + 1
    em1set = 0
    em2set = 0
    em3set = 0
    em4set = 0
    em5set = 0
    em6set = 0
    em7set = 0
    em8set = 0
    rab = 1: rabs = 0
    ras = 1: rass = 0
    spell = 0
    GoTo 100
End If
If plmx = 101 Then plmx = 1
If plmx = -1 Then plmx = 100
If plmy = 51 Then plmy = 1
If plmy = -1 Then plmy = 50

If strhou = 1 Then
    rab = 1: rabs = 0
    ras = 1: rass = 0

    bcclr = 0
    PSet (100, 100), 186
    Draw "R10D50L10U50R10D10R100U10L100R100D50R10U50L10"
    PSet (100, 150), 186
    Draw "R25"
    PSet (210, 150), 186
    Draw "L25"

    If plx > 210 Then strhou = 0: bcclr = 2: plx = 200: ply = 65
    If plx < 100 Then strhou = 0: bcclr = 2: plx = 200: ply = 65
    If ply < 100 Then strhou = 0: bcclr = 2: plx = 200: ply = 65
    If ply > 150 Then strhou = 0: bcclr = 2: plx = 200: ply = 65
    If crosso = 1 Then
        If plmx = 50 And plmy = 2 Then
            PSet (190, 105), 15
            Draw "D6U3R3L7"
            If plx >= 187 And plx <= 193 Then
                If ply >= 105 And ply <= 111 Then
                    crossa = Int(Rnd * 8)
                    cross = cross + 10 + crossa
                    crosso = 0
                End If
            End If
        End If
    End If
    If spellcr = 1 Then
        If plmx = 50 And plmy = 37 Then
            PSet (180, 115), 4
            Draw "D3R1U4D5R1U5D6R1U4D5R1D3"
            If plx >= 180 And plx <= 184 Then
                If ply >= 109 And ply <= 119 Then
                    spella = spella + 6
                    spellcr = 0
                End If
            End If
        End If
    End If


    If heart1 = 1 Then
        If plmx = 25 And plmy = 25 Then
            Line (140, 110)-(140, 115), 12
            Line (141, 110)-(141, 116), 12
            Line (142, 109)-(142, 117), 12
            Line (143, 109)-(143, 118), 12
            Line (144, 110)-(144, 119), 12
            Line (145, 110)-(145, 120), 12
            Line (146, 111)-(146, 121), 12
            Line (147, 112)-(147, 122), 12
            Line (148, 113)-(148, 123), 12
            Line (149, 114)-(149, 124), 12
            Line (150, 113)-(150, 123), 12
            Line (151, 112)-(151, 122), 12
            Line (152, 111)-(152, 121), 12
            Line (153, 110)-(153, 120), 12
            Line (154, 110)-(154, 119), 12
            Line (155, 109)-(155, 118), 12
            Line (156, 109)-(156, 117), 12
            Line (157, 110)-(157, 116), 12
            Line (158, 110)-(158, 115), 12

            If plx >= 140 And plx <= 158 Then
                If ply >= 109 And ply <= 124 Then
                    hlth = hlth + 600

                    heart1 = 0
                End If
            End If
        End If
    End If
    If heart2 = 1 Then
        If plmx = 75 And plmy = 25 Then
            Line (140, 110)-(140, 115), 12
            Line (141, 110)-(141, 116), 12
            Line (142, 109)-(142, 117), 12
            Line (143, 109)-(143, 118), 12
            Line (144, 110)-(144, 119), 12
            Line (145, 110)-(145, 120), 12
            Line (146, 111)-(146, 121), 12
            Line (147, 112)-(147, 122), 12
            Line (148, 113)-(148, 123), 12
            Line (149, 114)-(149, 124), 12
            Line (150, 113)-(150, 123), 12
            Line (151, 112)-(151, 122), 12
            Line (152, 111)-(152, 121), 12
            Line (153, 110)-(153, 120), 12
            Line (154, 110)-(154, 119), 12
            Line (155, 109)-(155, 118), 12
            Line (156, 109)-(156, 117), 12
            Line (157, 110)-(157, 116), 12
            Line (158, 110)-(158, 115), 12

            If plx >= 140 And plx <= 158 Then
                If ply >= 109 And ply <= 124 Then
                    hlth = hlth + 600

                    heart2 = 0
                End If
            End If
        End If
    End If


    If star1 = 1 Then
        If plmx = star1x And plmy = star1y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star1 = 0
                End If
            End If
        End If
    End If
    If star2 = 1 Then
        If plmx = star2x And plmy = star2y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star2 = 0
                End If
            End If
        End If
    End If
    If star3 = 1 Then
        If plmx = star3x And plmy = star3y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star3 = 0
                End If
            End If
        End If
    End If
    If star4 = 1 Then
        If plmx = star4x And plmy = star4y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star4 = 0
                End If
            End If
        End If
    End If
    If star5 = 1 Then
        If plmx = star5x And plmy = star5y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star5 = 0
                End If
            End If
        End If
    End If
    If star6 = 1 Then
        If plmx = star6x And plmy = star6y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star6 = 0
                End If
            End If
        End If
    End If
    If star7 = 1 Then
        If plmx = star7x And plmy = star7y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star7 = 0
                End If
            End If
        End If
    End If
    If star8 = 1 Then
        If plmx = star8x And plmy = star8y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star8 = 0
                End If
            End If
        End If
    End If
End If

If star1x = plmx And star1y = plmy GoTo 800
If star2x = plmx And star2y = plmy GoTo 800
If star3x = plmx And star3y = plmy GoTo 800
If star4x = plmx And star4y = plmy GoTo 800
If star5x = plmx And star5y = plmy GoTo 800
If star6x = plmx And star6y = plmy GoTo 800
If star7x = plmx And star7y = plmy GoTo 800
If star8x = plmx And star8y = plmy GoTo 800
If plmx = 25 And plmy = 25 GoTo 850
If plmx = 75 And plmy = 25 GoTo 850
If plmx = 50 And plmy = 2 GoTo 870
If plmx = 50 And plmy = 37 GoTo 880
GoTo 820
800
If strhou = 0 Then
    Line (190, 50)-(210, 50), 6
    Line (189, 51)-(211, 51), 6
    Line (188, 52)-(212, 52), 6
    Line (187, 53)-(213, 53), 6
    Line (190, 54)-(210, 54), 43
    Line (190, 55)-(210, 55), 43
    Line (190, 56)-(210, 56), 43
    Line (190, 57)-(210, 57), 43
    Line (190, 58)-(210, 58), 43
    Line (190, 59)-(210, 59), 43
    Line (190, 60)-(210, 60), 43
    Line (190, 61)-(210, 61), 43
    Line (195, 58)-(205, 58), 0
    Line (195, 59)-(205, 59), 0
    Line (195, 60)-(205, 60), 0
    Line (195, 61)-(205, 61), 0
    If plx >= 190 And plx <= 210 Then
        If ply >= 50 And ply <= 61 Then
            plx = 170
            ply = 140
            strhou = 1
        End If
    End If
End If
GoTo 820
850
If strhou = 0 Then
    Line (190, 50)-(210, 50), 6
    Line (189, 51)-(211, 51), 6
    Line (188, 52)-(212, 52), 6
    Line (187, 53)-(213, 53), 6
    Line (190, 54)-(210, 54), 12
    Line (190, 55)-(210, 55), 12
    Line (190, 56)-(210, 56), 12
    Line (190, 57)-(210, 57), 12
    Line (190, 58)-(210, 58), 12
    Line (190, 59)-(210, 59), 12
    Line (190, 60)-(210, 60), 12
    Line (190, 61)-(210, 61), 12
    Line (195, 58)-(205, 58), 0
    Line (195, 59)-(205, 59), 0
    Line (195, 60)-(205, 60), 0
    Line (195, 61)-(205, 61), 0
    If plx >= 190 And plx <= 210 Then
        If ply >= 50 And ply <= 61 Then
            plx = 170
            ply = 140
            strhou = 1
        End If
    End If
End If
GoTo 820
870
If strhou = 0 Then
    Line (190, 50)-(210, 50), 6
    Line (189, 51)-(211, 51), 6
    Line (188, 52)-(212, 52), 6
    Line (187, 53)-(213, 53), 6
    Line (190, 54)-(210, 54), 15
    Line (190, 55)-(210, 55), 15
    Line (190, 56)-(210, 56), 15
    Line (190, 57)-(210, 57), 15
    Line (190, 58)-(210, 58), 15
    Line (190, 59)-(210, 59), 15
    Line (190, 60)-(210, 60), 15
    Line (190, 61)-(210, 61), 15
    Line (195, 58)-(205, 58), 0
    Line (195, 59)-(205, 59), 0
    Line (195, 60)-(205, 60), 0
    Line (195, 61)-(205, 61), 0
    PSet (200, 50), 15
    Draw "U6D3R3L7"


    If plx >= 190 And plx <= 210 Then
        If ply >= 50 And ply <= 61 Then
            plx = 170
            ply = 140
            strhou = 1
        End If
    End If
End If
GoTo 820
880
If strhou = 0 Then
    Line (190, 50)-(210, 50), 6
    Line (189, 51)-(211, 51), 6
    Line (188, 52)-(212, 52), 6
    Line (187, 53)-(213, 53), 6
    Line (190, 54)-(210, 54), 0
    Line (190, 55)-(210, 55), 0
    Line (190, 56)-(210, 56), 0
    Line (190, 57)-(210, 57), 0
    Line (190, 58)-(210, 58), 0
    Line (190, 59)-(210, 59), 6
    Line (190, 60)-(210, 60), 6
    Line (190, 61)-(210, 61), 6
    Line (195, 58)-(205, 58), 0
    Line (195, 59)-(205, 59), 0
    Line (195, 60)-(205, 60), 0
    Line (195, 61)-(205, 61), 0
    Circle (200, 45), 6, 0
    If plx >= 190 And plx <= 210 Then
        If ply >= 50 And ply <= 61 Then
            plx = 170
            ply = 140
            strhou = 1
        End If
    End If
End If



820


vx = 0
vy = 0

Do
    i$ = InKey$


    If i$ = "a" Then pldir = 1: plx = plx - 1
    If i$ = "d" Then pldir = 4: plx = plx + 1
    If i$ = "w" Then pldir = 2: ply = ply - 1
    If i$ = "x" Then pldir = 3: ply = ply + 1

    'if _keydown(19200) then vx = vx - 3: pldir = 1
    'if _keydown(19712) then vx = vx + 3: pldir = 4
    'if _keydown(18432) then vy = vy - 3: pldir = 2
    'if _keydown(20480) then vy = vy + 3: pldir = 3

    'plx = plx + vx
    'ply = ply + vy

    'if vx > 0 then vx = vx - 1
    'if vy > 0 then vy = vy - 1
    'if vx < 0 then vx = vx + 1
    'if vy < 0 then vy = vy + 1
    '_limit 30



    If i$ = "f" GoTo 20000
    If i$ = "r" Then If cross <> 0 Then: crossu = 1: cross = cross - 1
    If i$ = "v" Then If spella <> 0 Then: spell = 1: spella = spella - 1
    If i$ = "s" Then
        plswo = 1
        If pldir = 1 Then
            plswx = plx
            plswy = ply + 2
        End If
        If pldir = 4 Then
            plswx = plx + 4
            plswy = ply + 2
        End If
        If pldir = 2 Then
            plswx = plx + 2
            plswy = ply
        End If
        If pldir = 3 Then
            plswx = plx + 2
            plswy = ply + 4
        End If
    End If
    If i$ = "c" And sprs <> 0 Then: If plspt <> 1 Then sprs = sprs - 1: plspt = 1: plstx = plx: plsty = ply: plspdr = pldir
    If i$ = "e" And bmbs <> 0 Then: bmbs = bmbs - 1: bmbset = 1
    tem = tem + 1
    If tem = 8000 Then tem = 0: GoTo 100
Loop

20000
Cls
PSet (star1x, star1y), 6
PSet (star2x, star2y), 6
PSet (star3x, star3y), 6
PSet (star4x, star4y), 6
PSet (star5x, star5y), 6
PSet (star6x, star6y), 6
PSet (star7x, star7y), 6
PSet (star8x, star8y), 6
PSet (25, 25), 12
PSet (75, 25), 12
PSet (50, 2), 7
PSet (50, 37), 0
PSet (plmx, plmy), 15
Line (1, 51)-(101, 51), 7
Line (101, 51)-(101, 1), 7
Locate 12, 1
Input dum$
GoTo 100

'

40000
Cls
Print "YOU DIED! GAME OVER :("
Input dum$
System

50000
Cls
Print "YOU WON GOT ALL 8 STARS CONGRATS!! THE END! :)"
Input dum$
System
Reply
#8
(06-07-2023, 02:50 AM)vince Wrote: do you think there's anyway I could get this QB program to run in BAM?

Code: (Select All)
Screen 13 ': _FullScreen
Print "Sir Knight Vile"
Print "Press any key to start game"
Print "Find the 8 stars to win!"
Sleep

rab = 1
ras = 1
spellcr = 1
crosso = 1
heart1 = 1
heart2 = 1
star1 = 1
star2 = 1
star3 = 1
star4 = 1
star5 = 1
star6 = 1
star7 = 1
star8 = 1
strhou = 0
hlth = 1300
Randomize Timer
10
star1x = Int(Rnd * 100)
star1y = Int(Rnd * 50)
star2x = Int(Rnd * 100)
star2y = Int(Rnd * 50)
star3x = Int(Rnd * 100)
star3y = Int(Rnd * 50)
star4x = Int(Rnd * 100)
star4y = Int(Rnd * 50)
star5x = Int(Rnd * 100)
star5y = Int(Rnd * 50)
star6x = Int(Rnd * 100)
star6y = Int(Rnd * 50)
star7x = Int(Rnd * 100)
star7y = Int(Rnd * 50)
star8x = Int(Rnd * 100)
star8y = Int(Rnd * 50)
If star1x = 0 GoTo 10
If star1y = 0 GoTo 10
If star2x = 0 GoTo 10
If star2y = 0 GoTo 10
If star3x = 0 GoTo 10
If star3y = 0 GoTo 10
If star4x = 0 GoTo 10
If star4y = 0 GoTo 10
If star5x = 0 GoTo 10
If star5y = 0 GoTo 10
If star6x = 0 GoTo 10
If star6y = 0 GoTo 10
If star7x = 0 GoTo 10
If star7y = 0 GoTo 10
If star8x = 0 GoTo 10
If star8y = 0 GoTo 10

plmx = 50
plmy = 25
pldir = 2
bcclr = 2
plx = 100
ply = 100
100
Color 15, bcclr
_Display
Cls


If spella > 0 Then sp$ = "(Got SP)" Else sp$ = ""
If cross > 0 Then cro$ = "(Got crosses)" Else cro$ = ""
Print "health:"; hlth; "|bombs:"; bmbs; "|spears:"; sprs
Print "STARS:"; strto; cro$; sp$

If pldir = 1 Then
    Line (plx, ply + 1)-(plx, ply + 4), 7
    Line (plx + 1, ply)-(plx + 1, ply + 5), 7
    Line (plx + 3, ply + 1)-(plx + 3, ply + 4), 7
    Line (plx + 2, ply)-(plx + 2, ply + 5), 7
    Line (plx, ply + 2)-(plx, ply + 3), 6
    Line (plx + 1, ply + 1)-(plx + 1, ply + 4), 6
    Line (plx + 3, ply + 2)-(plx + 3, ply + 3), 6
    Line (plx + 2, ply + 1)-(plx + 2, ply + 4), 6

End If
If pldir = 4 Then
    Line (plx, ply + 1)-(plx, ply + 3), 7
    Line (plx + 1, ply)-(plx + 1, ply + 4), 7
    Line (plx + 3, ply + 1)-(plx + 3, ply + 3), 7
    Line (plx + 2, ply)-(plx + 2, ply + 4), 7
    Line (plx, ply + 2)-(plx, ply + 3), 6
    Line (plx + 1, ply + 1)-(plx + 1, ply + 4), 6
    Line (plx + 3, ply + 2)-(plx + 3, ply + 3), 6
    Line (plx + 2, ply + 1)-(plx + 2, ply + 4), 6

End If
If pldir = 2 Then
    Line (plx + 1, ply)-(plx + 4, ply), 7
    Line (plx, ply + 1)-(plx + 5, ply + 1), 7
    Line (plx + 1, ply + 3)-(plx + 4, ply + 3), 7
    Line (plx, ply + 2)-(plx + 5, ply + 2), 7
    Line (plx, ply + 2)-(plx, ply + 3), 6
    Line (plx + 1, ply + 1)-(plx + 1, ply + 4), 6
    Line (plx + 3, ply + 2)-(plx + 3, ply + 3), 6
    Line (plx + 2, ply + 1)-(plx + 2, ply + 4), 6

End If
If pldir = 3 Then
    Line (plx + 1, ply)-(plx + 4, ply), 7
    Line (plx, ply + 1)-(plx + 5, ply + 1), 7
    Line (plx + 1, ply + 3)-(plx + 4, ply + 3), 7
    Line (plx, ply + 2)-(plx + 5, ply + 2), 7
    Line (plx, ply + 2)-(plx, ply + 3), 6
    Line (plx + 1, ply + 1)-(plx + 1, ply + 4), 6
    Line (plx + 3, ply + 2)-(plx + 3, ply + 3), 6
    Line (plx + 2, ply + 1)-(plx + 2, ply + 4), 6

End If


If strhou = 1 GoTo 220
If em1set = 0 Then emet1 = Int(Rnd * 5): plat1 = 0
If em2set = 0 Then emet2 = Int(Rnd * 5): plat2 = 0
If em3set = 0 Then emet3 = Int(Rnd * 5): plat3 = 0
If em4set = 0 Then emet4 = Int(Rnd * 5): plat4 = 0
If em5set = 0 Then emet5 = Int(Rnd * 5): plat5 = 0
If em6set = 0 Then emet6 = Int(Rnd * 5): plat6 = 0
If em7set = 0 Then emet7 = Int(Rnd * 5): plat7 = 0
If em8set = 0 Then emet8 = Int(Rnd * 5): plat8 = 0
If em1set = 0 Then
    If emet1 = 0 Then
        em1ht = 7
        em1kt = 4
    End If
    If emet1 = 1 Then
        em1ht = 3
        em1kt = 2
    End If
    If emet1 = 2 Then
        em1ht = 5
        em1kt = 3
    End If
    If emet1 = 3 Then
        em1ht = 4
        em1kt = 2
    End If
    If emet1 = 4 Then
        em1ht = 10
        em1kt = 5
    End If
End If
If em2set = 0 Then
    If emet2 = 0 Then
        em2ht = 7
        em2kt = 4
    End If
    If emet2 = 1 Then
        em2ht = 3
        em2kt = 2
    End If
    If emet2 = 2 Then
        em2ht = 5
        em2kt = 3
    End If
    If emet2 = 3 Then
        em2ht = 4
        em2kt = 2
    End If
    If emet2 = 4 Then
        em2ht = 10
        em2kt = 5
    End If
End If
If em3set = 0 Then
    If emet3 = 0 Then
        em3ht = 7
        em3kt = 4
    End If
    If emet3 = 1 Then
        em3ht = 3
        em3kt = 2
    End If
    If emet3 = 2 Then
        em3ht = 5
        em3kt = 3
    End If
    If emet3 = 3 Then
        em3ht = 4
        em3kt = 2
    End If
    If emet3 = 4 Then
        em3ht = 10
        em3kt = 5
    End If
End If
If em4set = 0 Then
    If emet4 = 0 Then
        em4ht = 7
        em4kt = 4
    End If
    If emet4 = 1 Then
        em4ht = 3
        em4kt = 2
    End If
    If emet4 = 2 Then
        em4ht = 5
        em4kt = 3
    End If
    If emet4 = 3 Then
        em4ht = 4
        em4kt = 2
    End If
    If emet4 = 4 Then
        em4ht = 10
        em4kt = 5
    End If
End If
If em5set = 0 Then
    If emet5 = 0 Then
        em5ht = 7
        em5kt = 4
    End If
    If emet5 = 1 Then
        em5ht = 3
        em5kt = 2
    End If
    If emet5 = 2 Then
        em5ht = 5
        em5kt = 3
    End If
    If emet5 = 3 Then
        em5ht = 4
        em5kt = 2
    End If
    If emet5 = 4 Then
        em5ht = 10
        em5kt = 5
    End If
End If
If em6set = 0 Then
    If emet6 = 0 Then
        em6ht = 7
        em6kt = 4
    End If
    If emet6 = 1 Then
        em6ht = 3
        em6kt = 2
    End If
    If emet6 = 2 Then
        em6ht = 5
        em6kt = 3
    End If
    If emet6 = 3 Then
        em6ht = 4
        em6kt = 2
    End If
    If emet6 = 4 Then
        em6ht = 10
        em6kt = 5
    End If
End If
If em7set = 0 Then
    If emet7 = 0 Then
        em7ht = 7
        em7kt = 4
    End If
    If emet7 = 1 Then
        em7ht = 3
        em7kt = 2
    End If
    If emet7 = 2 Then
        em7ht = 5
        em7kt = 3
    End If
    If emet7 = 3 Then
        em7ht = 4
        em7kt = 2
    End If
    If emet7 = 4 Then
        em7ht = 10
        em7kt = 5
    End If
End If
If em8set = 0 Then
    If emet8 = 0 Then
        em8ht = 7
        em8kt = 4
    End If
    If emet8 = 1 Then
        em8ht = 3
        em8kt = 2
    End If
    If emet8 = 2 Then
        em8ht = 5
        em8kt = 3
    End If
    If emet8 = 3 Then
        em8ht = 4
        em8kt = 2
    End If
    If emet8 = 4 Then
        em8ht = 10
        em8kt = 5
    End If
End If



If em1set = 0 Then eme1s = Int(Rnd * 4): plat1 = 0: plas1 = 0
If em2set = 0 Then eme2s = Int(Rnd * 4): plat2 = 0: plas2 = 0
If em3set = 0 Then eme3s = Int(Rnd * 4): plat3 = 0: plas3 = 0
If em4set = 0 Then eme4s = Int(Rnd * 4): plat4 = 0: plas4 = 0
If em5set = 0 Then eme5s = Int(Rnd * 4): plat5 = 0: plas5 = 0
If em6set = 0 Then eme6s = Int(Rnd * 4): plat6 = 0: plas6 = 0
If em7set = 0 Then eme7s = Int(Rnd * 4): plat7 = 0: plas7 = 0
If em8set = 0 Then eme8s = Int(Rnd * 4): plat8 = 0: plas8 = 0

If em1set = 0 Then If eme1s = 0 Then em1x = -12: em1y = Int(Rnd * 200): eme1d = 3: em1set = 1
If em1set = 0 Then If eme1s = 1 Then em1y = -12: em1x = Int(Rnd * 300): eme1d = 2: em1set = 1
If em1set = 0 Then If eme1s = 2 Then em1x = 325: em1y = Int(Rnd * 200): eme1d = 0: em1set = 1
If em1set = 0 Then If eme1s = 3 Then em1y = 225: em1x = Int(Rnd * 300): eme1d = 1: em1set = 1
If em2set = 0 Then If eme2s = 0 Then em2x = -12: em2y = Int(Rnd * 200): eme1d = 3: em2set = 1
If em2set = 0 Then If eme2s = 1 Then em2y = -12: em2x = Int(Rnd * 300): eme1d = 2: em2set = 1
If em2set = 0 Then If eme2s = 2 Then em2x = 325: em2y = Int(Rnd * 200): eme1d = 0: em2set = 1
If em2set = 0 Then If eme2s = 3 Then em2y = 225: em2x = Int(Rnd * 300): eme1d = 1: em2set = 1
If em3set = 0 Then If eme3s = 0 Then em3x = -12: em3y = Int(Rnd * 200): eme1d = 3: em3set = 1
If em3set = 0 Then If eme3s = 1 Then em3y = -12: em3x = Int(Rnd * 300): eme1d = 2: em3set = 1
If em3set = 0 Then If eme3s = 2 Then em3x = 325: em3y = Int(Rnd * 200): eme1d = 0: em3set = 1
If em3set = 0 Then If eme3s = 3 Then em3y = 225: em3x = Int(Rnd * 300): eme1d = 1: em3set = 1
If em4set = 0 Then If eme4s = 0 Then em4x = -12: em4y = Int(Rnd * 200): eme1d = 3: em4set = 1
If em4set = 0 Then If eme4s = 1 Then em4y = -12: em4x = Int(Rnd * 300): eme1d = 2: em4set = 1
If em4set = 0 Then If eme4s = 2 Then em4x = 325: em4y = Int(Rnd * 200): eme1d = 0: em4set = 1
If em4set = 0 Then If eme4s = 3 Then em4y = 225: em4x = Int(Rnd * 300): eme1d = 1: em4set = 1
If em5set = 0 Then If eme5s = 0 Then em5x = -12: em5y = Int(Rnd * 200): eme1d = 3: em5set = 1
If em5set = 0 Then If eme5s = 1 Then em5y = -12: em5x = Int(Rnd * 300): eme1d = 2: em5set = 1
If em5set = 0 Then If eme5s = 2 Then em5x = 325: em5y = Int(Rnd * 200): eme1d = 0: em5set = 1
If em5set = 0 Then If eme5s = 3 Then em5y = 225: em5x = Int(Rnd * 300): eme1d = 1: em5set = 1
If em6set = 0 Then If eme6s = 0 Then em6x = -12: em6y = Int(Rnd * 200): eme1d = 3: em6set = 1
If em6set = 0 Then If eme6s = 1 Then em6y = -12: em6x = Int(Rnd * 300): eme1d = 2: em6set = 1
If em6set = 0 Then If eme6s = 2 Then em6x = 325: em6y = Int(Rnd * 200): eme1d = 0: em6set = 1
If em6set = 0 Then If eme6s = 3 Then em6y = 225: em6x = Int(Rnd * 300): eme1d = 1: em6set = 1
If em7set = 0 Then If eme7s = 0 Then em7x = -12: em7y = Int(Rnd * 200): eme1d = 3: em7set = 1
If em7set = 0 Then If eme7s = 1 Then em7y = -12: em7x = Int(Rnd * 300): eme1d = 2: em7set = 1
If em7set = 0 Then If eme7s = 2 Then em7x = 325: em7y = Int(Rnd * 200): eme1d = 0: em7set = 1
If em7set = 0 Then If eme7s = 3 Then em7y = 225: em7x = Int(Rnd * 300): eme1d = 1: em7set = 1
If em8set = 0 Then If eme8s = 0 Then em8x = -12: em8y = Int(Rnd * 200): eme1d = 3: em8set = 1
If em8set = 0 Then If eme8s = 1 Then em8y = -12: em8x = Int(Rnd * 300): eme1d = 2: em8set = 1
If em8set = 0 Then If eme8s = 2 Then em8x = 325: em8y = Int(Rnd * 200): eme1d = 0: em8set = 1
If em8set = 0 Then If eme8s = 3 Then em8y = 225: em8x = Int(Rnd * 300): eme1d = 1: em8set = 1



200
emcnt = emcnt + 1
If emcnt = 1 Then
    emet = emet1
    emed = eme1d
    emx = em1x
    emy = em1y


End If
If emcnt = 2 Then
    emet = emet2
    emed = eme2d
    emx = em2x
    emy = em2y

End If
If emcnt = 3 Then
    emet = emet3
    emed = eme3d
    emx = em3x
    emy = em3y

End If
If emcnt = 4 Then
    emet = emet4
    emed = eme4d
    emx = em4x
    emy = em4y

End If
If emcnt = 5 Then
    emet = emet5
    emed = eme5d
    emx = em5x
    emy = em5y

End If
If emcnt = 6 Then
    emet = emet6
    emed = eme6d
    emx = em6x
    emy = em6y

End If
If emcnt = 7 Then
    emet = emet7
    emed = eme7d
    emx = em7x
    emy = em7y

End If
If emcnt = 8 Then
    emet = emet8
    emed = eme8d
    emx = em8x
    emy = em8y

End If

If emet = 0 Then
    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 5), 4
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 4
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 4
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 4
        Line (emx, emy + 2)-(emx - 3, emy + 2), 4
        Line (emx, emy + 4)-(emx - 3, emy + 4), 4
    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 5), 4
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 4
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 4
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 4
        Line (emx + 4, emy + 2)-(emx + 7, emy + 2), 4
        Line (emx + 4, emy + 4)-(emx + 7, emy + 4), 4
    End If
    If emed = 1 Then
        Line (emx + 1, emy)-(emx + 5, emy), 4
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 4
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 4
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 4
        Line (emx + 2, emy)-(emx + 2, emy - 3), 4
        Line (emx + 4, emy)-(emx + 4, emy - 3), 4
    End If
    If emed = 2 Then
        Line (emx + 1, emy)-(emx + 5, emy), 4
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 4
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 4
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 4
        Line (emx + 2, emy + 4)-(emx + 2, emy + 7), 4
        Line (emx + 4, emy + 4)-(emx + 4, emy + 7), 4
    End If
End If
If emet = 1 Then

    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 5), 6
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 6
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 6
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 6
        Line (emx, emy + 2)-(emx - 3, emy + 2), 6
        Line (emx, emy + 4)-(emx - 3, emy + 4), 6
        Line (emx - 1, emy + 3)-(emx, emy + 3), 6
    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 5), 6
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 6
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 6
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 6
        Line (emx + 4, emy + 2)-(emx + 7, emy + 2), 6
        Line (emx + 4, emy + 4)-(emx + 7, emy + 4), 6
        Line (emx + 5, emy + 3)-(emx + 4, emy + 3), 6
    End If
    If emed = 1 Then
        Line (emx + 1, emy)-(emx + 5, emy), 6
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 6
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 6
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 6
        Line (emx + 2, emy)-(emx + 2, emy - 3), 6
        Line (emx + 4, emy)-(emx + 4, emy - 3), 6
        Line (emx + 3, emy - 1)-(emx + 3, emy), 6
    End If
    If emed = 2 Then
        Line (emx + 1, emy)-(emx + 5, emy), 6
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 6
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 6
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 6
        Line (emx + 2, emy + 4)-(emx + 2, emy + 7), 6
        Line (emx + 4, emy + 4)-(emx + 4, emy + 7), 6
        Line (emx + 3, emy + 5)-(emx + 3, emy + 4), 6
    End If
End If
If emet = 2 Then

    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 5), 0
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 0
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 0
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 0
        Line (emx, emy + 2)-(emx - 5, emy + 2), 0
        Line (emx, emy + 4)-(emx - 5, emy + 4), 0
    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 5), 0
        Line (emx + 4, emy + 1)-(emx + 4, emy + 5), 0
        Line (emx + 2, emy + 2)-(emx + 2, emy + 4), 0
        Line (emx + 3, emy + 2)-(emx + 3, emy + 4), 0
        Line (emx + 4, emy + 2)-(emx + 9, emy + 2), 0
        Line (emx + 4, emy + 4)-(emx + 9, emy + 4), 0
    End If
    If emed = 1 Then
        Line (emx + 1, emy)-(emx + 5, emy), 0
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 0
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 0
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 0
        Line (emx + 2, emy)-(emx + 2, emy - 5), 0
        Line (emx + 4, emy)-(emx + 4, emy - 5), 0
    End If
    If emed = 2 Then
        Line (emx + 1, emy)-(emx + 5, emy), 0
        Line (emx + 1, emy + 4)-(emx + 5, emy + 4), 0
        Line (emx + 2, emy + 2)-(emx + 4, emy + 2), 0
        Line (emx + 2, emy + 3)-(emx + 4, emy + 3), 0
        Line (emx + 2, emy + 4)-(emx + 2, emy + 9), 0
        Line (emx + 4, emy + 4)-(emx + 4, emy + 9), 0
    End If
End If
If emet = 3 Then

    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 4), 10
        Line (emx + 4, emy + 1)-(emx + 4, emy + 4), 10
        Line (emx + 2, emy + 2)-(emx + 2, emy + 3), 10
        Line (emx + 3, emy + 2)-(emx + 3, emy + 3), 10
        Line (emx, emy + 1)-(emx - 5, emy + 1), 10
        Line (emx, emy + 4)-(emx - 5, emy + 4), 10
    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 4), 10
        Line (emx + 4, emy + 1)-(emx + 4, emy + 4), 10
        Line (emx + 2, emy + 2)-(emx + 2, emy + 3), 10
        Line (emx + 3, emy + 2)-(emx + 3, emy + 3), 10
        Line (emx + 4, emy + 1)-(emx + 9, emy + 1), 10
        Line (emx + 4, emy + 4)-(emx + 9, emy + 4), 10
    End If
    If emed = 1 Then
        Line (emx + 1, emy)-(emx + 4, emy), 10
        Line (emx + 1, emy + 4)-(emx + 4, emy + 4), 10
        Line (emx + 2, emy + 2)-(emx + 3, emy + 2), 10
        Line (emx + 2, emy + 3)-(emx + 3, emy + 3), 10
        Line (emx + 1, emy)-(emx + 1, emy - 5), 10
        Line (emx + 4, emy)-(emx + 4, emy - 5), 10
    End If
    If emed = 2 Then
        Line (emx + 1, emy)-(emx + 4, emy), 10
        Line (emx + 1, emy + 4)-(emx + 4, emy + 4), 10
        Line (emx + 2, emy + 2)-(emx + 3, emy + 2), 10
        Line (emx + 2, emy + 3)-(emx + 3, emy + 3), 10
        Line (emx + 1, emy + 4)-(emx + 1, emy + 9), 10
        Line (emx + 4, emy + 4)-(emx + 4, emy + 9), 10
    End If
End If
If emet = 4 Then

    If emed = 0 Then
        Line (emx, emy + 1)-(emx, emy + 2), 15
        Line (emx + 4, emy + 1)-(emx + 4, emy + 2), 15
        Line (emx + 2, emy + 2)-(emx + 2, emy + 1), 15
        Line (emx + 3, emy + 2)-(emx + 3, emy + 1), 15

    End If
    If emed = 3 Then
        Line (emx, emy + 1)-(emx, emy + 2), 15
        Line (emx + 4, emy + 1)-(emx + 4, emy + 2), 15
        Line (emx + 2, emy + 2)-(emx + 2, emy + 1), 15
        Line (emx + 3, emy + 2)-(emx + 3, emy + 1), 15

    End If
    If emed = 1 Then
        Line (emx, emy + 1)-(emx, emy + 2), 15
        Line (emx + 4, emy + 1)-(emx + 4, emy + 2), 15
        Line (emx + 2, emy + 2)-(emx + 2, emy + 1), 15
        Line (emx + 3, emy + 2)-(emx + 3, emy + 1), 15

    End If
    If emed = 2 Then
        Line (emx, emy + 1)-(emx, emy + 2), 15
        Line (emx + 4, emy + 1)-(emx + 4, emy + 2), 15
        Line (emx + 2, emy + 2)-(emx + 2, emy + 1), 15
        Line (emx + 3, emy + 2)-(emx + 3, emy + 1), 15

    End If
End If
If emcnt = 8 Then emcnt = 0: GoTo 220
GoTo 200
220

If plstx >= em1x And plstx <= em1x + 7 Then
    If plsty >= em1y And plstx <= em1y + 7 Then
        em1kt = em1kt - 2
        plspt = 0
        If em1kt <= 0 Then em1set = 0
    End If
End If
If plstx >= em2x And plstx <= em2x + 7 Then
    If plsty >= em2y And plstx <= em2y + 7 Then
        em2kt = em2kt - 2
        plspt = 0
        If em2kt <= 0 Then em2set = 0
    End If
End If
If plstx >= em3x And plstx <= em3x + 7 Then
    If plsty >= em3y And plstx <= em3y + 7 Then
        em3kt = em3kt - 2
        plspt = 0
        If em3kt <= 0 Then em3set = 0
    End If
End If
If plstx >= em4x And plstx <= em4x + 7 Then
    If plsty >= em4y And plstx <= em4y + 7 Then
        em4kt = em4kt - 2
        plspt = 0
        If em4kt <= 0 Then em4set = 0
    End If
End If
If plstx >= em5x And plstx <= em5x + 7 Then
    If plsty >= em5y And plstx <= em5y + 7 Then
        em5kt = em5kt - 2
        plspt = 0
        If em5kt <= 0 Then em5set = 0
    End If
End If
If plstx >= em6x And plstx <= em6x + 7 Then
    If plsty >= em6y And plstx <= em6y + 7 Then
        em6kt = em6kt - 2
        plspt = 0
        If em6kt <= 0 Then em6set = 0
    End If
End If
If plstx >= em7x And plstx <= em7x + 7 Then
    If plsty >= em7y And plstx <= em7y + 7 Then
        em7kt = em7kt - 2
        plspt = 0
        If em7kt <= 0 Then em7set = 0
    End If
End If
If plstx >= em8x And plstx <= em8x + 7 Then
    If plsty >= em8y And plstx <= em8y + 7 Then
        em8kt = em8kt - 2
        plspt = 0
        If em8kt <= 0 Then em8set = 0
    End If
End If

If sprs > 0 Then
    If plspt = 1 Then
        If plspdr = 1 Then
            Line (plstx, plsty)-(plstx, plsty - 5), 6
            plstx = plstx - 1
        End If
        If plspdr = 4 Then
            Line (plstx, plsty)-(plstx, plsty + 5), 6
            plstx = plstx + 1
        End If
        If plspdr = 2 Then
            Line (plstx, plsty)-(plstx - 5, plsty), 6
            plsty = plsty - 1
        End If
        If plspdr = 3 Then
            Line (plstx, plsty)-(plstx + 5, plsty), 6
            plsty = plsty + 1
        End If
    End If
End If

If plstx > 325 Then plspt = 0
If plstx < -12 Then plspt = 0
If plsty > 225 Then plspt = 0
If plsty < -12 Then plspt = 0

If bmbs > 0 Then
    If bmbset = 1 Then
        bmbpx = plx
        bmbpy = ply
        bmbset = 0
        bmbp = 1
        bmbtdo = 1
    End If
    If bmbp = 1 Then
        Line (bmbpx, bmbpy + 1)-(bmbpx, bmbpy + 2), 8
        Line (bmbpx + 3, bmbpy + 1)-(bmbpx + 3, bmbpy + 2), 8
        Line (bmbpx + 1, bmbpy)-(bmbpx + 1, bmbpy + 3), 8
        Line (bmbpx + 2, bmbpy)-(bmbpx + 2, bmbpy + 3), 8
        Line (bmbpx + 2, bmbpy)-(bmbpx + 2, bmbpy - 4), 15
        PSet (bmbpx + 2, bmbpy - 4), 4
    End If
    If bmbtdo = 1 Then bmbt = bmbt + 1
    If bmbt = 650 Then
        bmbex = 1
        bmbp = 0
    End If
    If bmbex = 1 Then
        Circle (bmbpx, bmbpy), 25, 4
        If pla = 0 Then
            If plx >= bmbpx - 15 And plx <= bmbpx + 15 Then
                If ply >= bmbpy - 15 And ply <= bmbpy + 15 Then
                    hlth = hlth - 4
                    pla = 1
                    If hlth <= 0 GoTo 50000
                End If
            End If
        End If

        If em1a = 0 Then
            If em1x >= bmbpx - 15 And em1x <= bmbpx + 15 Then
                If em1y >= bmbpy - 15 And em1y <= bmbpy + 15 Then
                    em1kt = em1kt - 4
                    em1a = 1
                    If em1kt <= 0 Then em1set = 0
                End If
            End If
        End If
        If em2a = 0 Then
            If em2x >= bmbpx - 15 And em2x <= bmbpx + 15 Then
                If em2y >= bmbpy - 15 And em2y <= bmbpy + 15 Then
                    em2kt = em2kt - 4
                    em2a = 1
                    If em2kt <= 0 Then em2set = 0
                End If
            End If
        End If
        If em3a = 0 Then
            If em3x >= bmbpx - 15 And em3x <= bmbpx + 15 Then
                If em3y >= bmbpy - 15 And em3y <= bmbpy + 15 Then
                    em3kt = em3kt - 4
                    em3a = 1
                    If em3kt <= 0 Then em3set = 0
                End If
            End If
        End If
        If em4a = 0 Then
            If em4x >= bmbpx - 15 And em4x <= bmbpx + 15 Then
                If em4y >= bmbpy - 15 And em4y <= bmbpy + 15 Then
                    em4kt = em4kt - 4
                    em4a = 1
                    If em4kt <= 0 Then em4set = 0
                End If
            End If
        End If
        If em15a = 0 Then
            If em5x >= bmbpx - 15 And em5x <= bmbpx + 15 Then
                If em5y >= bmbpy - 15 And em5y <= bmbpy + 15 Then
                    em5kt = em5kt - 4
                    em5a = 1
                    If em5kt <= 0 Then em5set = 0
                End If
            End If
        End If
        If em6a = 0 Then
            If em6x >= bmbpx - 15 And em6x <= bmbpx + 15 Then
                If em6y >= bmbpy - 15 And em6y <= bmbpy + 15 Then
                    em6kt = em6kt - 4
                    em6a = 1
                    If em6kt <= 0 Then em6set = 0
                End If
            End If
        End If
        If em7a = 0 Then
            If em7x >= bmbpx - 15 And em7x <= bmbpx + 15 Then
                If em7y >= bmbpy - 15 And em7y <= bmbpy + 15 Then
                    em7kt = em7kt - 4
                    em7a = 1
                    If em7kt <= 0 Then em7set = 0
                End If
            End If
        End If
        If em8a = 0 Then
            If em8x >= bmbpx - 15 And em8x <= bmbpx + 15 Then
                If em8y >= bmbpy - 15 And em8y <= bmbpy + 15 Then
                    em8kt = em8kt - 4
                    em8a = 1
                    If em8kt <= 0 Then em8set = 0
                End If
            End If
        End If
    End If
    If bmbt = 660 Then
        bmbex = 0
        bmbtdo = 0
        bmbt = 0
        em1a = 0
        em2a = 0
        em3a = 0
        em4a = 0
        em5a = 0
        em6a = 0
        em7a = 0
        em8a = 0
        pla = 0
    End If

End If




If crossu = 1 Then
    If cross > 0 Then
        If ftim < 10 And ftim <> 0 Then bcclr = 15 Else bcclr = 2
        ftim = ftim + 1
        em1set = 0
        em2set = 0
        em3set = 0
        em4set = 0
        em5set = 0
        em6set = 0
        em7set = 0
        em8set = 0

        If ftim = 12 Then
            crossu = 0
            ftim = 0
        End If
    End If
End If

If plswo = 1 Then
    plswot = plswot + 1
    If pldir = 1 Then Line (plswx, plswy)-(plswx - 5, plswy), 15
    If pldir = 4 Then Line (plswx, plswy)-(plswx + 5, plswy), 15
    If pldir = 2 Then Line (plswx, plswy)-(plswx, plswy - 5), 15
    If pldir = 3 Then Line (plswx, plswy)-(plswx, plswy + 5), 15

    If plswot = 5 Then plswo = 0: plswot = 0
    If pldir = 1 Then
        em1a = 0
        If plswx >= em1x And plswx - 5 <= em1x + 7 Then
            If plswy >= em1y And plswy <= em1y + 7 GoTo 905
        End If
    End If
    If pldir = 4 Then
        em1a = 0
        If plswx >= em1x And plswx + 5 <= em1x + 7 Then
            If plswy >= em1y And plswy <= em1y + 7 GoTo 905
        End If
    End If
    If pldir = 2 Then
        em1a = 0
        If plswx >= em1x And plswx <= em1x + 7 Then
            If plswy >= em1y And plswy - 5 <= em1y + 7 GoTo 905
        End If
    End If
    If pldir = 3 Then
        em1a = 0
        If plswx >= em1x And plswx <= em1x + 7 Then
            If plswy >= em1y And plswy + 5 <= em1y + 7 GoTo 905
        End If
    End If
    If pldir = 1 Then
        em2a = 0
        If plswx >= em2x And plswx - 5 <= em2x + 7 Then
            If plswy >= em2y And plswy <= em2y + 7 GoTo 910
        End If
    End If
    If pldir = 4 Then
        em2a = 0
        If plswx >= em2x And plswx + 5 <= em2x + 7 Then
            If plswy >= em2y And plswy <= em2y + 7 GoTo 910
        End If
    End If
    If pldir = 2 Then
        em2a = 0
        If plswx >= em2x And plswx <= em2x + 7 Then
            If plswy >= em2y And plswy - 5 <= em2y + 7 GoTo 910
        End If
    End If
    If pldir = 3 Then
        em2a = 0
        If plswx >= em2x And plswx <= em2x + 7 Then
            If plswy >= em2y And plswy + 5 <= em2y + 7 GoTo 910
        End If
    End If
    If pldir = 1 Then
        em3a = 0
        If plswx >= em3x And plswx - 5 <= em3x + 7 Then
            If plswy >= em3y And plswy <= em3y + 7 GoTo 915
        End If
    End If
    If pldir = 4 Then
        em3a = 0
        If plswx >= em3x And plswx + 5 <= em3x + 7 Then
            If plswy >= em3y And plswy <= em3y + 7 GoTo 915
        End If
    End If
    If pldir = 2 Then
        em3a = 0
        If plswx >= em3x And plswx <= em3x + 7 Then
            If plswy >= em3y And plswy - 5 <= em3y + 7 GoTo 915
        End If
    End If
    If pldir = 3 Then
        em3a = 0
        If plswx >= em3x And plswx <= em3x + 7 Then
            If plswy >= em3y And plswy + 5 <= em3y + 7 GoTo 915
        End If
    End If
    If pldir = 1 Then
        em4a = 0
        If plswx >= em4x And plswx - 5 <= em4x + 7 Then
            If plswy >= em4y And plswy <= em4y + 7 GoTo 920
        End If
    End If
    If pldir = 4 Then
        em4a = 0
        If plswx >= em4x And plswx + 5 <= em4x + 7 Then
            If plswy >= em4y And plswy <= em4y + 7 GoTo 920
        End If
    End If
    If pldir = 2 Then
        em4a = 0
        If plswx >= em4x And plswx <= em4x + 7 Then
            If plswy >= em4y And plswy - 5 <= em4y + 7 GoTo 920
        End If
    End If
    If pldir = 3 Then
        em4a = 0
        If plswx >= em4x And plswx <= em4x + 7 Then
            If plswy >= em4y And plswy + 5 <= em4y + 7 GoTo 920
        End If
    End If
    If pldir = 1 Then
        em5a = 0
        If plswx >= em5x And plswx - 5 <= em5x + 7 Then
            If plswy >= em5y And plswy <= em5y + 7 GoTo 925
        End If
    End If
    If pldir = 4 Then
        em5a = 0
        If plswx >= em5x And plswx + 5 <= em5x + 7 Then
            If plswy >= em5y And plswy <= em5y + 7 GoTo 925
        End If
    End If
    If pldir = 2 Then
        em5a = 0
        If plswx >= em5x And plswx <= em5x + 7 Then
            If plswy >= em5y And plswy - 5 <= em5y + 7 GoTo 925
        End If
    End If
    If pldir = 3 Then
        em5a = 0
        If plswx >= em5x And plswx <= em5x + 7 Then
            If plswy >= em5y And plswy + 5 <= em5y + 7 GoTo 925
        End If
    End If
    If pldir = 1 Then
        em6a = 0
        If plswx >= em6x And plswx - 5 <= em6x + 7 Then
            If plswy >= em6y And plswy <= em6y + 7 GoTo 930
        End If
    End If
    If pldir = 4 Then
        em6a = 0
        If plswx >= em6x And plswx + 5 <= em6x + 7 Then
            If plswy >= em6y And plswy <= em6y + 7 GoTo 930
        End If
    End If
    If pldir = 2 Then
        em6a = 0
        If plswx >= em6x And plswx <= em6x + 7 Then
            If plswy >= em6y And plswy - 5 <= em6y + 7 GoTo 930
        End If
    End If
    If pldir = 3 Then
        em6a = 0
        If plswx >= em6x And plswx <= em6x + 7 Then
            If plswy >= em6y And plswy + 5 <= em6y + 7 GoTo 930
        End If
    End If
    If pldir = 1 Then
        em7a = 0
        If plswx >= em7x And plswx - 5 <= em7x + 7 Then
            If plswy >= em7y And plswy <= em7y + 7 GoTo 935
        End If
    End If
    If pldir = 4 Then
        em7a = 0
        If plswx >= em7x And plswx + 5 <= em7x + 7 Then
            If plswy >= em7y And plswy <= em7y + 7 GoTo 935
        End If
    End If
    If pldir = 2 Then
        em7a = 0
        If plswx >= em7x And plswx <= em7x + 7 Then
            If plswy >= em7y And plswy - 5 <= em7y + 7 GoTo 935
        End If
    End If
    If pldir = 3 Then
        em7a = 0
        If plswx >= em7x And plswx <= em7x + 7 Then
            If plswy >= em7y And plswy + 5 <= em7y + 7 GoTo 935
        End If
    End If
    If pldir = 1 Then
        em8a = 0
        If plswx >= em8x And plswx - 5 <= em8x + 7 Then
            If plswy >= em8y And plswy <= em8y + 7 GoTo 940
        End If
    End If
    If pldir = 4 Then
        em8a = 0
        If plswx >= em8x And plswx + 5 <= em8x + 7 Then
            If plswy >= em8y And plswy <= em8y + 7 GoTo 940
        End If
    End If
    If pldir = 2 Then
        em8a = 0
        If plswx >= em8x And plswx <= em8x + 7 Then
            If plswy >= em8y And plswy - 5 <= em8y + 7 GoTo 940
        End If
    End If
    If pldir = 3 Then
        em8a = 0
        If plswx >= em8x And plswx <= em8x + 7 Then
            If plswy >= em8y And plswy + 5 <= em8y + 7 GoTo 940
        End If
    End If
End If

GoTo 990


905
If em1a = 0 Then
    em1kt = em1kt - 1
    If em1kt <= 0 Then em1set = 0
    em1a = 1
End If
GoTo 990
910
If em2a = 0 Then
    em2kt = em2kt - 1
    If em2kt <= 0 Then em2set = 0
    em2a = 1
End If
GoTo 990
915
If em3a = 0 Then
    em3kt = em3kt - 1
    If em3kt <= 0 Then em3set = 0
    em3a = 1
End If
GoTo 990
920
If em4a = 0 Then
    em4kt = em4kt - 1
    If em4kt <= 0 Then em4set = 0
    em2a = 1
End If
GoTo 990
925
If em5a = 0 Then
    em5kt = em5kt - 1
    If em5kt <= 0 Then em5set = 0
    em5a = 1
End If
GoTo 990
930
If em6a = 0 Then
    em6kt = em6kt - 1
    If em6kt <= 0 Then em6set = 0
    em6a = 1
End If
GoTo 990
935
If em7a = 0 Then
    em7kt = em7kt - 1
    If em7kt <= 0 Then em7set = 0
    em7a = 1
End If
GoTo 990
940
If em8a = 0 Then
    em8kt = em8kt - 1
    If em8kt <= 0 Then em8set = 0
    em8a = 1
End If
GoTo 990

990



emmov = emmov + 1

If spell = 1 GoTo 780
If emmov = 15 Then
    emmov = 0
    If plx > em1x Then em1x = em1x + 1
    If plx < em1x Then em1x = em1x - 1
    If ply > em1y Then em1y = em1y + 1
    If ply < em1y Then em1y = em1y - 1
    If plx > em2x Then em2x = em2x + 1
    If plx < em2x Then em2x = em2x - 1
    If ply > em2y Then em2y = em2y + 1
    If ply < em2y Then em2y = em2y - 1
    If plx > em3x Then em3x = em3x + 1
    If plx < em3x Then em3x = em3x - 1
    If ply > em3y Then em3y = em3y + 1
    If ply < em3y Then em3y = em3y - 1
    If plx > em4x Then em4x = em4x + 1
    If plx < em4x Then em4x = em4x - 1
    If ply > em4y Then em4y = em4y + 1
    If ply < em4y Then em4y = em4y - 1
    If plx > em5x Then em5x = em5x + 1
    If plx < em5x Then em5x = em5x - 1
    If ply > em5y Then em5y = em5y + 1
    If ply < em5y Then em5y = em5y - 1
    If plx > em6x Then em6x = em6x + 1
    If plx < em6x Then em6x = em6x - 1
    If ply > em6y Then em6y = em6y + 1
    If ply < em6y Then em6y = em6y - 1
    If plx > em7x Then em7x = em7x + 1
    If plx < em7x Then em7x = em7x - 1
    If ply > em7y Then em7y = em7y + 1
    If ply < em7y Then em7y = em7y - 1
    If plx > em8x Then em8x = em8x + 1
    If plx < em8x Then em8x = em8x - 1
    If ply > em8y Then em8y = em8y + 1
    If ply < em8y Then em8y = em8y - 1
End If
GoTo 790
780

If spella > 0 Then
    If sbbx = 0 Then spltim = spltim + 1
    If spltim < 10 And spltim <> 0 Then bcclr = 0 Else bcclr = 2
    If spltim = 10 Then sbbx = 1: spltim = 0
    emmov = 0
    If plx < em1x Then em1x = em1x + 1
    If plx > em1x Then em1x = em1x - 1
    If ply < em1y Then em1y = em1y + 1
    If ply > em1y Then em1y = em1y - 1
    If plx < em2x Then em2x = em2x + 1
    If plx > em2x Then em2x = em2x - 1
    If ply < em2y Then em2y = em2y + 1
    If ply > em2y Then em2y = em2y - 1
    If plx < em3x Then em3x = em3x + 1
    If plx > em3x Then em3x = em3x - 1
    If ply < em3y Then em3y = em3y + 1
    If ply > em3y Then em3y = em3y - 1
    If plx < em4x Then em4x = em4x + 1
    If plx > em4x Then em4x = em4x - 1
    If ply < em4y Then em4y = em4y + 1
    If ply > em4y Then em4y = em4y - 1
    If plx < em5x Then em5x = em5x + 1
    If plx > em5x Then em5x = em5x - 1
    If ply < em5y Then em5y = em5y + 1
    If ply > em5y Then em5y = em5y - 1
    If plx < em6x Then em6x = em6x + 1
    If plx > em6x Then em6x = em6x - 1
    If ply < em6y Then em6y = em6y + 1
    If ply > em6y Then em6y = em6y - 1
    If plx < em7x Then em7x = em7x + 1
    If plx > em7x Then em7x = em7x - 1
    If ply < em7y Then em7y = em7y + 1
    If ply > em7y Then em7y = em7y - 1
    If plx < em8x Then em8x = em8x + 1
    If plx > em8x Then em8x = em8x - 1
    If ply < em8y Then em8y = em8y + 1
    If ply > em8y Then em8y = em8y - 1
End If
790


If plas1 = 0 And plat1 = 1 Then
    If plx = em1x And ply = em1y Then
        hlth = hlth - em1ht
        If hlth <= 0 GoTo 40000


        plas1 = 1
    End If
End If
If plas2 = 0 And plat2 = 1 Then
    If plx = em2x And ply = em2y Then
        hlth = hlth - em2ht
        If hlth <= 0 GoTo 40000


        plas2 = 1
    End If
End If


If plas3 = 0 And plat3 = 1 Then
    If plx = em3x And ply = em3y Then
        hlth = hlth - em3ht
        If hlth <= 0 GoTo 40000


        plas3 = 1
    End If
End If
If plas4 = 0 And plat4 = 1 Then
    If plx = em4x And ply = em4y Then
        hlth = hlth - em4ht
        If hlth <= 0 GoTo 40000


        plas4 = 1
    End If
End If
If plas5 = 0 And plat5 = 1 Then
    If plx = em5x And ply = em5y Then
        hlth = hlth - em5ht
        If hlth <= 0 GoTo 40000


        plas5 = 1
    End If
End If
If plas6 = 0 And plat6 = 1 Then
    If plx = em6x And ply = em6y Then
        hlth = hlth - em6ht
        If hlth <= 0 GoTo 40000


        plas6 = 1
    End If
End If
If plas7 = 0 And plat7 = 1 Then
    If plx = em7x And ply = em7y Then
        hlth = hlth - em7ht
        If hlth <= 0 GoTo 40000


        plas7 = 1
    End If
End If
If plas8 = 0 And plat8 = 1 Then
    If plx = em8x And ply = em8y Then
        hlth = hlth - em8ht
        If hlth <= 0 GoTo 40000


        plas8 = 1
    End If
End If

If em1set = 1 Then plat1 = 1
If em2set = 1 Then plat2 = 1
If em3set = 1 Then plat3 = 1
If em4set = 1 Then plat4 = 1
If em5set = 1 Then plat5 = 1
If em6set = 1 Then plat6 = 1
If em7set = 1 Then plat7 = 1
If em8set = 1 Then plat8 = 1



If rab <> 0 Then rab = Int(Rnd * 1000)
If ras <> 0 Then ras = Int(Rnd * 1000)
If rabs = 0 Then
    If rab = 0 Then

        bmbpipx = Int(Rnd * 290)
        bmbpipy = Int(Rnd * 190)
        rabs = 1
    End If
End If
If rass = 0 Then
    If ras = 0 Then
        sprpipx = Int(Rnd * 290)
        sprpipy = Int(Rnd * 190)
        rass = 1
    End If
End If

If rabs = 1 Then
    Line (bmbpipx, bmbpipy + 1)-(bmbpipx, bmbpipy + 2), 8
    Line (bmbpipx + 3, bmbpipy + 1)-(bmbpipx + 3, bmbpipy + 2), 8
    Line (bmbpipx + 1, bmbpipy)-(bmbpipx + 1, bmbpipy + 3), 8
    Line (bmbpipx + 2, bmbpipy)-(bmbpipx + 2, bmbpipy + 3), 8
    Line (bmbpipx + 2, bmbpipy)-(bmbpipx + 2, bmbpipy - 4), 15
End If


If rass = 1 Then Line (sprpipx, sprpipy)-(sprpipx, sprpipy + 5), 6
If rabs = 1 Then
    If plx >= bmbpipx And plx <= bmbpipx + 5 Then
        If ply >= bmbpipy And ply <= bmbpipy + 5 Then
            bmbs = bmbs + 3
            rab = 1: rabs = 0
        End If
    End If
End If
If rass = 1 Then
    If plx >= sprpipx And plx <= sprpipx + 7 Then
        If ply >= sprpipy And ply <= sprpipy + 1 Then
            sprs = sprs + 5
            ras = 1: rass = 0
        End If
    End If
End If

If plx < -14 Then
    plx = 350
    plmx = plmx - 1
    em1set = 0
    em2set = 0
    em3set = 0
    em4set = 0
    em5set = 0
    em6set = 0
    em7set = 0
    em8set = 0
    rab = 1: rabs = 0
    ras = 1: rass = 0
    spell = 0
    GoTo 100
End If
If plx > 354 Then
    plx = -12
    plmx = plmx + 1
    em1set = 0
    em2set = 0
    em3set = 0
    em4set = 0
    em5set = 0
    em6set = 0
    em7set = 0
    em8set = 0
    rab = 1: rabs = 0
    ras = 1: rass = 0
    spell = 0
    GoTo 100
End If
If ply < -14 Then
    ply = 200
    plmy = plmy - 1
    em1set = 0
    em2set = 0
    em3set = 0
    em4set = 0
    em5set = 0
    em6set = 0
    em7set = 0
    em8set = 0
    rab = 1: rabs = 0
    ras = 1: rass = 0
    spell = 0
    GoTo 100
End If
If ply > 204 Then
    ply = -12
    plmy = plmy + 1
    em1set = 0
    em2set = 0
    em3set = 0
    em4set = 0
    em5set = 0
    em6set = 0
    em7set = 0
    em8set = 0
    rab = 1: rabs = 0
    ras = 1: rass = 0
    spell = 0
    GoTo 100
End If
If plmx = 101 Then plmx = 1
If plmx = -1 Then plmx = 100
If plmy = 51 Then plmy = 1
If plmy = -1 Then plmy = 50

If strhou = 1 Then
    rab = 1: rabs = 0
    ras = 1: rass = 0

    bcclr = 0
    PSet (100, 100), 186
    Draw "R10D50L10U50R10D10R100U10L100R100D50R10U50L10"
    PSet (100, 150), 186
    Draw "R25"
    PSet (210, 150), 186
    Draw "L25"

    If plx > 210 Then strhou = 0: bcclr = 2: plx = 200: ply = 65
    If plx < 100 Then strhou = 0: bcclr = 2: plx = 200: ply = 65
    If ply < 100 Then strhou = 0: bcclr = 2: plx = 200: ply = 65
    If ply > 150 Then strhou = 0: bcclr = 2: plx = 200: ply = 65
    If crosso = 1 Then
        If plmx = 50 And plmy = 2 Then
            PSet (190, 105), 15
            Draw "D6U3R3L7"
            If plx >= 187 And plx <= 193 Then
                If ply >= 105 And ply <= 111 Then
                    crossa = Int(Rnd * 8)
                    cross = cross + 10 + crossa
                    crosso = 0
                End If
            End If
        End If
    End If
    If spellcr = 1 Then
        If plmx = 50 And plmy = 37 Then
            PSet (180, 115), 4
            Draw "D3R1U4D5R1U5D6R1U4D5R1D3"
            If plx >= 180 And plx <= 184 Then
                If ply >= 109 And ply <= 119 Then
                    spella = spella + 6
                    spellcr = 0
                End If
            End If
        End If
    End If


    If heart1 = 1 Then
        If plmx = 25 And plmy = 25 Then
            Line (140, 110)-(140, 115), 12
            Line (141, 110)-(141, 116), 12
            Line (142, 109)-(142, 117), 12
            Line (143, 109)-(143, 118), 12
            Line (144, 110)-(144, 119), 12
            Line (145, 110)-(145, 120), 12
            Line (146, 111)-(146, 121), 12
            Line (147, 112)-(147, 122), 12
            Line (148, 113)-(148, 123), 12
            Line (149, 114)-(149, 124), 12
            Line (150, 113)-(150, 123), 12
            Line (151, 112)-(151, 122), 12
            Line (152, 111)-(152, 121), 12
            Line (153, 110)-(153, 120), 12
            Line (154, 110)-(154, 119), 12
            Line (155, 109)-(155, 118), 12
            Line (156, 109)-(156, 117), 12
            Line (157, 110)-(157, 116), 12
            Line (158, 110)-(158, 115), 12

            If plx >= 140 And plx <= 158 Then
                If ply >= 109 And ply <= 124 Then
                    hlth = hlth + 600

                    heart1 = 0
                End If
            End If
        End If
    End If
    If heart2 = 1 Then
        If plmx = 75 And plmy = 25 Then
            Line (140, 110)-(140, 115), 12
            Line (141, 110)-(141, 116), 12
            Line (142, 109)-(142, 117), 12
            Line (143, 109)-(143, 118), 12
            Line (144, 110)-(144, 119), 12
            Line (145, 110)-(145, 120), 12
            Line (146, 111)-(146, 121), 12
            Line (147, 112)-(147, 122), 12
            Line (148, 113)-(148, 123), 12
            Line (149, 114)-(149, 124), 12
            Line (150, 113)-(150, 123), 12
            Line (151, 112)-(151, 122), 12
            Line (152, 111)-(152, 121), 12
            Line (153, 110)-(153, 120), 12
            Line (154, 110)-(154, 119), 12
            Line (155, 109)-(155, 118), 12
            Line (156, 109)-(156, 117), 12
            Line (157, 110)-(157, 116), 12
            Line (158, 110)-(158, 115), 12

            If plx >= 140 And plx <= 158 Then
                If ply >= 109 And ply <= 124 Then
                    hlth = hlth + 600

                    heart2 = 0
                End If
            End If
        End If
    End If


    If star1 = 1 Then
        If plmx = star1x And plmy = star1y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star1 = 0
                End If
            End If
        End If
    End If
    If star2 = 1 Then
        If plmx = star2x And plmy = star2y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star2 = 0
                End If
            End If
        End If
    End If
    If star3 = 1 Then
        If plmx = star3x And plmy = star3y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star3 = 0
                End If
            End If
        End If
    End If
    If star4 = 1 Then
        If plmx = star4x And plmy = star4y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star4 = 0
                End If
            End If
        End If
    End If
    If star5 = 1 Then
        If plmx = star5x And plmy = star5y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star5 = 0
                End If
            End If
        End If
    End If
    If star6 = 1 Then
        If plmx = star6x And plmy = star6y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star6 = 0
                End If
            End If
        End If
    End If
    If star7 = 1 Then
        If plmx = star7x And plmy = star7y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star7 = 0
                End If
            End If
        End If
    End If
    If star8 = 1 Then
        If plmx = star8x And plmy = star8y Then
            PSet (150, 110), 43
            Draw "D5H5F5E5G5L5R5F5H5G5E5L5"
            If plx >= 145 And plx <= 155 Then
                If ply >= 105 And ply <= 115 Then
                    strto = strto + 1
                    If strto >= 8 GoTo 50000
                    star8 = 0
                End If
            End If
        End If
    End If
End If

If star1x = plmx And star1y = plmy GoTo 800
If star2x = plmx And star2y = plmy GoTo 800
If star3x = plmx And star3y = plmy GoTo 800
If star4x = plmx And star4y = plmy GoTo 800
If star5x = plmx And star5y = plmy GoTo 800
If star6x = plmx And star6y = plmy GoTo 800
If star7x = plmx And star7y = plmy GoTo 800
If star8x = plmx And star8y = plmy GoTo 800
If plmx = 25 And plmy = 25 GoTo 850
If plmx = 75 And plmy = 25 GoTo 850
If plmx = 50 And plmy = 2 GoTo 870
If plmx = 50 And plmy = 37 GoTo 880
GoTo 820
800
If strhou = 0 Then
    Line (190, 50)-(210, 50), 6
    Line (189, 51)-(211, 51), 6
    Line (188, 52)-(212, 52), 6
    Line (187, 53)-(213, 53), 6
    Line (190, 54)-(210, 54), 43
    Line (190, 55)-(210, 55), 43
    Line (190, 56)-(210, 56), 43
    Line (190, 57)-(210, 57), 43
    Line (190, 58)-(210, 58), 43
    Line (190, 59)-(210, 59), 43
    Line (190, 60)-(210, 60), 43
    Line (190, 61)-(210, 61), 43
    Line (195, 58)-(205, 58), 0
    Line (195, 59)-(205, 59), 0
    Line (195, 60)-(205, 60), 0
    Line (195, 61)-(205, 61), 0
    If plx >= 190 And plx <= 210 Then
        If ply >= 50 And ply <= 61 Then
            plx = 170
            ply = 140
            strhou = 1
        End If
    End If
End If
GoTo 820
850
If strhou = 0 Then
    Line (190, 50)-(210, 50), 6
    Line (189, 51)-(211, 51), 6
    Line (188, 52)-(212, 52), 6
    Line (187, 53)-(213, 53), 6
    Line (190, 54)-(210, 54), 12
    Line (190, 55)-(210, 55), 12
    Line (190, 56)-(210, 56), 12
    Line (190, 57)-(210, 57), 12
    Line (190, 58)-(210, 58), 12
    Line (190, 59)-(210, 59), 12
    Line (190, 60)-(210, 60), 12
    Line (190, 61)-(210, 61), 12
    Line (195, 58)-(205, 58), 0
    Line (195, 59)-(205, 59), 0
    Line (195, 60)-(205, 60), 0
    Line (195, 61)-(205, 61), 0
    If plx >= 190 And plx <= 210 Then
        If ply >= 50 And ply <= 61 Then
            plx = 170
            ply = 140
            strhou = 1
        End If
    End If
End If
GoTo 820
870
If strhou = 0 Then
    Line (190, 50)-(210, 50), 6
    Line (189, 51)-(211, 51), 6
    Line (188, 52)-(212, 52), 6
    Line (187, 53)-(213, 53), 6
    Line (190, 54)-(210, 54), 15
    Line (190, 55)-(210, 55), 15
    Line (190, 56)-(210, 56), 15
    Line (190, 57)-(210, 57), 15
    Line (190, 58)-(210, 58), 15
    Line (190, 59)-(210, 59), 15
    Line (190, 60)-(210, 60), 15
    Line (190, 61)-(210, 61), 15
    Line (195, 58)-(205, 58), 0
    Line (195, 59)-(205, 59), 0
    Line (195, 60)-(205, 60), 0
    Line (195, 61)-(205, 61), 0
    PSet (200, 50), 15
    Draw "U6D3R3L7"


    If plx >= 190 And plx <= 210 Then
        If ply >= 50 And ply <= 61 Then
            plx = 170
            ply = 140
            strhou = 1
        End If
    End If
End If
GoTo 820
880
If strhou = 0 Then
    Line (190, 50)-(210, 50), 6
    Line (189, 51)-(211, 51), 6
    Line (188, 52)-(212, 52), 6
    Line (187, 53)-(213, 53), 6
    Line (190, 54)-(210, 54), 0
    Line (190, 55)-(210, 55), 0
    Line (190, 56)-(210, 56), 0
    Line (190, 57)-(210, 57), 0
    Line (190, 58)-(210, 58), 0
    Line (190, 59)-(210, 59), 6
    Line (190, 60)-(210, 60), 6
    Line (190, 61)-(210, 61), 6
    Line (195, 58)-(205, 58), 0
    Line (195, 59)-(205, 59), 0
    Line (195, 60)-(205, 60), 0
    Line (195, 61)-(205, 61), 0
    Circle (200, 45), 6, 0
    If plx >= 190 And plx <= 210 Then
        If ply >= 50 And ply <= 61 Then
            plx = 170
            ply = 140
            strhou = 1
        End If
    End If
End If



820


vx = 0
vy = 0

Do
    i$ = InKey$


    If i$ = "a" Then pldir = 1: plx = plx - 1
    If i$ = "d" Then pldir = 4: plx = plx + 1
    If i$ = "w" Then pldir = 2: ply = ply - 1
    If i$ = "x" Then pldir = 3: ply = ply + 1

    'if _keydown(19200) then vx = vx - 3: pldir = 1
    'if _keydown(19712) then vx = vx + 3: pldir = 4
    'if _keydown(18432) then vy = vy - 3: pldir = 2
    'if _keydown(20480) then vy = vy + 3: pldir = 3

    'plx = plx + vx
    'ply = ply + vy

    'if vx > 0 then vx = vx - 1
    'if vy > 0 then vy = vy - 1
    'if vx < 0 then vx = vx + 1
    'if vy < 0 then vy = vy + 1
    '_limit 30



    If i$ = "f" GoTo 20000
    If i$ = "r" Then If cross <> 0 Then: crossu = 1: cross = cross - 1
    If i$ = "v" Then If spella <> 0 Then: spell = 1: spella = spella - 1
    If i$ = "s" Then
        plswo = 1
        If pldir = 1 Then
            plswx = plx
            plswy = ply + 2
        End If
        If pldir = 4 Then
            plswx = plx + 4
            plswy = ply + 2
        End If
        If pldir = 2 Then
            plswx = plx + 2
            plswy = ply
        End If
        If pldir = 3 Then
            plswx = plx + 2
            plswy = ply + 4
        End If
    End If
    If i$ = "c" And sprs <> 0 Then: If plspt <> 1 Then sprs = sprs - 1: plspt = 1: plstx = plx: plsty = ply: plspdr = pldir
    If i$ = "e" And bmbs <> 0 Then: bmbs = bmbs - 1: bmbset = 1
    tem = tem + 1
    If tem = 8000 Then tem = 0: GoTo 100
Loop

20000
Cls
PSet (star1x, star1y), 6
PSet (star2x, star2y), 6
PSet (star3x, star3y), 6
PSet (star4x, star4y), 6
PSet (star5x, star5y), 6
PSet (star6x, star6y), 6
PSet (star7x, star7y), 6
PSet (star8x, star8y), 6
PSet (25, 25), 12
PSet (75, 25), 12
PSet (50, 2), 7
PSet (50, 37), 0
PSet (plmx, plmy), 15
Line (1, 51)-(101, 51), 7
Line (101, 51)-(101, 1), 7
Locate 12, 1
Input dum$
GoTo 100

'

40000
Cls
Print "YOU DIED! GAME OVER :("
Input dum$
System

50000
Cls
Print "YOU WON GOT ALL 8 STARS CONGRATS!! THE END! :)"
Input dum$
System

Nested IF-THEN in one line (in your loop) will have to be replaced.  System statements: replace those with END statements.  Still reviewing ...
Reply
#9
(06-07-2023, 04:12 AM)CharlieJV Wrote:
(06-07-2023, 02:50 AM)vince Wrote: do you think there's anyway I could get this QB program to run in BAM?

First cut has the programming running (i.e. runtime errors quashed.)

Some things need to be done to get the programming running correctly.  Compatibility problems with things BAM does not support 100% (like SLEEP with no value.)

* Run the program
* View the source code
Reply
#10
wow, this is very nice, Charlie!  I knew this game would be a good candidate for BAM as it's very QB-like and full of GOTOs -- otherwise hopeless for QBJS.  I pasted it in BAM and it seemingly did nothing as idk all the BAM specifics so it's much appreciated that you got it working
Reply




Users browsing this thread: 4 Guest(s)