Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Mob: Buckley
- local BuckleyName = Buckley
- local BuckleyH = 40000
- local BuckleyA = 500
- local BuckleyS1Dam = math.random(1,20) * 350
- local BuckleyS1Atri = Steel
- local BuckleyS1Area = false
- local BuckleyS1Name = SilverRiver
- local BuckleyS2Dam = 3000
- local BuckleyS2Atri = Steel
- local BuckleyS2Area = false
- local BuckleyS2Name = ShiningSilver
- local BuckleyAttribute = Steel
- --Mob: Angeling
- local AngelingName = Angeling
- local AngelingH = 8000
- local AngelingA = 200
- local AngelingS1Dam = 450
- local AngelingS1Atri = Light
- local AngelingS1Area = false
- local AngelingS1Name = LexAeterna
- local AngelingS2Dam = 600
- local AngelingS2Atri = Light
- local AngelingS2Area = true
- local AngelingS2Name = KyrieEleison
- local AngelingS3Dam = 300
- local AngelingS3Atri = Normal
- local AngelingS3Area = false
- local AngelingS3Name = Tackle
- local AngelingAttribute = Light
- --Main Collection--
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- clear()
- --First Player Info
- function Head()
- print ("RPG A.I v1.0:")
- print ()
- end
- function FirstCollect()
- Head()
- print ("First player name: ")
- local first = read()
- print ("Total Health: ")
- local firstHP = read()
- print ("Total Mana: ")
- local firstMP = read()
- print ("Attack Base: ")
- local firstATK = read()
- print ("Intelligence: ")
- local firstINT = read()
- print ("Luck: ")
- local firstLuck = read()
- sleep(1)
- clear()
- end
- --Second Player Info
- function SecondCollect()
- Head()
- print ("Second player name: ")
- local second = read()
- print ("Total Health: ")
- local secondHP = read()
- print ("Total Mana: ")
- local secondMP = read()
- print ("Attack Base: ")
- local secondATK = read()
- print ("Intelligence: ")
- local secondINT = read()
- print ("Luck: ")
- local secondLuck = read()
- sleep(1)
- clear()
- end
- --Third Player Info
- function ThirdCollect()
- Head()
- print ("Third player name: ")
- local third = read()
- print ("Total Health: ")
- local thirdHP = read()
- print ("Total Mana: ")
- local thirdMP = read()
- print ("Attack Base: ")
- local thirdATK = read()
- print ("Intelligence: ")
- local thirdINT = read()
- print ("Luck: ")
- local thirdLuck = read()
- sleep(1)
- clear()
- end
- function PrintThirdInfo()
- print (third.." Info:")
- print ()
- print ("HP: "..thirdHP)
- print ("MP: "..thirdMP)
- print ("ATK: "..thirdATK)
- print ("INT: "..thirdINT)
- print ("Luck: "..thirdLuck)
- print ()
- sleep(1)
- print ("Everything correct?")
- local thirdCorrect = read()
- if thirdCorrect == "Yes" then
- print ("Done.")
- sleep(2)
- clear()
- elseif thirdCorrect == "No" then
- print ("Correct what you need.")
- ThirdCollect()
- end
- end
- function PrintSecondInfo()
- print (second.." Info:")
- print ()
- print ("HP: "..secondHP)
- print ("MP: "..secondMP)
- print ("ATK: "..secondATK)
- print ("INT: "..secondINT)
- print ("Luck: "..secondLuck)
- print ()
- sleep(1)
- print ("Everything correct?")
- local secondCorrect = read()
- if secondCorrect == "Yes" then
- print ("Ok, next")
- sleep(2)
- clear()
- elseif secondCorrect == "No" then
- print ("Correct what you need.")
- SecondCollect()
- end
- end
- function PrintFirstInfo()
- print (first.." Info:")
- print ()
- print ("HP: "..firstHP)
- print ("MP: "..firstMP)
- print ("ATK: "..firstATK)
- print ("INT: "..firstINT)
- print ("Luck: "..firstLuck)
- print ()
- sleep(1)
- print ("Everything correct?")
- local firstCorrect = read()
- if firstCorrect == "Yes" then
- print ("Ok, next")
- sleep(2)
- clear()
- elseif firstCorrect == "No" then
- print ("Correct what you need.")
- FirstCollect()
- end
- end
- FirstCollect()
- SecondCollect()
- ThirdCollect()
- PrintFirstInfo()
- PrintSecondInfo()
- PrintThirdInfo()
- print ("Info collected!")
- sleep(1)
- --PlayersName
- local players = {first, second, third}
- --Clear Screen
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- --Ask for Mob
- clear()
- write ("Monster: ")
- local mob = read()
- --Dices and Mult
- local d20 = math.random(1,20)
- local d20p10 = d20/10
- local d10 = math.random(1,10)
- local crit = 2
- --Battle Function (Buckley)
- function StartBattleBuckley()
- print ("Battle engage!")
- print ()
- print ("Buckley HP: "..BuckleyH.." HP")
- print ("Buckley ATK: "..BuckleyA.." ATK")
- print ()
- end
- --Function First Player Attack!
- function FirstAttack()
- print ("Attacker: "..first)
- print()
- print ("Dice (20): "..d20)
- if d10>= 5 then
- print ("Dice (10): "..d10)
- print ("Critical Hit!")
- print ()
- print ("Final attack: "..d20p10 * firstATK * crit)
- else
- print ("Dice (10): "..d10)
- print ()
- print ("Final attack: "..d20p10 * firstATK)
- print ()
- end
- end
- --Function Second Player Attack
- function SecondAttack()
- print ("Attacker: "..second)
- print ()
- print ("Dice (20): "..d20)
- if d10>= 5 then
- print ("Dice (10): "..d10)
- print ("Critical Hit!")
- print ()
- print ("Final attack: "..d20p10 * secondATK * crit)
- else
- print ("Dice (10) "..d10)
- print ()
- print ("Final attack: "..d20p10 * secondATK * crit)
- print ()
- end
- end
- --Function Ask (Attack or Skill)
- function aos()
- print (first.." turn!")
- print ("Attack or Skill?")
- local aos = read()
- if aos == "Attack" then
- FirstAttack()
- elseif aos == "Skill" then
- print ("Skill feature not ready!")
- else
- print ("Please, give a correct command!")
- sleep(1.5)
- clear()
- aos2()
- end
- end
- function aos2()
- print (first.." turn!")
- print ("Attack or Skill?")
- local aos = read()
- if aos == "Attack" then
- FirstAttack()
- elseif aos == "Skill" then
- print ("Skill feature not ready!")
- else
- print ("Please, give a correct command!")
- sleep(1.5)
- clear()
- aos()
- end
- end
- if mob == "Buckley" then
- clear()
- StartBattleBuckley()
- aos()
- elseif mob == "Angeling" then
- clear()
- test2()
- else
- print ("Database does not contain that mob!")
- print ("Update it, doing 'edit battle'.")
- end
Advertisement
Add Comment
Please, Sign In to add comment