Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Two-Edged Sword RPG-Idler
- ' By Logan G. / "TheBaykun"
- ' For instructions, gameplay information, and installation, go to:
- ' http://www.bit.ly/13ix4WI
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- ' SETTINGS:
- ''''''''''''''''''''''''''''''''
- RETINA on
- CheatMode = 0 'Advanced users only!
- Difficulty = 2 'Enemy difficulty, 1-3.
- ResetHighScore = 0 'Resets highscore data
- ' when the program
- ' is executed.
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- BCOLOR 75,75,75
- COLOR 255,0,0
- LOADSPRITE 1, "manIDLE2" ' Character
- LOADSPRITE 2, "leftarrow"
- LOADSPRITE 3, "rightarrow"
- LOADSPRITE 4, "hat1" 'Hat
- LOADSPRITE 5, "hat2" 'Cowbot
- LOADSPRITE 6, "hat3" 'Crown
- LOADSPRITE 7, "shirt1" 'Blue
- LOADSPRITE 8, "shirt2" 'Red
- LOADSPRITE 9, "shirt3" 'Yellow
- LOADSPRITE 10 , "pants1" 'Red
- LOADSPRITE 11, "pants2" 'Yellow
- LOADSPRITE 12, "pants3" 'Green
- LOADSPRITE 13, "shoes1" 'Shoes
- LOADSPRITE 14, "shoes2" 'Boots
- LOADSPRITE 15, "checkButton"
- LOADSPRITE 16, "dice"
- LOADSPRITE 17, "blankButton"
- LOADSPRITE 19, "save" 'Save icon
- LOADSPRITE 20, "speak1"
- LOADSPRITE 21, "blankButton3" 'Tall
- LOADSPRITE 24, "speak2"
- LOADSPRITE 25, "paused"
- LOADSPRITE 26, "resume"
- LOADSPRITE 27, "tesrpgi"
- LOADSPRITE 28, "medic"
- LOADSPRITE 29, "lvlBar"
- LOADSPRITE 30, "corner1"
- LOADSPRITE 31, "cashS"
- LOADSPRITE 32, "expBar"
- LOADSPRITE 33, "mpIcon"
- LOADSPRITE 34, "usePotion"
- LOADSPRITE 35, "buyPotion"
- LOADSPRITE 38, "buyMp"
- LOADSPRITE 39, "useMp"
- LOADSPRITE 40, "slime"
- LOADSPRITE 41, "zombie"
- LOADSPRITE 42, "skeleton"
- LOADSPRITE 43, "clown"
- LOADSPRITE 44, "goblin"
- LOADSPRITE 45, "knight"
- LOADSPRITE 46, "worm"
- LOADSPRITE 47, "giant"
- LOADSPRITE 48, "demon"
- LOADSPRITE 49, "dragon"
- LOADSPRITE 50, "bgRect" 'Enemy backg.
- IF resethighscore=1 THEN
- hiScore=0
- OPEN "tesrpgidata" FOR OUTPUT AS #1
- PRINT #1, hiScore
- CLOSE #1
- ENDIF
- cheatCash=1
- cheatInv=0
- cheatInfP=0
- cheatXP=1
- CheatModeA:
- IF cheatmode=1 THEN
- CLS tty
- PRINT "Welcome to TESRPG-I Cheat Mode."
- PRINT "What do you want to change this session?"
- PRINT "1: Cash per tick. (Default: $1/tick, Current: ",cheatCash,")"
- PRINT "2: Enable invincibility. (Default: 0, Current: ",cheatInv,")"
- PRINT "3: Toggle infinite potions. (Default: 0, Current: ",cheatInfP,")"
- PRINT "4: XP per tick. (Default: 1 XP/tick, Current: ",cheatXP,")"
- PRINT "5: Exit Cheat Mode, start game."
- INPUT "? : ", gotoCheat
- IF gotoCheat<1 OR gotoCheat>5 THEN
- GOTO CheatModeA
- ENDIF
- IF gotoCheat=1 THEN
- INPUT "CASH PER TICK? : ",cheatCash
- IF cheatCash>9999999 THEN
- cheatCash=9999999
- ENDIF
- GOTO CheatModeA
- ENDIF
- IF gotoCheat=4 THEN
- INPUT "XP PER TICK? : ",cheatXP
- IF cheatXP>9999999 THEN
- cheatXP=9999999
- ENDIF
- GOTO CheatModeA
- ENDIF
- IF gotoCheat=2 THEN
- PRINT "INVINCIBILITY TOGGLED."
- IF cheatInv=0 THEN
- cheatInv=1
- ELSE
- cheatInv=0
- ENDIF
- SLEEP 1
- GOTO CheatModeA
- ENDIF
- IF gotoCheat=3 THEN
- PRINT "INFINITE POTIONS TOGGLED."
- IF cheatInfP=0 THEN
- cheatInfP=1
- ELSE
- cheatInfP=0
- ENDIF
- SLEEP 1
- GOTO CheatModeA
- ENDIF
- ENDIF
- CLS
- DIM sts$(5),monHP(10),monSTR(10),monDEF(10),monXP(10),monGOLD(10),monNAME$(10)
- sts$(1)="Wandering" 'Default. May be attacked & find treasure.
- sts$(2)="Fighting" 'In battle.
- sts$(3)="Resting" '+1 HP & MP/tick.
- sts$(4)="Hunting" 'Monsters common, more rewards and treasures. Dungeons can be found.
- sts$(5)="In Dungeon" 'Many monsters, good treasure, and a boss fight. Bosses drop a lot of gold and xp.
- monHP(1)=25 'Slime
- monHP(2)=50 'Zombie
- monHP(3)=100 'Skeleton
- monHP(4)=150 'Clown
- monHP(5)=250 'Goblin
- monHP(6)=350 'Knight
- monHP(7)=450 'Worm
- monHP(8)=550 'Giant
- monHP(9)=666 'Demon
- monHP(10)=750 'Dragon
- monSTR(1)=10
- monSTR(2)=15
- monSTR(3)=20
- monSTR(4)=25
- monSTR(5)=35
- monSTR(6)=45
- monSTR(7)=50
- monSTR(8)=60
- monSTR(9)=75
- monSTR(10)=100
- monDEF(1)=5
- monDEF(2)=10
- monDEF(3)=15
- monDEF(4)=25
- monDEF(5)=35
- monDEF(6)=45
- monDEF(7)=55
- monDEF(8)=65
- monDEF(9)=75
- monDEF(10)=100
- monXP(1)=25
- monXP(2)=50
- monXP(3)=100
- monXP(4)=200
- monXP(5)=300
- monXP(6)=400
- monXP(7)=500
- monXP(8)=750
- monXP(9)=1000
- monXP(10)=1500
- monGOLD(1)=25
- monGOLD(2)=50
- monGOLD(3)=75
- monGOLD(4)=100
- monGOLD(5)=200
- monGOLD(6)=250
- monGOLD(7)=500
- monGOLD(8)=750
- monGOLD(9)=1000
- monGOLD(10)=1500
- monNAME$(1)="Slime" 'Unlocked at lvl 1
- monNAME$(2)="Zombie" '5
- monNAME$(3)="Skeleton" '10
- monNAME$(4)="Clown" '20
- monNAME$(5)="Goblin" '25
- monNAME$(6)="Knight" '35
- monNAME$(7)="Worm" '45
- monNAME$(8)="Giant" '55
- monNAME$(9)="Demon" '65
- monNAME$(10)="Dragon" '75
- loadnewDone=0
- TEXTFONT "American Typewriter", "Bold", 32
- DRAWSPRITE 17,40,25,5
- DRAWSPRITE 17,40,225,5
- DRAWTEXT "Load Game", 73, 65
- DRAWTEXT "New Game", 73, 268
- TEXTFONT "Arial Rounded", 22
- DRAWTEXT "Two-Edged Sword RPG Idler", 8,(ScreenHeight/2)-30
- loopB: 'Load Game / New Game
- TEXTFONT "Arial Rounded", 18
- DRAWTEXT "By TheBaykun • bit.ly/13ix4WI",31,185
- IF Touch=1 THEN
- IF TouchX>40 AND TouchX<300 AND TouchY>25 AND TouchY<160 THEN
- loadnewDone=1
- END IF
- IF TouchX>40 AND TouchX<300 AND TouchY>225 AND TouchY<360 THEN
- loadnewDone=2
- END IF
- END IF
- IF loadnewDone=0 THEN
- GOTO loopB
- END IF
- CLS
- IF loadnewDone=1 THEN 'Load
- OPEN "RPGDATA" FOR INPUT AS #1
- INPUT #1, hat
- INPUT #1, shirt
- INPUT #1, pants
- INPUT #1, shoes
- INPUT #1, hp
- INPUT #1, mhp
- INPUT #1, lvl
- INPUT #1, xp
- INPUT #1, mxp
- INPUT #1, str
- INPUT #1, def
- INPUT #1, cash
- INPUT #1, mp
- INPUT #1, mmp
- INPUT #1, wins
- INPUT #1, losses
- INPUT #1, potions
- INPUT #1, mppotions
- INPUT #1, status
- INPUT #1, pstatus
- INPUT #1, cenemy
- INPUT #1, isBoss
- INPUT #1, eHp
- CLOSE #1
- END IF
- IF loadnewDone=2 THEN 'New
- hat=0 '0-Bald, 1-Hat, 2-Cowboy, 3-Crown
- shirt=0 '0-Green, 1-Blue, 2-Red, 3-Yellow
- pants=1 'Same colors as above
- shoes=0 '0-None, 1-Shoes, 2-Boots
- hp=100 'HP
- mhp=100 'Max HP
- lvl=1 'Level
- xp=0 'Experience
- mxp=50 'Max. Exp.
- cash=0
- mp=30 'Magic Points / Mana
- mmp=30 'Max. Mana
- wins=0
- losses=0
- potions=0 'HP potions
- mppotions=0
- status=1 'Wandering
- pstatus=1 'Where to go after a fight
- cenemy=0 'No current enemy
- isBoss=1 'No boss (1 is off)
- touchable=1
- touchcount=0
- customDone=0
- reloadA:
- CLS
- TEXTFONT "American Typewriter", "Bold", 32
- DRAWTEXT "HAT", 177, 35
- TEXTFONT "American Typewriter", "Bold", 22
- DRAWTEXT "SHIRT", 177, 110
- TEXTFONT "American Typewriter", "Bold", 21
- DRAWTEXT "PANTS", 177, 182
- TEXTFONT "American Typewriter", "Bold", 22
- DRAWTEXT "SHOES", 177, 251
- DRAWSPRITE 1, -15, 35, 10
- DRAWSPRITE 2, 120,30, 2
- DRAWSPRITE 3, 260,30, 2
- DRAWSPRITE 2, 120,100, 2
- DRAWSPRITE 3, 260,100, 2
- DRAWSPRITE 2, 120,170, 2
- DRAWSPRITE 3, 260,170, 2
- DRAWSPRITE 2, 120,240, 2
- DRAWSPRITE 3, 260,240, 2
- DRAWSPRITE 15, 165,310,2
- DRAWSPRITE 16, 10,290,5
- IF hat>0 THEN
- DRAWSPRITE hat+3, 5,-125,10
- END IF
- IF shirt>0 THEN
- DRAWSPRITE shirt+6, -15,35,10
- END IF
- IF pants>1 THEN
- DRAWSPRITE pants+8, -15,35,10
- END IF
- IF pants=0 THEN
- DRAWSPRITE 12, -15,35,10
- END IF
- IF shoes>0 THEN
- DRAWSPRITE shoes+12,-15,35,10
- END IF
- loopA:
- SLEEP(0.01)
- IF Touch>=1 AND touchable=1 THEN
- IF TouchX>120 AND TouchX<170 AND TouchY>30 AND TouchY<80 THEN
- hat=hat-1
- IF hat<0 THEN
- hat=3
- END IF
- touchable=0
- touchcount=0
- GOTO reloadA
- END IF
- IF TouchX>260 AND TouchX<310 AND TouchY>30 AND TouchY<80 THEN
- hat=hat+1
- IF hat>3 THEN
- hat=0
- END IF
- touchable=0
- touchcount=0
- GOTO reloadA
- END IF
- IF TouchX>120 AND TouchX<170 AND TouchY>100 AND TouchY<150 THEN
- shirt=shirt-1
- IF shirt<0 THEN
- shirt=3
- END IF
- touchable=0
- touchcount=0
- GOTO reloadA
- END IF
- IF TouchX>260 AND TouchX<310 AND TouchY>100 AND TouchY<150 THEN
- shirt=shirt+1
- IF shirt>3 THEN
- shirt=0
- END IF
- touchable=0
- touchcount=0
- GOTO reloadA
- END IF
- IF TouchX>120 AND TouchX<170 AND TouchY>170 AND TouchY<220 THEN
- pants=pants-1
- IF pants<0 THEN
- pants=3
- END IF
- touchable=0
- touchcount=0
- GOTO reloadA
- END IF
- IF TouchX>260 AND TouchX<310 AND TouchY>170 AND TouchY<220 THEN
- pants=pants+1
- IF pants>3 THEN
- pants=0
- END IF
- touchable=0
- touchcount=0
- GOTO reloadA
- END IF
- IF TouchX>120 AND TouchX<170 AND TouchY>240 AND TouchY<290 THEN
- shoes=shoes-1
- IF shoes<0 THEN
- shoes=2
- END IF
- touchable=0
- touchcount=0
- GOTO reloadA
- END IF
- IF TouchX>260 AND TouchX<310 AND TouchY>240 AND TouchY<290 THEN
- shoes=shoes+1
- IF shoes>2 THEN
- shoes=0
- END IF
- touchable=0
- touchcount=0
- GOTO reloadA
- END IF
- IF TouchX>10 AND TouchX<65 AND TouchY>290 AND TouchY<345 THEN
- ranHat=RND
- IF ranHat<=0.25 THEN
- hat=0
- END IF
- IF ranHat>0.25 AND ranHat<=0.5 THEN
- hat=1
- END IF
- IF ranHat>0.5 AND ranHat<=0.75 THEN
- hat=2
- END IF
- IF ranHat>0.75 THEN
- hat=3
- END IF
- ranShirt=RND
- IF ranShirt<=0.25 THEN
- shirt=0
- END IF
- IF ranShirt>0.25 AND ranShirt<=0.5 THEN
- shirt=1
- END IF
- IF ranShirt>0.5 AND ranShirt<=0.75 THEN
- shirt=2
- END IF
- IF ranShirt>0.75 THEN
- shirt=3
- END IF
- ranPants=RND
- IF ranPants<=0.25 THEN
- pants=0
- END IF
- IF ranPants>0.25 AND ranPants<=0.5 THEN
- pants=1
- END IF
- IF ranPants>0.5 AND ranPants<=0.75 THEN
- pants=2
- END IF
- IF ranPants>0.75 THEN
- Pants=3
- END IF
- ranShoes=RND
- IF ranShoes<=0.33 THEN
- shoes=0
- END IF
- IF ranShoes>0.33 AND ranShoes<=0.67 THEN
- shoes=1
- END IF
- IF ranShoes>0.67 THEN
- shoes=2
- END IF
- touchable=0
- touchcount=0
- GOTO reloadA
- END IF
- IF TouchX>165 AND TouchX<265 AND TouchY>310 AND TouchY<380 THEN
- customDone=1
- END IF
- END IF
- IF touchable=0 THEN
- touchcount=touchcount+1
- END IF
- IF touchcount>=15 THEN
- touchcount=0
- touchable=1
- END IF
- IF customDone=0 THEN
- GOTO loopA
- END IF
- str=INT(RND*10)+1
- def=INT(RND*10)+1
- ' Save your new character.
- OPEN "RPGDATA" FOR OUTPUT AS #1
- PRINT #1, hat
- PRINT #1, shirt
- PRINT #1, pants
- PRINT #1, shoes
- PRINT #1, hp
- PRINT #1, mhp
- PRINT #1, lvl
- PRINT #1, xp
- PRINT #1, mxp
- PRINT #1, str
- PRINT #1, def
- PRINT #1, cash
- PRINT #1, mp
- PRINT #1, mmp
- PRINT #1, wins
- PRINT #1, losses
- PRINT #1, potions
- PRINT #1, mppotions
- PRINT #1, status
- PRINT #1, pstatus
- PRINT #1, cenemy
- PRINT #1, isBoss
- PRINT #1, eHp
- CLOSE #1
- END IF
- CLS
- BCOLOR 75,75,75
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- GOSUB stsChange
- IF cheatInfP=1 THEN
- potions=5
- mppotions=5
- ENDIF
- touchable=1
- touchcount=0
- pauseA=0
- gamePaused=0
- DRAWSPRITE 19,ScreenWidth-52,5,2
- DRAWSPRITE 21,5,90,5.7
- DRAWSPRITE 1,-21,153,12.5
- DRAWSPRITE 25,215,5,2
- DRAWSPRITE 28,20,99,1
- DRAWSPRITE 31,145,155,1.5
- DRAWSPRITE 35,110,5,2
- DRAWSPRITE 38, 162,5,2
- DRAWSPRITE 27,-2,1,2.4
- COLOR 255,0,0
- TEXTFONT "Marker Felt",10
- DRAWTEXT "Two-Edged Sword",37,12
- DRAWTEXT "RPG - Idler",37,35
- COLOR 255,250,250
- TEXTFONT "American Typewriter", "Bold", 16
- DRAWTEXT "Status:",250,195
- 'Update status
- COLOR 75,75,75
- RECT 249,214,350,230
- COLOR 255,0,0
- TEXTFONT "American Typewriter", 12
- DRAWTEXT sts$(status),249,215
- 'Update use-mp-potion button
- COLOR 0,0,255
- TEXTFONT "American Typewriter", "Bold", 24
- DRAWSPRITE 39,198,192,2
- DRAWTEXT STR$(mppotions),214,205
- 'Update use-potion button
- COLOR 255,0,0
- TEXTFONT "American Typewriter", "Bold", 24
- DRAWSPRITE 34,148,192,2
- DRAWTEXT STR$(potions),164,205
- COLOR 0,0,255
- TEXTFONT "American Typewriter", "Bold", 12
- DRAWTEXT "MP:",162,175
- DRAWSPRITE 33,148,176,1
- 'Update MP bar
- COLOR 75,75,75
- RECT 189,163,350,187
- TEXTFONT "American Typewriter", 12
- COLOR 125,0,200
- RECT 190,176,280,187
- COLOR 0,0,255
- mpDraw=((mp/mmp)*100)*0.9
- RECT 190,176,190+mpDraw,187
- DRAWTEXT STR$(mp),285,175.5
- COLOR 255,0,0
- 'Update cash
- COLOR 75,75,75
- RECT 161,155,350,172
- TEXTFONT "American Typewriter", "Bold", 18
- COLOR 0,255,0
- DRAWTEXT STR$(cash),161,153
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- 'Update lvl, xp, str, and def.
- DRAWSPRITE 29,145,90,2.9
- TEXTFONT "American Typewriter", "Bold", 32
- COLOR 255,0,0
- DRAWTEXT STR$(lvl),150,110
- TEXTFONT "American Typewriter", 20
- DRAWTEXT STR$(str),213,121
- DRAWTEXT STR$(def),260,121
- COLOR 0,0,255
- xpDraw=((xp/mxp)*100)*1.3
- RECT 182.5,98.5,182.5+xpDraw,104
- DRAWSPRITE 30,145,90,2.9
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- TEXTFONT "American Typewriter", "Bold", 12
- COLOR 255,0,0
- DRAWTEXT "HP:",35,98
- ' Display / Update health bar:
- hpDraw=((hp/mhp)*100)*0.3
- COLOR 0,0,255
- RECT 59,98,120,112
- COLOR 255,0,0
- RECT 59,100,89,110
- COLOR 0,255,0
- RECT 59,100,59+hpDraw,110
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(hp),92,99
- 'Enemy area
- DRAWSPRITE 50,215,243,5
- IF cenemy>0 THEN
- eStr=monSTR(cenemy)*isBoss 'Set strength
- eDef=monDEF(cenemy)*isBoss 'Set defense
- etXP=monXP(cenemy)*isBoss 'Treasure XP
- etGOLD=monGOLD(cenemy)*isBoss 'Treasure $
- 'Update/Draw enemy HP:
- COLOR 0,0,255
- RECT 225,249,285,269
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(eHp)+" HP",226,248
- 'Update/Draw monster:
- DRAWSPRITE 39+cenemy,218,261,3
- IF isBoss=2 THEN
- TEXTFONT "American Typewriter", "Bold", 14
- COLOR 255,255,0
- DRAWTEXT "• BOSS •",226,261
- ENDIF
- ENDIF
- DIM triAx(3),triAy(3),triBx(3),triBy(3)
- triAx(1)=146
- triAy(1)=270
- triAx(2)=150
- triAy(2)=265
- triAx(3)=150
- triAy(3)=275
- triBx(1)=206
- triBy(1)=338
- triBx(2)=206
- triBy(2)=328
- triBx(3)=210
- triBy(3)=333
- 'Action display:
- COLOR 200,200,200
- SHAPE 3,triAx,triAy
- SHAPE 3,triBx,triBy
- RRECT 150,243,210,300,5
- RRECT 146,305,206,362,5
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- IF hat>0 THEN
- DRAWSPRITE hat+3, 4,-47,12.5
- END IF
- IF shirt>0 THEN
- DRAWSPRITE shirt+6, -21,153,12.5
- END IF
- IF pants>1 THEN
- DRAWSPRITE pants+8, -21,153,12.5
- END IF
- IF pants=0 THEN
- DRAWSPRITE 12, -21,153,12.5
- END IF
- IF shoes>0 THEN
- DRAWSPRITE shoes+12,-21,153,12.5
- END IF
- loopC:
- IF Touch>=1 AND touchable=1 THEN
- IF TouchX>=ScreenWidth-52 AND TouchX<=ScreenWidth-5 AND TouchY>=5 AND TouchY<=52 THEN
- OPEN "RPGDATA" FOR OUTPUT AS #1
- PRINT #1, hat
- PRINT #1, shirt
- PRINT #1, pants
- PRINT #1, shoes
- PRINT #1, hp
- PRINT #1, mhp
- PRINT #1, lvl
- PRINT #1, xp
- PRINT #1, mxp
- PRINT #1, str
- PRINT #1, def
- PRINT #1, cash
- PRINT #1, mp
- PRINT #1, mmp
- PRINT #1, wins
- PRINT #1, losses
- PRINT #1, potions
- PRINT #1, mppotions
- PRINT #1, status
- PRINT #1, pstatus
- PRINT #1, cenemy
- PRINT #1, isBoss
- PRINT #1, eHp
- CLOSE #1
- COLOR 75,75,75
- RECT 2,55,ScreenWidth-2,87
- COLOR 255,0,0
- DRAWSPRITE 20, 190,55,2
- TEXTFONT "American Typewriter", 18
- DRAWTEXT "Game saved.",195,65
- touchable=0
- touchcount=0
- END IF
- IF TouchX>=215 AND TouchX<=270 AND TouchY>=5 AND TouchY<=52 THEN
- COLOR 75,75,75
- RECT 2,55,ScreenWidth-2,87
- COLOR 255,0,0
- DRAWSPRITE 24, 136,55,2
- TEXTFONT "American Typewriter", 18
- IF gamePaused=0 THEN
- gamePaused=1
- DRAWSPRITE 26,215,5,2
- DRAWTEXT "Game paused.",148,65
- pauseA=1
- END IF
- IF gamePaused=1 AND pauseA=0 THEN
- gamePaused=0
- DRAWSPRITE 25,215,5,2
- DRAWTEXT "Game resumed.",142,65
- END IF
- pauseA=0
- touchable=0
- touchcount=0
- END IF
- IF TouchX>=110 AND TouchX<=158 AND TouchY>=5 AND TouchY<=52 AND cash>=500 AND potions<5 THEN
- cash=cash-500
- potions=potions+1
- touchable=0
- touchcount=0
- COLOR 75,75,75
- RECT 2,55,ScreenWidth-2,87
- COLOR 255,0,0
- DRAWSPRITE 24, 31,55,2
- TEXTFONT "American Typewriter", 18
- DRAWTEXT "+1 HP potion.",46,65
- COLOR 255,0,0
- TEXTFONT "American Typewriter", "Bold", 24
- DRAWSPRITE 34,148,192,2
- DRAWTEXT STR$(potions),164,205
- ENDIF
- IF TouchX>=162 AND TouchX<=210 AND TouchY>=5 AND TouchY<=52 AND cash>=250 AND mppotions<5 THEN
- cash=cash-250
- mppotions=mppotions+1
- touchable=0
- touchcount=0
- COLOR 75,75,75
- RECT 2,55,ScreenWidth-2,87
- COLOR 255,0,0
- DRAWSPRITE 24, 83,55,2
- TEXTFONT "American Typewriter", 18
- DRAWTEXT "+1 MP potion.",98,65
- COLOR 0,0,255
- TEXTFONT "American Typewriter", "Bold", 24
- DRAWSPRITE 39,198,192,2
- DRAWTEXT STR$(mppotions),214,205
- ENDIF
- IF TouchX>=148 AND TouchX<=196 AND TouchY>=192 AND TouchY<=239 AND hp<mhp AND potions>0 THEN
- hp=hp+25
- IF hp>mhp THEN
- hp=mhp
- ENDIF
- IF cheatInfP=0 THEN
- potions=potions-1
- ENDIF
- touchable=0
- touchcount=0
- hpDraw=((hp/mhp)*100)*0.3
- COLOR 0,0,255
- RECT 59,98,120,112
- COLOR 255,0,0
- RECT 59,100,89,110
- COLOR 0,255,0
- RECT 59,100,59+hpDraw,110
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(hp),92,99
- COLOR 255,0,0
- TEXTFONT "American Typewriter", "Bold", 24
- DRAWSPRITE 34,148,192,2
- DRAWTEXT STR$(potions),164,205
- ENDIF
- IF TouchX>=198 AND TouchX<=246 AND TouchY>=192 AND TouchY<=239 AND mp<mmp AND mppotions>0 THEN
- mp=mp+25
- IF mp>mmp THEN
- mp=mmp
- ENDIF
- IF cheatInfP=0 THEN
- mppotions=mppotions-1
- ENDIF
- touchable=0
- touchcount=0
- COLOR 0,0,255
- DRAWSPRITE 33,148,176,1
- 'Update MP bar
- COLOR 75,75,75
- RECT 189,163,350,187
- TEXTFONT "American Typewriter", 12
- COLOR 125,0,200
- RECT 190,176,280,187
- COLOR 0,0,255
- mpDraw=((mp/mmp)*100)*0.9
- RECT 190,176,190+mpDraw,187
- DRAWTEXT STR$(mp),285,175.5
- COLOR 0,0,255
- TEXTFONT "American Typewriter", "Bold", 24
- DRAWSPRITE 39,198,192,2
- DRAWTEXT STR$(mppotions),214,205
- ENDIF
- END IF
- IF Touch>=1 AND TouchX>=215 AND TouchY>=243 AND cenemy>0 AND mp>0 THEN 'Attack enemy
- mp=mp-1
- randDmg=1+(INT(RND*(INT(str/2))))
- randDmg=randDmg-(INT(eDef/3))
- IF randDmg<1 THEN
- randDmg=1
- ENDIF
- eHp=INT(eHp-randDmg)
- COLOR 0,0,255
- RECT 225,249,285,263
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(eHp)+" HP",226,248
- COLOR 200,200,200
- SHAPE 3,triAx,triAy
- RRECT 150,243,210,300,5
- COLOR 255,0,0
- DRAWTEXT "You hurt",152,245
- DRAWTEXT monNAME$(cenemy),153,258
- DRAWTEXT "for "+STR$(randDmg),153,271
- DRAWTEXT "health.",153,284
- COLOR 75,75,75
- RECT 189,163,350,187
- TEXTFONT "American Typewriter", 12
- COLOR 125,0,200
- RECT 190,176,280,187
- COLOR 0,0,255
- mpDraw=((mp/mmp)*100)*0.9
- RECT 190,176,190+mpDraw,187
- DRAWTEXT STR$(mp),285,175.5
- IF eHp<=0 THEN
- cash=cash+(etGOLD*treas)
- xp=xp+(etXP*treas)
- status=pstatus
- DRAWSPRITE 50,215,243,5
- GOSUB stsChange
- cenemy=0
- COLOR 200,200,200
- SHAPE 3,triAx,triAy
- SHAPE 3,triBx,triBy
- RRECT 150,243,210,300,5
- RRECT 146,305,206,362,5
- IF isBoss=2 THEN
- isBoss=1
- status=1
- GOSUB stsChange
- ENDIF
- ENDIF
- ENDIF
- IF touchable=0 THEN
- touchcount=touchcount+1
- END IF
- IF touchcount>=15 AND gamePaused=1 THEN
- touchable=1
- touchcount=0
- END IF
- IF touchcount>=5 AND gamePaused=0 THEN
- touchable=1
- touchcount=0
- END IF
- IF gamePaused=0 THEN
- IF status=2 OR status=3 THEN
- IF status=3 AND mp<mmp THEN
- mp=mp+1
- COLOR 75,75,75
- RECT 189,163,350,187
- TEXTFONT "American Typewriter", 12
- COLOR 125,0,200
- RECT 190,176,280,187
- COLOR 0,0,255
- mpDraw=((mp/mmp)*100)*0.9
- RECT 190,176,190+mpDraw,187
- DRAWTEXT STR$(mp),285,175.5
- ENDIF
- IF status=3 AND hp<mhp THEN
- hp=hp+1
- IF hp>mhp THEN
- hp=mhp
- ENDIF
- hpDraw=((hp/mhp)*100)*0.3
- COLOR 0,0,255
- RECT 59,98,120,112
- COLOR 255,0,0
- RECT 59,100,89,110
- COLOR 0,255,0
- RECT 59,100,59+hpDraw,110
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(hp),92,99
- ELSE
- IF status=3 AND hp>=mhp THEN
- status=pstatus
- GOSUB stsChange
- ENDIF
- ENDIF
- IF status=2 THEN
- randEvt=RND
- IF randEvt<=0.03 THEN 'Attack enemy
- randDmg=1+(INT(RND*str))
- randDmg=randDmg-(INT(eDef/3))
- IF randDmg<1 THEN
- randDmg=1
- ENDIF
- eHp=INT(eHp-randDmg)
- 'Update/Draw enemy HP:
- COLOR 0,0,255
- RECT 225,249,285,263
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(eHp)+" HP",226,248
- COLOR 200,200,200
- SHAPE 3,triAx,triAy
- RRECT 150,243,210,300,5
- COLOR 255,0,0
- DRAWTEXT "You hurt",152,245
- DRAWTEXT monNAME$(cenemy),153,258
- DRAWTEXT "for "+STR$(randDmg),153,271
- DRAWTEXT "health.",153,284
- IF eHp<=0 THEN
- cash=cash+(etGOLD*treas)
- xp=xp+(etXP*treas)
- status=pstatus
- DRAWSPRITE 50,215,243,5
- GOSUB stsChange
- cenemy=0
- COLOR 200,200,200
- SHAPE 3,triAx,triAy
- SHAPE 3,triBx,triBy
- RRECT 150,243,210,300,5
- RRECT 146,305,206,362,5
- IF isBoss=2 THEN
- isBoss=1
- status=1
- GOSUB stsChange
- ENDIF
- ENDIF
- ENDIF
- IF randEvt<=0.06 AND randEvt>0.03 THEN 'Attack you
- randDmg=1+((INT(difficulty/2))*(INT(RND*eStr)))
- randDmg=randDmg-(INT(def/3))
- IF randDmg<1 THEN
- randDmg=1
- ENDIF
- IF cheatInv=0 THEN
- hp=INT(hp-randDmg)
- ENDIF
- hpDraw=((hp/mhp)*100)*0.3
- COLOR 0,0,255
- RECT 59,98,120,112
- COLOR 255,0,0
- RECT 59,100,89,110
- COLOR 0,255,0
- RECT 59,100,59+hpDraw,110
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(hp),92,99
- COLOR 200,200,200
- SHAPE 3,triBx,triBy
- RRECT 146,305,206,362,5
- COLOR 255,0,0
- DRAWTEXT monNAME$(cenemy),148,307
- DRAWTEXT "hurts you",148,320
- DRAWTEXT "for "+STR$(randDmg),148,333
- DRAWTEXT "health.",148,346
- ENDIF
- IF randEvt<=0.07 AND randEvt>0.06 AND hp<=(mhp-25) AND potions>0 THEN 'Use potion
- IF cheatInfP=0 THEN
- potions=potions-1
- ENDIF
- hp=hp+25
- IF hp>mhp THEN
- hp=mhp
- ENDIF
- hpDraw=((hp/mhp)*100)*0.3
- COLOR 0,0,255
- RECT 59,98,120,112
- COLOR 255,0,0
- RECT 59,100,89,110
- COLOR 0,255,0
- RECT 59,100,59+hpDraw,110
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(hp),92,99
- TEXTFONT "American Typewriter", "Bold", 24
- DRAWSPRITE 34,148,192,2
- DRAWTEXT STR$(potions),164,205
- ENDIF
- ENDIF
- ELSE
- IF RND<(mChance/100) THEN
- GOSUB monster
- ENDIF
- IF RND<(tChance/100) THEN
- GOSUB treasure
- ENDIF
- ENDIF
- IF cash>9999999 THEN
- cash=9999999-cheatCash
- ENDIF
- IF cash<9999999 THEN
- cash=cash+cheatCash
- COLOR 75,75,75
- RECT 161,155,350,172
- TEXTFONT "American Typewriter", "Bold", 18
- COLOR 0,255,0
- DRAWTEXT STR$(cash),161,153
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- END IF
- IF RND<=0.01 AND cash>=500 AND potions<5 AND hp<mhp THEN 'buy potion
- potions=potions+1
- cash=cash-500
- COLOR 255,0,0
- TEXTFONT "American Typewriter", "Bold", 24
- DRAWSPRITE 34,148,192,2
- DRAWTEXT STR$(potions),164,205
- ENDIF
- IF status=1 OR status=4 OR status=5 THEN
- IF RND<=0.01 AND hp<=(INT(mhp/2)) THEN
- status=3
- GOSUB stsChange
- ENDIF
- ENDIF
- IF status=1 AND RND<=0.01 THEN
- status=4
- GOSUB stsChange
- ENDIF
- IF status=4 AND RND<=0.01 THEN
- status=1
- GOSUB stsChange
- ENDIF
- IF status=4 AND RND<=0.01 THEN
- status=5
- GOSUB stsChange
- ENDIF
- IF status=5 AND bossDef=1 THEN
- status=1
- bossDef=0
- GOSUB stsChange
- ENDIF
- xp=xp+cheatXP
- DRAWSPRITE 32,145,90,2.9
- COLOR 0,0,255
- xpDraw=((xp/mxp)*100)*1.3
- RECT 182.5,98.5,182.5+xpDraw,104
- DRAWSPRITE 30,145,90,2.9
- IF xp>=mxp THEN
- IF lvl<99 THEN
- lvl=lvl+1
- ENDIF
- xp=0
- mxp=INT(mxp*1.1)
- strRand=RND
- IF strRand<=0.5 THEN
- str=str+1
- ELSE
- str=str+2
- END IF
- defRand=RND
- IF defRand<=0.5 THEN
- def=def+1
- ELSE
- def=def+2
- END IF
- mhpRand=RND
- IF mhpRand<=0.5 THEN
- mhp=mhp+1
- hp=hp+1
- ELSE
- mhp=mhp+3
- hp=hp+3
- END IF
- IF mmpRand<=0.5 THEN
- mmp=mmp+1
- mp=mp+1
- ELSE
- mmp=mmp+2
- mp=mp+2
- END IF
- COLOR 75,75,75
- RECT 189,163,350,187
- TEXTFONT "American Typewriter", 12
- COLOR 125,0,200
- RECT 190,176,280,187
- COLOR 0,0,255
- mpDraw=((mp/mmp)*100)*0.9
- RECT 190,176,190+mpDraw,187
- DRAWTEXT STR$(mp),285,175.5
- COLOR 255,0,0
- hpDraw=((hp/mhp)*100)*0.3
- COLOR 0,0,255
- RECT 59,98,120,112
- COLOR 255,0,0
- RECT 59,100,89,110
- COLOR 0,255,0
- RECT 59,100,59+hpDraw,110
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(hp),92,99
- DRAWSPRITE 29,145,90,2.9
- TEXTFONT "American Typewriter", "Bold", 32
- COLOR 255,0,0
- DRAWTEXT STR$(lvl),150,110
- TEXTFONT "American Typewriter", 20
- DRAWTEXT STR$(str),213,121
- DRAWTEXT STR$(def),260,121
- COLOR 0,0,255
- xpDraw=((xp/mxp)*100)*1.3
- RECT 182.5,98.5,182.5+xpDraw,104
- DRAWSPRITE 30,145,90,2.9
- TEXTFONT "American Typewriter", 12
- COLOR 75,75,75
- RECT 310,90,320,115
- END IF
- END IF
- SLEEP(0.01)
- IF hp>0 THEN
- GOTO loopC
- ENDIF
- CLS
- PRINT "GAME OVER!"
- PRINT "Level:",lvl
- PRINT "$",cash
- PRINT ""
- OPEN "tesrpgidata" FOR INPUT AS #1
- INPUT #1, hiScore
- CLOSE #1
- IF lvl>hiScore THEN
- hiScore=lvl
- ENDIF
- OPEN "tesrpgidata" FOR OUTPUT AS #1
- PRINT #1, hiScore
- CLOSE #1
- PRINT "Highest Score: Level",hiScore
- END
- stsChange:
- IF status=1 OR status=4 OR status=5 THEN
- pstatus=status
- ENDIF
- IF status=1 THEN 'Set chance of monsters attacking %, treasure, and difficulty.
- mChance=1
- tChance=0.33
- treas=1
- ENDIF
- IF status=2 OR status=3 THEN 'Fighting/Resting
- mChance=0
- tChance=0
- ENDIF
- IF status=4 THEN 'Hunting
- mChance=2
- tChance=1
- treas=2 '2x treasure
- ENDIF
- IF status=5 THEN 'Dungeon
- mChance=3
- tChance=2
- treas=3 '3x more treasure(xp/gold/...)
- ENDIF
- COLOR 75,75,75
- RECT 249,214,350,230
- COLOR 255,0,0
- TEXTFONT "American Typewriter", 12
- DRAWTEXT sts$(status),249,215
- RETURN
- monster:
- pstatus=status
- status=2
- GOSUB stsChange
- randMon=1+(INT(RND*10))
- IF randMon>=2 AND lvl<=5 THEN
- randMon=1
- ENDIF
- IF randMon>=3 AND lvl<=10 THEN
- randMon=1+(INT(RND*2))
- ENDIF
- IF randMon>=4 AND lvl<=20 THEN
- randMon=1+(INT(RND*3))
- ENDIF
- IF randMon>=5 AND lvl<=25 THEN
- randMon=1+(INT(RND*4))
- ENDIF
- IF randMon>=6 AND lvl<=35 THEN
- randMon=1+(INT(RND*5))
- ENDIF
- IF randMon>=7 AND lvl<=45 THEN
- randMon=1+(INT(RND*6))
- ENDIF
- IF randMon>=8 AND lvl<=55 THEN
- randMon=1+(INT(RND*7))
- ENDIF
- IF randMon>=9 AND lvl<=65 THEN
- randMon=1+(INT(RND*8))
- ENDIF
- IF randMon>=10 AND lvl<=75 THEN
- randMon=1+(INT(rand*9))
- ENDIF
- cenemy=randMon
- IF pstatus=5 AND RND<=0.2 THEN
- isBoss=2 'on
- ELSE
- isBoss=1 'off
- ENDIF
- eHp=monHP(randMon)*isBoss 'Set health
- eStr=monSTR(randMon)*isBoss 'Set strength
- eDef=monDEF(randMon)*isBoss 'Set defense
- etXP=monXP(randMon)*isBoss 'Treasure XP
- etGOLD=monGOLD(randMon)*isBoss 'Treasure $
- 'Update/Draw enemy HP:
- COLOR 0,0,255
- RECT 225,249,285,263
- TEXTFONT "American Typewriter", 12
- COLOR 255,0,0
- DRAWTEXT STR$(eHp)+" HP",226,248
- 'Update/Draw monster:
- DRAWSPRITE 39+randMon,218,261,3
- IF isBoss=2 THEN
- TEXTFONT "American Typewriter", "Bold", 14
- COLOR 255,255,0
- DRAWTEXT "• BOSS •",226,261
- ENDIF
- RETURN
- treasure:
- cash=cash+(50*treas)
- xp=xp+(50*treas)
- COLOR 200,200,200
- SHAPE 3,triAx,triAy
- RRECT 150,243,210,300,5
- TEXTFONT "American Typewriter",12
- COLOR 255,0,0
- DRAWTEXT "You found",152,245
- DRAWTEXT "$"+STR$(50*treas)+" and",152,258
- DRAWTEXT STR$(50*treas)+" XP.",152,271
- RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement