Advertisement
KamuOji

Code to help me

Sep 24th, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. -- A basic monster script skeleton you can copy and modify for your own creations.
  2. comments = {"[effect:shake,1][color:fca600][speed:0.50]Lets Melt This Place."}
  3. commands = {"Save","Grab Icicle"}
  4. randomdialogue = {"[color:42fcff][func:SetSprite,glizzface]Heh Take This.","[color:42fcff]Hmph","[color:d535d9][func:SetSprite,glizzface1]Yare Yare Daze"}
  5.  
  6. SetGlobal("Phase2", false)
  7. SetGlobal("Phase2Dialogue", false)
  8.  
  9. iciclecounter = 0
  10.  
  11. sprite = "glizz" --Always PNG. Extension is added automatically.
  12. name = "Glizz"
  13. hp = 200
  14. atk = 1
  15. def = 1
  16. check = "[speed:0.50][color:42fcff]The Icy Attacker!!."
  17. dialogbubble = "right" -- See documentation for what bubbles you have available.
  18. canspare = false
  19. cancheck = true
  20.  
  21. -- Happens after the slash animation but before
  22. function HandleAttack(attackstatus)
  23. if attackstatus == -1 then
  24. -- player pressed fight but didn't press Z afterwards
  25. else
  26. -- player did actually attack
  27. if hp < 100 then
  28. local Phase2 = GetGlobal("Phase2")
  29. if Phase2 == false then
  30. def = 2
  31. end
  32. if hp < 50 then
  33. local Phase2 = GetGlobal("Phase2")
  34. if Phase2 == false then
  35. Phase2 = true
  36. end
  37. if Phase2 == true then
  38. Audio.Stop()
  39. SetSprite("glizzhurt1")
  40. hp = 200
  41. def = 6
  42. check = "He's not playing anymore..."
  43. currentdialogue = {"[speed:0.50][color:42fcff][func:SetSprite,glizzhurt2]Heh", "[speed:0.50][color:42fcff][func:SetSprite,glizzhurt3]So This it ", "[effect:shake,1][speed:0.25][color:ff0000][func:SetSprite,glizzhurt4]Already Bleeding", "[speed:0.25][color:ff0000][func:SetSprite,glizzhurt5]But Who Said I Was Losing", "[effect:shake,1][speed:0.05][color:ff0000][func:SetSprite,glizzhurt]GET READY"}
  44. local Phase2Dialogue = GetGlobal("Phase2Dialogue")
  45. if Phase2Dialogue == false then
  46. Phase2Dialogue = true
  47. end
  48. local Phase2 = GetGlobal("Phase2")
  49. if Phase2 == true then
  50. Phase2 = false
  51. end
  52. if Phase2Dialogue == true then Audio.LoadFile("Loop 1 Phase 3")
  53. randomdialogue = {"[color:ff0000]DIE."}
  54. end
  55.  
  56. end
  57. end
  58. end
  59. end
  60. end
  61.  
  62. -- This handles the commands; all-caps versions of the commands list you have above.
  63. function HandleCustomCommand(command)
  64. if command == "SAVE" then
  65. currentdialogue = {"[color:42fcff]WAIT WHAT"}
  66. BattleDialog({"[color:ffff00][health:5]You Saved."})
  67. elseif command == "GRAB ICICLE" then
  68. currentdialogue = {"[color:42fcff]That looks like it hurts"}
  69. BattleDialog({"[health:-10]You Grabbed An Icicle[w:10]\n It Stings"})
  70. Player.atk = Player.atk + 10
  71. end
  72. iciclecounter = iciclecounter + 1
  73. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement