Advertisement
ailenkai

Dialogue

Dec 23rd, 2024
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.10 KB | None | 0 0
  1. local Greetings = {
  2.     "Hey, how are you doing?",
  3.     "Man this place is boring.",
  4.     "Something on your mind?"
  5. }
  6.  
  7. local Farewells = {
  8.     "See you around then.",
  9.     "Meh later..",
  10.     "I'll always be here, unfortunately."
  11. }
  12.  
  13. local dialogue = {
  14.     Greetings = Greetings,
  15.     Farewells = Farewells,
  16.  
  17.     DialogueTree = {
  18.         good = {
  19.             ["Do you need anything?"] = {
  20.                 Response = {
  21.                     "I suppose, if you can gather me 5 coconuts I'd appreciate that.",
  22.                     "I'll give you 15 seashells for your troubles"
  23.                 },
  24.                 good = {
  25.                     ["Sure I'll be back before you know it!"] = {
  26.                         Response = "Thank you, see you soon!",
  27.                         Trigger = "End"
  28.                     }
  29.                 },
  30.                 bad = {
  31.                     ["No, get them yourself, loser!"] = {
  32.                         Response = "You'll pay for that. >:(",
  33.                         Trigger = "Attack"
  34.                     }
  35.                 },
  36.                 bye = {
  37.                     ["Actually, forget I said anything..."] = {
  38.                         Response = Farewells[math.random(1, #Farewells)],
  39.                         Trigger = "End"
  40.                     }
  41.                 },
  42.                 persuade = {
  43.                     ChanceOfSuccess = 0.7,
  44.                     ["Only 15 seashells? you know thats worth at least 20"] = {
  45.                         Response = {
  46.                             "You do have a point, 20 shells it is then, how does that sound?"
  47.                         },
  48.                         good = {
  49.                             ["You've got yourself a deal, I'll be right back!"] = {
  50.                                 Response = "Thank you! I'll see you soon then.",
  51.                                 Trigger = "End"
  52.                             }
  53.                         },
  54.                         bad = {
  55.                             ["How does pounding sand and getting lost sound?"] = {
  56.                                 Response = "Hurtful, you don't have to be so mean. :(",
  57.                                 Trigger = "End"
  58.                             }
  59.                         },
  60.                         bye = {
  61.                             ["I just remembered I actually have something else I have to do."] = {
  62.                                 Response = Farewells[math.random(1,#Farewells)],
  63.                                 Trigger = "End"
  64.                             }
  65.                         },
  66.                         FailureResponse = {
  67.                             Response = "You must take me as a fool. Pound sand loser.",
  68.                             Trigger = "End"
  69.                         }
  70.                     }
  71.                 }
  72.             }
  73.         },
  74.         bad = {
  75.             ["You smell bad."] = {
  76.                 Response = ":(",
  77.                 Trigger = "End"
  78.             }
  79.         },
  80.         bye = {
  81.             ["Nevermind."] = {
  82.                 Response = Farewells[math.random(1,#Farewells)],
  83.                 Trigger = "End"
  84.             }
  85.         }
  86.     }
  87. }
  88.  
  89. return dialogue
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement