Guest User

Untitled

a guest
May 15th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. music = "megalovania" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
  4. encountertext = "Poseur strikes a pose!" --Modify as necessary. It will only be read out in the action select screen.
  5. nextwaves = {"finale"}
  6. wavetimer = 4.0
  7. arenasize = {155, 130}
  8.  
  9. enemies = {
  10. "poseur"
  11. }
  12.  
  13. enemypositions = {
  14. {0, 0}
  15. }
  16. SetGlobal("intro", true)
  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 = {"Sp1", "UD", "Side Bu", "bullettest_gasterblastersRL", "bullettest_gasterblastersR", "bullettest_gasterblastersL", "Co", "blaster", "finale", "finale2", "finale3", "cos", "cross", "novawave", "orangetou", "lgb"}
  19.  
  20. function EncounterStarting()
  21. -- If you want to change the game state immediately, this is the place.
  22. State("ENEMYDIALOGUE")
  23. Player.lv = 20
  24. Player.hp = 99
  25. Player.name = "Cosmo"
  26. end
  27.  
  28. function EnemyDialogueStarting()
  29. local intro = GetGlobal("intro")
  30. if intro == true then
  31. enemies[1].SetVar('currentdialogue', {"[noskip][font:sans][waitall:2]Heya kid..", "[waitall:2][noskip][font:sans]Heh, how zit\ngoin ?", "[waitall:2][noskip][font:sans]What can I say\nyou made a pretty\nmess of\nthe underground", "[waitall:2][noskip][font:sans]Whatev, this is\nUnderfell right ?", "[waitall:2][noskip][font:sans]Here is....\n[waitall:2]Kill or be killed", "[waitall:2][noskip][font:sans]But pal, do ya\nknow what you've\n got into ?", "[waitall:2][noskip][font:sans]I like killing\n too, not blaming\nya kid", "[waitall:2][noskip][font:sans]But there is a\ndifference\nbetween us", "[noskip][font:sans][waitall:4]I don't kill[w:10]\nTHE WRONG PEOPLE", "[noskip][font:sans][waitall:6]You dirty brother\nKILLER.." })
  32. SetGlobal("intro", false)
  33. end
  34. end
  35.  
  36. function EnemyDialogueEnding()
  37. attacknum = attacknum + 1
  38. if attacknum == 1 then
  39. nextwaves = {"finale"}
  40. elseif attacknum == 2 then
  41. nextwaves = {"finale2"}
  42. elseif attacknum == 3 then
  43. nextwaves = {"finale2"}
  44. attacknum = 0
  45. end
  46. end
  47.  
  48.  
  49. function DefenseEnding() --This built-in function fires after the defense round ends.
  50. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  51. end
  52.  
  53. function HandleSpare()
  54. State("ENEMYDIALOGUE")
  55. end
  56.  
  57. function HandleItem(ItemID)
  58. if ItemID == "DOGTEST1" then
  59. BattleDialog({"You ate the I.Noodles !\nHP restored !"})
  60. Player.Heal(92)
  61. elseif ItemID == "DOGTEST2" then
  62. BattleDialog({"You ate the butterscotch pie !\n HP restored !"})
  63. Player.Heal(67)
  64. elseif ItemID == "DOGTEST3" then
  65. BattleDialog({"[effect:shake]You ate the W.D Gaster Cake ☟☜☹🏱 💣☜"})
  66. Player.Hurt(91)
  67. end
  68. end
Advertisement
Add Comment
Please, Sign In to add comment