Advertisement
Guest User

Monster code

a guest
Nov 22nd, 2023
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.31 KB | Gaming | 0 0
  1. -- A basic monster script skeleton you can copy and modify for your own creations.
  2. comments = {"Voce sente como se estivesse\nsendo enterrado vivo.", "Voce comeca a pensar\nno que voce fez...", "Ler isso nao parece ser o\nmelhor uso do seu tempo", "Apenas desmonetize ele!", "Ervilhas voam pelo ar!"}
  3. commands = {"Check", "Amigos", "Desmotivar"}
  4. randomdialogue = {""}
  5.  
  6. sprite = "Peashooter-5" --Always PNG. Extension is added automatically.
  7. name = "Pea"
  8. hp = 120
  9. atk = 2
  10. def = 4
  11. dialogbubble = "right" -- See documentation for what bubbles you have available.
  12. canspare = false
  13. cancheck = false
  14.  
  15. local a = 1
  16. local b = 1
  17. local attacks = GetGlobal("attacks")
  18. local serious = GetGlobal("serious")
  19.  
  20. local dial = {"[func:SetSprite, Peashooter-6][effect:none][font:sans][voice:peashooter_voice]Que? N-\nao sabia\nque plantas\npodem\nse mover?[func:Progress][w:6]", "[effect:none][func:SetSprite, Peashooter-36][font:sans][voice:peashooter_voice]Pelo\nvisto nao.[func:Progress]", "[effect:none][func:SetSprite, Peashooter-44][font:sans][voice:peashooter_voice]Depois\nque eu vi\no que vo-\n-ce fez[func:Progress]", "[effect:none][func:SetSprite, Peashooter-44][font:sans][voice:peashooter_voice]com\no Dispar e\no Arthur eu\ndeveria\nter te impedido![func:Progress]", "[effect:none][func:SetSprite, Peashooter-50][font:sans][voice:peashooter_voice]Voce\nnao con-\nsegue\nentender[func:Progress]", "[effect:none][font:sans][voice:peashooter_voice]perder\npessoas\nque voce\nse importa.[func:Progress]", "[effect:none][func:SetSprite, Peashooter-1][font:sans][voice:peashooter_voice]afinal...\nnimguem\ngosta de\nvoce.[func:Progress]", "[effect:none][func:SetSprite, Peashooter-36][font:sans][voice:peashooter_voice]Falando\nsobre meus\nirmaos...[func:Progress]", "[w:5][func:SetSprite, Peashooter-5][noskip][func:Memories][next]", "[w:5][func:SetSprite, Peashooter-5][noskip][func:MemoriesOver][next]", "[w:5][func:SetSprite, Peashooter-5][noskip][func:SparePlayer][next]"}
  21.  
  22. local dial2 = {"[func:SetSprite, Peashooter-1][effect:none][font:sans][voice:peashooter_voice]Esta\nfeliz com\ntudo\nisso?[func:Progress][w:6]", "[effect:none][func:SetSprite, Peashooter-38][font:sans][voice:peashooter_voice]Milhares\nde so-\nnhos e\nesperancas...[func:Progress]", "[effect:none][func:SetSprite, Peashooter-40][font:sans][voice:peashooter_voice]Destru-\nidos![func:Progress]", "[effect:none][func:SetSprite, Peashooter-40][font:sans][voice:peashooter_voice]Por qual\nrazao?[func:Progress]", "[effect:none][func:SetSprite, Peashooter-50][font:sans][voice:peashooter_voice]Por nao\nfazerem\nconteudo\nsem criatividade?[func:Progress]", "[func:SetSprite, Peashooter-34][effect:none][font:sans][voice:peashooter_voice]Afinal,\nsabemos\nbem o\nque e\no Shorts.[func:Progress]", "[effect:none][func:SetSprite, Peashooter-1][font:sans][voice:peashooter_voice]Nao e?.[func:Progress]", "[effect:none][func:SetSprite, Peashooter-4][font:sans][voice:peashooter_voice]Voce\nnao se\nimporta\ncom seus\nusuarios![func:Progress]", "[w:5][func:SetSprite, Peashooter-50][noskip][next]", "[w:5][func:SetSprite, Peashooter-5][noskip][func:MemoriesOver][next]", "[w:5][func:SetSprite, Peashooter-5][noskip][func:SparePlayer][next]"}
  23.  
  24.  
  25. -- Happens after the slash animation but before
  26. function HandleAttack(attackstatus)
  27. local actions = GetGlobal("actions")
  28. local serious = GetGlobal("serious")
  29. if attackstatus == -1 then
  30. SetGlobal("actions",true)
  31.  
  32. elseif serious == false then
  33.  
  34. if actions == false then
  35.  
  36. currentdialogue = dial[a]
  37.  
  38. a = a + 1
  39.  
  40. if serious == true and actions == false then
  41.  
  42. currentdialogue = dial2[b]
  43.  
  44. b = b + 1
  45.  
  46. end
  47. end
  48. end
  49.  
  50. -- This handles the commands; all-caps versions of the commands list you have above.
  51. function HandleCustomCommand(command)
  52. if command == "CHECK" then
  53. SetGlobal("actions",true)
  54. if atk == 2 then
  55. BattleDialog({"Pea 2 ATK 4 DEF \nApenas atira uma ervilha por vez.", "Seus velhos truques nao vao \nfuncionar para sempre!\nContinue atacando!"})
  56. currentdialogue = {""}
  57. elseif atk == 4 then
  58. BattleDialog({"Pea 4 ATK 3 DEF \nApenas atira uma ervilha por vez.", "A sua forca aumentou.\nIsso nao ira o ajudar!"})
  59. currentdialogue = {""}
  60. elseif atk == 8 then
  61. BattleDialog({"Pea 8 ATK 2 DEF \nApenas atira uma ervilha por vez.", "Sua defesa esta abaixando!\nSe prepare!"})
  62. currentdialogue = {""}
  63. elseif atk == 10 then
  64. BattleDialog({"Pea 10 ATK 1 DEF \nApenas atira uma ervilha por vez.", "A sua forca e imensa!\nTome cuidado!"})
  65. currentdialogue = {""}
  66. end
  67. elseif command == "AMIGOS" then
  68. SetGlobal("actions",true)
  69. if atk == 2 then
  70. BattleDialog({"Voce diz a Pea que seus\namigos morreram por nada.\nO ATK de Pea aumentou!"})
  71. currentdialogue = {"[voice:peashooter_voice][font:sans][func:SetSprite, Peashooter-40]Voce\nesta\nerrado![w:5][func:DialogueReturn]"}
  72. atk = 4
  73. elseif atk == 4 then
  74. BattleDialog({"Voce diz a Pea que seus\nirmaos eram fracos.\nO ATK de Pea aumentou!"})
  75. currentdialogue = {"[voice:peashooter_voice][font:sans][func:SetSprite, Peashooter-40]Eles\neram\npessoas\nmelhores\nque\nvoce![w:5][func:DialogueReturn]"}
  76. atk = 8
  77. elseif atk == 8 then
  78. BattleDialog({"Voce debocha dos\namigos de Pea.\nO ATK de Pea aumentou!"})
  79. currentdialogue = {"[voice:peashooter_voice][font:sans][func:SetSprite, Peashooter-34]O que\nfoi que\nvoce\ndisse!?[w:5][func:DialogueReturn]"}
  80. atk = 10
  81. elseif atk == 10 then
  82. BattleDialog({"Parece que ele esta\nno seu limite..."})
  83. currentdialogue = {"[voice:peashooter_voice][font:sans][func:SetSprite, Peashooter-40]...[w:5][func:DialogueReturn]"}
  84. end
  85. elseif command == "DESMOTIVAR" then
  86. SetGlobal("actions",true)
  87. if atk == 10 then
  88. BattleDialog({"Voce diz a Pea que seus\nirmaos o esperam.\nO ATK de Pea abaixou um pouco!"})
  89. currentdialogue = {"[voice:peashooter_voice][font:sans][func:SetSprite, Peashooter-40]...[w:5][func:DialogueReturn]"}
  90. atk = 8
  91. elseif atk == 4 then
  92. BattleDialog({"Voce diz a Pea que ele ira se\nreencontrar com Girassol logo...\nO ATK de Pea abaixou muito!"})
  93. currentdialogue = {"[voice:peashooter_voice][font:sans][func:SetSprite, Peashooter-44]...[w:5][func:DialogueReturn]"}
  94. atk = 2
  95. elseif atk == 6 then
  96. BattleDialog({"Voce diz a Pea que ele e fraco\ncomo os seus irmaos...\nO ATK de Pea abaixou um pouco!"})
  97. currentdialogue = {"[voice:peashooter_voice][font:sans][func:SetSprite, Peashooter-44]...[w:5][func:DialogueReturn]"}
  98. atk = 4
  99. elseif atk == 8 then
  100. BattleDialog({"Voce diz a Pea que ele sera\ndesmonetizado facilmente...\nO ATK de Pea abaixou um pouco!"})
  101. currentdialogue = {"[voice:peashooter_voice][font:sans][func:SetSprite, Peashooter-46]...[w:5][func:DialogueReturn]"}
  102. atk = 4
  103. elseif atk == 2 then
  104. BattleDialog({"Ele nao parece se\nimportar com isso..."})
  105. currentdialogue = {"[voice:peashooter_voice][font:sans][func:SetSprite, Peashooter-50]...[w:5][func:DialogueReturn]"}
  106. end
  107. end
  108. end
  109. end
  110.  
  111. function OnDeath()
  112. local isDead = GetGlobal("isDead")
  113. if hp <= 0 then
  114. hp = 1
  115. SetGlobal("isDead", true)
  116. end
  117. -- code goes here
  118. end
  119.  
  120.  
  121. function LaunchMusic()
  122.  
  123. Audio.Unpause(megalovania)
  124.  
  125. end
  126.  
  127. function StopMusic()
  128.  
  129. Audio.Pause()
  130.  
  131. end
  132. function Memories()
  133. SetGlobal("memories",1)
  134. comments = {"Nao..."}
  135. end
  136.  
  137. function MemoriesOver()
  138. SetGlobal("memories",0)
  139. comments = {"..."}
  140. end
  141.  
  142. function SparePlayer()
  143. SetGlobal("sparing",1)
  144. canspare = true
  145. currentdialogue = {"[func:SetSprite, Peashooter-24][noskip][font:sans][voice:peashooter_voice][effect:none]Vamos parar\ncom a\nluta ok?"}
  146. def = -9999
  147. randomdialogue = {"[func:SetSprite, Peashooter-51][noskip][font:sans][voice:peashooter_voice][effect:none]..."}
  148. comments = {"Pea esta te poupando."}
  149. name = "[starcolor:ffff00][color:ffff00]Pea" --makes the name yellow to fool player
  150. end
  151.  
  152. function OnSpare()
  153. if GetGlobal("sparing") == 1 then
  154. currentdialogue = {"[func:SetSprite, Peashooter-51][font:sans][voice:peashooter_voice][effect:none]...", "[font:sans][voice:peashooter_voice][func:SetSprite, Peashooter-7][effect:none]Voce\nta me\npoupando?", "[font:sans][effect:none][voice:peashooter_voice][func:SetSprite, Peashooter-25]Bem isso\nfoi\ninesper-\nado.", "[font:sans][voice:peashooter_voice][func:SetSprite, Peashooter-27][effect:none]De\nqualquer\nforma.\n[w:5]Estava\nna hora.", "[font:sans][voice:peashooter_voice][effect:none]De uma\nmudanca...", "[font:sans][voice:peashooter_voice][func:SetSprite, Peashooter-51][effect:none]De coracao.", "[font:sans][voice:peashooter_voice][func:SetSprite, Peashooter-49][effect:none]Vamos\ngravar\num Ask\nPea juntos!", "[font:sans][voice:peashooter_voice][func:SetSprite, Peashooter-23][effect:none]Vai\nser\ndivertido![w:3]\nJunto\ncom...", "[font:sans][voice:peashooter_voice][func:SetSprite, Peashooter-35][effect:none]OS\nMEUS\nAMIGOS!"} -- replace with what you want the enemy to say
  155. end
  156. end
  157.  
  158. function Progress()
  159. attacks = attacks + 1
  160. end
  161.  
  162. function AngerMusic()
  163. Audio.LoadFile("megalobrainiac")
  164. Audio.Play(megalobrainiac)
  165.  
  166. end
  167.  
  168.  
  169. function Ding()
  170. Audio.PlaySound("ding")
  171. end
  172.  
  173.  
  174. function Serious()
  175. local serious = GetGlobal("serious")
  176. SetGlobal("serious", true)
  177. end
  178.  
  179. function Memories2()
  180. SetGlobal("memories",2)
  181. comments = {"Petalas douradas\nfluem com a brisa..."}
  182. end
  183.  
  184. function DialogueReturn()
  185. local actions = GetGlobal("actions")
  186. SetGlobal("actions", false)
  187.  
  188. end
Tags: unitale
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement