Advertisement
Guest User

expected (to close '(' at line 34) near 'function'

a guest
Jun 9th, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. -- music = "anothermedium" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
  4. encountertext = "Fax Is Ready To Defeat\nYou!" --Modify as necessary. It will only be read out in the action select screen.
  5. nextwaves = {"blank"}
  6. wavetimer = 4.0
  7. arenasize = {155, 130}
  8.  
  9. enemies = {
  10. "poseur"
  11. }
  12.  
  13. enemypositions = {
  14. {0, 0}
  15. }
  16.  
  17. SetGlobal("intro",true)
  18.  
  19. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  20. possible_attacks = {"bullettest_blasters", "bullettest_blue", "bullettest_chaserorb", "bullettest_gasterblastersR", "Co", "Filmos-slice", "bullet_warning", "bullettest_slice"}
  21.  
  22. function EncounterStarting()
  23. -- If you want to change the game state immediately, this is the place.
  24. State("ENEMYDIALOGUE")
  25. Player.lv = 18
  26. Player.hp = 99
  27. Player.name = "Killer"
  28. Audio.Stop()
  29. end
  30.  
  31. function EnemyDialogueStarting()
  32. local intro = GetGlobal("intro")
  33. if intro == true then
  34. enemies[1].SetVar('currentdialogue', {"[waitall:3]Hello\n[waitall:8]traitor...", "[waitall:2]I see..[waitall:4]\nyou have\n a knife", "[w:30]", "[waitall:3]you\nkilled\nthem[waitall;4]...", "[waitall:8]You\nkilled\nthem all", "[w:10][waitall:6]you know...", "[waitall:6]Would you like it\nif your family\nwas dead?", "[waitall:5]Would you like it\n[w:5]if i killed your family\nright in front of you?", "no protection", "Hopeless", "[waitall:4]Well...", "[waitall:6]You dont have a soul...", "and", "Chara[waitall:6]...", "[waitall:6]its not your fault", "[waitall:6]Even though i wouldnt\ndo this...", "[waitall:7][noskip][effect:shake]YOU WILL PAY FOR\nTHIS HOOMAN"}
  35. function EnemyDialogueEnding()
  36. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  37. -- This example line below takes a random attack from 'possible_attacks'.
  38. nextwaves = { possible_attacks[math.random(#possible_attacks)] }
  39. end
  40.  
  41. function DefenseEnding() --This built-in function fires after the defense round ends.
  42. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  43. end
  44.  
  45. function HandleSpare()
  46. State("ENEMYDIALOGUE")
  47. end
  48.  
  49. function HandleItem(ItemID)
  50. if ItemID == "DOGTEST1" then
  51. BattleDialog({"You Throw The FireStick At Fax[w:10]\nthough Fax is Amuned To Fire! "})
  52. Player.Heal(5)
  53. elseif ItemID == "DOGTEST2" then
  54. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  55. Player.Heal(5)
  56. elseif ItemID == "DOGTEST3" then
  57. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  58. Player.Heal(5)
  59. elseif ItemID == "DOGTEST4" then
  60. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  61. Player.Heal(5)
  62. elseif ItemID == "DOGTEST5" then
  63. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  64. Player.Heal(5)
  65. elseif ItemID == "DOGTEST6" then
  66. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  67. Player.Heal(5)
  68. elseif ItemID == "DOGTEST7" then
  69. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  70. Player.Heal(5)
  71. elseif ItemID == "DOGTEST8" then
  72. BattleDialog({"You just lick a Test Dog. Yuck!\nYou recovered 5 HP! "})
  73. Player.Heal(5)
  74. end
  75. end
  76.  
  77. function EnemyDialogueEnding()
  78. attack_order = {'bullettest_blue',
  79. 'bullettest_gasterblastersR',
  80. 'Co'}
  81. attacknum = 1
  82. end end end
  83.  
  84. function newmusic(anothermedium)
  85. Audio.LoadFile(anothermedium)
  86. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement