That should do it. I have removed the last command (ClearAllActions() for oPC) since it's probably not needed. The code could probably be simplified further, if the owner of the script was known.
void main()
{
object oPC = GetLastPerceived();
if(!GetIsPC(oPC)) return;
if(GetLocalInt(oPC, "JesterDone")) return;
object oJester = GetObjectByTag("TheJesterWorldSerpentInn001");
object oDoor = GetObjectByTag("WorldSerpentInn2HuntingGrounds");
object oWP = GetWaypointByTag("BK_WP_THEHUNTINGGROUNDSENTER");
object oHell = GetWaypointByTag("BK_WP_NOPLACEREAL");
AssignCommand(oPC, ClearAllActions());
SetCommandable(FALSE,oPC);
DelayCommand(0.2, SetCommandable(TRUE,oPC));
DelayCommand(0.5, AssignCommand(oJester, ClearAllActions()));
DelayCommand(5.0, AssignCommand(oPC, SpeakString("Your the caretaker of my new houe.")));
DelayCommand(10.0, AssignCommand(oJester, SpeakString("Oh yes! That's me. Say, let me show you something")));
DelayCommand(11.0, AssignCommand(oPC, ActionForceFollowObject(oJester)));
DelayCommand(12.0, AssignCommand(oJester, ActionForceMoveToObject(oDoor)));
DelayCommand(20.0, AssignCommand(oJester, ActionOpenDoor(oDoor)));
DelayCommand(21.0, AssignCommand(oJester, ActionSpeakString("Right through here if we could")));
DelayCommand(22.0, AssignCommand(oJester, ClearAllActions()));
DelayCommand(25.0, AssignCommand(oJester, ActionJumpToObject(oHell)));
DelayCommand(25.1, AssignCommand(oPC, ClearAllActions()));
DelayCommand(27.0, AssignCommand(oPC, ActionJumpToObject(oWP)));
AssignCommand(GetModule(), DelayCommand(29.0, DeleteLocalInt(oPC, "JesterDone")));
SetLocalInt(oPC, "JesterDone", TRUE);
}
Kato
Modifié par Kato_Yang, 21 novembre 2011 - 06:08 .