Advertisement
Guest User

Untitled

a guest
May 26th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.75 KB | None | 0 0
  1. music = "Muffet" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
  2. encountertext = "Jaiden traps you in a strange \npurple web!" --Modify as necessary. It will only be read out in the action select screen.
  3. nextwaves = {"bullettest_chaserorb"}
  4. wavetimer = 12.0
  5. arenasize = {155, 130}
  6.  
  7. enemies = {
  8. "muffet"
  9. }
  10.  
  11. enemypositions = {
  12. {0, 0}
  13. }
  14.  
  15.  
  16. sparecount = 0
  17. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  18. possible_attacks = {"bullettest_purpleheart"}
  19.  
  20. function EncounterStarting()
  21. -- If you want to change the game state immediately, this is the place.
  22. Player.name = "Frisk"
  23. Player.lv = 20
  24. Player.hp =(99)
  25. require "Animations/muffet"
  26. State("ENEMYDIALOGUE")
  27. end
  28.  
  29. currentframe = 0
  30. function Update()
  31. currentframe = currentframe + 1
  32. if(currentframe == 2) then
  33. UpdateMuffet()
  34. currentframe = 0
  35. end
  36. end
  37. SetGlobal("intro", true)
  38. SetGlobal("items", 8)
  39. function EnemyDialogueStarting()
  40. -- Good location for setting monster dialogue depending on how the battle is going.
  41. local intro = GetGlobal("intro")
  42. if intro == true then
  43. enemies[1].SetVar('currentdialogue', {"Hey, Stupid! \nYou do know you \nhave to pay the \nPrice right?"})
  44. SetGlobal("intro", false)
  45. State("ACTIONSELECT")
  46. end
  47. end
  48.  
  49. function EnemyDialogueEnding()
  50. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  51. -- This example line below takes a random attack from 'possible_attacks'.
  52. if GetGlobal("phase") == 0 then
  53. nextwaves = { "waverandom" }
  54. elseif GetGlobal("phase") == 1 then
  55. nextwaves = { "wave1" }
  56. elseif GetGlobal("phase") == 2 then
  57. nextwaves = { "wave3" }
  58. elseif GetGlobal("phase") == 3 then
  59. nextwaves = { "purple_bullets" }
  60. elseif GetGlobal("phase") == 4 then
  61. nextwaves = { "wave4", "bullets" }
  62. elseif GetGlobal("phase") == 5 then
  63. nextwaves = { "wave5", "midbot_knife" }
  64. elseif GetGlobal("phase") == 6 then
  65. nextwaves = { "purple_bullets", "midbot_knife" }
  66. elseif GetGlobal("phase") == 7 then
  67. nextwaves = { "wave8", "knife_warning" }
  68. elseif GetGlobal("phase") == 8 then
  69. nextwaves = { "wave7", "middle_knife" }
  70. elseif GetGlobal("phase") == 9 then
  71. nextwaves = { "purple_knife", "middle_knife" }
  72. elseif GetGlobal("phase") == 10 then
  73. nextwaves = { "purple_knife", "middle_knife", "bullets" }
  74. elseif GetGlobal("phase") == 11 then
  75. nextwaves = { "waverandom", "bullets" }
  76. elseif GetGlobal("phase") == 12 then
  77. nextwaves = { "waverandom", "knife_warning" }
  78. elseif GetGlobal("phase") == 13 then
  79. nextwaves = { "waverandom", "knife_warning", "bullets" }
  80. elseif GetGlobal("phase") == 14 then
  81. nextwaves = { "fastrandom" }
  82. elseif GetGlobal("phase") == 15 then
  83. nextwaves = { "wave15", "fastmid_knife" }
  84. elseif GetGlobal("phase") == 16 then
  85. nextwaves = { "wave16", "fasttop_knife", "fastbot_knife" }
  86. elseif GetGlobal("phase") == 17 then
  87. nextwaves = { "purple_bullets", "bullets", "bullets", "bullets", "bullets" }
  88. elseif GetGlobal("phase") == 18 then
  89. nextwaves = { "faster_random" }
  90. elseif GetGlobal("phase") == 19 then
  91. nextwaves = { "faster_random", "bullets", "bullets", "bullets" }
  92. elseif GetGlobal("phase") == 20 then
  93. nextwaves = { "knife_warning", "faster_random" }
  94. elseif GetGlobal("phase") == 21 then
  95. nextwaves = { "knife_warning", "faster_random", "bullets" }
  96. elseif GetGlobal("phase") == 22 then
  97. nextwaves = { "knife23", "2knife23", "bullets" }
  98. elseif GetGlobal("phase") == 23 then
  99. wavetimer = 36.0
  100. nextwaves = { "faketopknife", "deathbotknife", "deathbotknife2", "deathbotknife3", "deathbotknife4", "deathmidknife2", "deathmidknife3", "deathtopknife2", "deathtopknife3", "fakebotknife3", "fakebotknife4", "fakebotknife5", "fakebotknife6", "fakemidknife2", "fakemidknife3", "fakemidknife4", "fakemidknife5", "fakemidknife6", "fakemidknife7", "faketopknife2", "faketopknife3", "faketopknife4", "faketopknife5", "faketopknife6", "faketopknife7", "fakemidknife8", "deathbotknife5", "deathmidknife4", "faketopknife8", "fakebotknife7", "deathtopknife4", "fakemidknife9", "fakebotknife8", "faketopknife9", "deathmidknife5", "fakebotknife9", "deathbotknife6", "faketopknife10", "fakemidknife10", "faketopknife11", "deathmidknife6", "fakebotknife10", "deathtopknife5", "fakemidknife11", "fakebotknife11", "faketopknife12", "fakemidknife12", "deathbotknife7", "lastbullettest", "lastspider" }
  101. end
  102. end
  103.  
  104. function DefenseEnding() --This built-in function fires after the defense round ends.
  105. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  106. end
  107.  
  108. function HandleSpare()
  109. if sparecount == 0 then
  110. sparecount = sparecount + 1
  111. elseif sparecount == 1 then
  112. enemies[1].SetVar('currentdialogue',{"So you refused \nto pay?", "That's fine deary \nI'll just take \nyour SOUL instead \nAhAhAhA~~ "})
  113. sparecount = sparecount + 1
  114. nextwaves = { "wave1" }
  115. elseif sparecount == 2 then
  116. enemies[1].SetVar('currentdialogue',{"Why your soul? \nWell i was paid to get\nit.", "Well...", "it's going to be \nharder every \ntime you try to \nspare me AhAhAhA~~~"})
  117. sparecount = sparecount + 1
  118. nextwaves = { "wave3" }
  119. elseif sparecount == 3 then
  120. enemies[1].SetVar('currentdialogue',{"EAT BULLET!"})
  121. sparecount = sparecount + 1
  122. nextwaves = { "purple_bullets" }
  123. elseif sparecount == 4 then
  124. enemies[1].SetVar('currentdialogue',{"You Want to know why\ni was imprisoned?"})
  125. sparecount = sparecount + 1
  126. elseif sparecount == 5 then
  127. enemies[1].SetVar('currentdialogue',{"[voice:toriel]Attack or\nRun Away!"})
  128. sparecount = sparecount + 1
  129. elseif sparecount == 6 then
  130. enemies[1].SetVar('currentdialogue',{"[voice:toriel]What are\nyou proving\nthis way?"})
  131. sparecount = sparecount + 1
  132. elseif sparecount == 7 then
  133. enemies[1].SetVar('currentdialogue',{"[voice:toriel]Fight me\not leave!"})
  134. sparecount = sparecount + 1
  135. elseif sparecount == 8 then
  136. enemies[1].SetVar('currentdialogue',{"[voice:toriel]Stop it."})
  137. sparecount = sparecount + 1
  138. elseif sparecount == 9 then
  139. enemies[1].SetVar('currentdialogue',{"[voice:toriel]Stop ooking\nat me\nthat way!"})
  140. sparecount = sparecount + 1
  141. elseif sparecount == 10 then
  142. enemies[1].SetVar('currentdialogue',{"[voice:toriel]Go away!"})
  143. sparecount = sparecount + 1
  144. elseif sparecount == 11 then
  145. enemies[1].SetVar('currentdialogue',{"[voice:toriel]..."})
  146. sparecount = sparecount + 1
  147. elseif sparecount == 12 then
  148. enemies[1].SetVar('currentdialogue',{"[voice:toriel]...\n..."})
  149. sparecount = sparecount + 1
  150. elseif sparecount == 13 then
  151. enemies[1].SetVar('currentdialogue',{"[voice:toriel]...\n...\n..."})
  152. sparecount = sparecount + 1
  153. elseif sparecount == 14 then
  154. enemies[1].SetVar('currentdialogue',{"[voice:toriel]I know\nyou want\nto go\nhome but..."})
  155. sparecount = sparecount + 1
  156. elseif sparecount == 15 then
  157. enemies[1].SetVar('currentdialogue',{"[voice:toriel]But please go upstairs...\nnow"})
  158. sparecount = sparecount + 1
  159. elseif sparecount == 16 then
  160. enemies[1].SetVar('currentdialogue',{"[voice:toriel]I promise...\nI will take good\ncare of you here.", "[voice:toriel]I know we do not have\nmuch but...", "[voice:toriel]We can have a good life\nhere!"})
  161. sparecount = sparecount + 1
  162. elseif sparecount == 17 then
  163. enemies[1].SetVar('currentdialogue',{"[voice:toriel]Why are you\nmmaking this so\ndiffacult!", "[voice:toriel]plese...\ngo upstairs now!"})
  164. sparecount = sparecount + 1
  165. elseif sparecount == 18 then
  166. enemies[1].SetVar('currentdialogue',{"[voice:toriel]........"})
  167. sparecount = sparecount + 1
  168. elseif sparecount == 19 then
  169. enemies[1].SetVar('currentdialogue',{"[voice:toriel].....Ha HA!", "[voice:toriel]Pathetic,\nis it not?", "[voice:toriel]I cannot save even\na single\nchild."})
  170. sparecount = sparecount + 1
  171. elseif sparecount == 20 then
  172. enemies[1].SetVar('currentdialogue',{"[voice:toriel]...", "[voice:toriel]No I understand,\n The RUINS are very\nsmall once you get\nused to them...", "[voice:toriel]It whould not be correct for you\nto grow up in\nsuch a place.", "[voice:toriel]My Expectations\nmy Lonelyness\nMy fear", "[voice:toriel]For you my child", "[voice:toriel]I will put\nthem aside."})
  173. sparecount = sparecount + 1
  174. enemies[1].SetVar("def" , -9999999999999999999999)
  175. enemies[1].SetVar("canspare" , true)
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182. end
  183. State("ENEMYDIALOGUE")
  184. end
  185.  
  186. function HandleItem(ItemID)
  187. if GetGlobal("items") > 0 then
  188. SetGlobal("items", GetGlobal("items")-1)
  189. Player.Heal(20)
  190. BattleDialog({"You ate a spider donut \nfrom an alternate universe!\nYou recovered 20 HP!", "" .. GetGlobal("items") .. " spider donuts remaining."})
  191. else
  192. BattleDialog({"You're out of spider donuts!"})
  193. end
  194. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement