Guest User

Monster

a guest
Dec 22nd, 2019
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. -- A basic monster script skeleton you can copy and modify for your own creations.
  2. comments = {"Smells like 'dog.", "Looking good.", "Is that ketchup?"}
  3. commands = {"Act 1", "Act 2", "Act 3"}
  4. randomdialogue = {"[font:sans]..."}
  5.  
  6. sprite = "empty" --Always PNG. Extension is added automatically.
  7. name = "Skeleton"
  8. hp = 10
  9. atk = 1
  10. def = 1
  11. check = "Check message goes here."
  12. dialogbubble = "rightwideminus" -- See documentation for what bubbles you have available.
  13. cancheck = true
  14. canspare = false
  15. xp = 30
  16. gold = 40
  17.  
  18. -- Happens after the slash animation but before the animation.
  19. function HandleAttack(attackstatus)
  20.     if attackstatus == -1 then
  21.         -- player pressed fight but didn't press Z afterwards
  22.     else
  23.         -- player did actually attack
  24.         if hp <= 0 then
  25.             Encounter.SetVar("Death", true)
  26.         end
  27.     end
  28. end
  29.  
  30. -- This handles the commands; all-caps versions of the commands list you have above.
  31. function HandleCustomCommand(command)
  32.     if command == "ACT 1" then
  33.         currentdialogue = {"Selected\nAct 1."}
  34.     elseif command == "ACT 2" then
  35.         currentdialogue = {"Selected\nAct 2."}
  36.     elseif command == "ACT 3" then
  37.         currentdialogue = {"Selected\nAct 3."}
  38.     end
  39.     currentdialogue = {"[font:sans]" .. currentdialogue[1]}
  40.     BattleDialog({"You selected " .. command .. "."})
  41. end
Advertisement
Add Comment
Please, Sign In to add comment