//::////////////////////////////////////////////// //:: Created By: Milambyr (milambyr@hotmail.com //:: Created On: Feb 8th, 2003 //::////////////////////////////////////////////// void main() { object oDog = GetObjectByTag("Lewis"); object oMan = GetObjectByTag("master"); object oThrow1 = GetObjectByTag("InvisibleObject01"); object oThrow2 = GetObjectByTag("InvisibleObject02"); object oThrow3 = GetObjectByTag("InvisibleObject03"); object oThrow4 = GetObjectByTag("InvisibleObject04"); object oThrow5 = GetObjectByTag("InvisibleObject05"); object oThrow6 = GetObjectByTag("InvisibleObject06"); location lOut = GetLocation(GetWaypointByTag("dogstop")); location lThrow1 = GetLocation(GetWaypointByTag("throw1")); location lThrow2 = GetLocation(GetWaypointByTag("throw2")); location lThrow3 = GetLocation(GetWaypointByTag("throw3")); location lThrow4 = GetLocation(GetWaypointByTag("throw4")); location lThrow5 = GetLocation(GetWaypointByTag("throw5")); location lThrow6 = GetLocation(GetWaypointByTag("throw6")); int nInt = GetLocalInt(GetFirstPC(), "dogfetch"); int nThrow = Random(6); if(nInt == 0) { SetLocalInt(GetFirstPC(), "dogfetch", 1); switch (nThrow) { case 1: DelayCommand(0.0, AssignCommand (oMan, SpeakString("Good boy!"))); DelayCommand(4.0, AssignCommand (oMan, SpeakString("Go fetch!"))); DelayCommand(5.0, AssignCommand (oMan, ActionAttack(oThrow1, TRUE))); DelayCommand(6.0, AssignCommand (oDog, ActionMoveToLocation(lThrow1, TRUE))); break; case 2: DelayCommand(0.0, AssignCommand (oMan, SpeakString("Good doggie!"))); DelayCommand(4.0, AssignCommand (oMan, SpeakString("Catch the ball!"))); DelayCommand(5.0, AssignCommand (oMan, ActionAttack(oThrow2, TRUE))); DelayCommand(6.0, AssignCommand (oDog, ActionMoveToLocation(lThrow2, TRUE)));break; case 3: DelayCommand(0.0, AssignCommand (oMan, SpeakString("Good catch!"))); DelayCommand(4.0, AssignCommand (oMan, SpeakString("Run boy run!"))); DelayCommand(5.0, AssignCommand (oMan, ActionAttack(oThrow3, TRUE))); DelayCommand(6.0, AssignCommand (oDog, ActionMoveToLocation(lThrow3, TRUE)));break; case 4: DelayCommand(0.0, AssignCommand (oMan, SpeakString("Aww maybe you'll get it next time."))); DelayCommand(4.0, AssignCommand (oMan, SpeakString("Jump jump!"))); DelayCommand(5.0, AssignCommand (oMan, ActionAttack(oThrow4, TRUE))); DelayCommand(6.0, AssignCommand (oDog, ActionMoveToLocation(lThrow4, TRUE)));break; case 5: DelayCommand(0.0, AssignCommand (oMan, SpeakString("Almost got it!"))); DelayCommand(4.0, AssignCommand (oMan, SpeakString("Go dog go!"))); DelayCommand(5.0, AssignCommand (oMan, ActionAttack(oThrow5, TRUE))); DelayCommand(6.0, AssignCommand (oDog, ActionMoveToLocation(lThrow5, TRUE)));break; default: DelayCommand(0.0, AssignCommand (oMan, SpeakString("You need more practice dog."))); DelayCommand(4.0, AssignCommand (oMan, SpeakString("Go catch the pointy dart!"))); DelayCommand(5.0, AssignCommand (oMan, ActionAttack(oThrow6, TRUE))); DelayCommand(6.0, AssignCommand (oDog, ActionMoveToLocation(lThrow6, TRUE)));break; } DelayCommand(10.0, AssignCommand (oDog, ActionMoveToObject(oMan, TRUE, 1.0))); DelayCommand(12.0, SetLocalInt(GetFirstPC(), "dogfetch", 0)); } }