Guest User

Monster Script

a guest
Aug 24th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. -- A basic monster script skeleton you can copy and modify for your own creations.
  2. comments = {"The water's flowing."}
  3. commands = {"Check"}
  4. randomdialogue = {"[noskip][func:SetSprite,blank][func:BackAnim][next]"}
  5.  
  6. sprite = "blank" --Always PNG. Extension is added automatically.
  7. name = "Mettaton OMEGA"
  8. local def = SetGlobal('def', -550)
  9. hp = 27000
  10. atk = 1
  11. def = def
  12. xp = 1500
  13. check = "Check message goes here."
  14. dialogbubble = "right" -- See documentation for what bubbles you have available.
  15. canspare = false
  16. cancheck = false
  17. SetGlobal('stun', 0)
  18.  
  19. -- Happens after the slash animation but before
  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. SetGlobal('stun', 1)
  26. local lights = GetGlobal('lights')
  27. if lights <= 1169 then
  28. local def = GetGlobal('def')
  29. SetGlobal('def', 50)
  30. end
  31. if lights > 1170 then
  32. local def = GetGlobal('def')
  33. SetGlobal('def', -550)
  34. SetSprite("mettaton/hurt")
  35. end
  36. end
  37. end
  38.  
  39. -- This handles the commands; all-caps versions of the commands list you have above.
  40. function HandleCustomCommand(command)
  41. if command == "CHECK" then
  42. BattleDialog({"METTATON OMEGA 99 ATK 99 DEF\nNapstablook's best invention and friend."})
  43. end
  44. end
  45.  
  46. function BackAnim()
  47. SetGlobal('stun', 0)
  48. end
Add Comment
Please, Sign In to add comment