Hi. Im a newb programmer, and I decided to make a 2d rpg game. This weekend I wrote out my code(which btw is not complete) and it works good for what I have. However, the code is a bit lengthy for what it does. If anyone knows how I can shorten it, I appreciate it. Also, the money system in this does not work right, anyone know why? Here is my code:
rem * Title : Shopbuy
rem * Author : Mathew Larribas
rem * Date : 10/4/03
beginning:
exit_subshop$="Exit"
buy_subshop$="Buy"
sell_subshop$="Sell"
upgrade_subshop$="Upgrade"
lx=507
ly=283
lx1=501
ly1=43
lx2=504
ly2=123
lx3=485
ly3=203
lw=text width(exit_subshop$)
lh=text height(exit_subshop$)
lw1=text width(buy_subshop$)
lh1=text height(buy_subshop$)
lw2=text width(sell_subshop$)
lh2=text height(sell_subshop$)
lw3=text width(upgrade_subshop$)
lh3=text height(upgrade_subshop$)
` background for menu
ink 400000,0
BOX 450,0,600,324
` Lines/Border around menu
Ink 5000000,0
` top line
line 600,0,450,0
line 600,1,450,1
line 600,2,450,2
` bottom line
Line 600,325.8,450,325.8
Line 600,326.8,450,326.8
Line 600,327.8,450,327.8
` right line
Line 600,325,600,0
Line 599,325,599,0
Line 598,325,598,0
` left line
Line 450,325,450,0
Line 451,325,451,0
Line 452,325,452,0
` middle line
Line 600,25,450,25
Line 600,26,450,26
Line 600,27,450,27
` Text for shop submenu
ink 999999999999999999999999999999,0
Perform checklist for fonts
Set text size 23
Set text font "Abaddon"
Text 500,3,"Store"
Text 501,43,"Buy"
Text 504,123,"Sell"
Text 485,203,"Upgrade"
do
` Exit Shop Submenu on Mouseclick
if mousex()>=lx and mousex()<=lx+lw and mousey()>=ly and mousey()<=ly+lh
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then end
else
ink rgb(255,255,255),0
rollover=1
endif
text lx,ly,exit_subshop$
` Sell Shop Submenu on Mouseclick
if mousex()>=lx2 and mousex()<=lx2+lw and mousey()>=ly2 and mousey()<=ly2+lh
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then end
else
ink rgb(255,255,255),0
rollover=1
endif
text lx2,ly2,sell_subshop$
` Buy Shop Submenu on Mouseclick
if mousex()>=lx1 and mousex()<=lx1+lw and mousey()>=ly1 and mousey()<=ly1+lh
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto letsgo
else
ink rgb(255,255,255),0
rollover=1
endif
text lx1,ly1,buy_subshop$
` Upgrade Shop Submenu on Mouseclick
if mousex()>=lx3 and mousex()<=lx3+lw and mousey()>=ly3 and mousey()<=ly3+lh
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then end
else
ink rgb(255,255,255),0
rollover=1
endif
text lx3,ly3,upgrade_subshop$
loop
letsgo:
totalmoney#=100
weapon$="Weapon"
armor$="Armor"
item$="Item"
exit$="Exit"
` Weaponnames for Selling(Fill weaponname$ with your own weapons)
weapon1$="Longsword"
weapon2$="Dagger"
weapon3$="Knife"
weapon4$="weaponname4"
weapon5$="weaponname5"
weapon6$="weaponname6"
weapon7$="weaponname7"
weapon8$="weaponname8"
weapon9$="weaponname9"
weapon10$="weaponname10"
weapon11$="weaponname11"
weapon12$="weaponname12"
` Descriptions for Selling(replace +X with ability or description)
dweapon1$="+4"
dweapon2$="+2"
dweapon3$="+1"
dweapon4$="+X"
dweapon5$="+X"
dweapon6$="+X"
dweapon7$="+X"
dweapon8$="+X"
dweapon9$="+X"
dweapon10$="+X"
dweapon11$="+X"
dweapon12$="+X"
` Weaponnames Pricing(change XXXXX for price)
sweapon1$="$50"
sweapon2$="$25"
sweapon3$="$15"
sweapon4$="$XXXXX"
sweapon5$="$XXXXX"
sweapon6$="$XXXXX"
sweapon7$="$XXXXX"
sweapon8$="$XXXXX"
sweapon9$="$XXXXX"
sweapon10$="$XXXXX"
sweapon11$="$XXXXX"
sweapon12$="$XXXXX"
` Weaponnames Price Deduction(change 00000 for price)
pweapon1#=50
pweapon2#=25
pweapon3#=15
pweapon4#=00000
pweapon5#=00000
pweapon6#=00000
pweapon7#=00000
pweapon8#=00000
pweapon9#=00000
pweapon10#=00000
pweapon11#=00000
pweapon12#=00000
` Coordinates for Weaponnames
x1=31
y1=70
x2=31
y2=100
x3=31
y3=130
x4=31
y4=160
x5=31
y5=190
x6=31
y6=220
x7=31
y7=250
x8=31
y8=280
x9=31
y9=310
x10=31
y10=340
x11=31
y11=370
x12=31
y12=400
xa=525
ya=90
xb=525
yb=181
xc=525
yc=272
xd=525
yd=363
` Weaponname Base and Height
w1=text width(weapon1$)
h1=text height(weapon1$)
w2=text width(weapon2$)
h2=text height(weapon2$)
w3=text width(weapon3$)
h3=text height(weapon3$)
w4=text width(weapon4$)
h4=text height(weapon4$)
w5=text width(weapon5$)
h5=text height(weapon5$)
w6=text width(weapon6$)
h6=text height(weapon6$)
w7=text width(weapon7$)
h7=text height(weapon7$)
w8=text width(weapon8$)
h8=text height(weapon8$)
w9=text width(weapon9$)
h9=text height(weapon9$)
w10=text width(weapon10$)
h10=text height(weapon10$)
w11=text width(weapon11$)
h11=text height(weapon11$)
w12=text width(weapon12$)
h12=text height(weapon12$)
wa=text width(weapon$)
ha=text height(weapon$)
wb=text width(armor$)
hb=text height(armor$)
wc=text width(item$)
hc=text height(item$)
wd=text width(exit$)
hd=text height(exit$)
` Armornames for Selling(Fill armorname$ with your own armor)
armor1$="Leather Banded"
armor2$="Steel Shield"
armor3$="Small Shield"
armor4$="armorname4"
armor5$="armorname5"
armor6$="armorname6"
armor7$="armorname7"
armor8$="armorname8"
armor9$="armorname9"
armor10$="armorname10"
armor11$="armorname11"
armor12$="armorname12"
` Descriptions for Selling(replace +X with ability or description)
darmor1$="+4"
darmor2$="+2"
darmor3$="+1"
darmor4$="+X"
darmor5$="+X"
darmor6$="+X"
darmor7$="+X"
darmor8$="+X"
darmor9$="+X"
darmor10$="+X"
darmor11$="+X"
darmor12$="+X"
` Armornames Pricing(change XXXXX for price)
sarmor1$="$50"
sarmor2$="$25"
sarmor3$="$15"
sarmor4$="$XXXXX"
sarmor5$="$XXXXX"
sarmor6$="$XXXXX"
sarmor7$="$XXXXX"
sarmor8$="$XXXXX"
sarmor9$="$XXXXX"
sarmor10$="$XXXXX"
sarmor11$="$XXXXX"
sarmor12$="$XXXXX"
` Armornames Price Deduction(change 00000 for price)
parmor1#=50
parmor2#=25
parmor3#=15
parmor4#=00000
parmor5#=00000
parmor6#=00000
parmor7#=00000
parmor8#=00000
parmor9#=00000
parmor10#=00000
parmor11#=00000
parmor12#=00000
` Coordinates for Armornames
x1=31
y1=70
x2=31
y2=100
x3=31
y3=130
x4=31
y4=160
x5=31
y5=190
x6=31
y6=220
x7=31
y7=250
x8=31
y8=280
x9=31
y9=310
x10=31
y10=340
x11=31
y11=370
x12=31
y12=400
xa=525
ya=90
xb=525
yb=181
xc=525
yc=272
xd=525
yd=363
` Armorname Base and Height
w1=text width(armor1$)
h1=text height(armor1$)
w2=text width(armor2$)
h2=text height(armor2$)
w3=text width(armor3$)
h3=text height(armor3$)
w4=text width(armor4$)
h4=text height(armor4$)
w5=text width(armor5$)
h5=text height(armor5$)
w6=text width(armor6$)
h6=text height(armor6$)
w7=text width(armor7$)
h7=text height(armor7$)
w8=text width(armor8$)
h8=text height(armor8$)
w9=text width(armor9$)
h9=text height(armor9$)
w10=text width(armor10$)
h10=text height(armor10$)
w11=text width(armor11$)
h11=text height(armor11$)
w12=text width(armor12$)
h12=text height(armor12$)
wa=text width(weapon$)
ha=text height(weapon$)
wb=text width(armor$)
hb=text height(armor$)
wc=text width(item$)
hc=text height(item$)
wd=text width(exit$)
hd=text height(exit$)
` Itemnames for Selling(Fill itemname$ with your own items)
item1$="Tent"
item2$="Antidote"
item3$="Potion"
item4$="itemname4"
item5$="itemname5"
item6$="itemname6"
item7$="itemname7"
item8$="itemname8"
item9$="itemname9"
item10$="itemname10"
item11$="itemname11"
item12$="itemname12"
` Descriptions for Selling(replace X with ability or description)
ditem1$="Fully Heals"
ditem2$="Cures Poison"
ditem3$="Health+10"
ditem4$="X"
ditem5$="X"
ditem6$="X"
ditem7$="X"
ditem8$="X"
ditem9$="X"
ditem10$="X"
ditem11$="X"
ditem12$="X"
` Itemnames Pricing(change XXXXX for price)
sitem1$="$50"
sitem2$="$25"
sitem3$="$15"
sitem4$="$XXXXX"
sitem5$="$XXXXX"
sitem6$="$XXXXX"
sitem7$="$XXXXX"
sitem8$="$XXXXX"
sitem9$="$XXXXX"
sitem10$="$XXXXX"
sitem11$="$XXXXX"
sitem12$="$XXXXX"
` Itemnames Price Deduction(change 00000 for price)
pitem1#=50
pitem2#=25
pitem3#=15
pitem4#=00000
pitem5#=00000
pitem6#=00000
pitem7#=00000
pitem8#=00000
pitem9#=00000
pitem10#=00000
pitem11#=00000
pitem12#=00000
` Coordinates for Itemnames
x1=31
y1=70
x2=31
y2=100
x3=31
y3=130
x4=31
y4=160
x5=31
y5=190
x6=31
y6=220
x7=31
y7=250
x8=31
y8=280
x9=31
y9=310
x10=31
y10=340
x11=31
y11=370
x12=31
y12=400
xa=525
ya=90
xb=525
yb=181
xc=525
yc=272
xd=525
yd=363
` Itemname Base and Height
w1=text width(item1$)
h1=text height(item1$)
w2=text width(item2$)
h2=text height(item2$)
w3=text width(item3$)
h3=text height(item3$)
w4=text width(item4$)
h4=text height(item4$)
w5=text width(item5$)
h5=text height(item5$)
w6=text width(item6$)
h6=text height(item6$)
w7=text width(item7$)
h7=text height(item7$)
w8=text width(item8$)
h8=text height(item8$)
w9=text width(item9$)
h9=text height(item9$)
w10=text width(item10$)
h10=text height(item10$)
w11=text width(item11$)
h11=text height(item11$)
w12=text width(item12$)
h12=text height(item12$)
wa=text width(weapon$)
ha=text height(weapon$)
wb=text width(armor$)
hb=text height(armor$)
wc=text width(item$)
hc=text height(item$)
wd=text width(exit$)
hd=text height(exit$)
` Background for Menu
Ink 400000,0
BOX 25,25,600,455
` Lines/Border for Menu
Ink 5000000,0
` Top Line
Line 25,25,600,25
Line 25,26,600,26
Line 25,27,600,27
` Bottom Line
Line 25,455,600,455
Line 25,454,600,454
Line 25,453,600,453
` Right Line
Line 600,25,600,455
Line 599,25,599,455
Line 598,25,598,455
` Left Line
Line 25,25,25,455
Line 26,25,26,455
Line 27,25,27,455
` Middle Vertical Line
Line 450,25,450,455
Line 451,25,451,455
Line 452,25,452,455
` Middle Top Line
Line 25,57,450,57
Line 25,58,450,58
Line 25,59,450,59
` Middle Bottom Line
Line 25,423,450,423
Line 25,424,450,424
Line 25,425,450,425
` Set Text for Shop
ink 999999999999999999999999999999,0
Perform checklist for fonts
Set text size 23
Set text font "Abaddon"
` Print Text for Shop
center text 525,90,"Weapon"
center text 525,181,"Armor"
center text 525,272,"Item"
center text 525,363,"Exit"
text 31,31,"Item"
text 31,428,"Money: "
set cursor 100,432
print totalmoney#
text 200,31,"Ability"
text 360,31,"Price"
begin:
do
` Weaponslist on Mouseclick
if mousex()>=xa and mousex()<=xa+wa and mousey()>=ya and mousey()<=ya+ha
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto weaponlistX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xa,ya,weapon$
` Armorlist on Mouseclick
if mousex()>=xb and mousex()<=xb+wb and mousey()>=yb and mousey()<=yb+hb
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto armorlistX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xb,yb,armor$
` Itemlist on Mouseclick
if mousex()>=xc and mousex()<=xc+wc and mousey()>=yc and mousey()<=yc+hc
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto itemlistX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xc,yc,item$
` Exit on Mouseclick
if mousex()>=xd and mousex()<=xd+wd and mousey()>=yd and mousey()<=yd+hd
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto exitX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xd,yd,exit$
loop
` Weapon Menu
weaponlistX:
ink 400000,0
box 100,428,415,451
box 26,60,449,422
ink rgb(255,255,255),0
set cursor 100,432
print totalmoney#
center text xa,ya,weapon$
text 31,70,weapon1$
text 200,70,dweapon1$
text 360,70,sweapon1$
text 31,100,weapon2$
text 31,130,weapon3$
text 31,160,weapon4$
text 31,190,weapon5$
text 31,220,weapon6$
text 31,250,weapon7$
text 31,280,weapon8$
text 31,310,weapon9$
text 31,340,weapon10$
text 31,370,weapon11$
text 31,400,weapon12$
text 200,100,dweapon2$
text 200,130,dweapon3$
text 200,160,dweapon4$
text 200,190,dweapon5$
text 200,220,dweapon6$
text 200,250,dweapon7$
text 200,280,dweapon8$
text 200,310,dweapon9$
text 200,340,dweapon10$
text 200,370,dweapon11$
text 200,400,dweapon12$
text 360,100,sweapon2$
text 360,130,sweapon3$
text 360,160,sweapon4$
text 360,190,sweapon5$
text 360,220,sweapon6$
text 360,250,sweapon7$
text 360,280,sweapon8$
text 360,310,sweapon9$
text 360,340,sweapon10$
text 360,370,sweapon11$
text 360,400,sweapon12$
do
` Armorlist on Mouseclick
if mousex()>=xb and mousex()<=xb+wb and mousey()>=yb and mousey()<=yb+hb
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto armorlistX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xb,yb,armor$
` Itemlist on Mouseclick
if mousex()>=xc and mousex()<=xc+wc and mousey()>=yc and mousey()<=yc+hc
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto itemlistX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xc,yc,item$
` Exit on Mouseclick
if mousex()>=xd and mousex()<=xd+wd and mousey()>=yd and mousey()<=yd+hd
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto exitX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xd,yd,exit$
` Buy Weapon#1
if mousex()>=x1 and mousex()<=x1+w1 and mousey()>=y1 and mousey()<=y1+h1
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon1:
else
ink rgb(255,255,255),0
rollover=1
endif
text x1,y1,weapon1$
` Buy Weapon#2
if mousex()>=x2 and mousex()<=x2+w2 and mousey()>=y2 and mousey()<=y2+h2
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon2:
else
ink rgb(255,255,255),0
rollover=1
endif
text x2,y2,weapon2$
` Buy Weapon#3
if mousex()>=x3 and mousex()<=x3+w3 and mousey()>=y3 and mousey()<=y3+h3
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon3:
else
ink rgb(255,255,255),0
rollover=1
endif
text x3,y3,weapon3$
` Buy Weapon#4
if mousex()>=x4 and mousex()<=x4+w4 and mousey()>=y4 and mousey()<=y4+h4
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon4:
else
ink rgb(255,255,255),0
rollover=1
endif
text x4,y4,weapon4$
` Buy Weapon#5
if mousex()>=x5 and mousex()<=x5+w5 and mousey()>=y5 and mousey()<=y5+h5
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon5:
else
ink rgb(255,255,255),0
rollover=1
endif
text x5,y5,weapon5$
` Buy Weapon#6
if mousex()>=x6 and mousex()<=x6+w6 and mousey()>=y6 and mousey()<=y6+h6
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon6:
else
ink rgb(255,255,255),0
rollover=1
endif
text x6,y6,weapon6$
` Buy Weapon#7
if mousex()>=x7 and mousex()<=x7+w7 and mousey()>=y7 and mousey()<=y7+h7
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon7:
else
ink rgb(255,255,255),0
rollover=1
endif
text x7,y7,weapon7$
` Buy Weapon#8
if mousex()>=x8 and mousex()<=x8+w8 and mousey()>=y8 and mousey()<=y8+h8
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon8:
else
ink rgb(255,255,255),0
rollover=1
endif
text x8,y8,weapon8$
` Buy Weapon#9
if mousex()>=x9 and mousex()<=x9+w9 and mousey()>=y9 and mousey()<=y9+h9
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon9:
else
ink rgb(255,255,255),0
rollover=1
endif
text x9,y9,weapon9$
` Buy Weapon#10
if mousex()>=x10 and mousex()<=x10+w10 and mousey()>=y10 and mousey()<=y10+h10
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon10:
else
ink rgb(255,255,255),0
rollover=1
endif
text x10,y10,weapon10$
` Buy Weapon#11
if mousex()>=x11 and mousex()<=x11+w11 and mousey()>=y11 and mousey()<=y11+h11
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon11:
else
ink rgb(255,255,255),0
rollover=1
endif
text x11,y11,weapon11$
` Buy Weapon#12
if mousex()>=x12 and mousex()<=x12+w12 and mousey()>=y12 and mousey()<=y12+h12
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyweapon12:
else
ink rgb(255,255,255),0
rollover=1
endif
text x12,y12,weapon12$
loop
buyweapon1:
if totalmoney# < sweapon1# then goto notenoughmoney
totalmoney#=totalmoney# - sweapon1#
text 200,428,weapon1$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon2:
if totalmoney# < sweapon2# then goto notenoughmoney
totalmoney#=totalmoney# - sweapon2#
text 200,428,weapon2$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon3:
if totalmoney# < sweapon3# then goto notenoughmoney
totalmoney#=totalmoney#-sweapon3#
text 200,428,weapon3$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon4:
if totalmoney# < sweapon4# then goto notenoughmoney
totalmoney#=totalmoney#-sweapon4#
text 200,428,weapon4$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon5:
if totalmoney# < sweapon5# then goto notenoughmoney
totalmoney# = totalmoney# - sweapon5#
text 200,428,weapon5$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon6:
if totalmoney# < sweapon6# then goto notenoughmoney
totalmoney#=totalmoney#-sweapon6#
text 200,428,weapon6$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon7:
if totalmoney# < sweapon7# then goto notenoughmoney
totalmoney#=totalmoney#-sweapon7#
text 200,428,weapon7$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon8:
if totalmoney# < sweapon8# then goto notenoughmoney
totalmoney#=totalmoney#-sweapon8#
text 200,428,weapon8$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon9:
if totalmoney# < sweapon9# then goto notenoughmoney
totalmoney# = totalmoney# - sweapon9#
text 200,428,weapon9$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon10:
if totalmoney# < sweapon10# then goto notenoughmoney
totalmoney#=totalmoney#-sweapon10#
text 200,428,weapon10$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon11:
if totalmoney# < sweapon11# then goto notenoughmoney
totalmoney#=totalmoney#-sweapon11#
text 200,428,weapon11$
text 350,428,"bought!"
suspend for key
goto weaponlistX
buyweapon12:
if totalmoney# < sweapon12# then goto notenoughmoney
totalmoney#=totalmoney# - sweapon12#
text 200,428,weapon12$
text 350,428,"bought!"
suspend for key
goto weaponlistX
` Armor Menu
armorlistX:
ink 400000,0
box 100,428,415,451
box 26,60,449,422
ink rgb(255,255,255),0
set cursor 100,432
print totalmoney#
center text xb,yb,armor$
text 31,70,armor1$
text 200,70,darmor1$
text 360,70,sarmor1$
text 31,100,armor2$
text 31,130,armor3$
text 31,160,armor4$
text 31,190,armor5$
text 31,220,armor6$
text 31,250,armor7$
text 31,280,armor8$
text 31,310,armor9$
text 31,340,armor10$
text 31,370,armor11$
text 31,400,armor12$
text 200,100,darmor2$
text 200,130,darmor3$
text 200,160,darmor4$
text 200,190,darmor5$
text 200,220,darmor6$
text 200,250,darmor7$
text 200,280,darmor8$
text 200,310,darmor9$
text 200,340,darmor10$
text 200,370,darmor11$
text 200,400,darmor12$
text 360,100,sarmor2$
text 360,130,sarmor3$
text 360,160,sarmor4$
text 360,190,sarmor5$
text 360,220,sarmor6$
text 360,250,sarmor7$
text 360,280,sarmor8$
text 360,310,sarmor9$
text 360,340,sarmor10$
text 360,370,sarmor11$
text 360,400,sarmor12$
do
` Weaponslist on Mouseclick
if mousex()>=xa and mousex()<=xa+wa and mousey()>=ya and mousey()<=ya+ha
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto weaponlistX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xa,ya,weapon$
` Itemlist on Mouseclick
if mousex()>=xc and mousex()<=xc+wc and mousey()>=yc and mousey()<=yc+hc
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto itemlistX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xc,yc,item$
` Exit on Mouseclick
if mousex()>=xd and mousex()<=xd+wd and mousey()>=yd and mousey()<=yd+hd
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto exitX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xd,yd,exit$
` Buy Armor#1
if mousex()>=x1 and mousex()<=x1+w1 and mousey()>=y1 and mousey()<=y1+h1
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor1:
else
ink rgb(255,255,255),0
rollover=1
endif
text x1,y1,armor1$
` Buy Armor#2
if mousex()>=x2 and mousex()<=x2+w2 and mousey()>=y2 and mousey()<=y2+h2
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor2:
else
ink rgb(255,255,255),0
rollover=1
endif
text x2,y2,armor2$
` Buy Armor#3
if mousex()>=x3 and mousex()<=x3+w3 and mousey()>=y3 and mousey()<=y3+h3
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor3:
else
ink rgb(255,255,255),0
rollover=1
endif
text x3,y3,armor3$
` Buy Armor#4
if mousex()>=x4 and mousex()<=x4+w4 and mousey()>=y4 and mousey()<=y4+h4
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor4:
else
ink rgb(255,255,255),0
rollover=1
endif
text x4,y4,armor4$
` Buy Armor#5
if mousex()>=x5 and mousex()<=x5+w5 and mousey()>=y5 and mousey()<=y5+h5
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor5:
else
ink rgb(255,255,255),0
rollover=1
endif
text x5,y5,armor5$
` Buy Armor#6
if mousex()>=x6 and mousex()<=x6+w6 and mousey()>=y6 and mousey()<=y6+h6
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor6:
else
ink rgb(255,255,255),0
rollover=1
endif
text x6,y6,armor6$
` Buy Armor#7
if mousex()>=x7 and mousex()<=x7+w7 and mousey()>=y7 and mousey()<=y7+h7
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor7:
else
ink rgb(255,255,255),0
rollover=1
endif
text x7,y7,armor7$
` Buy Armor#8
if mousex()>=x8 and mousex()<=x8+w8 and mousey()>=y8 and mousey()<=y8+h8
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor8:
else
ink rgb(255,255,255),0
rollover=1
endif
text x8,y8,armor8$
` Buy Armor#9
if mousex()>=x9 and mousex()<=x9+w9 and mousey()>=y9 and mousey()<=y9+h9
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor9:
else
ink rgb(255,255,255),0
rollover=1
endif
text x9,y9,armor9$
` Buy Armor#10
if mousex()>=x10 and mousex()<=x10+w10 and mousey()>=y10 and mousey()<=y10+h10
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor10:
else
ink rgb(255,255,255),0
rollover=1
endif
text x10,y10,armor10$
` Buy Armor#11
if mousex()>=x11 and mousex()<=x11+w11 and mousey()>=y11 and mousey()<=y11+h11
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor11:
else
ink rgb(255,255,255),0
rollover=1
endif
text x11,y11,armor11$
` Buy Armor#12
if mousex()>=x12 and mousex()<=x12+w12 and mousey()>=y12 and mousey()<=y12+h12
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyarmor12:
else
ink rgb(255,255,255),0
rollover=1
endif
text x12,y12,armor12$
loop
buyarmor1:
if totalmoney# < sarmor1# then goto notenoughmoney
totalmoney# = totalmoney# - sarmor1#
text 200,428,armor1$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor2:
if totalmoney# < sarmor2# then goto notenoughmoney
totalmoney#=totalmoney#-sarmor2#
text 200,428,armor2$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor3:
if totalmoney# < sarmor3# then goto notenoughmoney
totalmoney#=totalmoney#-sarmor3#
text 200,428,armor3$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor4:
if totalmoney# < sarmor4# then goto notenoughmoney
totalmoney#=totalmoney#-sarmor4#
text 200,428,armor4$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor5:
if totalmoney# < sarmor5# then goto notenoughmoney
totalmoney# = totalmoney# - sarmor5#
text 200,428,armor5$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor6:
if totalmoney# < sarmor6# then goto notenoughmoney
totalmoney#=totalmoney#-sarmor6#
text 200,428,armor6$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor7:
if totalmoney# < sarmor7# then goto notenoughmoney
totalmoney#=totalmoney#-sarmor7#
text 200,428,armor7$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor8:
if totalmoney# < sarmor8# then goto notenoughmoney
totalmoney#=totalmoney#-sarmor8#
text 200,428,armor8$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor9:
if totalmoney# < sarmor9# then goto notenoughmoney
totalmoney# = totalmoney# - sarmor9#
text 200,428,armor9$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor10:
if totalmoney# < sarmor10# then goto notenoughmoney
totalmoney#=totalmoney#-sarmor10#
text 200,428,armor10$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor11:
if totalmoney# < sarmor11# then goto notenoughmoney
totalmoney#=totalmoney#-sarmor11#
text 200,428,armor11$
text 350,428,"bought!"
suspend for key
goto armorlistX
buyarmor12:
if totalmoney# < sarmor12# then goto notenoughmoney
totalmoney#=totalmoney#-sarmor12#
text 200,428,armor12$
text 350,428,"bought!"
suspend for key
goto armorlistX
` Item Menu
itemlistX:
ink 400000,0
box 100,428,415,451
box 26,60,449,422
ink rgb(255,255,255),0
set cursor 100,432
print totalmoney#
center text xc,yc,item$
text 31,70,item1$
text 200,70,ditem1$
text 360,70,sitem1$
text 31,100,item2$
text 31,130,item3$
text 31,160,item4$
text 31,190,item5$
text 31,220,item6$
text 31,250,item7$
text 31,280,item8$
text 31,310,item9$
text 31,340,item10$
text 31,370,item11$
text 31,400,item12$
text 200,100,ditem2$
text 200,130,ditem3$
text 200,160,ditem4$
text 200,190,ditem5$
text 200,220,ditem6$
text 200,250,ditem7$
text 200,280,ditem8$
text 200,310,ditem9$
text 200,340,ditem10$
text 200,370,ditem11$
text 200,400,ditem12$
text 360,100,sitem2$
text 360,130,sitem3$
text 360,160,sitem4$
text 360,190,sitem5$
text 360,220,sitem6$
text 360,250,sitem7$
text 360,280,sitem8$
text 360,310,sitem9$
text 360,340,sitem10$
text 360,370,sitem11$
text 360,400,sitem12$
do
` Weaponslist on Mouseclick
if mousex()>=xa and mousex()<=xa+wa and mousey()>=ya and mousey()<=ya+ha
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto weaponlistX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xa,ya,weapon$
` Armorlist on Mouseclick
if mousex()>=xb and mousex()<=xb+wb and mousey()>=yb and mousey()<=yb+hb
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto armorlistX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xb,yb,armor$
` Exit on Mouseclick
if mousex()>=xd and mousex()<=xd+wd and mousey()>=yd and mousey()<=yd+hd
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto exitX
else
ink rgb(255,255,255),0
rollover=1
endif
center text xd,yd,exit$
` Buy Item#1
if mousex()>=x1 and mousex()<=x1+w1 and mousey()>=y1 and mousey()<=y1+h1
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem1:
else
ink rgb(255,255,255),0
rollover=1
endif
text x1,y1,item1$
` Buy Item#2
if mousex()>=x2 and mousex()<=x2+w2 and mousey()>=y2 and mousey()<=y2+h2
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem2:
else
ink rgb(255,255,255),0
rollover=1
endif
text x2,y2,item2$
` Buy Item#3
if mousex()>=x3 and mousex()<=x3+w3 and mousey()>=y3 and mousey()<=y3+h3
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem3:
else
ink rgb(255,255,255),0
rollover=1
endif
text x3,y3,item3$
` Buy Item#4
if mousex()>=x4 and mousex()<=x4+w4 and mousey()>=y4 and mousey()<=y4+h4
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem4:
else
ink rgb(255,255,255),0
rollover=1
endif
text x4,y4,item4$
` Buy Item#5
if mousex()>=x5 and mousex()<=x5+w5 and mousey()>=y5 and mousey()<=y5+h5
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem5:
else
ink rgb(255,255,255),0
rollover=1
endif
text x5,y5,item5$
` Buy Item#6
if mousex()>=x6 and mousex()<=x6+w6 and mousey()>=y6 and mousey()<=y6+h6
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem6:
else
ink rgb(255,255,255),0
rollover=1
endif
text x6,y6,item6$
` Buy Item#7
if mousex()>=x7 and mousex()<=x7+w7 and mousey()>=y7 and mousey()<=y7+h7
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem7:
else
ink rgb(255,255,255),0
rollover=1
endif
text x7,y7,item7$
` Buy Item#8
if mousex()>=x8 and mousex()<=x8+w8 and mousey()>=y8 and mousey()<=y8+h8
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem8:
else
ink rgb(255,255,255),0
rollover=1
endif
text x8,y8,item8$
` Buy Item#9
if mousex()>=x9 and mousex()<=x9+w9 and mousey()>=y9 and mousey()<=y9+h9
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem9:
else
ink rgb(255,255,255),0
rollover=1
endif
text x9,y9,item9$
` Buy Item#10
if mousex()>=x10 and mousex()<=x10+w10 and mousey()>=y10 and mousey()<=y10+h10
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem10:
else
ink rgb(255,255,255),0
rollover=1
endif
text x10,y10,item10$
` Buy Item#11
if mousex()>=x11 and mousex()<=x11+w11 and mousey()>=y11 and mousey()<=y11+h11
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem11:
else
ink rgb(255,255,255),0
rollover=1
endif
text x11,y11,item11$
` Buy Item#12
if mousex()>=x12 and mousex()<=x12+w12 and mousey()>=y12 and mousey()<=y12+h12
ink rgb(0,232,0),0
rollover=2
if mouseclick()=1 then goto buyitem12:
else
ink rgb(255,255,255),0
rollover=1
endif
text x12,y12,item12$
loop
buyitem1:
if totalmoney# < sitem1# then goto notenoughmoney
totalmoney# = totalmoney# - sitem1#
text 200,428,weapon1$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem2:
if totalmoney# < sitem2# then goto notenoughmoney
totalmoney#=totalmoney#-sitem2#
text 200,428,weapon2$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem3:
if totalmoney# < sitem3# then goto notenoughmoney
totalmoney#=totalmoney#-sitem3#
text 200,428,item3$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem4:
if totalmoney# < sitem4# then goto notenoughmoney
totalmoney#=totalmoney#-sitem4#
text 200,428,item4$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem5:
if totalmoney# < sitem5# then goto notenoughmoney
totalmoney# = totalmoney# - sitem5#
text 200,428,item5$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem6:
if totalmoney# < sitem6# then goto notenoughmoney
totalmoney#=totalmoney#-sitem6#
text 200,428,item6$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem7:
if totalmoney# < sitem7# then goto notenoughmoney
totalmoney#=totalmoney#-sitem7#
text 200,428,item7$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem8:
if totalmoney# < sitem8# then goto notenoughmoney
totalmoney#=totalmoney#-sitem8#
text 200,428,item8$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem9:
if totalmoney# < sitem9# then goto notenoughmoney
totalmoney# = totalmoney# - sitem9#
text 200,428,item9$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem10:
if totalmoney# < sitem10# then goto notenoughmoney
totalmoney#=totalmoney#-sitem10#
text 200,428,item10$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem11:
if totalmoney# < sitem11# then goto notenoughmoney
totalmoney#=totalmoney#-sitem11#
text 200,428,item11$
text 350,428,"bought!"
suspend for key
goto itemlistX
buyitem12:
if totalmoney# < sitem12# then goto notenoughmoney
totalmoney#=totalmoney#-sitem12#
text 200,428,item12$
text 350,428,"bought!"
suspend for key
goto itemlistX
notenoughmoney:
text 200,428,"Not enough money!"
goto begin:
end
exitX:
cls
goto beginning
Just so you know, the sell and upgrade menus do not work yet. Any help would be appreciated-thx
*When I'm depressed, I eat ChocoTacos*