Advertisement
Guest User

Monster

a guest
Oct 26th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.38 KB | None | 0 0
  1. -- A basic skeleton monster script you can copy and modify for your own creations.
  2. comments = {"Papyrus whispers \nNyeh heh heh!", "Papyrus is preparing a\rbone attack.","Smells like bones."}
  3. commands = {"Flirt", "Insult"}
  4.  
  5.  
  6. sprite = "papyrusempty" --Always PNG. Extension is added automatically.
  7. name = "Papyrus"
  8. hp = 650
  9. atk = 2
  10. def = 2
  11. check = "Likes to say\rNyeh heh heh."
  12. dialogbubble = "rightwide" -- See documentation for what bubbles you have available.
  13. canspare = false
  14. cancheck = true
  15.  
  16. flirtcount = 0
  17. insultcount = 0
  18.  
  19. -- Happens after the slash animation but before the shaking and hit sound.
  20. function HandleAttack(attackstatus)
  21.     if attackstatus == -1 then
  22.         -- player pressed fight but didn't press Z afterwards
  23.     else
  24.         -- player did actually attack
  25.         if GetGlobal("battlephase", 0) then
  26.             SwitchPhase()
  27.         end
  28.     end
  29. end
  30. function Devious()
  31.     SetGlobal("SansHead", "papyrus/faces/angryhappy")
  32. end
  33.  
  34. function Anxious()
  35.     SetGlobal("SansHead", "papyrus/faces/anxious")  
  36. end
  37.  
  38.  
  39. function Furious()
  40.     SetGlobal("SansHead", "papyrus/faces/furious")
  41. end
  42.  
  43. function Happy()
  44.     SetGlobal("SansHead", "papyrus/faces/happy")
  45. end
  46.  
  47. function Amazeboned()
  48.     SetGlobal("SansHead", "papyrus/faces/kawaii")
  49. end
  50.  
  51. function SetAnim(animation)
  52.     SetGlobal("SansAnimation", animation)
  53. end
  54.  
  55. function ResetSprite()
  56.     SetGlobal("SansHead","papyrus/faces/normal")
  57.     SetGlobal("SansAnimation", "normal")
  58.     SetGlobal("SansAnimated", true)
  59. end
  60.  
  61. function StopAnim()
  62.     SetGlobal("SansAnimated", false)
  63. end
  64.  
  65. function StartAnim()
  66.     SetGlobal("SansAnimated", true)
  67. end
  68.  
  69. -- This handles the commands; all-caps versions of the commands list you have above.
  70. function HandleCustomCommand(command)
  71.    
  72.     SetGlobal("inBattleBox", true)
  73.    
  74.     if command == "FLIRT" then
  75.         if GetGlobal("battlephase") == 0 then
  76.                 if flirtcount == 0 then
  77.         currentdialogue = {"[font:papyrus][effect:none][func:anxious]WHAT!?\nFL-FLIRTING?", "[font:papyrus][effect:none][func:happy]SO YOU FINALLY\nREVEAL YOUR\n[color:ff0000]ULTIMATE\nFEELINGS[color:000000]!", "[font:papyrus][effect:none][func:angry]W-WELL!\nI'M A SKELETON\nWITH VERY HIGH\nSTANDARDS!!!", "[func:angryhappy][next]"}
  78.             BattleDialog({"You flirt with Papyrus."})
  79.                         flirtcount = flirtcount + 1
  80.                 elseif flirtcount == 1 then
  81.         currentdialogue = {"[font:papyrus][effect:none]OH NO!!!\nYOU'RE MEETING\nALL MY STANDARDS", "[FONT:papyrus][effect:none]GUESS THAT MEANS\nI HAVE TO GO\nON A DATE THEN!?", "[font:papyrus]LET'S DATE L-LATER\nAFTER I CAPTURE\nYOU}
  82.             BattleDialog({"You flirt with Papyrus.\r(again)"})
  83.             flirtcount = flirtcount + 1
  84.         else
  85.             BattleDialog({"Papyrus is too busy FIGHTing to\rFLIRT back."})
  86.         end
  87.        
  88.    elseif command == "INSULT" then
  89.         if GetGlobal("battlephase") == 0 then
  90.             if insultcount == 0 then
  91.                 currentdialogue = {"[effect:none][font:papyrus]HOW SELFLESS...\n YOU WANT ME TO\nFEEL BETTER ABOUT\nFIGHTING YOU...[w:10]"},{"[font:papyrus]I DONT DESERVE\nSUCH HOSPITATLITY\nFROM YOU..."}
  92.                 State("ENEMYDIALOGUE")
  93.             elseif insultcount == 1 then
  94.                 BattleDialog({"You INSULT Papyrus again."})
  95.                 currentdialogue = {"[effect:none][font:papyrus]THERE'S NO NEED TO LIE\nTO YOURSELF!!!\nYOUR BARBS HIDE A\nHIDDEN AFFECTION!\nYOU EMOTIONAL CACTUS!"}
  96.             else
  97.                 BattleDialog{("You INSULT, but to no avail.[w:10]\nSeems INSULTing wont escalate\rthis battle...")}
  98.                 currentdialogue = {"[effect:none][font:papyrus]DON'T WASTE YOUR WORDS\nON ME!"}
  99.             end
  100.             insultcount = insultcount + 1
  101.         else
  102.             BattleDialog({"Papyrus is too busy FIGHTing to\rINSULT back."})
  103.         end
  104.    
  105.     if GetGlobal("trulyblue") then
  106.         MakeBlue()
  107.     end
  108.    
  109. end
  110.  
  111. function SwitchPhase()
  112.     currentdialogue = {"[noskip][effect:none][font:papyrus]SO, YOU WANT\nTO DO THIS\nTHE HARD WAY...", "[noskip][effect:none][font:papyrus]THEN, LET'S SEE\nIF YOU CAN\nHANDLE MY \nFABLED\n'BLUE ATTACK!'"}
  113.     SetGlobal("battlephase", 1)
  114. end
  115.  
  116. function MakeBlue()
  117.     SetGlobal("isBlue", true)
  118.     blue = GetGlobal("blue")
  119.     blue.MoveTo(Player.x, Player.y)
  120. end
  121.  
  122. function OnDeath()
  123.     Audio.Stop()
  124.     SetGlobal("inBattleBox", true)
  125.     currentdialogue = {"[noskip][effect:none][font:papyrus]...[w:15]ALAS,[w:2]\nPOOR PAPYRUS!", "[noskip][effect:none][font:papyrus]HE WAS TOO\nINNOCENT... [w:15]\nTOO COOL FOR \nTHIS WORLD!!!![w:90][func:Kill]"}
  126.     State("ENEMYDIALOGUE")
  127. end
  128.  
  129.     function ResetSprite()
  130.         SetSprite("papyrus")
  131.         end
  132.     end
  133. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement