this is it so far things i want to know is like doing the imaginary map am i'm doing it the best way?(don't try the code it has media
and is'nt set up yet.)so much code
` ----Project4----
` ----------------
` ~TEXT ADVENTURE~
` ----------------
` ~~~~04-21-09~~~~
rem get images
load image "boxs.bmp",50
load bitmap "monster.bmp",1
get image 1,1,1,78,78
get image 3,161,1,238,78
delete bitmap 1
rem make arrays
maxmon = 4
dim mon$(maxmon)
dim mon_str(maxmon)
dim mon_mag(maxmon)
dim mon_def(maxmon)
dim mon_int(maxmon)
dim mon_agl(maxmon)
dim mon_ima(maxmon)
dim statement$(4)
dim mon_area(20,maxmon)
name$="Tom"
x=3
y=5
sync on
` MAIN LOOP
DO
` ~~~IMAGINARY MAP~~~
while x=1 and y=3
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=1 and y=5
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=3 and y=1
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=3 and y=3
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=3 and y=5
cls
textleft$="(duel area)"
texttop$="(main hall)"
textright$="q"
textbottom$="q"
textmiddle$="q"
gosub showtext
if leftkey()=1 then x=x-2
if upkey()=1 then y=y-2
sync
endwhile
while x=3 and y=7
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=3 and y=9
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=5 and y=1
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=5 and y=3
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=5 and y=9
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=5 and y=13
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=5 and y=15
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=5 and y=17
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=5 and y=19
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=7 and y=5
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=7 and y=7
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=7 and y=9
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=7 and y=11
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=7 and y=13
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=1
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=3
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=7
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=9
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=11
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=13
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=15
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=17
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=19
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=9 and y=21
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=1
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=3
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=5
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=7
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=9
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=11
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=13
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=15
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=17
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=19
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=11 and y=21
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=13 and y=1
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=13 and y=3
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=13 and y=9
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=13 and y=13
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=13 and y=15
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=13 and y=17
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=13 and y=21
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=13 and y=23
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=15 and y=1
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=15 and y=3
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=15 and y=13
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=15 and y=19
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=15 and y=21
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=17 and y=1
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=17 and y=11
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
while x=17 and y=13
remstart
cls
textleft$=
texttop$=
textright$=
textbottom$=
textmiddle$=
gosub showtext
sync
remend
endwhile
LOOP
` LOOP
gosub area1
END
`<><><><><><><><><><><><>><><><><><><><><><><><><><><><><><><><><><><><>
` ~~~SUB FILES~~~
` ~~~AREAS~~~
` AREA 1
area1:
mon_area(1,1)=1
mon_area(1,2)=1
mon_area(1,3)=1
rnd_mon=mon_area(1,rnd(2)+1)
levle=0
gosub reset_mon
gosub battle
return
` ~~~BATTLE~~~
BATTLE:
health=100
mon_hth=100
strength=10+str_lev
magic=10+mag_lev
defence=10+def_lev
intelligence=10+int_lev
Agility=10+spd_lev
turn=0
x1=190
y1=195
x2=375
y2=195
if mon_agl(ran_mon)<agility then turn=1
while 1=1
mx=mousex()
my=mousey()
cls
sprite 1, x1,y1,1
sprite 2, x2,y2,3
set text size 2
text 240,70, "->"+statement$(1)
text 240,90, statement$(2)
text 240,110, statement$(3)
text 240,130, statement$(4)
if turn=1 then paste image 50,35,320
if health<=0 then health=0
if mon_hth<=0 then mon_hth=0
text 158,180, "HEALTH: "+str$(health)
text 90,200, " "+name$
text 90,220, "Strength: "+str$(strength)
text 90,240, "Magic: "+str$(magic)
text 90,260, "Defence: "+str$(defence)
text 90,280, "intelligence: "+str$(intelligence)
text 90,300, "Agility: "+str$(Agility)
text 397,180, "HEALTH: "+str$(mon_hth)
text 482,200, " "+mon$(rnd_mon)
text 482,220, "Strength: "+str$(mon_str(rnd_mon))
text 482,240, "Magic: "+str$(mon_mag(rnd_mon))
text 482,260, "Defence: "+str$(mon_def(rnd_mon))
text 482,280, "intelligence: "+str$(mon_int(rnd_mon))
text 482,300, "Agility: "+str$(mon_agl(rnd_mon))
if fight=1 then x1=190:sleep 800:fight=0
if health=0
endif
if mon_hth
endif
sprite 1, x1,y1,1
if turn=0
sleep 1000
def#=defence
def#=def#/100
str#=mon_str(rnd_mon)
damage#=str#-str#*def#
health=health-damage#
turn=1
endif
if mouseclick()=1
if press=0
if mx>35 and mx<109 and my>320 and my<355
sleep 400
x1=x1+8
hit=agility+50
hitchance=rnd(99)+1
if hitchance<=hit
gosub movetext
statement$(1)=name$+" attacks "+mon$(rnd_mon)
fight=1
def#=mon_def(rnd_mon)
def#=def#/100
str#=strength
damage#=str#-str#*def#
mon_hth=mon_hth-damage#
endif
if hitchance>hit
gosub movetext
statement$(1)="You miss"
sleep 750
x1=x1-8
endif
turn=0
endif
if mx>129 and mx<202 and my>320 and my<355
endif
if mx>35 and mx<109 and my>375 and my<410
endif
if mx>129 and mx<202 and my>375 and my<410
endif
press=1
endif
endif
if mouseclick()=0 then press=0
sync
endwhile
RETURN
` ~~~MOVETEXT~~~
Movetext:
statement$(4)=statement$(3)
statement$(3)=statement$(2)
statement$(2)=statement$(1)
Return
` ~~~showtext~~~
Showtext:
text 1,240, textleft$
text 270,1, texttop$
text 590,240, textright$
text 270,460, textbottom$
text 270,240, textmiddle$
Return
` ~~~RESET~~~
reset_mon:
rem get data for monsters
restore monsters
for x=1 to maxmon
read mon$(x)
read mon_str(x)
read mon_mag(x)
read mon_def(x)
read mon_int(x)
read mon_agl(x)
read mon_ima(x)
next x
rem rnd the stats
for x=1 to maxmon
mon_str(x)=mon_str(x)+rnd(2)-1
mon_str(x)=mon_str(x)+levle
mon_mag(x)=mon_mag(x)+rnd(2)-1
mon_mag(x)=mon_mag(x)+levle
mon_def(x)=mon_def(x)+rnd(2)-1
mon_def(x)=mon_def(x)+levle
mon_int(x)=mon_int(x)+rnd(2)-1
mon_int(x)=mon_int(x)+levle
mon_agl(x)=mon_agl(x)+rnd(2)-1
mon_agl(x)=mon_agl(x)+levle
next x
Return
` ~~~DATA MONSTERS~~~
monsters:
rem name$,strength,magic,defence,intelligence,agility,image
data "Goblin",6,9,4,3,4,3
data "Rat",10,2,9,5,2,4
data "Mugger",2,9,7,5,3,5
data "Guard",3,5,2,4,2,6
im new at this