public void RunString(List <string> scripts) //Run dialog scripts based on their names { foreach (string script in scripts) { print(script); string tempScript = script.Replace("\n", string.Empty); string[] phrases = tempScript.Split(' '); if (phrases[0] == "AddItem") { menu.AddItem(phrases[1]); } else if (phrases[0] == "RemItem") { menu.RemoveItem(phrases[1]); } else if (phrases[0] == "AddQuest") { menu.AddQuest(phrases[1]); dictionary.BooleanDictionary[phrases[1] + "R"] = true; print(dictionary.BooleanDictionary[phrases[1] + "R"]); } else if (phrases[0] == "RemQuest") { menu.RemoveQuest(phrases[1]); dictionary.BooleanDictionary[phrases[1] + "C"] = true; } else if (phrases.Length == 1) { Invoke(phrases[0], 0); } else { print("Behavior undefined"); } } }