here my code
REM Stanas RPG
load bitmap "cool.bmp",0
set current bitmap 0
SET CURSOR 00,233
Text 0,403,"press enter to continue"
Set text transparent
print "Maxi(Glacier's real name) is an energetic kid who always wanted"
set cursor 0,250
print "to travel the world and test his swordsmenship against the best."
set cursor 0,270
print "Your job is to help guide him in his quest to get to all 80 of his destinations."
load music "cselect2.wav",1: loop music 1
suspend for key
cls
menu:
Do
if Button(275,205,"New Game")=1 then Goto New_Game
if Button(275,235,"Learn How To Play")=1 then Goto htp
if Button(275,265,"Design a Character")=1 then goto load_game
if button(300,295,"Exit")=1 then end
loop
htp:
cls
Print "(THIS IS HOW YOU PLAY)"
wait 3000
do
if Button(275,265,"Main Menu")=1 then goto menu
loop
New_Game:
cls
Text 240,220,"..........loading................";
wait 2000
print "(Story Goes Here)"
Text 0,403,"press enter to continue"
wait key
cselect:
cls
print "Please Select a Character."
load sound "cselect.wav",1
set sound volume 1,100
play sound 1
loadflames:
if object exist(1)=1
delete object 1
endif
load object "drayven.x",1
append object "walk.x",1,1
hide limb 1,12
hide limb 1,13
hide limb 1,19
hide limb 1,20
hide limb 1,21
hide limb 1,24
hide limb 1,14
hide limb 1,22
hide limb 1,23
hide limb 1,18
loop object 1
scale object 1,5000,5000,5000
backdrop on
flames = 0
do
if Button(375,205,"Flames")=1 then flames = 1 : delete object 1 : backdrop off : goto select
if Button(475,55,">>>")=1 then goto loadglacier
loop
loadglacier:
if object exist(1)=1
delete object 1
endif
load object "tommy.x",1
append object "walk.x",1,1
hide limb 1,12
hide limb 1,13
hide limb 1,19
hide limb 1,20
hide limb 1,21
hide limb 1,24
hide limb 1,14
hide limb 1,22
hide limb 1,23
hide limb 1,18
loop object 1
scale object 1,5000,5000,5000
backdrop on
glacier = 0
do
if Button(475,55,">>>")=1 then goto loadflames
if Button(375,205,"Glacier")=1 then glacier = 1 : delete object 1 : backdrop off:goto select
loop
cls
select:
cls
wait 200
do
if button(275,205,"Travel To.....")=1 then goto travel
if button(275,235,"Battle in Reniveil")=1 then goto go_to_town
if button(275,265,"Quit Game")=1 then end
loop
wait key
travel:
cls
wait 200
do
if button(275,205,"Back")=1 then goto select
if button(275,235,"Reniveil")=1 then goto go_to_town
if button(275,265,"Frelia")=1 then goto go_to_ftown
if button(275,295,"Ena")=1 then goto etown
if button(275,325,"Jehenna")=1 then goto jtown
loop
town:
jtown:
jtown = 1
wait 200
Print "NPC: Hello. Welcome to Jehenna. Please, go exploring for free while you stay."
wait 2000
cls
do
if button(275,145,"Back")=1 then goto select
if button(275,175,"Explore")=1 then goto select
if button(275,205,"Head to shop")=1 then goto FShop
if button(275,235,"Arena")=1 then goto Battlefield
if button(275,265,"Collseum")=1 then goto colloseum
if button(275,295,"Items")=1 then goto items
if button(275,325,"Quit Game")=1 then end
loop
items:
cls
wait 200
if flames = 1
Print "Flames Hickary"
endif
if glacier = 1
Print "Glacier Hyhichi"
endif
do
if button(275,145,"Skills")=1 then goto skills
if button(275,175,"Weapons")=1 then goto select
if button(275,205,"Stats")=1 then goto select
if button(275,235,"Back")=1 and rtown = 1 then goto go_to_town
if button(275,235,"Back")=1 and ttown = 1 then goto go_to_ftown
if button(275,235,"Back")=1 and jtown = 1 then goto jtown
if button(275,235,"Back")=1 and etown = 1 then goto etown
loop
skills:
cls
repeat
if speed = 1
if Button(275,205,"Speed") then goto items
endif
if attack = 1
if Button(275,225,"Attack+2")
endif
endif
if speed = 0 and attack = 0
if Button(275,205,"None") then goto items
endif
until mouseclick = 1
return
speed = 0
attack = 0
etown:
wait 200
Print "NPC: Hello. Welcome to Ena. Please, visit the skill shop."
etown = 1
wait 2000
cls
do
if button(275,145,"Back")=1 then goto select
if button(275,175,"Head to skill shop")=1 then goto eSShop
if button(275,205,"Head to shop")=1 then goto FShop : cfe = 1
if button(275,235,"Arena")=1 then goto Battlefield
if button(275,295,"Items")=1 then goto items
if button(275,265,"Collseum")=1 then goto colloseum
if button(275,295,"Quit Game")=1 then end
loop
speed = 0
attack = 0
eSShop:
cls
Print "NPC:This is the skill shop. How may I help you?(100g)"
wait 2000
do
if button(275,205,"Speed - 50g")=1 then speed = 1 : goto etown
if button(275,265,"Attack + 2 - 50g")=1 then attack = 1 : goto etown
if button(275,235,"Sword Mastery lvl.2 - 50g")=1 then goto etown
if button(275,295,"Fire Mastery Lvl.1 - 50g")=1 then goto etown : fire = 1
loop
load_game:
cls
text 240,220,"................loading.............."
wait 3000
goto go_to_town
EXP:
if glacier = 1
Print "Glacier earned 5000 exp.points!"
wait 5000
cls
Print "Glacier reached lvl.2!"
endif
if flames = 1
Print "Flames earned 5000 exp.points!"
wait 5000
cls
Print "Flames reached lvl.2!"
endif
wait 3000
go_to_town:
cls
text 275,195,"NPC:Welcome to the town of reniveil."
wait 5000
cls
do
if button(275,205,"head to shop")=1 then goto Shop
if button(275,295,"Items")=1 then goto items
if button(275,235,"Arena")=1 then goto Battlefield
if button(275,265,"Collseum")=1 then goto colloseum
if button(275,325,"quit game")=1 then end
loop
cls
wait key
go_to_ftown:
cls
Print "Glacier traveled to Freila, the town of delight."
wait 2000
cls
text 2,195,"NPC:Welcome to the town of Freila.Plese enjoy your stay!"
wait 5000
cls
do
if button(275,205,"head to shop")=1 then goto FShop
if button(275,295,"Items")=1 then goto items
if button(275,235,"Arena")=1 then goto Battlefield
if button(275,265,"Collseum")=1 then goto colloseum
if button(275,325,"quit game")=1 then end
loop
cls
wait key
Shop:
cls
Print "NPC:This is the shop. How may I help you?(100g)"
wait 2000
do
if button(275,205,"hero sword - 50g")=1 then goto go_to_town
loop
FShop:
cls
Print "NPC:This is the shop. As you may notice,we have a wide selection. How may I help you?(100g)"
wait 2000
staff = 0
do
if button(275,205,"Hero Sword - 50g")=1 then goto go_to_ftown
if button(275,235,"Wood Staff - 100g")=1 then staff = 1: goto go_to_ftown
if button(275,265,"Water Staff - 100g")=1 then goto go_to_ftown
if button(275,295,"Metal Pole - 50g")=1 then goto go_to_ftown
loop
Battlefield:
cls
print "Flames :This is the battlefield.Here you may fight Wild monsters."
wait key
stop music 1
load music "Drowning Pool - Bodies.mp3",2
play music 2
loop music 2
ecolloseum:
cls
Print "The arena is where you can battle monsters. Each of your opponets have 15 HP."
Print "Use z and x to attack!"
text 300,140,"Opponent: Goblin "
wait 5000
counter = 15
ycounter = 15
make object cylinder 3,60
position object 3,0,-8,50
scale object 3,100,10,100
color object 3,rgb(200,120,200)
backdrop on
load image "yorikiri.bmp",1
texture backdrop 1
load sound "pain.wav",1
position camera 0,-0,0
set camera fov 0.15
load object "tommy.x",1
append object "idle.x",1,1
append object "walk.x",1,25
append object "punch.x",1,50
append object "fall.x",1,80
append object "w_hit2.x",1,150
append object "hit.x",1,200
scale object 1,100,130,200
set object speed 1,10
if speed = 1
set object speed 1,30
endif
load object "idle2.x",2
append object "charge.x",2,25
append object "die2.x",2,80
scale object 2,6,6,6
set object speed 2,10
position object 1,-6,0,12
position object 2,6,0,12
set object collision on 1
set object collision on 2
yrotate object 1,270
yrotate object 2,90
loop object 1,5,20
loop object 2,30,40
hide limb 1,12
hide limb 1,13
hide limb 1,19
hide limb 1,20
hide limb 1,21
hide limb 1,24
hide limb 1,14
hide limb 1,22
hide limb 1,23
if staff = 1
hide limb 1,18
show limb 1,19
endif
do
move object 2,-0.09
if counter = 15 then text 240,240,"ENEMY HEALTH = 15"
if counter = 14 then text 240,240,"ENEMY HEALTH = 14"
if counter = 13 then text 240,240,"ENEMY HEALTH = 13"
if counter = 12 then text 240,240,"ENEMY HEALTH = 12"
if counter = 11 then text 240,240,"ENEMY HEALTH = 11"
if counter = 10 then text 240,240,"ENEMY HEALTH = 10"
if counter = 9 then text 240,240,"ENEMY HEALTH = 9"
if counter = 8 then text 240,240,"ENEMY HEALTH = 8"
if counter = 7 then text 240,240,"ENEMY HEALTH = 7"
if counter = 6 then text 240,240,"ENEMY HEALTH = 6"
if counter = 5 then text 240,240,"ENEMY HEALTH = 5"
if counter = 4 then text 240,240,"ENEMY HEALTH = 4"
if counter = 3 then text 240,240,"ENEMY HEALTH = 3"
if counter = 2 then text 240,240,"ENEMY HEALTH = 2"
if counter = 1 then text 240,240,"ENEMY HEALTH = 1"
if counter = 0 then text 240,240,"FINISH HIM!!"
if ycounter = 15 then text 240,260," HEALTH = 15"
if ycounter = 14 then text 240,260," HEALTH = 14"
if ycounter = 13 then text 240,260," HEALTH = 13"
if ycounter = 12 then text 240,260," HEALTH = 12"
if ycounter = 11 then text 240,260," HEALTH = 11"
if ycounter = 10 then text 240,260," HEALTH = 10"
if ycounter = 9 then text 240,260," HEALTH = 9"
if ycounter = 8 then text 240,260," HEALTH = 8"
if ycounter = 7 then text 240,260," HEALTH = 7"
if ycounter = 6 then text 240,260," HEALTH = 6"
if ycounter = 5 then text 240,260," HEALTH = 5"
if ycounter = 4 then text 240,260," HEALTH = 4"
if ycounter = 3 then text 240,260," HEALTH = 3"
if ycounter = 2 then text 240,260," HEALTH = 2"
if ycounter = 1 then text 240,260," HEALTH = 1"
if ycounter = 0 then text 240,260,"FINISH HIM!!"
if rightkey()>0 then move object 1,-.4 : loop object 1,25,45
if leftkey()>0 then move object 1,.4
delete object collision box 1
delete object collision box 2
if object collision(1,2)=1 and object playing(1)=1 then move object 2,1 : counter = counter - 1: play sound 1
if (inkey$())="z"=1 then play object 1,50,69
if (inkey$())="x"=1 then play object 1,150,180
if object collision(1,2)=1 and object playing(1)=0 then move object 1,1 : play object 1,80,100 : ycounter = ycounter - 1
if object collision(1,2)=1 and object playing(2)=1 then move object 1,1 : play object 1,80,100 : ycounter = ycounter - 1
sleep 50
sync
if counter = 0
play object 2,80
endif
if object playing(2)=0 then cls:cls:cls:delete object 1: delete object 2 :delete object 3:backdrop off: goto EXP
loop
sync
colloseum:
cls
Print "The colloseum is where you can battle other humans.Each of your opponets have 15 HP."
Print "Use z and x to attack!"
text 300,140,"Opponent: Carlos - lvl.2 Brawler "
text 300,165," weapon : metal pole"
wait 5000
counter = 15
ycounter = 15
make object cylinder 3,60
position object 3,0,-8,50
scale object 3,100,10,100
color object 3,rgb(200,120,200)
backdrop on
load image "yorikiri.bmp",1
texture backdrop 1
load music "thin life.mp3",1
loop music 1
load sound "pain.wav",1
position camera 0,-0,0
set camera fov 0.15
if glacier = 1
load object "tommy.x",1
append object "idle.x",1,1
append object "walk.x",1,25
append object "punch.x",1,50
append object "fall.x",1,80
append object "w_hit2.x",1,150
append object "hit.x",1,200
scale object 1,100,130,200
set object speed 1,10
if speed = 1
set object speed 1,30
endif
endif
if flames = 1
load object "drayven.x",1
append object "idle.x",1,1
append object "walk.x",1,25
append object "punch.x",1,50
append object "fall.x",1,80
append object "w_hit2.x",1,150
append object "hit.x",1,200
scale object 1,100,130,200
set object speed 1,10
if speed = 1
set object speed 1,30
endif
endif
load object "carlos.x",2
append object "idle.x",2,1
append object "walk.x",2,25
append object "punch.x",2,50
append object "fall.x",2,80
append object "w_hit2.x",2,150
append object "hit.x",2,200
scale object 2,100,130,200
set object speed 2,10
position object 1,-6,0,12
position object 2,6,0,12
set object collision on 1
set object collision on 2
yrotate object 1,270
yrotate object 2,90
loop object 1,5,20
loop object 2,25,40
hide limb 2,12
hide limb 2,13
hide limb 2,19
hide limb 2,20
hide limb 2,21
hide limb 2,24
hide limb 2,14
hide limb 2,22
hide limb 2,18
hide limb 1,12
hide limb 1,13
hide limb 1,19
hide limb 1,20
hide limb 1,21
hide limb 1,24
hide limb 1,14
hide limb 1,22
hide limb 1,23
if staff = 1
hide limb 1,18
show limb 1,19
endif
do
move object 2,-0.09
if counter = 15 then text 240,240,"ENEMY HEALTH = 15"
if counter = 14 then text 240,240,"ENEMY HEALTH = 14"
if counter = 13 then text 240,240,"ENEMY HEALTH = 13"
if counter = 12 then text 240,240,"ENEMY HEALTH = 12"
if counter = 11 then text 240,240,"ENEMY HEALTH = 11"
if counter = 10 then text 240,240,"ENEMY HEALTH = 10"
if counter = 9 then text 240,240,"ENEMY HEALTH = 9"
if counter = 8 then text 240,240,"ENEMY HEALTH = 8"
if counter = 7 then text 240,240,"ENEMY HEALTH = 7"
if counter = 6 then text 240,240,"ENEMY HEALTH = 6"
if counter = 5 then text 240,240,"ENEMY HEALTH = 5"
if counter = 4 then text 240,240,"ENEMY HEALTH = 4"
if counter = 3 then text 240,240,"ENEMY HEALTH = 3"
if counter = 2 then text 240,240,"ENEMY HEALTH = 2"
if counter = 1 then text 240,240,"ENEMY HEALTH = 1"
if counter = 0 then text 240,240,"FINISH HIM!!"
if ycounter = 15 then text 240,260," HEALTH = 15"
if ycounter = 14 then text 240,260," HEALTH = 14"
if ycounter = 13 then text 240,260," HEALTH = 13"
if ycounter = 12 then text 240,260," HEALTH = 12"
if ycounter = 11 then text 240,260," HEALTH = 11"
if ycounter = 10 then text 240,260," HEALTH = 10"
if ycounter = 9 then text 240,260," HEALTH = 9"
if ycounter = 8 then text 240,260," HEALTH = 8"
if ycounter = 7 then text 240,260," HEALTH = 7"
if ycounter = 6 then text 240,260," HEALTH = 6"
if ycounter = 5 then text 240,260," HEALTH = 5"
if ycounter = 4 then text 240,260," HEALTH = 4"
if ycounter = 3 then text 240,260," HEALTH = 3"
if ycounter = 2 then text 240,260," HEALTH = 2"
if ycounter = 1 then text 240,260," HEALTH = 1"
if ycounter = 0 then text 240,260,"FINISH HIM!!"
if rightkey()>0 then move object 1,-.4 : loop object 1,25,45
if leftkey()>0 then move object 1,.4
if speed = 1
if rightkey()>0 then move object 1,-.6 : loop object 1,25,45
if leftkey()>0 then move object 1,.6
endif
delete object collision box 1
delete object collision box 2
if object collision(1,2)=1 and object playing(1)=1 then move object 2,1 : counter = counter - 1:play sound 1: if attack = 1 then counter = counter - 2 : play sound 1
if (inkey$())="z"=1 then play object 1,50,69
if (inkey$())="x"=1 then play object 1,150,180
if object collision(1,2)=1 and object playing(1)=0 then move object 1,1 : play object 1,80,100 : ycounter = ycounter - 1
sleep 50
sync
if counter = 0
play object 2,80,100
endif
if counter = -0
play object 2,80,100
endif
if object playing(2)=0 then cls:cls:cls:delete object 1: delete object 2 :delete object 3:backdrop off: goto EXP
loop
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(0,0,255),0 else ink rgb(255,0,0),0
if pressed=1
Pressed=Mouseclick()
else
pressed = 0
endif
text x1,y1,WORDS$
endfunction pressed