// ====================================================================== // // itp_thrawn_winthazen.script // Copyright 2004, Sony Online Entertainment // All Rights Reserved. // // Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE! // // ====================================================================== // ====================================================================== // Library Includes // ====================================================================== include library.ai_lib; include library.chat; include library.groundquests; include library.space_quest; include library.utils; // ====================================================================== // Script Constants // ====================================================================== string c_stringFile = "conversation/itp_thrawn_winthazen"; // ====================================================================== // Script Conditions // ====================================================================== boolean itp_thrawn_winthazen_condition__defaultCondition (obj_id player, obj_id npc) { return true; } // ---------------------------------------------------------------------- boolean itp_thrawn_winthazen_condition_thrawnTaskActive (obj_id player, obj_id npc) { return groundquests.isTaskActive(player, "itp_thrawn_02", "itp_thrawn_02_02c"); } // ====================================================================== // Script Actions // ====================================================================== void itp_thrawn_winthazen_action_thrawnSignal (obj_id player, obj_id npc) { groundquests.sendSignal(player, "itp_thrawn_02_02c"); } // ====================================================================== // Script %TO Tokens // ====================================================================== // ====================================================================== // Script %DI Tokens // ====================================================================== // ====================================================================== // Script %DF Tokens // ====================================================================== // ====================================================================== // handleBranch Functions // ====================================================================== // ====================================================================== // User Script Triggers // ====================================================================== trigger OnInitialize () { if ((!isMob (self)) || (isPlayer (self))) detachScript(self, "conversation.itp_thrawn_winthazen"); setCondition (self, CONDITION_CONVERSABLE); return SCRIPT_CONTINUE; } trigger OnAttach () { setCondition (self, CONDITION_CONVERSABLE); return SCRIPT_CONTINUE; } trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo) { int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null); menu_info_data menuInfoData = menuInfo.getMenuItemById (menu); menuInfoData.setServerNotify (false); faceTo( self, player ); return SCRIPT_CONTINUE; } trigger OnIncapacitated (obj_id killer) { clearCondition (self, CONDITION_CONVERSABLE); detachScript (self, "conversation.itp_thrawn_winthazen"); return SCRIPT_CONTINUE; } // ====================================================================== // Script Triggers // ====================================================================== //-- This function should move to base_class.java boolean npcStartConversation(obj_id player, obj_id npc, string convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) { Object[] objects = new Object[responses.length]; System.arraycopy(responses, 0, objects, 0, responses.length); return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects); } // ---------------------------------------------------------------------- trigger OnStartNpcConversation (obj_id player) { obj_id npc = self; if (ai_lib.isInCombat (npc) || ai_lib.isInCombat (player)) return SCRIPT_OVERRIDE; //-- [NOTE] if (itp_thrawn_winthazen_condition_thrawnTaskActive (player, npc)) { itp_thrawn_winthazen_action_thrawnSignal (player, npc); //-- NPC: Oh, such bad news that the transport was destroyed. But the Empire must go on. Here, please take this ballistics report to Captain Thrawn. string_id message = new string_id (c_stringFile, "s_32"); chat.chat (npc, player, message); return SCRIPT_CONTINUE; } //-- [NOTE] if (itp_thrawn_winthazen_condition__defaultCondition (player, npc)) { //-- NPC: I wonder where my Imperial contact might be. It is not like them to be so tardy. string_id message = new string_id (c_stringFile, "s_34"); chat.chat (npc, player, message); return SCRIPT_CONTINUE; } chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false."); return SCRIPT_CONTINUE; } // ---------------------------------------------------------------------- trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response) { if (conversationId != "itp_thrawn_winthazen") return SCRIPT_CONTINUE; obj_id npc = self; int branchId = utils.getIntScriptVar (player, "conversation.itp_thrawn_winthazen.branchId"); chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar (player, "conversation.itp_thrawn_winthazen.branchId"); return SCRIPT_CONTINUE; } // ======================================================================