sorry about that wrong zip file.
Sync On
Sync Rate 30
color backdrop rgb(0,255,0)
Draw sprites first
Gosub _VarSet
Gosub _loadimages
EnemySetup(3)
```````````````Main Loop`````````````
Repeat
Cls
Gosub _DrawScreen
Gosub _Battle
`Wait 1000
Sync
Until Player.Life < 1 Or Enemy.Life < 1
End
`````````````End Main Loop````````````
``````````````Gosubs`````````````````
_VarSet:
type Char
Name$ As String
Str As Integer
Dex As Integer
Life As Integer
EndType
Global imgNum As integer
Global Player As Char
Global Enemy As Char
Sync
Input "What is your name young sir: ", Player.Name$
Input "How strong are you: ", Player.Str
Input "How agile are you: ", Player.Dex
Player.Life = 25
Cls
Sync
Return
_loadimages:
Load image "media\Man1.png", 1
Load image "media\Banana.png",2
Load image "media\Monster.png",3
Load image "media\Menu.png", 4
Return
_DrawScreen:
`box 0, 0, screen width(), screen height(), rgb(255,0,0), rgb(0,255,0), rgb(0,0,255), rgb(100,255,0)
Set text font "Chiller"
Set text Size 40
Text 300, 0, "The Battle"
set text Font "Old English Text MT"
set text size 24
Text 0, 0, "Name: " + Enemy.Name$
Text 0, 20, "Strength: " + str$(Enemy.Str)
Text 0, 40, "Dexterity: " + str$(Enemy.Dex)
Text 0, 60, "Life: " + str$(Enemy.Life)
Text Screen width() - 160, screen Height() - 85, "Name: " + Player.Name$
Text Screen width() - 160, screen Height() - 65, "Strength: " + str$(Player.Str)
Text Screen width() - 160, screen Height() - 45, "Dexterity: " + str$(Player.Dex)
Text Screen width() - 160, screen Height() - 25, "Life: " + str$(Player.Life)
Sprite 1, 20, 200, 1
Scale sprite 1, 150
Set sprite 1, 0, 0
Sprite 2, screen width() - 100, 200, imgNum
Scale sprite 2, 150
Set sprite 2, 0, 0
Return
_Battle:
choice = 0
sprite 999, screen width() - 425, screen height() - 150, 4
scale sprite 999, 130
While choice = 0
If Button(screen width() - 400, Screen height() - 130, "Attack") = 1
choice = 1
EndIf
If Button(screen width() - 400, Screen height() - 100, "Spell") = 1
choice = 2
EndIf
If Button(screen width() - 400, Screen height() - 70, "Run") = 1
choice = 3
EndIf
Sync
EndWhile
`Results
If choice = 1
dec Enemy.Life, rnd(Player.Str) + 3
EndIf
If choice = 2
EndIf
If choice = 3
run = rnd(1)
If run = 1
End
EndIf
EndIf
Return
``````````````End Gosubs`````````````
`````````````Functions```````````````
Function EnemySetup(Lvl)
Dim Names$(4)
Names$(0) = "Banana Man"
Names$(1) = "Monster"
Names$(2) = "???"
Names$(3) = "???"
Names$(4) = "???"
Enemy.Name$ = Names$(Rnd(4))
Enemy.Str = rnd(10) + 1 + lvl
Enemy.Dex = rnd(5) + 1 + lvl
Enemy.Life = 25
If image exist(999) = 1
Delete image 999
EndIf
If Enemy.Name$ = Names$(0)
imgNum = 2
EndIf
If Enemy.Name$ = Names$(1)
imgNum = 3
EndIf
If Enemy.Name$ = Names$(2)
imgNum = 2
EndIf
If Enemy.Name$ = Names$(3)
imgNum = 2
EndIf
If Enemy.Name$ = Names$(4)
imgNum = 2
EndIf
EndFunction
function Button(x1,y1,WORDS$)
Pressed=0
x2=Text Width(WORDS$)
y2=Text Height(WORDS$)
if mousex()>x1 and mousex()<x1+x2
if mousey()>y1-y2 and mousey()<y1+y2
Pressed=1
endif
endif
if pressed=1 then ink rgb(255,0,0),0 else ink rgb(255,255,255),0
if pressed=1
Pressed=Mouseclick()
else
pressed = 0
endif
text x1,y1,WORDS$
endfunction pressed
`````````````End Functions`````````````
I've attached the media.