Advertisement
Guest User

unitale 'end' expected near '<eof>'

a guest
Aug 4th, 2021
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. -- music = "shine_on_you_crazy_diamond" --Either OGG or WAV. Extension is added automatically. Uncomment 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 = {"bullettest_chaserorb"}
  6. wavetimer = 4.0
  7. arenasize = {155, 130}
  8.  
  9. autolinebreak = true
  10.  
  11. enemies = {
  12. "poseur"
  13. }
  14.  
  15. enemypositions = {
  16. {0, 0}
  17. }
  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_bouncy", "bullettest_chaserorb", "bullettest_touhou"}
  21.  
  22. function EncounterStarting()
  23. Inventory.addcustomitems({"Cinnamon Bun"}, {0})
  24. Inventory.SetInventory({"Cinnamon Bun"})
  25. end
  26.  
  27. function EnemyDialogueStarting()
  28. -- Good location for setting monster dialogue depending on how the battle is going.
  29. end
  30.  
  31. function EnemyDialogueEnding()
  32. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  33. nextwaves = { possible_attacks[math.random(#possible_attacks)] }
  34. end
  35.  
  36. function DefenseEnding() --This built-in function fires after the defense round ends.
  37. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  38. end
  39.  
  40. function HandleSpare()
  41. State("ENEMYDIALOGUE")
  42. end
  43.  
  44. function HandleItem(ItemID)
  45. if ItemID == "CINNAMON BUN" then
  46. player.Heal(10)
  47. BattleDialog({"you ate the cinnamon bun by eating it"})
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement