Advertisement
Guest User

Computer boss battle

a guest
Mar 6th, 2021
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. -- A basic monster script skeleton you can copy and modify for your own creations.
  2. comments = {"Am I working.", "Try switching it off and back on.", "The PC is overheating."}
  3. commands = {"Encourage", "Reset", "Turn Off"}
  4. randomdialogue = {"Random\nDialogue\n1.", "Random\nDialogue\n2.", "Random\nDialogue\n3."}
  5.  
  6. autolinebreak = true
  7. sprite = "poseur" --Always PNG. Extension is added automatically.
  8. name = "Poseur"
  9. hp = 100
  10. atk = 15
  11. def = 5
  12. check = "Specs: Core i5, No GPU, Faulty Motherboard, Corrupted Hard Drive."
  13. dialogbubble = "right" -- See documentation for what bubbles you have available.
  14. canspare = false
  15. cancheck = true
  16.  
  17. actcounter = 0
  18. function HandleCustomCommand(command)
  19. if command == "Reset" then
  20. if actcounter < 3 then
  21. actcounter = actcounter + 1
  22. elseif actcounter == 3 then
  23. canspare = true
  24. end
  25. BattleDialog({"You acted.\nAct number "..actcounter})
  26. end
  27. end
  28.  
  29. posecounter = 0
  30.  
  31. -- Happens after the slash animation but before
  32. function HandleAttack(attackstatus)
  33. if attackstatus == -1 then
  34. -- player pressed fight but didn't press Z afterwards
  35. else
  36. -- player did actually attack
  37. end
  38. end
  39.  
  40. -- This handles the commands; all-caps versions of the commands list you have above.
  41. function HandleCustomCommand(command)
  42. if command == "ENCOURAGE" then
  43. currentdialogue = {"The Computer wont boot."}
  44. BattleDialog({"You try to encourage the pc to boot."})
  45. elseif command == "POWER OFF" then
  46. currentdialogue = {"The computer switches on even though its been switched off\n."}
  47. elseif command == "RESET" then
  48. if posecounter == 0 then
  49. currentdialogue = {"What are you doing"}
  50. Battledialog({"You reset but nothing happens"})
  51. elseif posecounter == 1 then
  52. currentdialogue = {"Are you sure youre doing the right thing"}
  53. Battledialog({"You try to reset it again... nothing happens"})
  54. elseif posecounter == 2 then
  55. currentdialogue = {"Nice try"}
  56. Battledialog({"Maybe try something else"})
  57. elseif posecounter == 3 then
  58. currentdialogue = {"You know Einstein said once “The definition of insanity is doing the same thing over and over again, but expecting different results.”"}
  59. Battledialog({"Try POWERing it OFF"})
  60. elseif posecounter == 4 then
  61. currentdialogue = {"You're really trying to reset me arent you"}
  62. Battledialog({"JUST PRESS THE POWER OFF BUTTON"})
  63. else
  64. currentdialogue = {"You know what Im tired, and I give up. You win"}
  65. Battledialog({"I agree, just do us all a favour and press the SPARE button... Lemme guess you dont know where that is either... I QUIT"})
  66. canspare = true
  67. end
  68. posecounter = posecounter + 1
  69. end
  70. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement