Advertisement
Katchau01

Eye of Cthulhu.lua

Aug 17th, 2020 (edited)
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.58 KB | None | 0 0
  1. -- A basic monster script skeleton you can copy and modify for your own creations.
  2. comments = {"Smells like the work\rof an enemy stand.", "Eye of Cthulhu is staring at you.", "Poseur's limbs shouldn't be\rmoving in this way."}
  3. commands = {"Stare", "Eye drops"}
  4. autolinebreak = true
  5.  
  6. Staremessages = {{"You want to see who will\rblink first, get ready to lose."}, {"He stares back at you"},{"You question if it doesn't hurt,\rbecause he always has his eye open"}}
  7.  
  8. currentstare = 1
  9.  
  10. Staredialogue = {{"Why are\nyou staring\nat me."}, {"What are\nyou trying\nto do"}, {"yes, a little"}}
  11.  
  12. currentstaredialogue = 1
  13.  
  14. Eyedropsmessages = {{"You put eye drops in\nhis eye."}, {"You put eye drops in his eye again.[func:Spare] [func:Return]"}, {"You put eye drops in\nhis eye." ,"Eye of Cthulhu ATTACK Increased!\nEye of Cthulhu DEFENSE Increased![func:Increase]"}}
  15.  
  16. currenteyedrops = 1
  17.  
  18. Eyedropsdialogue = {{"What are you doing? [func:Return]"},{"WHAT DID YOU DO?"}}
  19.  
  20. Currenteyedropsdialogue = 1
  21.  
  22.  
  23. function Spare()
  24.   canspare = true
  25. end
  26.  
  27. function Return()
  28.   currenteyedrops = 2
  29.   Currenteyedropsdialogue = 1
  30. end
  31.  
  32. function Increase()
  33.   def = def + 5
  34.   atk = atk + 5
  35. end
  36.  
  37. sprite = "Eye_of_CthulhuHitbox" --Always PNG. Extension is added automatically.
  38. name = "Eye of Cthulhu"
  39. hp = 400
  40. atk = 1
  41. def = 2
  42. check = "Doesn't it know it's rude\rto stalk someone?"
  43. dialogbubble = "right" -- See documentation for what bubbles you have available.
  44. canspare = false
  45. cancheck = true
  46.  
  47. -- Happens after the slash animation but before
  48. function HandleAttack(attackstatus)
  49.   if attackstatus == -1 then
  50.     -- player pressed fight but didn't press Z afterwards
  51.   else
  52.     -- player did actually attack
  53.   if hp <= maxhp/4 then
  54.     SetGlobal("SetSprite", 1)
  55.     SetGlobal("phase", 1.5)
  56.     def = def + 50
  57.   end
  58.  
  59.     currenteyedrops = 3
  60.     Currenteyedropsdialogue = 2
  61.   end
  62. end
  63.  
  64. -- This handles the commands; all-caps versions of the commands list you have above.
  65. function HandleCustomCommand(command)
  66.   if command == "STARE" then
  67.     BattleDialog(Staremessages[currentstare])
  68.     if currentstare < #Staremessages then
  69.       currentstare = currentstare + 1
  70.     end
  71.     currentdialogue = (Staredialogue[currentstaredialogue])
  72.     if currentstaredialogue < #Staredialogue then
  73.       currentstaredialogue = currentstaredialogue + 1
  74.     end
  75.   elseif command == "EYE DROPS" then
  76.     BattleDialog(Eyedropsmessages[currenteyedrops])
  77.     if currentstare > #Eyedropsmessages then
  78.       currenteyedrops = currentstare - 1
  79.     end
  80.     currentdialogue = (Eyedropsdialogue[Currenteyedropsdialogue])
  81.   end
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement