There are a couple different ways to do something like this. However they may both add a bit of lag to your server/mod. You could use the module heartbeat or an area or object heartbeat to constantly check for the current time. Then once it gets to the time you start the conversation.
You could also slap a recursive script on the players themselves to check for the time and then start the conversation that way.
And of course there are some things to consider. Will this conversation fire for all the players or only certain ones. And then you'd also need to make sure that the script doesn't keep firing the conversation off for all the players..just once. That can be done in the script as well.
So...yes it can be done. But it may cause some lag or resource issues.
Something like this to start the conversation with all the players:
(This would go in the moduels "OnHeartbeat" event)
void main()
{
int iDay = GetCalendarDay();
int iHour = GetTimeHour();
int iActive = GetLocalInt(GetModule(), "CONVERSATION_ACTIVE");
if (iDay == 7 && iHour == 19 && iActive != TRUE)
{
object oPC = GetFirstPC();
while (GetIsObjectValid(oPC))
{
AssignCommand(oPC, ActionStartConversation(oPC, "conv res ref", TRUE));
oPC = GetNextPC();
}
SetLocalInt(GetModule(), "CONVERSATION_ACTIVE", TRUE);
}
else if ((iDay != 7 || iHour != 19) && iActive == TRUE)
{
SetLocalInt(GetModule(), "CONVERSATION_ACTIVE", FALSE);
}
}
Hope it helps. Good luck.
Modifié par GhostOfGod, 23 janvier 2011 - 05:03 .