Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::compbeg::
- local version = 1.1
- local component = require("component")
- local gpu = component.gpu
- local colors = require("colors")
- local width, height = gpu.getResolution()
- local text = "Project Axium"
- gpu.setBackground(0x000000)
- print("Project Axium V" .. version)
- os.sleep(1)
- health = tonumber(health)
- damage = tonumber(damage)
- ress = tonumber(ress)
- CordX = tonumber(CordX)
- CordZ = tonumber(CordZ)
- Tmove = tonumber(Tmove)
- coins = tonumber(coins)
- exp = tonumber(exp)
- nedexp = tonumber(nedexp)
- magicAff = tonumber(magicAff)
- maxmana = tonumber(maxmana)
- managen = tonumber(managen)
- town1X = tonumber(town1X)
- town1Z = tonumber(town1Z)
- town2X = tonumber(town2X)
- town2Z = tonumber(town2Z)
- town3X = tonumber(town3X)
- town3Z = tonumber(town3Z)
- town4X = tonumber(town4X)
- town4Z = tonumber(town4Z)
- town5X = tonumber(town5X)
- town5Z = tonumber(town5Z)
- town6X = tonumber(town6X)
- town6Z = tonumber(town6Z)
- town7X = tonumber(town7X)
- town7Z = tonumber(town7Z)
- town8X = tonumber(town8X)
- town8Z = tonumber(town8Z)
- town9X = tonumber(town9X)
- town9Z = tonumber(town9Z)
- town10X = tonumber(town10X)
- town10Z = tonumber(town10Z)
- town11X = tonumber(town11X)
- town11Z = tonumber(town11Z)
- town12X = tonumber(town12X)
- town12Z = tonumber(town12Z)
- town13X = tonumber(town13X)
- town13Z = tonumber(town13Z)
- town14X = tonumber(town14X)
- town14Z = tonumber(town14Z)
- BTtown1 = tonumber(BTtown1)
- BTtown2 = tonumber(BTtown2)
- BTtown3 = tonumber(BTtown3)
- BTtown4 = tonumber(BTtown4)
- BTtown5 = tonumber(BTtown5)
- BTtown6 = tonumber(BTtown6)
- BTtown7 = tonumber(BTtown7)
- BTtown8 = tonumber(BTtown8)
- BTtown9 = tonumber(BTtown9)
- BTtown10 = tonumber(BTtown10)
- BTtown11 = tonumber(BTtown11)
- BTtown12 = tonumber(BTtown12)
- BTtown13 = tonumber(BTtown13)
- BTtown14 = tonumber(BTtown14)
- storyC = tonumber(storyC)
- HfireR = tonumber(HfireR)
- HwaterR = tonumber(HwaterR)
- HairR = tonumber(HairR)
- HearthR = tonumber(HearthR)
- HvoidR = tonumber(HvoidR)
- HarcR = tonumber(HarcR)
- HcheekR = tonumber(HcheekR)
- HlightningR = tonumber(HlightningR)
- HmetalR = tonumber(HmetalR)
- HwoodR = tonumber(HwoodR)
- HaxiumR = tonumber(HaxiumR)
- potionN = tonumber(potionN)
- ::beg::
- os.execute("cls")
- local Cname = "error"
- local Chealth = 1
- local Cdamage = 1
- local option = 0
- local randoN = 0
- local chosenN = 0
- local endsceneC = math.random(0, 100)
- local runchance = math.random(1, 4)
- local Rmob = math.random(0, 100)
- local mobspawnC = math.random(0, 150)
- local dungenC = math.random(0, 200)
- local mobN = 1
- local TmobN = 0
- local Tcoin = 0
- local allowbattle = "true"
- local amrunning = "false"
- local attackfunctionran = "false"
- local canrun = "false"
- local Ctown = "error"
- local allowOattack = "true"
- local Cdead = "false"
- local admingohome = "false"
- local mana = 10
- local freezeing = 0
- local isdead = "false"
- local ruindefeated = "false"
- local chesthealth = 0
- local chestdamage = 0
- local TCdamage = 0
- local icebreak = 0
- local orandom = 0
- local isdeadd = "false"
- --mobs!
- local slimeN = "Slime"
- local slimeH = 10
- local slimeA = 1
- local bunnyN = "Bunny"
- local bunnyH = 15
- local bunnyA = 3
- local skeletonN = "Skeleton"
- local skeletonH = 25
- local skeletonA = 10
- local witchN = "Witch"
- local witchH = 20
- local witchA = 8
- local ghostN = "ghost"
- local ghostH = 3
- local ghostA = 15
- local babydN = "Baby Dragon"
- local babydH = 100
- local babydA = 50
- local undedwN = "Undead Warrior"
- local undedwH = 35
- local undedwA = 20
- local darkfairyN = "Dark Fairy"
- local darkfairyH = 20
- local darkfairyA = 10
- local ogreN = "Ogre"
- local ogreH = 40
- local ogreA = 10
- local banditN = "Bandit"
- local banditH = 20
- local banditA = 15
- local crabN = "Demonic Crab"
- local crabH = 30
- local crabA = 12
- local option2 = 0
- local option3 = 0
- local burning = 0
- --Functions!
- function randomm()
- if nedexp <= 9 then
- Rmob = Rmob / 2
- if Rmob <= 40 then
- Cname = slimeN
- Chealth = slimeH
- Cdamage = slimeA
- CThealth = Chealth
- elseif Rmob >= 41 and Rmob <= 70 then
- Cname = bunnyN
- Chealth = bunnyH
- Cdamage = bunnyA
- CThealth = Chealth
- elseif Rmob <= 80 and Rmob >= 71 then
- Cname = witchN
- Chealth = witchH
- Cdamage = witchA
- CThealth = Chealth
- elseif Rmob <= 98 and Rmob >= 81 then
- Cname = ghostN
- Chealth = ghostH
- Cdamage = ghostA
- CThealth = Chealth
- elseif Rmob >= 99 then
- Cname = babydN
- Chealth = babydH
- Cdamage = babydA
- CThealth = Chealth
- end
- elseif nedexp <= 15 then
- if Rmob <= 40 then
- Cname = slimeN
- Chealth = slimeH
- Cdamage = slimeA
- CThealth = Chealth
- elseif Rmob >= 41 and Rmob <= 70 then
- Cname = bunnyN
- Chealth = bunnyH
- Cdamage = bunnyA
- CThealth = Chealth
- elseif Rmob <= 80 and Rmob >= 71 then
- Cname = witchN
- Chealth = witchH
- Cdamage = witchA
- CThealth = Chealth
- elseif Rmob <= 98 and Rmob >= 81 then
- Cname = ghostN
- Chealth = ghostH
- Cdamage = ghostA
- CThealth = Chealth
- elseif Rmob >= 99 and Rmob <= 100 then
- Cname = babydN
- Chealth = babydH
- Cdamage = babydA
- CThealth = Chealth
- elseif Rmob >= 101 and Rmob <= 120 then
- Cname = skeletonN
- Chealth = skeletonH
- Cdamage = skeletonA
- CThealth = Chealth
- elseif Rmob >= 121 and Rmob <= 140 then
- Cname = undedwN
- Chealth = undedwH
- Cdamage = undedwA
- CThealth = Chealth
- elseif Rmob >= 141 and Rmob <= 160 then
- Cname = darkfairyN
- Chealth = darkfairyH
- Cdamage = darkfairyA
- CThealth = Chealth
- elseif Rmob >= 161 and Rmob <= 180 then
- Cname = ogreN
- Chealth = ogreH
- Cdamage = ogreA
- CThealth = Chealth
- elseif Rmob >= 181 and Rmob <= 200 then
- Cname = banditN
- Chealth = banditH
- Cdamage = banditA
- CThealth = Chealth
- end
- elseif nedexp <= 25 then
- if Rmob <= 40 then
- Cname = "Strong " .. slimeN
- Chealth = slimeH * 2
- Cdamage = slimeA * 2
- CThealth = Chealth
- elseif Rmob >= 41 and Rmob <= 70 then
- Cname = "Strong " .. bunnyN
- Chealth = bunnyH * 2
- Cdamage = bunnyA * 2
- CThealth = Chealth
- elseif Rmob <= 80 and Rmob >= 71 then
- Cname = "Strong " .. witchN
- Chealth = witchH * 2
- Cdamage = witchA * 2
- CThealth = Chealth
- elseif Rmob <= 98 and Rmob >= 81 then
- Cname = "Strong " .. ghostN
- Chealth = ghostH * 2
- Cdamage = ghostA * 2
- CThealth = Chealth
- elseif Rmob >= 99 and Rmob <= 100 then
- Cname = "Strong " .. babydN
- Chealth = babydH * 2
- Cdamage = babydA * 2
- CThealth = Chealth
- elseif Rmob >= 101 and Rmob <= 120 then
- Cname = "Strong " .. skeletonN
- Chealth = skeletonH * 2
- Cdamage = skeletonA * 2
- CThealth = Chealth
- elseif Rmob >= 121 and Rmob <= 140 then
- Cname = "Strong " .. undedwN
- Chealth = undedwH * 2
- Cdamage = undedwA * 2
- CThealth = Chealth
- elseif Rmob >= 141 and Rmob <= 160 then
- Cname = "Strong " .. darkfairyN
- Chealth = darkfairyH * 2
- Cdamage = darkfairyA * 2
- CThealth = Chealth
- elseif Rmob >= 161 and Rmob <= 180 then
- Cname = "Strong " .. ogreN
- Chealth = ogreH * 2
- Cdamage = ogreA * 2
- CThealth = Chealth
- elseif Rmob >= 181 and Rmob <= 189 then
- Cname = "Strong " .. banditN
- Chealth = banditH * 2
- Cdamage = banditA * 2
- CThealth = Chealth
- elseif Rmob >= 190 and Rmob <= 200 then
- if math.random(0, 10) == 1 then
- Cname = "The weak Jim Bob"
- Chealth = crabH / 2
- Cdamage = crabA / 2
- CThealth = Chealth
- else
- Cname = crabN
- Chealth = crabH
- Cdamage = crabA
- CThealth = Chealth
- end
- end
- else
- if math.random(1, 10) <= 8 then
- if Rmob <= 40 then
- Cname = "Strong " .. slimeN
- Chealth = slimeH * 4
- Cdamage = slimeA * 4
- CThealth = Chealth
- elseif Rmob >= 41 and Rmob <= 70 then
- Cname = "Strong " .. bunnyN
- Chealth = bunnyH * 4
- Cdamage = bunnyA * 4
- CThealth = Chealth
- elseif Rmob <= 80 and Rmob >= 71 then
- Cname = "Strong " .. witchN
- Chealth = witchH * 4
- Cdamage = witchA * 4
- CThealth = Chealth
- elseif Rmob <= 98 and Rmob >= 81 then
- Cname = "Strong " .. ghostN
- Chealth = ghostH * 4
- Cdamage = ghostA * 4
- CThealth = Chealth
- elseif Rmob >= 99 and Rmob <= 100 then
- Cname = "Strong " .. babydN
- Chealth = babydH * 4
- Cdamage = babydA * 4
- CThealth = Chealth
- elseif Rmob >= 101 and Rmob <= 120 then
- Cname = "Strong " .. skeletonN
- Chealth = skeletonH * 4
- Cdamage = skeletonA * 4
- CThealth = Chealth
- elseif Rmob >= 121 and Rmob <= 140 then
- Cname = "Strong " .. undedwN
- Chealth = undedwH * 4
- Cdamage = undedwA * 4
- CThealth = Chealth
- elseif Rmob >= 141 and Rmob <= 160 then
- Cname = "Strong " .. darkfairyN
- Chealth = darkfairyH * 4
- Cdamage = darkfairyA * 4
- CThealth = Chealth
- elseif Rmob >= 161 and Rmob <= 180 then
- Cname = "Strong " .. ogreN
- Chealth = ogreH * 4
- Cdamage = ogreA * 4
- CThealth = Chealth
- elseif Rmob >= 181 and Rmob <= 189 then
- Cname = "Strong " .. banditN
- Chealth = banditH * 4
- Cdamage = banditA * 4
- CThealth = Chealth
- elseif Rmob >= 190 and Rmob <= 200 then
- if math.random(0, 10) == 1 then
- Cname = "The weak Jim Bob"
- Chealth = crabH / 2
- Cdamage = crabA / 2
- CThealth = Chealth
- else
- Cname = crabN
- Chealth = crabH
- Cdamage = crabA
- CThealth = Chealth
- end
- end
- elseif math.random(1, 2) == 1 then
- if Rmob <= 40 then
- Cname = slimeN
- Chealth = slimeH * 2
- Cdamage = slimeA * 2
- CThealth = Chealth
- elseif Rmob >= 41 and Rmob <= 70 then
- Cname = bunnyN
- Chealth = bunnyH * 2
- Cdamage = bunnyA * 2
- CThealth = Chealth
- elseif Rmob <= 80 and Rmob >= 71 then
- Cname = witchN
- Chealth = witchH * 2
- Cdamage = witchA * 2
- CThealth = Chealth
- elseif Rmob <= 98 and Rmob >= 81 then
- Cname = ghostN
- Chealth = ghostH * 2
- Cdamage = ghostA * 2
- CThealth = Chealth
- elseif Rmob >= 99 and Rmob <= 100 then
- Cname = babydN
- Chealth = babydH * 2
- Cdamage = babydA * 2
- CThealth = Chealth
- elseif Rmob >= 101 and Rmob <= 120 then
- Cname = skeletonN
- Chealth = skeletonH * 2
- Cdamage = skeletonA * 2
- CThealth = Chealth
- elseif Rmob >= 121 and Rmob <= 140 then
- Cname = undedwN
- Chealth = undedwH * 2
- Cdamage = undedwA * 2
- CThealth = Chealth
- elseif Rmob >= 141 and Rmob <= 160 then
- Cname = darkfairyN
- Chealth = darkfairyH * 2
- Cdamage = darkfairyA * 2
- CThealth = Chealth
- elseif Rmob >= 161 and Rmob <= 180 then
- Cname = ogreN
- Chealth = ogreH * 2
- Cdamage = ogreA * 2
- CThealth = Chealth
- elseif Rmob >= 181 and Rmob <= 200 then
- Cname = banditN
- Chealth = banditH * 2
- Cdamage = banditA * 2
- CThealth = Chealth
- end
- else
- if Rmob <= 40 then
- Cname = "Weak " .. slimeN
- Chealth = slimeH
- Cdamage = slimeA
- CThealth = Chealth
- elseif Rmob >= 41 and Rmob <= 70 then
- Cname = "Weak " .. bunnyN
- Chealth = bunnyH
- Cdamage = bunnyA
- CThealth = Chealth
- elseif Rmob <= 80 and Rmob >= 71 then
- Cname = "Weak " .. witchN
- Chealth = witchH
- Cdamage = witchA
- CThealth = Chealth
- elseif Rmob <= 98 and Rmob >= 81 then
- Cname = "Weak " .. ghostN
- Chealth = ghostH
- Cdamage = ghostA
- CThealth = Chealth
- elseif Rmob >= 99 and Rmob <= 100 then
- Cname = "Weak " .. babydN
- Chealth = babydH
- Cdamage = babydA
- CThealth = Chealth
- elseif Rmob >= 101 and Rmob <= 120 then
- Cname = "Weak " .. skeletonN
- Chealth = skeletonH
- Cdamage = skeletonA
- CThealth = Chealth
- elseif Rmob >= 121 and Rmob <= 140 then
- Cname = "Weak " .. undedwN
- Chealth = undedwH
- Cdamage = undedwA
- CThealth = Chealth
- elseif Rmob >= 141 and Rmob <= 160 then
- Cname = "Weak " .. darkfairyN
- Chealth = darkfairyH
- Cdamage = darkfairyA
- CThealth = Chealth
- elseif Rmob >= 161 and Rmob <= 180 then
- Cname = "Weak " .. ogreN
- Chealth = ogreH
- Cdamage = ogreA
- CThealth = Chealth
- elseif Rmob >= 181 and Rmob <= 200 then
- Cname = "Weak " .. banditN
- Chealth = banditH
- Cdamage = banditA
- CThealth = Chealth
- end
- end
- end
- end
- function attacks()
- Tdamage = 0
- print("what will you do")
- print("1) attack")
- print("2) run")
- ::attackstemp::
- option = io.read("*l")
- if option == nil then
- goto attackstemp
- end
- if option == "1" then
- print("select type of attack")
- print("1) light")
- print("2) heavy(takes 2 turns)")
- print("3) magic")
- if storyC >= 1 then
- print("4) rune magic")
- end
- option2 = io.read("*l")
- if option2 == "1" then
- --attack chance
- if math.random(0, 1000) <= 5 then
- print("your attack missed")
- os.sleep(2)
- else
- Chealth = Chealth - damage
- print("attack successfull!")
- os.sleep(0.5)
- print("you do " .. damage .. " damage!")
- Tdamage = Tdamage + damage
- os.sleep(2)
- if math.random(0, 100) <= 10 then
- TCdamage = damage * math.random(0.5, 2)
- print("The attack did more damage than expected!")
- os.sleep(2)
- print("you did an additional " .. TCdamage .. " damage!")
- os.sleep(2)
- Chealth = Chealth - TCdamage
- Tdamage = Tdamage + TCdamage
- end
- if randoN >= 5 then
- print("your sword suddenly became very light")
- os.sleep(2)
- print("you attack twice")
- os.sleep(1)
- print("you did an additional " .. damage .. " damage!")
- os.sleep(2)
- Chealth = Chealth - damage
- Tdamage = Tdamage + damage
- end
- end
- elseif option2 == "2" then
- print("choose a number betwwen 1-10")
- chosenN = io.read("*n")
- if chosenN >= 11 then
- print("error to high of number")
- os.sleep(2)
- print("for your insilence, your opponent will now attack")
- os.sleep(2)
- print("you should followed the rules")
- os.sleep(1)
- allowbattle = "false"
- else
- randoN = randoN - 2
- chosenN = chosenN - randoN
- if chosenN - chosenN == 0 then
- print("")
- else
- chosenN = chosenN * -1
- end
- if chosenN >= 0 and chosenN <= 1 then
- print("you swung you sword but did no damage!")
- os.sleep(1)
- print("instead you broke your wrist!")
- print("-10 health!")
- health = health - 10
- os.sleep(2)
- elseif chosenN >= 2 and chosenN <= 4 then
- Tdamage = 1 * damage
- print("you did " .. Tdamage .. " damage")
- elseif chosenN >= 5 and chosenN <= 8 then
- Tdamage = 2 * damage
- print("you did " .. Tdamage .. " damage")
- elseif chosenN >= 9 and chosenN <= 10 then
- Tdamage = 3 * damage
- print("you did " .. Tdamage .. " damage")
- else
- print("now thats alot of damage!")
- Tdamage = 4 * damage
- print("you did " .. Tdamage .. " damage")
- os.sleep(3)
- end
- end
- Chealth = Chealth - Tdamage
- elseif option2 == "3" then
- print("1) fireball -10 mana")
- print("2) freeze -10 mana")
- option3 = io.read("*l")
- if option3 == "1" then
- if mana <= 9 then
- print("you dont have enugh mana!")
- print("please wait to regain mana!")
- os.sleep(3)
- allowbattle = "false"
- else
- print("you cast fireball!")
- os.sleep(1)
- if Cname == ghostN then
- print("but nothing happens")
- mana = mana - 10
- else
- burning = magicAff * 2
- print("the enemy wil burn for " .. burning .. " turns")
- print("you do " .. magicAff .. " damage")
- Chealth = Chealth - magicAff
- Tdamage = Tdamage + magicAff
- os.sleep(3)
- mana = mana - 10
- end
- end
- elseif option3 == "2" then
- if mana <= 9 then
- print("you dont have enugh mana!")
- print("please wait to regain mana!")
- os.sleep(3)
- allowbattle = "false"
- else
- print("you cast freeze!")
- os.sleep(1)
- if Cname == ghostN or Cname == "Strong " .. ghostN or Cname == "Weak " .. ghostN then
- print("but nothing happens")
- mana = mana - 10
- else
- freezeing = magicAff * 2
- print("the enemy wil be frozen for " .. freezeing .. " turns")
- print("you do " .. magicAff / 2 .. " damage")
- Chealth = Chealth - magicAff / 2
- Tdamage = Tdamage + magicAff / 2
- os.sleep(3)
- mana = mana - 10
- end
- end
- end
- elseif option2 == "4" and storyC >= 1 then
- print("1) Void rune")
- if HwaterR == 1 then
- print("2) water rune (requires 10 mana to perform succsesfully")
- end
- option3 = io.read("*l")
- if option3 == "1" then
- print("you summon a black hole")
- os.sleep(3)
- print("it damages you as well!")
- os.sleep(3)
- print("you take " .. health / 4 .. " damage!")
- os.sleep(3)
- print("The black hole eats the " .. Cname .. " for breakfast!")
- os.sleep(4)
- health = health - health / 4
- Chealth = 0
- elseif option3 == "2" and HwaterR == 1 then
- if mana >= 10 then
- print("you summon life stealing water")
- os.sleep(3)
- print("it heals you by " .. Cdamage / 2 .. " Health!")
- os.sleep(3)
- print("it damages the " .. Cname .. " by " .. Cdamage * 2)
- health = health + Cdamage / 2
- Chealth = Chealth - Cdamage * 2
- Tdamage = Tdamage + Cdamage * 2
- print("it costs 20 mana!")
- mana = mana - 20
- else
- print("you soak the " .. Cname)
- os.sleep(3)
- print("it does nothing")
- end
- end
- end
- elseif option == "2" then
- amrunning = "true"
- elseif option == "adminOV" then
- adminpanelf()
- allowOattack = "false"
- else
- goto attackstemp
- end
- attackfunctionran = "true"
- end
- function prepbattle()
- canrun = "false"
- option = nil
- option2 = nil
- randoN = math.random(0, 10)
- runchance = math.random(1, 5)
- amrunning = "false"
- allowbattle = "true"
- attackfunctionran = "false"
- gpu.setBackground(0xff2020)
- end
- function slimecheck()
- if Cname == slimeN or Cname == "Strong " .. Cname then
- if math.random(1, 2) == 2 then
- os.execute("cls")
- print("The slime dropped a health potion")
- print("would you like to use it?")
- print("Y/n")
- option2 = io.read("*l")
- if option2 == "n" then
- print("thats to bad")
- else
- print("you have healed " .. runchance * 10 .. " health!")
- health = health + runchance * 10
- os.sleep(2)
- end
- end
- end
- end
- function runaway()
- if Cname == babydN and randoN >= 1 then
- print("the baby dragon breathes fire on you")
- os.sleep(2)
- print("-10 health")
- os.sleep(1)
- health = health - 10
- canrun = "false"
- elseif Cname == babydN then
- print("you got away")
- os.sleep(1)
- print("somehow....")
- os.sleep(3)
- canrun = "true"
- else
- if math.random(0, 10) <= 1 then
- os.execute("cls")
- print("you have succsesfully ran away!")
- os.sleep(2)
- canrun = "true"
- else
- os.execute("cls")
- print("you failed to run away!")
- if runchance == 1 then
- print("while running away you stubbed your toe!")
- print("-" .. 1 / ress .. " health")
- health = health - 1 / ress
- os.sleep(2)
- elseif runchance == 2 then
- print("while running away the " .. Cname .. " hit you from behind!")
- print("-" .. 2 / ress .. " health!")
- health = health - 2 / ress
- os.sleep(2)
- elseif runchance == 3 then
- print("while running away you slip on a banna peal")
- print("-" .. 1 / ress .. " health")
- health = health - 1 / ress
- os.sleep(2)
- elseif runchance == 4 then
- print("while running away you get distracted by a squirel")
- print("when you come to your senses " .. Cname .. " is right behind you!")
- os.sleep(3)
- end
- canrun = "false"
- os.sleep(2)
- end
- end
- end
- function townf()
- ::townbeg::
- os.execute("cls")
- print("you have entered the village of " .. Ctown)
- print("what would you like to do?")
- print("You currently have " .. coins .. " coins")
- print("1) blacksmith")
- print("2) go to a doctors")
- print("3) visit a rune master")
- print("4) goto village pond")
- print("5) visit cartographer")
- print("6) leave")
- option = io.read("*l")
- if option == "1" then
- os.execute("cls")
- print("You currently have " .. coins .. " coins")
- print("what would you like to buy?")
- print("1) weapon upgrades")
- print("2) back")
- option2 = io.read("*l")
- if option2 == "1" then
- print("that'l be 400 coins")
- print("y/n")
- option3 = io.read("*l")
- if option3 == "y" then
- if coins >= 400 then
- print("alrighty then")
- os.sleep(2)
- coins = coins - 400
- damage = damage + 1
- print("You obtained a better weapon!")
- os.sleep(2)
- print("+1 damage")
- os.sleep(0.5)
- print("your damage is now " .. damage)
- os.sleep(3)
- else
- print("you aint got enugh lad, sorry")
- os.sleep(2)
- end
- end
- goto townbeg
- elseif option2 == "2" then
- goto townbeg
- else
- goto townbeg
- end
- elseif option == "2" then
- os.execute("cls")
- print("You currently have " .. coins .. " coins")
- print("do you need some potions?")
- print("im afraid their 200 coins a bottle")
- print("y/n")
- option2 = io.read("*l")
- if option2 == "y" then
- if coins >= 200 then
- print("commin right up")
- os.sleep(2)
- coins = coins - 200
- health = health + 20
- print("you drank the potion")
- os.sleep(2)
- print("you have gained 20 health!")
- os.sleep(1)
- print("your health is now " .. health)
- else
- print("oh sorry, but you only have " .. coins)
- os.sleep(2)
- end
- elseif option2 == "n" then
- goto townbeg
- end
- goto townbeg
- elseif option == "3" then
- os.execute("cls")
- print("You currently have " .. coins .. " coins")
- print("you came for runes, right?")
- print("that'l be 800 coins")
- print("hope that aint a problem")
- print("y/n")
- option2 = io.read("*l")
- if option2 == "y" then
- if coins >= 800 then
- print("whatever, heres your rune")
- os.sleep(3)
- print("as he is handing you the rune it begins to glow")
- os.sleep(2)
- print("the rune gives you +1 resistance")
- os.sleep(2)
- ress = ress + 1
- print("your resistance is now " .. ress)
- os.sleep(2)
- goto townbeg
- else
- print("what are you trying to scam me with")
- print("only " .. coins .. " coins!?")
- print("get outa here!")
- os.sleep(4)
- goto townbeg
- end
- else
- goto townbeg
- end
- elseif option == "4" then
- if storyC == 1 then
- storyP2()
- goto townbeg
- end
- print("you walk toward the pond")
- if canfish == 0 then
- print("but theres nothing to do")
- os.sleep(2)
- print("you walk back to the village.")
- goto townbeg
- elseif canfish == 1 then
- print("you can fish")
- end
- goto townbeg
- elseif option == "5" then
- ::villageteller::
- print("You currently have " .. coins .. " coins")
- os.execute("cls")
- orandom = math.random(100, 300)
- print("ill lead you to a village if ya give some money")
- print("ill say " .. orandom .. " sound good?")
- print("y/N")
- option2 = io.read("*l")
- if option2 == "y" then
- print("ok then")
- coins = coins - orandom
- os.sleep(2)
- else
- goto townbeg
- end
- ::villagespin::
- orandom = math.random(1, 14)
- if orandom == 1 and BTtown1 == 0 then
- print("the village of Nevo is at")
- print("X = " .. town1X .. " Z = " .. town1Z)
- BTtown1 = 1
- os.sleep(2)
- elseif orandom == 2 and BTtown2 == 0 then
- print("the village of Zenus is at")
- print("X = " .. town2X .. " Z = " .. town2Z)
- BTtown2 = 1
- os.sleep(2)
- elseif orandom == 3 and BTtown3 == 0 then
- print("the village of Cilum is at")
- print("X = " .. town3X .. " Z = " .. town3Z)
- BTtown3 = 1
- os.sleep(2)
- elseif orandom == 4 and BTtown4 == 0 then
- print("the village of Bugendai is at")
- print("X = " .. town4X .. " Z = " .. town4Z)
- BTtown4 = 1
- os.sleep(2)
- elseif orandom == 5 and BTtown5 == 0 then
- print("the village of Kuruma is at")
- print("X = " .. town5X .. " Z = " .. town5Z)
- BTtown5 = 1
- os.sleep(2)
- elseif orandom == 6 and BTtown6 == 0 then
- print("the village of Tonbo is at")
- print("X = " .. town6X .. " Z = " .. town6Z)
- BTtown6 = 1
- os.sleep(2)
- elseif orandom == 7 and BTtown7 == 0 then
- print("the village of Doragon is at")
- print("X = " .. town7X .. " Z = " .. town7Z)
- BTtown7 = 1
- os.sleep(2)
- elseif orandom == 8 and BTtown8 == 0 then
- print("the village of Toripuru is at")
- print("X = " .. town8X .. " Z = " .. town8Z)
- BTtown8 = 1
- os.sleep(2)
- elseif orandom == 9 and BTtown9 == 0 then
- print("the village of Pagu is at")
- print("X = " .. town9X .. " Z = " .. town9Z)
- BTtown9 = 1
- os.sleep(2)
- elseif orandom == 10 and BTtown10 == 0 then
- print("the village of Topikia is at")
- print("X = " .. town10X .. " Z = " .. town10Z)
- BTtown10 = 1
- os.sleep(2)
- elseif orandom == 11 and BTtown11 == 0 then
- print("the village of Gamen is at")
- print("X = " .. town11X .. " Z = " .. town11Z)
- BTtown11 = 1
- os.sleep(2)
- elseif orandom == 12 and BTtown12 == 0 then
- print("the village of Kamu is at")
- print("X = " .. town12X .. " Z = " .. town12Z)
- BTtown12 = 1
- os.sleep(2)
- elseif orandom == 13 and BTtown13 == 0 then
- print("the village of Kita is at")
- print("X = " .. town13X .. " Z = " .. town13Z)
- BTtown13 = 1
- os.sleep(2)
- elseif orandom == 14 and BTtown14 == 0 then
- print("the village of Sarani is at")
- print("X = " .. town14X .. " Z = " .. town14Z)
- BTtown14 = 1
- os.sleep(2)
- else
- os.sleep(1)
- goto villagespin
- end
- goto townbeg
- else
- os.execute("cls")
- print("what direction would you like to go?")
- print("1) north -Z")
- print("2) east +X")
- print("3) south +Z")
- print("4) west -X")
- option = io.read("*l")
- if option == "1" then
- CordZ = CordZ - 1
- elseif option == "2" then
- CordX = CordX + 1
- elseif option == "3" then
- CordZ = CordZ + 1
- elseif option == "4" then
- CordX = CordX - 1
- end
- end
- end
- function oenemyattack()
- if burning >= 1 then
- print("the enemy is on fire! -" .. magicAff .. " health!")
- os.sleep(2)
- Chealth = Chealth - magicAff
- burning = burning - 1
- Tdamage = Tdamage + magicAff
- end
- if freezeing >= 1 then
- if math.random(1, 10) == 1 then
- icebreak = math.random(1, 5)
- print("the " .. Cname .. " is struggling")
- os.sleep(2)
- if icebreak >= freezeing then
- print("the " .. Cname .. " broke out of the ice!")
- os.sleep(2)
- freezeing = 0
- else
- print("the " .. Cname .. " broke a bit of the ice!")
- os.sleep(2)
- freezeing = freezeing - icebreak
- print("the ice will only hold for " .. freezeing .. " more turns")
- end
- else
- print("the enemy is frozen!")
- os.sleep(2)
- print("the enemy cant attack!")
- os.sleep(2)
- print("the enemy got hurt by frostbite!")
- os.sleep(2)
- print("-1 health")
- Chealth = Chealth - 1
- freezeing = freezeing - 1
- Tdamage = Tdamage + 1
- allowOattack = "false"
- end
- end
- print("you did a total of " .. Tdamage .. " damage!")
- os.sleep(3)
- print("")
- if Chealth <= 0 then
- allowOattack = "false"
- Cdead = "true"
- end
- if allowOattack == "true" then
- print("The " .. Cname .. " is trying to attack ")
- os.sleep(2)
- if math.random(1, 4) <= 2 then
- print("The attack landed!")
- print(Cdamage / ress .. " damage!")
- health = health - Cdamage / ress
- os.sleep(3)
- else
- print("the attack failed!")
- os.sleep(1)
- end
- end
- end
- function randomrune()
- if math.random(0, 100) <= 1 then
- os.execute("cls")
- gpu.setBackground(0x0042b5)
- os.execute("cls")
- print("while leaving the battle field you stumble across a glowing rune")
- os.sleep(3)
- print("it feels like its calling to you....")
- os.sleep(3)
- print("do you take it?")
- print("Y/n")
- option = io.read("*l")
- if option == n then
- print("oof")
- else
- ress = ress + 1
- os.execute("cls")
- print("you reach for the glowing object")
- os.sleep(3)
- print("you can hear a humming sound comming from it")
- os.sleep(3)
- os.execute("cls")
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xffffff)
- os.execute("cls")
- os.sleep(2)
- gpu.setBackground(0x0042b5)
- os.execute("cls")
- print("your resistance has gone up!")
- os.sleep(5)
- end
- end
- end
- function skelcheck()
- if Cname == skeletonN or Cname == "Strong " .. skeletonN then
- if math.random(1, 4) == 2 then
- os.execute("cls")
- print("The Skeleton dropped a weapon upgrade")
- print("would you like to use it?")
- print("Y/n")
- option = io.read("*l")
- if option == "n" then
- print("thats to bad")
- else
- print("your damage has increased by 2!")
- damage = damage + 1
- os.sleep(2)
- end
- end
- end
- end
- function allchecks()
- slimecheck()
- randomrune()
- skelcheck()
- banditcheck()
- end
- function banditcheck()
- if Cname == banditN then
- print("The bandit had a bag of coins on him.")
- os.sleep(1)
- print("+100 coins")
- coins = coins + 100
- os.sleep(3)
- end
- end
- function adminpanelf()
- gpu.setBackground(0x000000)
- os.execute("cls")
- print("1) add exp")
- print("2) add damage")
- print("3) add health")
- print("4) add resistance")
- print("5) add magical affinity")
- print("6) add coins")
- print("7) change coords")
- print("8) add total move distance")
- print("9) change level")
- print("10) coords of all towns")
- print("11) make towns known")
- print("12) summon unicorn")
- print("13) back")
- option = io.read("*l")
- if option == "1" then
- print("how much?")
- option = io.read("*n")
- exp = exp + option
- elseif option == "2" then
- print("how much?")
- option = io.read("*n")
- damage = damage + option
- elseif option == "3" then
- print("how much")
- option = io.read("*n")
- health = health + option
- elseif option == "4" then
- print("how much?")
- print("hint: dont go crazy. max 10")
- option = io.read("*n")
- ress = ress + option
- elseif option == "5" then
- print("how much?")
- option = io.read("*n")
- magicAff = magicAff + option
- elseif option == "6" then
- print("how much?")
- option = io.read("*n")
- coins = coins + option
- elseif option == "7" then
- print("CordX =")
- option = io.read("*n")
- CordX = option
- print("CordZ =")
- option = io.read("*n")
- CordZ = option
- elseif option == "8" then
- print("how much?")
- option = io.read("*n")
- Tmove = Tmove + option
- elseif option == "9" then
- print("to what?")
- option = io.read("*n")
- nedexp = option
- elseif option == "10" then
- print("cento x = 100 z = 100")
- print("Nevo x = " .. town1X .. " z = " .. town1Z)
- print("Zenus x = " .. town2X .. " z = " .. town2Z)
- print("Cilum x = " .. town3X .. " z = " .. town3Z)
- print("Bugendai x = " .. town4X .. " z = " .. town4Z)
- print("Kuruma x = " .. town5X .. " z = " .. town5Z)
- print("Tonbo x = " .. town6X .. " z = " .. town6Z)
- print("Doragon x = " .. town7X .. " z = " .. town7Z)
- print("Toripuru x = " .. town8X .. " z = " .. town8Z)
- print("Pagu x = " .. town9X .. " z = " .. town9Z)
- print("Topikia x = " .. town10X .. " z = " .. town10Z)
- print("Gamen x = " .. town11X .. " z = " .. town11Z)
- print("Kamu x = " .. town12X .. " z = " .. town12Z)
- print("Kita x = " .. town13X .. " z = " .. town13Z)
- print("Sarani x = " .. town14X .. " z = " .. town14Z)
- print("")
- print("press enter when done")
- option2 = io.read("*l")
- elseif option == "11" then
- print("which one?")
- print("1) Nevo")
- print("2) Zenus")
- print("3) Cilum")
- print("4) Bugendai")
- print("5) Kuruma")
- print("6) Tonbo")
- print("7) Doragon")
- print("8) Toripuru")
- print("9) Pagu")
- print("10) Topikia")
- print("11) Gamen")
- print("12) Kamu")
- print("13) Kita")
- print("14) Sarani")
- option2 = io.read("*l")
- if option2 == "1" then
- BTtown1 = 1
- elseif option2 == "2" then
- BTtown2 = 1
- elseif option2 == "3" then
- BTtown3 = 1
- elseif option2 == "4" then
- BTtown4 = 1
- elseif option2 == "5" then
- BTtown5 = 1
- elseif option2 == "6" then
- BTtown6 = 1
- elseif option2 == "7" then
- BTtown7 = 1
- elseif option2 == "8" then
- BTtown8 = 1
- elseif option2 == "9" then
- BTtown9 = 1
- elseif option2 == "10" then
- BTtown10 = 1
- elseif option2 == "11" then
- BTtown11 = 1
- elseif option2 == "12" then
- BTtown12 = 1
- elseif option2 == "13" then
- BTtown13 = 1
- elseif option2 == "14" then
- BTtown14 = 1
- end
- elseif option == "12" then
- unicornC()
- elseif option == "13" then
- admingohome = "true"
- end
- end
- function adminmove()
- if nedexp <= 9 then
- print("which mob should appear next?")
- print("1) slime 2) bunny 3)witch")
- print("4) ghost 5) baby dragon")
- option2 = io.read("*l")
- if option2 == "1" then
- Rmob = 80
- elseif option2 == "2" then
- Rmob = 84
- elseif option2 == "3" then
- Rmob = 160
- elseif option2 == "4" then
- Rmob = 164
- elseif option2 == "5" then
- Rmob = 198
- end
- mobspawnC = 1
- else
- print("which mob should appear next?")
- print("1) slime 2) bunny 3) witch")
- print("4) ghost 5) baby dragon")
- print("6) skeleton 7) Undead warrior")
- print("8) Dark fairy 9) Ogre")
- print("10) bandit ")
- print("11) garentee dungen(only level 10 and up!)")
- print("12) garentee ruin(only level 10 and up!)")
- print("13) Crab (only level 10 and up!)")
- option2 = io.read("*l")
- if option2 == "1" then
- Rmob = 40
- elseif option2 == "2" then
- Rmob = 41
- elseif option2 == "3" then
- Rmob = 80
- elseif option2 == "4" then
- Rmob = 98
- elseif option2 == "5" then
- Rmob = 99
- elseif option2 == "6" then
- Rmob = 101
- elseif option2 == "7" then
- Rmob = 121
- elseif option2 == "8" then
- Rmob = 141
- elseif option2 == "9" then
- Rmob = 161
- elseif option2 == "10" then
- Rmob = 181
- elseif option2 == "13" then
- Rmob = 190
- elseif option2 == "11" then
- dungenC = 1
- elseif option2 == "12" then
- dungenC = 2
- end
- mobspawnC = 1
- end
- end
- function attackstats()
- if mana <= maxmana - 1 then
- mana = mana + managen
- end
- if mana >= maxmana + 1 then
- mana = maxmana
- end
- TCdamage = 0
- icebreak = 0
- print(Cname .. " Has appeared")
- print("health = " .. Chealth)
- print("damage = " .. Cdamage)
- if burning >= 1 and freezeing >= 1 then
- print("FROSTBURN!")
- elseif burning >= 1 then
- print("BURNING!")
- elseif freezeing >= 1 then
- print("FROZEN!")
- end
- print("")
- print(name)
- print("health = " .. health)
- print("damage = " .. damage)
- print("mana: " .. mana .. " of " .. maxmana)
- print("")
- end
- function dungbossC()
- if math.random(1, 10) >= 5 then
- os.execute("cls")
- if randoN == 1 then
- print("so you defeated my minions huh?")
- os.sleep(4)
- print("I WILL MAKE YOU PAY!")
- os.sleep(1)
- print("[the ground begins to rumble as a big shadow starts to move in the distance]")
- os.sleep(4)
- randomm()
- Cname = "Huge " .. Cname
- Chealth = Chealth * 2
- elseif randoN == 2 then
- print("you dare cause so much ruckus?")
- os.sleep(4)
- print("i will kill you for waking me up!")
- os.sleep(4)
- randomm()
- Cname = "Mad " .. Cname
- Cdamage = Cdamage * 2
- else
- print("so what if you can kill my companions")
- os.sleep(4)
- print("that doesnt mean you wil make it out of here alive!")
- os.sleep(4)
- randomm()
- Cname = "Arrogant " .. Cname
- Cdamage = Cdamage * 1.5
- Chealth = Chealth * 1.5
- end
- ::bossB::
- prepbattle()
- os.execute("cls")
- deadcheck()
- attackstats()
- attacks()
- if amrunning == "true" then
- print("the monster wont allow it")
- os.sleep(2)
- end
- ::bossOB::
- if allowbattle == "false" then
- goto bossB
- end
- oenemyattack()
- if Cdead == "true" then
- goto bossEbattle
- end
- goto bossB
- ::bossEbattle::
- Cdead = "false"
- gpu.setBackground(0x949235)
- os.execute("cls")
- print("you defeted this " .. Cname)
- exp = exp + CThealth / 5
- print("you earned " .. exp .. " xp!")
- print("XP = " .. exp .. " of " .. nedexp)
- os.sleep(5)
- beatboss = "true"
- end
- end
- function deadcheck()
- if health <= 0 then
- gpu.setBackground(0xff0303)
- os.sleep(0.5)
- print("you have died!")
- os.sleep(2)
- print("thats sad")
- os.sleep(2)
- print("to load from last save type [launchAxium]")
- print("press enter to leave")
- option = io.read("*l")
- isdeadd = "true"
- end
- end
- function ruin()
- ::ruinstart::
- mobN = math.random(3, 10)
- TmobN = mobN
- os.execute("cls")
- print("you stumble across some ruins")
- print("you can see large golems protecting a chest")
- print("do you approach?")
- print("Y/n")
- option = io.read("*l")
- if option == "n" then
- print("you moved on, leaving the ruins behind")
- os.sleep(2)
- else
- ::RCheck::
- if mobN == 0 then
- Tcoin = TmobN * 20
- chesthealth = math.random(10, 50)
- chestdamage = math.random(2, 9)
- os.execute("cls")
- print("Congrats!")
- os.sleep(1)
- print("you beat the ruin!")
- os.sleep(1)
- print("you got " .. Tcoin .. " coins from monsters!")
- os.sleep(2)
- print("you open the chest in the center of the ruins")
- os.sleep(2)
- print("there are 1,000 coins and " .. chestdamage .. " damage upgrades!")
- os.sleep(2)
- print("and have healed " .. chesthealth .. " health")
- os.sleep(2)
- print("thats " .. Tcoin + 1000 .. " coins!")
- os.sleep(1)
- coins = coins + Tcoin
- coins = coins + 1000
- health = health + chesthealth
- damage = damage + chestdamage
- ruindefeated = "true"
- end
- burning = 0
- freezeing = 0
- if ruindefeated == "false" then
- Cname = "Gaurdian"
- Chealth = 70
- Cdamage = 10
- print("it looks like there are " .. mobN .. " " .. Cname .. "s")
- os.sleep(3)
- ::Rbattle::
- prepbattle()
- os.execute("cls")
- deadcheck()
- attackstats()
- attacks()
- if isdead == "true" then
- goto Rend
- end
- if attackfunctionran == "false" then
- goto Rbattle
- end
- if amrunning == "true" then
- goto RAttackrun
- end
- ::Robattle::
- if burning >= 1 or freezeing >= 1 then
- if math.random(1, 4) == 1 then
- print("The golem is trying to cast [purify]")
- os.sleep(2)
- if math.random(1, 2) == 1 then
- print("The golem succeeded!")
- os.sleep(2)
- freezeing = 0
- burning = 0
- else
- print("the golem failed!")
- os.sleep(2)
- end
- allowbattle = "false"
- end
- end
- if allowbattle == "false" then
- goto Rbattle
- end
- oenemyattack()
- if Cdead == "true" then
- goto Rendbattle
- end
- goto Rbattle
- ::RAttackrun::
- runaway()
- if canrun == "true" then
- goto Rend
- else
- goto Robattle
- end
- ::Rendbattle::
- Cdead = "false"
- mobN = mobN - 1
- gpu.setBackground(0x949235)
- os.execute("cls")
- print("you defeted this " .. Cname)
- exp = exp + CThealth / 10
- print("you earned " .. CThealth / 10 .. " xp!")
- print("XP = " .. exp .. " of " .. nedexp)
- print("you wont level up until you defeat the ruin")
- os.sleep(5)
- allchecks()
- goto RCheck
- end
- end
- ::Rend::
- end
- function storyF()
- if storyC == 0 and Ctown == "ellik" then
- os.execute("cls")
- gpu.setBackground(0xDDC86C)
- print("you walk into the village only to be immediately greeted by a stranger.")
- os.sleep(4)
- print("[?????] i havent seen you around here before.")
- os.sleep(3)
- print("[?????] and we dont get many visitors around here...")
- os.sleep(4)
- print("[?????] who are you?")
- os.sleep(2)
- print("")
- print("1) tell him your name")
- print("2) walk away")
- option = io.read("*l")
- if option == "1" then
- os.execute("cls")
- print("you walk into the village only to be immediately greeted by a stranger.")
- print("[?????] i havent seen you around here before.")
- print("[?????] and we dont get many visitors around here...")
- print("[?????] who are you?")
- os.sleep(2)
- print("[you] My name is " .. name)
- os.sleep(2)
- print("[you] and if i may ask, who are you?")
- os.sleep(3)
- print("[?????] My name is Chuck.")
- os.sleep(3)
- os.execute("cls")
- print("you walk into the village only to be immediately greeted by a stranger.")
- print("[Chuck] i havent seen you around here before.")
- print("[Chuck] and we dont get many visitors around here...")
- print("[Chuck] who are you?")
- print("[you] My name is " .. name)
- print("[you] and if i may ask, who are you?")
- print("[Chuck] My name is Chuck.")
- os.sleep(2)
- print("[Chuck] Im the rune master here in this village")
- os.sleep(3)
- print("[you] could you tell me where i am?")
- os.sleep(2)
- print("[you] i cant remember anything. I remember wanting to find some...")
- os.sleep(3)
- print("[you] something. i cant remember what it was")
- os.sleep(3)
- print("[Chuck] crystals?")
- os.sleep(2)
- print("[Chuck] maybe.... runes?")
- os.sleep(2)
- print("[you] Thats it!")
- os.sleep(2)
- print("[you] i wanted runes for something")
- os.sleep(2)
- print("[you] i cant remember what for..")
- os.sleep(3)
- print("[Chuck] Come, follow me to my lab.")
- os.sleep(1)
- print("you and chuck walk together toward his labortory")
- os.sleep(5)
- os.execute("cls")
- print("[Chuck] so you cant remeber anything huh?")
- os.sleep(3)
- print("[Chuck] ya know when if first encountered the void rune...")
- os.sleep(3)
- print("[Chuck] i was knocked out for a week! i couldnt remeber anything when i woke up")
- os.sleep(4)
- print("[Chuck] im still woking on remebering the-")
- os.sleep(3)
- os.execute("cls")
- gpu.setBackground(0x7F1EDB)
- os.execute("cls")
- os.sleep(4)
- gpu.setBackground(0x005050)
- os.execute("cls")
- print("Chuck is taken back, he has an exsaperated look on him")
- os.sleep(3)
- print("[Chuck] wha-what? its never done that before.")
- os.sleep(3)
- print("[Chuck] you must be very special")
- os.sleep(3)
- print("[Chuck] take this, i dont know why. i just feel like i should give it to you")
- os.sleep(5)
- print("[you] o-ok, thank you?")
- os.sleep(3)
- print("you take the glowing rune and put it in your pocket")
- os.sleep(3)
- os.execute("cls")
- print("[Chuck] you should check out the lake... you kinda stink")
- os.sleep(5)
- elseif option == "2" then
- print("you try to walk away but am blocked by guards")
- os.sleep(4)
- print("[?????] WHO ARE YOU!?")
- os.sleep(4)
- print("[you] M-My name is " .. name)
- os.sleep(2)
- print("[you] who are you?")
- os.sleep(3)
- print("[?????] My name is Chuck.")
- os.sleep(3)
- os.execute("cls")
- print("you walk into the village only to be immediately greeted by a stranger.")
- print("[Chuck] i havent seen you around here before.")
- print("[Chuck] and we dont get many visitors around here...")
- print("[Chuck] who are you?")
- print("[you] My name is " .. name)
- print("[you] and if i may ask, who are you?")
- print("[Chuck] My name is Chuck.")
- os.sleep(2)
- print("[Chuck] Im the rune master here in this village")
- os.sleep(3)
- print("[you] could you tell me where i am?")
- os.sleep(2)
- print("[you] i cant remember anything i remember wanting to find some...")
- os.sleep(3)
- print("[you] something. i cant remember what it was")
- os.sleep(3)
- print("[Chuck] crystals?")
- os.sleep(2)
- print("[Chuck] maybe.... runes?")
- os.sleep(2)
- print("[you] Thats it!")
- os.sleep(2)
- print("[you] i wanted runes for something")
- os.sleep(2)
- print("[you] i cant remeber what for..")
- os.sleep(3)
- print("[Chuck] Come, follow me to my lab.")
- os.sleep(1)
- print("you and chuck walk together toward his labortory")
- os.sleep(5)
- os.execute("cls")
- print("[Chuck] so you cant remeber anything huh?")
- os.sleep(3)
- print("[Chuck] ya know when if first encountered the void rune...")
- os.sleep(3)
- print("[Chuck] i was knocked out for a week! i couldnt remeber anything when i woke up")
- os.sleep(4)
- print("[Chuck] im still woking on remebering the-")
- os.sleep(3)
- os.execute("cls")
- gpu.setBackground(0x7F1EDB)
- os.execute("cls")
- os.sleep(4)
- gpu.setBackground(0x005050)
- os.execute("cls")
- print("Chuck is taken back, he has an exsaperated look on him")
- os.sleep(3)
- print("[Chuck] wha-what? its never done that before.")
- os.sleep(3)
- print("[Chuck] you must be very special")
- os.sleep(3)
- print("[Chuck] take this, i dont know why. i just feel like i should give it to you")
- os.sleep(5)
- print("[you] o-ok, thank you?")
- os.sleep(3)
- print("you take the glowing rune and put it in your pocket")
- os.sleep(3)
- os.execute("cls")
- print("[Chuck] you should check out the lake... you kinda stink")
- os.sleep(5)
- end
- print("--Obtained Void Rune--")
- HvoidR = 1
- os.sleep(3)
- storyC = 1
- end
- end
- function storyP2()
- print("you walk toward the lake")
- os.sleep(2)
- print("as you walk toward the lake you see the water ripple")
- os.sleep(4)
- print("out from the water comes a Leviathan")
- os.sleep(3)
- print("he just stands there.")
- os.sleep(3)
- print("what should you do?")
- os.sleep(1)
- print("")
- print("1) introduce yourself")
- print("2) draw your weapon")
- option2 = io.read("*l")
- if option2 == "1" then
- os.execute("cls")
- print("[you] e-excuse me uh sir?")
- os.sleep(3)
- print("[you] m-my na-name is " .. name)
- os.sleep(3)
- print("[you] who ar-are you?")
- os.sleep(2)
- print("[Leviathan] HAHAHAHAHAHAHA")
- os.sleep(2)
- print("[Leviathan] who would have throught you have the heart of a warrior?")
- os.sleep(2)
- print("[Leviathan] I am the water rune gaurdian")
- os.sleep(3)
- print("[Leviathan] I was created by the gods to protect this rune")
- os.sleep(4)
- print("[Leviathan] that was until i met a true warrior.")
- os.sleep(3)
- print("[you] im sorry... what!?")
- os.sleep(2)
- print("*Leviathan completely ignores you*")
- os.sleep(2)
- print("[Leviathan] I guess i am to give you this.")
- os.sleep(3)
- print("a glowing rock floats toward you")
- os.sleep(2)
- print("--Obtained Water Rune--")
- os.sleep(3)
- HwaterR = 1
- else
- os.execute("cls")
- print("the Leviathan notices your movements and soaks you in water")
- os.sleep(4)
- print("[you] e-excuse me uh sir?")
- os.sleep(3)
- print("[you] m-my na-name is " .. name)
- os.sleep(3)
- print("[you] who ar-are you?")
- os.sleep(2)
- print("[Leviathan] HAHAHAHAHAHAHA")
- os.sleep(2)
- print("[Leviathan] who would have throught you have the heart of a warrior?")
- os.sleep(2)
- print("[Leviathan] I am the water rune gaurdian")
- os.sleep(3)
- print("[Leviathan] I was created by the gods to protect this rune")
- os.sleep(4)
- print("[Leviathan] that was until i met a true warrior.")
- os.sleep(3)
- print("[you] im sorry... what!?")
- os.sleep(2)
- print("*Leviathan completely ignores you*")
- os.sleep(2)
- print("[Leviathan] I guess i am to give you this.")
- os.sleep(3)
- print("a glowing rock floats toward you")
- os.sleep(2)
- print("--Obtained Water Rune--")
- os.sleep(3)
- HwaterR = 1
- end
- storyC = 2
- end
- function unicornC()
- gpu.setBackground(0x949235)
- os.execute("cls")
- os.sleep(2)
- print("while walking a unicorn appears!")
- os.sleep(2)
- print("its surrounded by birds and fauna")
- os.sleep(2)
- print("you once heard a rumor.")
- os.sleep(2)
- print("ask it anything and your wish will be granted 10 times over")
- os.sleep(2)
- print("1) ask for health")
- print("2) ask to increase damage")
- print("3) ask to increase magic affinity")
- print("4) ask to increase mana management")
- print("5) ask for experience")
- option = io.read("*l")
- if option == "1" then
- os.execute("cls")
- print("the unicorn grants 180 health!")
- health = health + 180
- print("health is now " .. health)
- os.sleep(2)
- elseif option == "2" then
- os.execute("cls")
- print("the unicorn grants 5 damage!")
- damage = damage + 5
- print("damage is now " .. damage)
- os.sleep(2)
- elseif option == "3" then
- os.execute("cls")
- print("the unicorn grants 8 magic affinity")
- magicAff = magicAff + 8
- print("magic affinity is now " .. magicAff)
- os.sleep(3)
- elseif option == "4" then
- os.execute("cls")
- print("the unicorn increases maximum mana by 5")
- os.sleep(2)
- maxmana = maxmana + 5
- print("maximum mana is now " .. maxmana)
- os.sleep(2)
- print("increasing mana generation by 2.5")
- os.sleep(2)
- managen = managen + 2.5
- print("mana generation is now " .. managen)
- os.sleep(2)
- elseif option == "5" then
- os.execute("cls")
- print("the unicorn grants " .. nedexp * 4 .. " XP!")
- exp = exp + nedexp * 4
- os.sleep(3)
- else
- print("you leave the unicorn behind")
- end
- end
- function dragonDF()
- if math.random(1, 2) == 1 then
- Cname = "Ice Dragon"
- Cdamage = 50
- if health >= 200 then
- Chealth = health * 2
- else
- Chealth = 400
- end
- else
- Cname = "Fire Dragon"
- Cdamage = 50
- if health >= 200 then
- Chealth = health * 2
- else
- Chealth = 400
- end
- end
- CThealth = Chealth
- ::DragonB::
- prepbattle()
- os.execute("cls")
- deadcheck()
- attackstats()
- attacks()
- if amrunning == "true" then
- print("the monster wont allow it")
- os.sleep(2)
- end
- ::DragonOB::
- if allowbattle == "false" then
- goto DragonB
- end
- oenemyattack()
- if Cdead == "true" then
- goto DragonEbattle
- end
- goto DragonB
- ::DragonEbattle::
- Cdead = "false"
- gpu.setBackground(0x949235)
- os.execute("cls")
- print("you defeted this " .. Cname)
- exp = exp + CThealth / 5
- print("you earned " .. exp .. " xp!")
- print("XP = " .. exp .. " of " .. nedexp)
- os.sleep(5)
- end
- ::home::
- beatboss = "false"
- mana = maxmana
- admingohome = "false"
- Cdead = "false"
- burning = 0
- freezeing = 0
- endsceneC = math.random(0, 100)
- runchance = math.random(1, 4)
- Rmob = math.random(0, 200)
- mobspawnC = math.random(0, 150)
- dungenC = math.random(0, 200)
- gpu.setBackground(0x005050)
- if exp >= nedexp then
- goto lvlup
- end
- os.execute("cls")
- print("Axium V" .. version)
- print("Welcome " .. name .. "!")
- print("Stats:")
- print("coins = " .. coins)
- print("X = " .. CordX .. " Z = " .. CordZ)
- print("Health = " .. health)
- print("Physical Damage = " .. damage)
- print("Magic affinity = " .. magicAff)
- print("Max mana = " .. maxmana)
- print("Mana generation = " .. managen)
- print("resistance = " .. ress)
- print("XP = " .. exp .. " of " .. nedexp)
- print("")
- print("what would you like to do?")
- print("1) move")
- print("2) remeber")
- print("3) inventory")
- print("4) save")
- print("5) update game")
- print("6) quit and save")
- option = io.read("*l")
- if option == "1" then
- goto move
- elseif option == "2" then
- goto rememberss
- elseif option == "3" then
- goto inventory
- elseif option == "4" then
- os.execute("saveAxium")
- os.sleep(2)
- goto home
- elseif option == "5" then
- goto update
- elseif option == "6" then
- os.execute("saveAxium")
- goto theend
- elseif option == "adminOV" then
- goto adminpanel
- else
- goto home
- end
- ::inventory::
- os.execute("cls")
- print("you have:")
- if HfireR == 1 then
- print("Fire Rune")
- end
- if HwaterR == 1 then
- print("Water Rune")
- end
- if HairR == 1 then
- print("Air Rune")
- end
- if HearthR == 1 then
- print("Earth Rune")
- end
- if HvoidR == 1 then
- print("Void Rune")
- end
- if HarcR == 1 then
- print("Arc Rune")
- end
- if HcheekR == 1 then
- print("Cheek Rune")
- end
- if HlightningR == 1 then
- print("Lightning Rune")
- end
- if HmetalR == 1 then
- print("Metal Rune")
- end
- if HwoodR == 1 then
- print("Wood Rune")
- end
- if HaxiumR == 1 then
- print("Axium Rune")
- end
- print("")
- print("press enter to go back")
- option = io.read("*l")
- goto home
- ::rememberss::
- os.execute("cls")
- print("current story objectives:")
- if storyC == 0 then
- print("Make your way to the town of Ellik")
- elseif storyC == 1 then
- print("Make your way to a village pond")
- else
- print("no current objectives")
- end
- print("")
- print("known towns:")
- print("Cento: X = 100 Z = 100")
- print("ellik: X= -50 Z = -50")
- if BTtown1 == 1 then
- print("Nevo: X = " .. town1X .. " Z = " .. town1Z)
- end
- if BTtown2 == 1 then
- print("Zenus: X = " .. town2X .. " Z = " .. town2Z)
- end
- if BTtown3 == 1 then
- print("Cilum: X = " .. town3X .. " Z = " .. town3Z)
- end
- if BTtown4 == 1 then
- print("Bugendai: X = " .. town4X .. " Z = " .. town4Z)
- end
- if BTtown5 == 1 then
- print("Kuruma: X = " .. town5X .. " Z = " .. town5Z)
- end
- if BTtown6 == 1 then
- print("Tonbo: X = " .. town6X .. " Z = " .. town6Z)
- end
- if BTtown7 == 1 then
- print("Doragon: X = " .. town7X .. " Z = " .. town7Z)
- end
- if BTtown8 == 1 then
- print("Toripuru: X = " .. town8X .. " Z = " .. town8Z)
- end
- if BTtown9 == 1 then
- print("Pagu: X = " .. town9X .. " Z = " .. town9Z)
- end
- if BTtown10 == 1 then
- print("Topikia: X = " .. town10X .. " Z = " .. town10Z)
- end
- if BTtown11 == 1 then
- print("Gamen: X = " .. town11X .. " Z = " .. town11Z)
- end
- if BTtown12 == 1 then
- print("Kamu: X = " .. town12X .. " Z = " .. town12Z)
- end
- if BTtown13 == 1 then
- print("Kita: X = " .. town13X .. " Z = " .. town13Z)
- end
- if BTtown14 == 1 then
- print("Sarani: X = " .. town14X .. " Z = " .. town14Z)
- end
- print("")
- print("press any key to go back")
- option2 = io.read("*l")
- goto home
- ::adminpanel::
- adminpanelf()
- if admingohome == "true" then
- goto home
- else
- goto adminpanel
- end
- ::move::
- coins = coins + 1
- os.execute("cls")
- print("what direction would you like to go?")
- print("1) north -Z")
- print("2) east +X")
- print("3) south +Z")
- print("4) west -X")
- option = io.read("*l")
- if option == "1" then
- CordZ = CordZ - 1
- goto chance
- elseif option == "2" then
- CordX = CordX + 1
- goto chance
- elseif option == "3" then
- CordZ = CordZ + 1
- goto chance
- elseif option == "4" then
- CordX = CordX - 1
- elseif option == "adminOV" then
- adminmove()
- goto move
- else
- goto move
- end
- if math.random(0, 1000) == 500 then
- unicornC()
- end
- ::chance::
- Tmove = Tmove + 1
- if nedexp >= 9 and dungenC == 1 then
- goto dungen
- end
- if nedexp >= 9 and dungenC == 2 then
- ruin()
- if isdead == "true" then
- goto theend
- end
- end
- if CordX == 100 and CordZ == 100 then
- Ctown = "Cento"
- townf()
- BTcento = 1
- goto home
- elseif CordX == -50 and CordZ == -50 then
- Ctown = "ellik"
- storyF()
- townf()
- BTellik = 1
- goto home
- elseif CordX == town1X and CordZ == town1Z then
- Ctown = "Nevo"
- townf()
- BTtown1 = 1
- goto home
- elseif CordX == town2X and CordZ == town2Z then
- Ctown = "Zenus"
- townf()
- BTtown2 = 1
- goto home
- elseif CordX == town3X and CordZ == town3Z then
- Ctown = "Cilum"
- townf()
- BTtown3 = 1
- goto home
- elseif CordX == town4X and CordZ == town4Z then
- Ctown = "Bugendai"
- townf()
- BTtown4 = 1
- goto home
- elseif CordX == town5X and CordZ == town5Z then
- Ctown = "Kuruma"
- townf()
- BTtown5 = 1
- goto home
- elseif CordX == town6X and CordZ == town6Z then
- Ctown = "Tonbo"
- townf()
- BTtown6 = 1
- goto home
- elseif CordX == town7X and CordZ == town7Z then
- Ctown = "Doragon"
- townf()
- BTtown7 = 1
- goto home
- elseif CordX == town8X and CordZ == town8Z then
- Ctown = "Toripuru"
- townf()
- BTtown8 = 1
- goto home
- elseif CordX == town9X and CordZ == town9Z then
- Ctown = "Pagu"
- townf()
- BTtown9 = 1
- goto home
- elseif CordX == town10X and CordZ == town10Z then
- Ctown = "Topikia"
- townf()
- BTtown10 = 1
- goto home
- elseif CordX == town11X and CordZ == town11Z then
- Ctown = "Gamen"
- townf()
- BTtown11 = 1
- goto home
- elseif CordX == town12X and CordZ == town12Z then
- Ctown = "Kamu"
- townf()
- BTtown12 = 1
- goto home
- elseif CordX == town13X and CordZ == town13Z then
- Ctown = "Kita"
- townf()
- BTtown13 = 1
- goto home
- elseif CordX == town14X and CordZ == town14Z then
- Ctown = "Sarani"
- townf()
- BTtown14 = 1
- goto home
- end
- --mob appear chance
- if mobspawnC <= 50 then
- print("50!")
- randomm()
- else
- goto home
- end
- ::battle::
- prepbattle()
- os.execute("cls")
- Tdamage = 0
- allowOattack = "true"
- if health <= 0 then
- gpu.setBackground(0xff0303)
- os.sleep(0.5)
- print("you have died!")
- os.sleep(2)
- print("thats sad")
- os.sleep(2)
- print("final coins = " .. coins)
- print("press enter to leave")
- option = io.read("*l")
- goto compbeg
- end
- attackstats()
- attacks()
- if attackfunctionran == "false" then
- goto battle
- end
- if amrunning == "true" then
- goto Attackrun
- end
- ::obattle::
- if allowbattle == "false" then
- goto battle
- end
- oenemyattack()
- if Cdead == "true" then
- goto endbattle
- end
- goto battle
- ::Attackrun::
- runaway()
- if canrun == "true" then
- goto home
- else
- goto obattle
- end
- ::endbattle::
- gpu.setBackground(0x949235)
- os.execute("cls")
- print("you win!")
- print("you got 10 coins")
- exp = exp + CThealth / 10
- coins = coins + 10
- print("you earned " .. CThealth / 10 .. " xp!")
- print("XP = " .. exp .. " of " .. nedexp)
- os.sleep(2)
- allchecks()
- ::lvlup::
- gpu.setBackground(0x949235)
- os.execute("cls")
- if exp >= nedexp then
- print("you have leveled up!")
- print("1) increase health")
- print("2) increase damage")
- print("3) increase magic affinity")
- print("4) increase mana management")
- option = io.read("*l")
- if option == "1" then
- os.execute("cls")
- print("adding 10 health")
- health = health + 10
- print("health is now " .. health)
- os.sleep(2)
- elseif option == "2" then
- os.execute("cls")
- print("adding 1 damage!")
- damage = damage + 1
- print("damage is now " .. damage)
- os.sleep(2)
- elseif option == "3" then
- os.execute("cls")
- print("increasing magic affinity by 1!")
- magicAff = magicAff + 1
- print("magic affinity is now " .. magicAff)
- os.sleep(3)
- elseif option == "4" then
- os.execute("cls")
- print("increasing maximum mana by 1")
- os.sleep(2)
- maxmana = maxmana + 1
- print("maximum mana is now " .. maxmana)
- os.sleep(2)
- print("increasing mana generation by 0.5")
- os.sleep(2)
- managen = managen + 0.5
- print("mana generation is now " .. managen)
- os.sleep(2)
- else
- goto lvlup
- end
- exp = exp - nedexp
- nedexp = nedexp + 1
- end
- goto home
- ::dungen::
- mobN = math.random(1, 10)
- TmobN = mobN
- os.execute("cls")
- print("you stumble across a cave entrance")
- print("you can see movement in the cave")
- print("do you enter?")
- print("Y/n")
- option = io.read("*l")
- if option == "n" then
- print("you moved on, leaving the cave behind")
- os.sleep(2)
- goto home
- end
- ::DCheck::
- if mobN == 0 then
- dungbossC()
- Tcoin = TmobN * 20
- os.execute("cls")
- print("Congrats!")
- os.sleep(1)
- print("you beat the dungen!")
- os.sleep(1)
- print("you got " .. Tcoin .. " coins from monsters!")
- os.sleep(2)
- if beatboss == "true" then
- print("you also defeated the dungeon boss!")
- os.sleep(2)
- print("+200 coins")
- Tcoin = Tcoin + 200
- os.sleep(2)
- end
- burning = 0
- freezeing = 0
- print("and got an additional 300 coins for defeting the dungen!")
- os.sleep(2)
- print("thats " .. Tcoin + 300 .. " coins!")
- os.sleep(3)
- coins = coins + Tcoin
- coins = coins + 300
- goto home
- end
- randomm()
- print("it looks like there are " .. mobN .. " " .. Cname .. "s")
- os.sleep(2)
- ::Dbattle::
- prepbattle()
- os.execute("cls")
- deadcheck()
- if isdeadd == "true" then goto theend end
- attackstats()
- attacks()
- if isdead == "true" then
- goto theend
- end
- if attackfunctionran == "false" then
- goto Dbattle
- end
- if amrunning == "true" then
- goto DAttackrun
- end
- ::Dobattle::
- if allowbattle == "false" then
- goto Dbattle
- end
- oenemyattack()
- if Cdead == "true" then
- goto Dendbattle
- end
- goto Dbattle
- ::DAttackrun::
- runaway()
- if canrun == "true" then
- goto home
- else
- goto Dobattle
- end
- ::Dendbattle::
- Cdead = "false"
- mobN = mobN - 1
- gpu.setBackground(0x949235)
- os.execute("cls")
- print("you defeted this " .. Cname)
- exp = exp + CThealth / 10
- print("you earned " .. CThealth / 10 .. " xp!")
- print("XP = " .. exp .. " of " .. nedexp)
- print("you wont level up until you defeat the dungen")
- os.sleep(5)
- allchecks()
- goto DCheck
- ::update::
- os.execute("pastebin get -f MJ3aqGp9 Axium")
- os.execute("pastebin get -f WhpDBZYF saveAxium")
- os.execute("pastebin get -f RCgPgtE4 launchAxium")
- print("type [Axium] to start playing")
- os.execute("saveAxium")
- ::theend::
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement