Example #1
0
bool CCarryParrot::PassOnDragStartMsg(CPassOnDragStartMsg *msg) {
	if (CParrot::_v4 != 3) {
		moveToView();
		setPosition(Point(0, 0));
		setVisible(true);
		playClip("Pick Up", 2);
		playClip("Flapping", 1);

		stopTimer(_timerId);
		_timerId = addTimer(1000, 1000);

		_freeCounter = 0;
		CParrot::_v4 = 1;
		msg->_value3 = 1;

		return CCarry::PassOnDragStartMsg(msg);
	}

	CTrueTalkNPC *npc = dynamic_cast<CTrueTalkNPC *>(getRoot()->findByName(_string6));
	if (npc)
		startTalking(npc, 0x446BF);

	_fieldE0 = 0;
	playSound("z#475.wav");
	moveUnder(findRoom());
	msg->_value4 = 1;

	return true;
}
Example #2
0
bool CTrueTalkNPC::NPCPlayAnimationMsg(CNPCPlayAnimationMsg *msg) {
//	const char *const *nameP = msg->_names;
	int count;
	for (count = 0; msg->_names[count]; ++count)
		;

	if (msg->_maxDuration) {
		// Randomly pick a clip that's less than the allowed maximum
		int tries = 10, index;
		do {
			index = getRandomNumber(count - 1);
		} while (getClipDuration(msg->_names[index]) > msg->_maxDuration && --tries);

		if (tries) {
			// Sequentially go through the clips to find any below the maximum
			index = 0;
			for (int idx = 0; idx < count; ++idx) {
				if (getClipDuration(msg->_names[idx]) < msg->_maxDuration) {
					index = idx;
					break;
				}
			}
		}

		playClip(msg->_names[index], MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT);
	} else {
		playClip(msg->_names[getRandomNumber(count - 1)]);
	}

	return true;
}
Example #3
0
bool CDeskbot::TurnOn(CTurnOn *msg) {
    if (!_deskbotActive) {
        setVisible(true);
        playClip("BellRinging");
        playClip("Opening", MOVIE_NOTIFY_OBJECT);

        playSound("b#69.wav");
        petSetArea(PET_CONVERSATION);

        _npcFlags |= NPCFLAG_20000;
        _deskbotActive = true;
    }

    return true;
}
Example #4
0
bool CDoorbot::OnSummonBotMsg(COnSummonBotMsg *msg) {
	const char *const ROOM_WAVES[8][2] = {
		{ "EmbLobby", "z#186.wav" },
		{ "PromenadeDeck", "z#184.wav" },
		{ "Arboretum", "z#188.wav" },
		{ "Frozen Arboretum", "z#188.wav" },
		{ "Bar", "z#187.wav" },
		{ "MusicRoom", "z#185.wav" },
		{ "MusicRoomLobby", "z#185.wav" },
		{ "1stClassRestaurant", "z#183.wav" },
	};

	if (msg->_value != -1) {
		int idx;
		for (idx = 0; idx < 8; ++idx) {
			if (compareRoomNameTo(ROOM_WAVES[idx][0])) {
				playSound(ROOM_WAVES[idx][1]);

			}
		}
		if (idx == 8)
			playSound("z#146.wav");

		sleep(2000);
	}

	playClip(getRandomNumber(1) ? "Whizz On Left" : "Whizz On Right",
		MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
	movieEvent();
	_npcFlags |= NPCFLAG_400000;

	return true;
}
Example #5
0
bool CDropTarget::DropObjectMsg(CDropObjectMsg *msg) {
	if (!_itemName.empty()) {
		if (msg->_item->getName() != _itemName) {
			if (findByName(_itemName, true))
				return false;
		}
	}

	if (!msg->_item->isEquals(_itemMatchName, _itemMatchSize))
		return false;

	msg->_item->detach();
	msg->_item->addUnder(this);
	msg->_item->setPosition(Point(_bounds.left, _bounds.top));

	msg->_item->loadFrame(_itemFrame);
	if (_showItem)
		msg->_item->setVisible(false);

	CDropZoneGotObjectMsg gotMsg(this);
	gotMsg.execute(msg->_item);
	playSound(_soundName);

	if (_clipName.empty()) {
		loadFrame(_dropFrame);
	} else {
		playClip(_clipName, _clipFlags);
	}

	_cursorId = _dropCursorId;
	return true;
}
Example #6
0
bool CBellBot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
	switch (msg->_action) {
	case 1:
	case 28: {
		_npcFlags &= ~NPCFLAG_IDLING;
		CDismissBotMsg dismissMsg;
		dismissMsg.execute(this);
		break;
	}

	case 5:
		_npcFlags &= ~NPCFLAG_20000;
		playClip("Walk Off", MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
		movieEvent();
		break;

	case 17: {
		CActMsg actMsg("ThrowTVDownWell");
		actMsg.execute("ThrowTVDownWellControl");
		break;
	}

	case 29: {
		CActMsg actMsg("BellbotGetLight");
		actMsg.execute("BellbotGetLightCutScene");
		startTalking(this, 158);
		break;
	}

	default:
		break;
	}

	return true;
}
Example #7
0
bool CBellBot::OnSummonBotMsg(COnSummonBotMsg *msg) {
	if (msg->_value == 1) {
		_npcFlags |= NPCFLAG_40000;
	} else {
		static const char *const ROOM_WAVES[8][2] = {
			{ "EmbLobby",  "z#193.wav" },
			{ "PromenadeDeck", "z#191.wav" },
			{ "Arboretum", "z#195.wav" },
			{ "Frozen Arboretum", "z#195.wav" },
			{ "Bar", "z#194.wav" },
			{ "MusicRoom", "z#192.wav" },
			{ "MusicRoomLobby", "z#192.wav" },
			{ "1stClassRestaurant", "z#190.wav" }
		};

		int idx;
		for (idx = 0; idx < 8; ++idx) {
			if (compareRoomNameTo(ROOM_WAVES[idx][0])) {
				playSound(ROOM_WAVES[idx][1]);
				break;
			}
		}
		if (idx == 8)
			playSound("z#147.wav");

		sleep(2000);
		_npcFlags &= ~NPCFLAG_40000;
	}

	playClip("Walk On", MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
	movieEvent();
	_npcFlags |= NPCFLAG_10000;

	return true;
}
Example #8
0
bool CDeskbot::TurnOff(CTurnOff *msg) {
    if (_deskbotActive) {
        stopMovie();
        performAction(1, findView());

        _npcFlags = (_npcFlags & ~(NPCFLAG_SPEAKING | NPCFLAG_IDLING | NPCFLAG_START_IDLING)) | NPCFLAG_40000;
        playClip("Closing", MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT);
    }

    return true;
}
Example #9
0
bool CDoorbot::DoorbotNeededInHomeMsg(CDoorbotNeededInHomeMsg *msg) {
	moveToView();
	setPosition(Point(90, 42));
	_npcFlags = NPCFLAG_100000;

	stopMovie();
	playClip("Cloak Off", MOVIE_NOTIFY_OBJECT);

	_npcFlags |= NPCFLAG_8;
	return true;
}
Example #10
0
bool CDoorbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
	switch (msg->_action) {
	case 3:
		playClip("Cloak On", MOVIE_NOTIFY_OBJECT);
		break;

	case 4:
		_npcFlags = (_npcFlags & ~NPCFLAG_IDLING) | NPCFLAG_4000000;
		playClip("Whizz Off Left", MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
		break;

	case 28: {
		_npcFlags &= ~(NPCFLAG_IDLING | NPCFLAG_START_IDLING);
		CDismissBotMsg dismissMsg;
		dismissMsg.execute(this);
		break;
	}
	}

	return true;
}
Example #11
0
bool CCage::ActMsg(CActMsg *msg) {
	if (msg->_action == "Shut") {
		if (!_open) {
			playClip("Shut", MOVIE_STOP_PREVIOUS | MOVIE_NOTIFY_OBJECT);
			disableMouse();
		}
	} else if (msg->_action == "Open") {
		if (_open) {
			playClip("Open", MOVIE_STOP_PREVIOUS | MOVIE_NOTIFY_OBJECT);
			disableMouse();
		}
	} else if (msg->_action == "CoreReplaced") {
		CActMsg actMsg("Shut");
		actMsg.execute(this);
	} else if (msg->_action == "OpenNow") {
		loadFrame(0);
		_open = false;
	}

	return true;
}
Example #12
0
bool CBellBot::DismissBotMsg(CDismissBotMsg *msg) {
	if (_npcFlags & NPCFLAG_10000) {
		playClip("Walk Off", MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
		if (_npcFlags & NPCFLAG_START_IDLING) {
			_npcFlags &= ~NPCFLAG_START_IDLING;
			performAction(true);
		} else {
			performAction(false);
		}

		CActMsg actMsg("BellbotDismissed");
		actMsg.execute("BotIdleSummons");
	}

	return true;
}
Example #13
0
bool CDropTarget::EnterViewMsg(CEnterViewMsg *msg) {
	if (!_itemName.empty()) {
		CGameObject *obj = dynamic_cast<CGameObject *>(findByName(_itemName));
		if (!obj) {
			loadFrame(_dragFrame);
			_cursorId = _dragCursorId;
		} else if (_clipName.empty()) {
			loadFrame(_dropFrame);
		} else {
			playClip(_clipName, _clipFlags);
		}

		_cursorId = _dropCursorId;
	}

	return true;
}
Example #14
0
bool CBellBot::NPCPlayTalkingAnimationMsg(CNPCPlayTalkingAnimationMsg *msg) {
	static const char *const NAMES[] = {
		"Hand On Hip Talking", "Hand On Hip Talking", "Hand On Hip Talking",
		"Sway Side To Side", "Lean Forward", "Hit Head", "Confidential Talking",
		"Hands On Hips", "Hands On Hips", "Hands On Hips", "Sway", "Laugh",
		"Hand Wave", "Slow Sway", "Lean Backwards", "Sway Side To Side 2",
		"Bob Up And Down", "Elbow In Hand", "Elbow In Hand", "Elbow In Hand",
		nullptr
	};

	if (msg->_value2 == 2)
		playClip("Mother Frame");
	else
		msg->_names = NAMES;

	return true;
}
Example #15
0
bool CParrot::PanningAwayFromParrotMsg(CPanningAwayFromParrotMsg *msg) {
	if (_v4) {
		CActMsg actMsg("PanAwayFromParrot");
		actMsg.execute(msg->_target);
		_field134 = 0;
	} else if (_v2) {
		_field134 = msg->_target;
		loadMovie("z168.avi", false);
		stopMovie();
		playClip("Take Off", MOVIE_NOTIFY_OBJECT);
		_npcFlags |= NPCFLAG_2000000;
	} else {
		_npcFlags |= NPCFLAG_400000;
		_field134 = msg->_target;
		stopMovie();
	}

	return true;
}
Example #16
0
bool CDoorbot::DismissBotMsg(CDismissBotMsg *msg) {
	if (_npcFlags & NPCFLAG_400000) {
		playClip(getRandomNumber(1) ? "Whizz Off Left" : "Whizz Off Right",
			MOVIE_STOP_PREVIOUS | MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
		movieEvent();

		if (_npcFlags & NPCFLAG_START_IDLING) {
			_npcFlags &= ~NPCFLAG_START_IDLING;
			performAction(true);
		} else {
			performAction(false);
		}

		CActMsg actMsg("DoorbotDismissed");
		actMsg.execute("BotIdleSummons");
	}

	return true;
}
Example #17
0
bool CParrot::FrameMsg(CFrameMsg *msg) {
	if (compareViewNameTo("ParrotLobby.Node 1.N"))
		return false;
	if (_v4)
		return true;

	Point pt = getMousePos();
	CGameObject *dragObject = getDraggingObject();
	int xp = _bounds.left + _bounds.width() / 2;

	if ((_npcFlags & NPCFLAG_400000) && !hasActiveMovie()) {
		_field128 = xp - (_field124 + _bounds.width() / 2);

		if (xp < 64) {
			if (_field134) {
				CActMsg actMsg("PanAwayFromParrot");
				actMsg.execute(_field134);
			}

			_npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000
				| NPCFLAG_80000 | NPCFLAG_100000 | NPCFLAG_200000 | NPCFLAG_400000);
			return true;
		}
	}

	bool chickenFlag = dragObject && dragObject->isEquals("Chicken");

	if (_npcFlags & NPCFLAG_1000000) {
		if (!chickenFlag || pt.x > 70 || pt.y < 90 || pt.y > 280) {
			stopMovie();
			loadFrame(0);
			setPosition(Point(-90, _bounds.top));
		}
	} else {
		if (!chickenFlag)
			return false;
	}

	_field128 = CLIP((int)pt.x, 230, 480);
	if ((_npcFlags & NPCFLAG_10000) || hasActiveMovie())
		return true;

	if (_field128 > 64) {
		_npcFlags |= NPCFLAG_10000 | NPCFLAG_20000;

		if (_field128 >= xp) {
			setPosition(Point(_bounds.left + 30, _bounds.top));
			_npcFlags |= NPCFLAG_200000;
			playClip("Walk Right Intro", MOVIE_NOTIFY_OBJECT);
		} else {
			_npcFlags |= NPCFLAG_100000;
			playClip("Walk Left Intro", MOVIE_NOTIFY_OBJECT);
		}
	} else if (chickenFlag && pt.y >= 90 && pt.y <= 280 && !_field12C) {
		CParrotTriesChickenMsg triesMsg;
		triesMsg.execute(dragObject);

		CTrueTalkTriggerActionMsg triggerMsg;
		int id;
		switch (triesMsg._value2) {
		case 1:
			id = 280056 + (triesMsg._value1 ? 234 : 0);
			break;
		case 2:
			id = 280055 + (triesMsg._value1 ? 234 : 0);
			break;
		case 3:
			id = 280054 + (triesMsg._value1 ? 234 : 0);
			break;
		default:
			id = 280053 + (triesMsg._value1 ? 234 : 0);
			break;
		}

		if (id < 280266) {
			if (pt.x < 75) {
				_npcFlags |= NPCFLAG_1000000;
				playClip("Walk Left Intro", MOVIE_STOP_PREVIOUS);
				playClip("Walk Left Loop", MOVIE_NOTIFY_OBJECT);
				movieEvent(236);
				chickenFlag = false;
			} else if ((pt.x - xp) > 15) {
				_npcFlags |= NPCFLAG_800000;
				playClip("Peck At Feet Right", MOVIE_NOTIFY_OBJECT);
				movieEvent(170);
			} else if ((xp - pt.x) > 15) {
				_npcFlags |= NPCFLAG_800000;
				playClip("Peck At Feet Left", MOVIE_NOTIFY_OBJECT);
				movieEvent(142);
			} else {
				_npcFlags |= NPCFLAG_800000;
				playClip("Peck At Feet", MOVIE_NOTIFY_OBJECT);
				movieEvent(157);
			}
		}

		if (chickenFlag) {
			triggerMsg._param2 = 1;
			triggerMsg.execute(this);
			_field12C = 1;
		}
	}

	return true;
}
Example #18
0
bool CParrot::MovieEndMsg(CMovieEndMsg *msg) {
	if ((_npcFlags & NPCFLAG_2000000) && clipExistsByEnd("Take Off", msg->_endFrame)) {
		setVisible(false);
		moveUnder(findRoom());
		stopMovie();

		CActMsg actMsg1("LoseParrot");
		actMsg1.execute("ParrotLobbyController");

		if (_field134) {
			CActMsg actMsg2("PanAwayFromParrot");
			actMsg2.execute(_field134);
			_field134 = nullptr;
		} else {
			CActMsg actMsg2("Shut");
			actMsg2.execute("ParrotCage");
		}

		_npcFlags &= ~NPCFLAG_2000000;
		_v4 = 2;
	} else if (_npcFlags & NPCFLAG_10000) {
		if (_npcFlags & NPCFLAG_20000) {
			_npcFlags = (_npcFlags & ~NPCFLAG_20000) | NPCFLAG_40000;
			if (_npcFlags & NPCFLAG_100000) {
				playClip("Walk Left Loop", MOVIE_NOTIFY_OBJECT);
				movieEvent(236);
			} else {
				playClip("Walk Right Loop", MOVIE_NOTIFY_OBJECT);
			}
		} else if (_npcFlags & NPCFLAG_40000) {
			int xp = _bounds.left + _bounds.width() / 2;

			if (_npcFlags & NPCFLAG_100000) {
				if ((xp - _field128) > 32) {
					setPosition(Point(_bounds.left - 40, _bounds.top));
					playClip("Walk Left Loop", MOVIE_NOTIFY_OBJECT);
					movieEvent(236);
				} else {
					setPosition(Point(_bounds.left - 10, _bounds.top));
					playClip("Walk Left Outro", MOVIE_NOTIFY_OBJECT);
					_npcFlags = (_npcFlags & ~NPCFLAG_40000) | NPCFLAG_80000;
				}
			} else {
				if ((_field128 - xp) > 32) {
					playClip("Walk Right Loop", MOVIE_NOTIFY_OBJECT);
					movieEvent(244);
				} else {
					playClip("Walk Right Outro", MOVIE_NOTIFY_OBJECT);
					_npcFlags = (_npcFlags & NPCFLAG_40000) | NPCFLAG_80000;
				}
			}
		} else if (_npcFlags & NPCFLAG_80000) {
			loadFrame(0);
			if (_npcFlags & NPCFLAG_100000)
				setPosition(Point(_bounds.left - 30, _bounds.top));
			else
				setPosition(Point(_bounds.left + 14, _bounds.top));

			_npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_80000 | NPCFLAG_100000 | NPCFLAG_200000);
			CTrueTalkNPC::MovieEndMsg(msg);
		} else {
			if (_npcFlags & NPCFLAG_1000000) {
				Point pt = getMousePos();
				if (pt.x > 70 || pt.y < 90 || pt.y > 280) {
					stopMovie();
					loadFrame(0);
					_npcFlags &= ~NPCFLAG_1000000;
				}

				if (clipExistsByEnd("Walk Left Loop", msg->_endFrame)) {
					playClip("Lean Over To Chicken", MOVIE_NOTIFY_OBJECT);
					setPosition(Point(_bounds.left - 55, _bounds.top));
					_field130 = (-100 - _bounds.left) / 5;
					movieEvent(261);
					movieEvent(262);
					movieEvent(265);
					movieEvent(268);
					movieEvent(271);
					return true;

				} else if (clipExistsByEnd("Lean Over To Chicken", msg->_endFrame)) {
					playClip("Eat Chicken", 0);
					playClip("Eat Chicken 2", MOVIE_NOTIFY_OBJECT);
					_v1 = 1;

					CStatusChangeMsg statusMsg;
					statusMsg._newStatus = 0;
					statusMsg.execute("PerchCoreHolder");

					CTrueTalkTriggerActionMsg actionMsg;
					actionMsg._param1 = 280266;
					actionMsg._param2 = 1;
					actionMsg.execute(this);

					CCarry *chicken = dynamic_cast<CCarry *>(findUnder(getRoot(), "Chicken"));
					if (chicken) {
						CActMsg actMsg("Eaten");
						actMsg.execute(chicken);
					}

					_npcFlags &= ~NPCFLAG_1000000;
					return true;
				}
			}

			if (clipExistsByEnd("Eat Chicken 2", msg->_endFrame)) {
				CStatusChangeMsg statusMsg;
				statusMsg._newStatus = 1;
				statusMsg.execute("PerchCoreHolder");

				if (_v2) {
					loadMovie("z168.avi", false);
					playClip("Take Off", MOVIE_NOTIFY_OBJECT);
					setPosition(Point(20, 10));
					_npcFlags |= NPCFLAG_2000000;
				} else {
					_npcFlags &= ~(NPCFLAG_10000 | NPCFLAG_20000 | NPCFLAG_40000 | NPCFLAG_80000 | NPCFLAG_100000 | NPCFLAG_200000);
					_npcFlags |= NPCFLAG_400000;
					stopMovie();
					loadFrame(0);
					setPosition(Point(-90, _bounds.top));
				}
			} else {
				CTrueTalkNPC::MovieEndMsg(msg);
			}
		}
	}

	return true;
}
Example #19
0
bool CDoorbot::TimerMsg(CTimerMsg *msg) {
	if (msg->_action == "NPCIdleAnim") {
		return CTrueTalkNPC::TimerMsg(msg);
	} else if (_npcFlags & NPCFLAG_DOORBOT_INTRO) {
		_timerId = 0;

		switch (msg->_actionVal) {
		case 0:
			startTalking(this, 221475);
			break;

		case 1:
			startTalking(this, 221476);
			break;

		case 2:
			startTalking(this, 221477);
			break;

		case 3:
			playClip("DoubleTake Start");
			playClip("DoubleTake End");
			playClip("DoubleTake Start");
			playClip("DoubleTake End", MOVIE_NOTIFY_OBJECT);
			_introMovieNum = 3;
			break;

		case 4:
			startTalking(this, 221483);
			lockInputHandler();
			_field114 = true;
			break;

		case 5:
			lockInputHandler();
			mouseDisableControl();
			_field114 = true;
			startTalking(this, 221485);
			break;

		case 6:
			// Start dragging photograph to PET
			CMouseButtonDownMsg::generate();
			mouseSetPosition(Point(200, 430), 2500);
			_timerId = addTimer(7, 2500, 0);
			break;

		case 7:
			// Drop photograph in PET
			CMouseButtonUpMsg::generate();
			startTalking(this, 221486);
			mouseEnableControl();
			unlockInputHandler();
			_field114 = false;
			disableMouse();
			break;

		default:
			break;
		}
	} else if (msg->_action == "SummonBellbot") {
		CRoomItem *room = getRoom();
		if (room) {
			CSummonBotMsg botMsg;
			botMsg._npcName = "Bellbot";
			botMsg.execute(room);
		}

		_npcFlags &= ~NPCFLAG_4000000;
	}

	return true;
}
Example #20
0
bool CDoorbot::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) {
	CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(msg);

	if (_npcFlags & NPCFLAG_DOORBOT_INTRO) {
		// Initial speech by Doorbot in 
		switch (msg->_dialogueId) {
		case 10552:
			playClip("SE Try Buttons", MOVIE_NOTIFY_OBJECT);
			_introMovieNum = 9;
			break;

		case 10553:
			enableMouse();
			break;

		case 10557:
			playClip("SE Move To Right", MOVIE_NOTIFY_OBJECT);
			_introMovieNum = 11;
			break;

		case 10559:
			stopAnimTimer(_timerId);
			_timerId = addTimer(0, 2500, 0);
			break;

		case 10560:
			petShow();
			petSetArea(PET_CONVERSATION);
			stopAnimTimer(_timerId);
			_timerId = addTimer(1, 1000, 0);
			break;

		case 10561:
			enableMouse();
			_introMovieNum = 1;
			stopAnimTimer(_timerId);
			_timerId = addTimer(2, 10000, 0);
			break;

		case 10562:
			if (_introMovieNum == 1) {
				stopAnimTimer(_timerId);
				_timerId = addTimer(2, getRandomNumber(5000), 0);
			}
			break;

		case 10563:
		case 10564:
			disableMouse();
			startTalking(this, 221480);
			break;

		case 10565:
			startTalking(this, 221481);
			break;

		case 10566:
			stopAnimTimer(_timerId);
			_timerId = 0;
			if (_field110 == 2) {
				playClip("Cloak On", MOVIE_NOTIFY_OBJECT);
				_introMovieNum = 6;
			} else {
				_timerId = addTimer(3, 2000, 0);
			}
			break;

		case 10567: {
			CActMsg actMsg("BecomeGettable");
			actMsg.execute("Photograph");
			enableMouse();
			stopAnimTimer(_timerId);
			_timerId = addTimer(4, 5000, 0);
			break;
		}

		case 10568:
			// Start moving cursor to photograph
			mouseDisableControl();
			mouseSetPosition(Point(600, 250), 2500);
			_timerId = addTimer(6, 2500, 0);
			break;

		case 10569:
			if (_field110 != 2) {
				stopAnimTimer(_timerId);
				_timerId = addTimer(5, 3000, 0);
			}
			break;

		case 10570:
			mouseSetPosition(Point(200, 430), 2500);
			_timerId = addTimer(7, 3000, 0);
			break;

		case 10571:
			playClip("Cloak On", MOVIE_NOTIFY_OBJECT);
			_introMovieNum = 6;
			break;

		default:
			break;
		}
	}

	return true;
}
Example #21
0
bool CDoorbot::EnterViewMsg(CEnterViewMsg *msg) {
	if ((_npcFlags & NPCFLAG_DOORBOT_INTRO) && _introMovieNum == 7)
		playClip("SE Move And Turn", MOVIE_NOTIFY_OBJECT);

	return true;
}
Example #22
0
bool CDeskbot::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
    switch (msg->_action) {
    case 19:
        inc54();
        lockMouse();
        petSetArea(PET_CONVERSATION);
        playClip("ReprogramPETInHand", MOVIE_NOTIFY_OBJECT);
        _npcFlags |= NPCFLAG_10000;
        _classNum = (PassengerClass)msg->_param1;

        switch (_classNum) {
        case FIRST_CLASS:
            petDisplayMessage(UPGRADED_TO_FIRST_CLASS);
            setPassengerClass(_classNum);
            petReassignRoom(_classNum);
            break;
        case SECOND_CLASS:
            petDisplayMessage(UPGRADED_TO_SECOND_CLASS);
            setPassengerClass(_classNum);
            petReassignRoom(_classNum);
            break;
        case THIRD_CLASS:
            setPassengerClass(THIRD_CLASS);
            petReassignRoom(_classNum);
            break;
        default:
            break;
        }

    case 20:
        if (getPassengerClass() == 1) {
            CPetControl *petControl = getPetControl();
            if (petControl)
                petControl->changeLocationClass(UNCHECKED);
        }
        break;

    case 21:
        if (getPassengerClass() == FIRST_CLASS) {
            CPetControl *petControl = getPetControl();
            if (petControl)
                petControl->changeLocationClass(THIRD_CLASS);
        }
        break;

    case 22:
        if (getPassengerClass() == FIRST_CLASS) {
            CPetControl *petControl = getPetControl();
            if (petControl)
                petControl->changeLocationClass(SECOND_CLASS);
        }
        break;

    case 23:
        if (getPassengerClass() == FIRST_CLASS) {
            CPetControl *petControl = getPetControl();
            if (petControl)
                petControl->changeLocationClass(FIRST_CLASS);
        }
        break;

    case 26:
        _npcFlags |= NPCFLAG_80000;
        CTurnOff turnOff;
        turnOff.execute(this);
        lockMouse();
        break;
    }

    return true;
}