Dialogues: Added function to select random dialogues for NPCs from random data.

Modified NPCs so random dialogues are chosen on initialization.
Added function to start a dialogue, choosing randomly NPCs dialogues.
Changed NPC code to use new dialogue code
This commit is contained in:
zorman2000
2016-12-01 14:37:00 -05:00
parent 46e3d2543b
commit 762337cc6d
5 changed files with 206 additions and 37 deletions

View File

@ -4,7 +4,7 @@
npc.data = {}
npc.data.DIALOGUES = {
female = {}
female = {},
male = {}
}
@ -33,8 +33,8 @@ npc.data.DIALOGUES.female["phase1"] = {
text = "No, never before",
action_type = "function",
action = function(player_name, item)
minetest.chat_send_player(player_name, "Oh, never? How come! You should.
\nHere, take this. It will guide you to the sea...")
minetest.chat_send_player(player_name, "Oh, never? How come! You should."..
"\nHere, take this. It will guide you to the sea...")
end
},
{