fork download
  1. -- your code goes here-- A basic monster script skeleton you can copy and modify for your own creations.
  2. comments = {"Кажется,она настроенна \r очень серьёзно", "Пламя окутывает вас горячим пледом", "Её слепые глаза смотрят на вас\r с ...сожалением?."}
  3. commands = {"Поговорить", "Плакать", "Сосредоточиться"}
  4. Crycounter = 0
  5. randomdialogue = {"Звёзды никогда не лгут./n Мне жаль", "Random\nDialogue\n2.", "Random\nDialogue\n3."}
  6.  
  7. sprite = "Keeper" --Always PNG. Extension is added automatically.
  8. name = "Инга"
  9. hp = 1000
  10. atk = 20
  11. def = 40
  12. check = "Известная также как Хранитель Пути и Следящая за Небом"
  13. dialogbubble = "right" -- See documentation for what bubbles you have available.
  14. canspare = false
  15. cancheck = true
  16.  
  17. -- Happens after the slash animation but before
  18. function HandleAttack(attackstatus)
  19. if attackstatus == -1 then
  20. -- player pressed fight but didn't press Z afterwards
  21. else
  22. -- player did actually attack
  23. end
  24. end
  25.  
  26. -- This handles the commands; all-caps versions of the commands list you have above.
  27. function HandleCustomCommand(command)
  28. if command == "Поговорить" then
  29. currentdialogue = {"Звёзды никогда не лгут./n Мне жаль"}
  30.  
  31. elseif command == "Сосредоточиться" then
  32. currentdialogue = {"..."}
  33. elseif command == "Плакать" then
  34. if Crycounter == 0 then
  35. BattleDialog({"Не в силах сдержать эмоции,/r вы пустили слезу"})
  36. elseif Crycounter == 1 then
  37. BattleDialog({"Вы продолжаете затапливать всё слезами."})
  38. else
  39. BattleDialog({"Это невероятно,но слёзы закончились./r ... как и терпение Инги."})
  40. end
  41. Crycounter = Crycounter + 1
  42. BattleDialog({"Вы решили " .. command .. "."})
  43. end
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
luac5.3: prog.lua:43: 'end' expected (to close 'function' at line 27) near <eof>
stdout
Standard output is empty