Advertisement
Guest User

Untitled

a guest
May 20th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.94 KB | None | 0 0
  1. -- Set the name of the NPC. This will be displayed on the top of the panel.
  2. NPC.name = "Rezeption"
  3.  
  4. -- Uncomment to make the NPC sit.
  5. --NPC.sequence = "sit"
  6.  
  7. -- This is the function that gets called when the player presses <E> on the NPC.
  8. function NPC:onStart()
  9.     -- self:addText(<text>) adds text that comes from the NPC.
  10.     self:addText("Willkommen im 'THE TIDES'-Hotel. Wie kann ich Ihnen helfen?")
  11.  
  12.     -- self:addOption(<text>, <callback>) is a button that you can pick and it will
  13.     -- run the callback function.
  14.     self:addOption("Ich möchte ein Apartment mieten.", function()
  15.         -- This code is inside a function that gets ran after pressing the option.
  16.         self:addText("Okay, was ist Ihr derzeitiges Budget, das Sie für eine 3 Tage Miete eines Apartments zahlen würden?")
  17.  
  18.             self:addOption("~ 250.000", function()
  19.                 self:addText("Hierzu kommen folgende Apartments infrage:")
  20.                 self:addText("'Apartment 1' direkt links an der Ecke.")
  21.                 self:addText("'Apartment 2' direkt links hinten am Ende des Gangs.")
  22.             end)
  23.        
  24.             self:addOption("~ 500.000", function()
  25.                 self:addText("Hierzu kommen folgende Apartments infrage:")
  26.                 self:addText("'Premium Suite' direkt rechts hinter der Rezeption.")
  27.             end)
  28.                
  29.         -- self:addLeave(<leave text>) adds a button that closes the dialogue.
  30.         self:addLeave("Ich muss gehen.")
  31.     end)
  32.  
  33.     self:addOption("Was macht ihr Hotel so besonders?", function()
  34.         -- This code is inside a function that gets ran after pressing the option.
  35.         self:addText("Wir bieten unseren Kunden vornehm eingerichtete Apartments mit einfacher Bedienung der Mitbesitzer, Türen, Props an. Außerdem verfügen Sie über eine eigene Türklingel.")
  36.  
  37.             -- Add a leave.
  38.             self:addLeave("Ouch!")
  39.         end)
  40.         self:addLeave("No thanks.")
  41.     end)
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement