9
3

TalkTestScriptMe.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --[[
  2. Script Name : SpawnScripts/thunderdome/TalkTestScriptMe.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.12 05:05:12
  5. Script Purpose : For testing dialogue scripts. Breeeeak it!!
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function spawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. conversation = CreateConversation() -- I think this could technically be whatever we want, but CreateConversation() needs to be called without variables. We could call this stringcheese if we wanted.
  17. AddConversationOption(conversation, "Flex.", "flex") -- First option, adds a clickable option in response to what we send out in StartConversation. Second var refers to the function that contains the rest of the conversation.
  18. AddConversationOption(conversation, "Keep talking.", "keeptalking") -- second option
  19. AddConversationOption(conversation, "Terminate.") -- third option
  20. StartConversation(conversation, NPC, Spawn, "Script me, please!")
  21. end
  22. -- OPTION 1 is a simple emote
  23. function flex(NPC, Spawn)
  24. FaceTarget(NPC, Spawn)
  25. PlayFlavor(NPC, "", "Check out these MUSCLES!", "flex", 0, 0, Spawn)
  26. end
  27. -- OPTION 2 creates a conversation loop
  28. function keeptalking(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. conversation = CreateConversation()
  31. AddConversationOption(conversation, "No")
  32. AddConversationOption(conversation, "Yes","hailed") -- You can refer back to earlier functions.
  33. StartConversation(conversation, NPC, Spawn, "Want to continue our conversation?") -- If we want the player to cick a button, this option must be present.
  34. end
  35. --[[
  36. Tips on PlayFlavor
  37. PlayFlavor(NPC, "voiceover/english/gubbo_chaley/enchanted/gubbo_chaley/gubbo_chaley006.mp3","If you see Fritz, would you tell him I'm looking for him?","nod", 4082962413, 3474255449, Spawn,8)
  38. Translates into the NPC with the voiceover saying "If you see Fritz, would you tell him I'm looking for him?" in Stout Language (8) while nodding. Enitre action is only visible to the Spawn/Player.
  39. --Each variable translated below--
  40. PlayFlavor(Source, "VoiceoverMP3", "TextAboveNPC'sHead", "Emote", MP3key1, MP3key2, Target, LanguageNPCuses)
  41. --No talking example--
  42. PlayFlavor(NPC,"","","shakefist",0,0,Spawn)
  43. Visible to everyone around:
  44. PlayFlavor(NPC,"","","shakefist",0,0)
  45. ]]--