static void Main(string[] args) { _world = new World("C:\\games\\ultima_5_late\\britain"); //foreach (SmallMapReferences.SingleMapReference smr in world.SmallMapRef.MapReferenceList) { //_world.State.TheVirtualMap.LoadSmallMap(_world.SmallMapRef.GetSingleMapByLocation(SmallMapReferences.SingleMapReference._location.Britain, 0), _world.State.CharacterRecords, false); } _world.State.TheVirtualMap.LoadSmallMap(_world.SmallMapRef.GetSingleMapByLocation(SmallMapReferences.SingleMapReference.Location.Minoc, 0), _world.State.CharacterRecords, false); //Dictionary<int, TileReference> tileReference = TileReference.Load(); //world.OverworldMap.PrintMap(); //world.SmallMapRef.GetLocationName(SmallMapReferences.SingleMapReference._location.Lord_Britishs_Castle); //world.NpcRef.GetNonPlayerCharactersByLocation(SmallMapReferences.SingleMapReference._location.Britain); //Conversation convo = new Conversation(_world.NpcRef.NPCs[292], _world.State, _world.DataOvlRef); // justin List <NonPlayerCharacterReference> minocNpcRef = _world.NpcRef.GetNonPlayerCharactersByLocation(SmallMapReferences.SingleMapReference.Location.Minoc); Conversation convo = new Conversation(minocNpcRef[9], _world.State, _world.DataOvlRef); // delwyn //Conversation convo = new Conversation(world.NpcRef.NPCs[293], world.State, world.DataOvlRef); // eb //Conversation convo = new Conversation(world.NpcRef.NPCs[296], world.State, world.DataOvlRef); // Gwenno Conversation.EnqueuedScriptItem enqueuedScriptItemDelegate = new Conversation.EnqueuedScriptItem(EnqueuedScriptItem); convo.EnqueuedScriptItemCallback += enqueuedScriptItemDelegate; convo.BeginConversation(); //int i = 1000; // while (i > 0) // { // _world.AdvanceTime(2); // i--; // } }
static void Main(string[] args) { world = new World("C:\\games\\ultima_5_late\\britain"); //Dictionary<int, TileReference> tileReference = TileReference.Load(); world.OverworldMap.PrintMap(); world.SmallMapRef.GetLocationName(SmallMapReferences.SingleMapReference.Location.Lord_Britishs_Castle); world.NpcRef.GetNonPlayerCharactersByLocation(SmallMapReferences.SingleMapReference.Location.Britain); Conversation convo = new Conversation(world.NpcRef.NPCs[293], world.State, world.DataOvlRef); // eb //Conversation convo = new Conversation(world.NpcRef.NPCs[296], world.State, world.DataOvlRef); // Gwenno Conversation.EnqueuedScriptItem enqueuedScriptItemDelegate = new Conversation.EnqueuedScriptItem(EnqueuedScriptItem); convo.EnqueuedScriptItemCallback += enqueuedScriptItemDelegate; //convo.BeginConversation(); world.AdvanceTime(2); }
/// <summary> /// Begins the conversation with a particular NPC /// </summary> /// <param name="npc">the NPC to have a conversation with</param> /// <param name="enqueuedScriptItem">a handler to be called when script items are enqueued</param> /// <returns>A conversation object to be used to follow along with the conversation</returns> public Conversation CreateConversationAndBegin(NonPlayerCharacterReference npc, Conversation.EnqueuedScriptItem enqueuedScriptItem) { CurrentConversation = new Conversation(npc, State, DataOvlRef); CurrentConversation.EnqueuedScriptItemCallback += enqueuedScriptItem; PassTime(); return(CurrentConversation); }