diff --git a/sku.0/sys.server/compiled/game/script/ai/beast.script b/sku.0/sys.server/compiled/game/script/ai/beast.script index 06cf6927c..4adc04a8f 100644 --- a/sku.0/sys.server/compiled/game/script/ai/beast.script +++ b/sku.0/sys.server/compiled/game/script/ai/beast.script @@ -802,7 +802,7 @@ trigger OnObjectMenuRequest(obj_id player, menu_info mi) } obj_id bcd = beast_lib.getBeastBCD(self); - if(!beast_lib.hasBeastName(self) || (hasObjVar(bcd, beast_lib.OBJVAR_OLD_PET_IDENTIFIER) && !hasObjVar(bcd, beast_lib.OBJVAR_OLD_PET_RENAMED))) + if(!ai_lib.isInCombat(player) && !ai_lib.isAiDead(self) && !ai_lib.aiIsDead(player)) { mi.addRootMenu(menu_info_types.SERVER_MENU2, new string_id("beast", "name_beast")); } @@ -883,7 +883,7 @@ trigger OnObjectMenuSelect(obj_id player, int item) if(item == menu_info_types.SERVER_MENU2) { - if(!beast_lib.hasBeastName(self) || (hasObjVar(bcd, beast_lib.OBJVAR_OLD_PET_IDENTIFIER) && !hasObjVar(bcd, beast_lib.OBJVAR_OLD_PET_RENAMED))) + if(!ai_lib.isInCombat(player) && !ai_lib.isAiDead(self) && !ai_lib.aiIsDead(player)) { sui.inputbox(self, player, "@beast:name_d", sui.OK_CANCEL, "@beast:name_t", sui.INPUT_NORMAL, null, "handleSetBeastName", null); } @@ -1268,8 +1268,7 @@ trigger OnDefenderCombatAction(obj_id attacker, obj_id weapon, int combatResult) return SCRIPT_CONTINUE; } -//onSawAttack never fires for beasts, yet we have this here because Eidson swears it worked at one point -//Travis thinks it never worked +//onSawAttack never fires for beasts, yet we have this here because Development swears it worked at one point trigger OnSawAttack(obj_id defender, obj_id[] attackers) { diff --git a/sku.0/sys.server/compiled/game/script/ai/imperial_presence/harass.script b/sku.0/sys.server/compiled/game/script/ai/imperial_presence/harass.script index 283f7b0e1..629527f30 100644 --- a/sku.0/sys.server/compiled/game/script/ai/imperial_presence/harass.script +++ b/sku.0/sys.server/compiled/game/script/ai/imperial_presence/harass.script @@ -162,7 +162,7 @@ trigger OnAttach() trigger OnTriggerVolumeEntered(string volName, obj_id who) { - if (isDead (self)) + if (isDead (self) || isDead (who)) return SCRIPT_CONTINUE; if (!isIdValid (who)) diff --git a/sku.0/sys.server/compiled/game/script/city/interior_3_convo.script b/sku.0/sys.server/compiled/game/script/city/interior_3_convo.script index d46f60963..5876b5cf9 100644 --- a/sku.0/sys.server/compiled/game/script/city/interior_3_convo.script +++ b/sku.0/sys.server/compiled/game/script/city/interior_3_convo.script @@ -18,6 +18,7 @@ trigger OnAttach() { spawnGuyOne( self ); spawnGuyTwo( self ); + spawnGuyThree( self ); messageTo( self, "checkForScripts", null, 5, false ); messageTo( self, "handleChatting", null, 10, false ); diff --git a/sku.0/sys.server/compiled/game/script/city/interior_4_convo.script b/sku.0/sys.server/compiled/game/script/city/interior_4_convo.script index c31eff7f1..abd92d49d 100644 --- a/sku.0/sys.server/compiled/game/script/city/interior_4_convo.script +++ b/sku.0/sys.server/compiled/game/script/city/interior_4_convo.script @@ -19,6 +19,8 @@ trigger OnAttach() { spawnGuyOne( self ); spawnGuyTwo( self ); + spawnGuyThree ( self ); + spawnGuyFour ( self ); messageTo( self, "checkForScripts", null, 5, false ); messageTo( self, "handleChatting", null, 10, false ); diff --git a/sku.0/sys.server/compiled/game/script/library/ai_lib.scriptlib b/sku.0/sys.server/compiled/game/script/library/ai_lib.scriptlib index 8bea4d7a4..ee8fb8dae 100644 --- a/sku.0/sys.server/compiled/game/script/library/ai_lib.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/ai_lib.scriptlib @@ -623,7 +623,7 @@ void setIgnoreCombat( obj_id npc ) setWantSawAttackTriggers( npc, false ); } -/* -----------------8/12/2002 2:33PM----------------- +/* -------------------------------------------------- * ai.diction - This objvar specifies which npc reaction stringfile * the npc should use to bark spam. * diff --git a/sku.0/sys.server/compiled/game/script/library/beast_lib.scriptlib b/sku.0/sys.server/compiled/game/script/library/beast_lib.scriptlib index 19c079d50..e23a5ee40 100644 --- a/sku.0/sys.server/compiled/game/script/library/beast_lib.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/beast_lib.scriptlib @@ -12,6 +12,7 @@ include library.buff; include library.callable; include library.colors; include library.corpse; +include library.factions; include library.group; include library.hue; include library.incubator; @@ -1243,7 +1244,6 @@ int getTotalBeastsCalled(obj_id player) } // Beast Happiness -// ...happy...HAPPY...happy...HA HA HA! Obey my dog! int getBCDBeastHappiness(obj_id bcd) { if(!isValidBCD(bcd)) @@ -1427,7 +1427,7 @@ void incrementBeastLoyalty(obj_id bcd) int happiness = getBCDBeastHappiness(bcd); - //Happiness has a effect on loyalty gain, so it can scale from -50 to +50 + //Happiness has an effect on loyalty gain, so it can scale from -50 to +50 if(happiness < 0) { happiness = 0; @@ -2557,6 +2557,27 @@ void killBeast(obj_id beast, obj_id killer) setBCDBeastHealth(bcd, 0); setBCDBeastIsDead(bcd, true); } +//Called when player beastmaster dies. Pet no longer dies, but is packed up instead. +void playerDeathStoreBeast(obj_id bcd) +{ + if(!isIdValid(bcd)) + { + return; + } + + obj_id datapad = getContainedBy(bcd); + obj_id player = getContainedBy(datapad); + obj_id currentBeast = getBCDBeastCalled(bcd); + + if(!isIdValid(datapad) || !isIdValid(player) || !isIdValid(currentBeast)) + { + return; + } + + factions.setFaction(currentBeast, "Unattackable"); + stop(currentBeast); + storeBeast(bcd); +} void incrementBeastExperience(obj_id beast) { diff --git a/sku.0/sys.server/compiled/game/script/library/respec.scriptlib b/sku.0/sys.server/compiled/game/script/library/respec.scriptlib index dfc93ff09..4d5304fd1 100644 --- a/sku.0/sys.server/compiled/game/script/library/respec.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/respec.scriptlib @@ -46,7 +46,7 @@ const string OBJVAR_RESPEC = "respec.authorized"; // player the next time the OnLogout trigger is called const string OBJVAR_REMOVE_ON_LOGOUT = "respec.removeonlogout"; -// This objvar (which as of this writing 6/6/05 is out of date) controls access to the respec by limiting +// This objvar (which as of this writing is out of date) controls access to the respec by limiting // the number of times the player is allowed to respec. Specifically this objvar should contain, at all // times, the number of times this player has respec'd within this round of respec authorization. const string OBJVAR_RESPEC_COUNT = "respec.count"; @@ -190,6 +190,13 @@ void handleNpcRespec(obj_id player, string skillTemplateName) // We're definately respeccing now so destroy officer pets. pet_lib.destroyOfficerPets(player); + obj_id inv = utils.getInventoryContainer(player); + obj_id weapon = getCurrentWeapon(player); + if(isIdValid(weapon)) + { + putInOverloaded(weapon, inv); + } + if(cost > 0) { money.requestPayment(player, money.ACCT_SKILL_TRAINING, cost, "none", null, false); @@ -280,6 +287,13 @@ void earnProfessionSkillsViaNpc(obj_id player, string skillTemplateName, boolean revokeAllSkillsAndExperience(player); buff.removeAllBuffs(player, true, true); + obj_id inv = utils.getInventoryContainer(player); + obj_id weapon = getCurrentWeapon(player); + if(isIdValid(weapon)) + { + putInOverloaded(weapon, inv); + } + if(level> 0) { autoLevelPlayer(player, level, true); @@ -921,7 +935,7 @@ void revokeAllSkillsAndExperience(obj_id player) grantExperiencePoints(player, xpTypes[i], -curXp); } - // Grant existing Jedi a badge and clear Jedi data + /* // Grant existing Jedi a badge and clear Jedi data if (isJedi(player)) { setJediState(player, JEDI_STATE_NONE); @@ -929,6 +943,7 @@ void revokeAllSkillsAndExperience(obj_id player) grantCommand(player, "blueGlowie"); groundquests.grantQuestNoAcceptUI(player, "jedi_gifts_1", false); } + */ // Revoke all old Skills string[] skillList = getSkillListingForPlayer(player); @@ -1040,7 +1055,7 @@ void contentPathHandoff (obj_id self) //Give everyone the uniform crate static_item.createNewItemFunction("item_npe_uniform_crate_01_01", objInv); - //11/9: wwallace: changed this to use the library function + //changed this to use the library function npe.giveProfessionWeapon(self); } diff --git a/sku.0/sys.server/compiled/game/script/npc/celebrity/luke.script b/sku.0/sys.server/compiled/game/script/npc/celebrity/luke.script index 124e0221a..17bc6e63f 100644 --- a/sku.0/sys.server/compiled/game/script/npc/celebrity/luke.script +++ b/sku.0/sys.server/compiled/game/script/npc/celebrity/luke.script @@ -5,7 +5,7 @@ include library.ai_lib; trigger OnAttach () { ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL ); - debugSpeakMsg (self, "Aw..."); + //debugSpeakMsg (self, "Aw..."); attachScript (self, "conversation.rtp_luke_main"); //setObjVar (self, "quest_table", "luke_skywalker" ); diff --git a/sku.0/sys.server/compiled/game/script/npc/converse/dynamic_convo.script b/sku.0/sys.server/compiled/game/script/npc/converse/dynamic_convo.script index 955dcfdd3..8a042c38a 100644 --- a/sku.0/sys.server/compiled/game/script/npc/converse/dynamic_convo.script +++ b/sku.0/sys.server/compiled/game/script/npc/converse/dynamic_convo.script @@ -183,7 +183,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (dialogResponse.length == 0) { - chat.chat(self, openDialog); + chat.chat(self, speaker, openDialog); return SCRIPT_OVERRIDE; } diff --git a/sku.0/sys.server/compiled/game/script/npc/converse/npc_convo_assassin_mission.script b/sku.0/sys.server/compiled/game/script/npc/converse/npc_convo_assassin_mission.script index 929ca0e48..aa4cb400d 100644 --- a/sku.0/sys.server/compiled/game/script/npc/converse/npc_convo_assassin_mission.script +++ b/sku.0/sys.server/compiled/game/script/npc/converse/npc_convo_assassin_mission.script @@ -65,7 +65,7 @@ trigger OnStartNpcConversation (obj_id speaker) if(objMissionArray.length>=MAX_MISSIONS ) { string_id greeting = new string_id ("mission/mission_generic", "npc_on_other_mission"); - chat.chat(self, greeting); + chat.chat(self, speaker, greeting); return SCRIPT_CONTINUE; } } @@ -91,7 +91,7 @@ trigger OnStartNpcConversation (obj_id speaker) if ( !playerFaction.equals(type) ) { string_id notInFaction = new string_id(BASE_CONVO, type + "_npc_cannot_offer" ); - chat.chat (self, notInFaction); + chat.chat (self, speaker, notInFaction); return SCRIPT_OVERRIDE; } } @@ -99,7 +99,7 @@ trigger OnStartNpcConversation (obj_id speaker) else if ( playerFaction.equals("Imperial") || playerFaction.equals("Rebel") ) { string_id notNeutral= new string_id(BASE_CONVO, type + "_npc_cannot_offer" ); - chat.chat (self, notNeutral); + chat.chat (self, speaker, notNeutral); return SCRIPT_OVERRIDE; } @@ -230,7 +230,7 @@ trigger OnNpcConversationResponse (string convo, obj_id player, string_id respon // Give Mission Here string_id strResponse = new string_id(BASE_CONVO, type + "_npc_give_job_response"); npcEndConversation (player); - chat.chat(self, strResponse); + chat.chat(self, player, strResponse); } // Player turns down the job. @@ -238,7 +238,7 @@ trigger OnNpcConversationResponse (string convo, obj_id player, string_id respon { string_id strResponse = new string_id(BASE_CONVO, type + "_npc_turned_down_response"); npcEndConversation (player); - chat.chat(self, strResponse); + chat.chat(self, player, strResponse); } // Player asks a second question. diff --git a/sku.0/sys.server/compiled/game/script/npc/converse/philosopher.script b/sku.0/sys.server/compiled/game/script/npc/converse/philosopher.script index 68232d009..8b1081696 100644 --- a/sku.0/sys.server/compiled/game/script/npc/converse/philosopher.script +++ b/sku.0/sys.server/compiled/game/script/npc/converse/philosopher.script @@ -17,7 +17,7 @@ trigger OnStartNpcConversation (obj_id speaker) string lineToSay = "philosopher_1"; string datatable = "datatables/npc/convo/philosopher.iff"; - if (ai_lib.isInCombat(self) || ai_lib.isInCombat(speaker)) + if (ai_lib.isInCombat(self) || ai_lib.isInCombat(speaker) || hasScript(self, "themepark.poi.tatooine.city.npc_mission_convo") || hasScript(self, "themepark.poi.tatooine.city.npc_mission_01_friend_convo")) { return SCRIPT_OVERRIDE; } @@ -38,7 +38,7 @@ trigger OnStartNpcConversation (obj_id speaker) } string_id message = new string_id (CONVO, lineToSay); - chat.chat (self, message); + chat.chat (self, speaker, message); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/npc/epic_quest/quest_convo.script b/sku.0/sys.server/compiled/game/script/npc/epic_quest/quest_convo.script index 577d39efe..57fb3ce19 100644 --- a/sku.0/sys.server/compiled/game/script/npc/epic_quest/quest_convo.script +++ b/sku.0/sys.server/compiled/game/script/npc/epic_quest/quest_convo.script @@ -50,7 +50,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (checkForGatingItem(playerInv, speaker, questNum, datatable) != true) { string_id rewardMessage = new string_id (CONVO, "notyet"); - chat.chat (self, rewardMessage); + chat.chat (self, speaker, rewardMessage); return SCRIPT_OVERRIDE; } } @@ -66,7 +66,7 @@ trigger OnStartNpcConversation (obj_id speaker) { CONVO = dataTableGetString (datatable, 1, 1); string_id notyet = new string_id(CONVO, "notyet" ); - chat.chat (self, notyet); + chat.chat (self, speaker, notyet); return SCRIPT_OVERRIDE; } } @@ -78,14 +78,14 @@ trigger OnStartNpcConversation (obj_id speaker) { CONVO = dataTableGetString (datatable, 1, 1); string_id next = new string_id(CONVO, "next" ); - chat.chat (self, next); + chat.chat (self, speaker, next); return SCRIPT_OVERRIDE; } else if (hasObjVar (speaker, questID + ".done")) { string_id reward = new string_id(CONVO, "npc_reward_" + questNum); - chat.chat (self, reward); + chat.chat (self, speaker, reward); giveReward(self, speaker, questNum); return SCRIPT_CONTINUE; } @@ -165,7 +165,7 @@ trigger OnNpcConversationResponse (string convo, obj_id player, string_id respon { string noLoc = "npc_noloc_" + questNum; string_id message = new string_id (CONVO, noLoc); - chat.chat (self, message); + chat.chat (self, player, message); npcEndConversation(player); return SCRIPT_CONTINUE; } @@ -332,14 +332,14 @@ trigger OnGiveItem(obj_id item, obj_id player) } } string_id notyet = new string_id(CONVO, "good" ); - chat.chat (self, notyet); + chat.chat (self, player, notyet); return SCRIPT_CONTINUE; } else { string_id notyet = new string_id(CONVO, "notit" ); - chat.chat (self, notyet); + chat.chat (self, player, notyet); return SCRIPT_CONTINUE; } } @@ -370,4 +370,4 @@ messageHandler scriptCheck () detachScript (self, "npc.static_quest.quest_convo"); } return SCRIPT_CONTINUE; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/npc/epic_quest/quest_npc.script b/sku.0/sys.server/compiled/game/script/npc/epic_quest/quest_npc.script index 45032caf8..7b8761440 100644 --- a/sku.0/sys.server/compiled/game/script/npc/epic_quest/quest_npc.script +++ b/sku.0/sys.server/compiled/game/script/npc/epic_quest/quest_npc.script @@ -37,7 +37,7 @@ trigger OnStartNpcConversation (obj_id speaker) { string reward = "npc_takeme_" + questNum; string_id message = new string_id (CONVO, reward); - chat.chat (self, message); + chat.chat (self, speaker, message); dictionary parms = new dictionary(); parms.put ("player", speaker); messageTo (self, "followPlayer", parms, 0, true); @@ -52,7 +52,7 @@ trigger OnStartNpcConversation (obj_id speaker) { string reward = "npc_smuggle_" + questNum; string_id message = new string_id (CONVO, reward); - chat.chat (self, message); + chat.chat (self, speaker, message); dictionary parms = new dictionary(); parms.put ("player", speaker); messageTo (self, "giveReward", parms, 0, true); @@ -61,7 +61,7 @@ trigger OnStartNpcConversation (obj_id speaker) else { string_id work = new string_id(CONVO, "gotowork"); - chat.chat (self, work); + chat.chat (self, speaker, work); return SCRIPT_CONTINUE; } } @@ -70,14 +70,14 @@ trigger OnStartNpcConversation (obj_id speaker) else { string_id work = new string_id(CONVO, "otherescort"); - chat.chat (self, work); + chat.chat (self, speaker, work); return SCRIPT_CONTINUE; } } else { string_id blah = new string_id (CONVO, "dontknowyou"); - chat.chat (self, blah); + chat.chat (self, speaker, blah); return SCRIPT_CONTINUE; } } @@ -158,7 +158,7 @@ messageHandler saySomething() string something = "npc_breech_" + questNum; string_id message = new string_id (CONVO, something); - chat.chat (self, message); + chat.chat (self, player, message); if (type == "destroy" || type == "fetch") { diff --git a/sku.0/sys.server/compiled/game/script/npc/faction_recruiter/shuttle_extract.script b/sku.0/sys.server/compiled/game/script/npc/faction_recruiter/shuttle_extract.script index 54e25a613..fdc8e5394 100644 --- a/sku.0/sys.server/compiled/game/script/npc/faction_recruiter/shuttle_extract.script +++ b/sku.0/sys.server/compiled/game/script/npc/faction_recruiter/shuttle_extract.script @@ -118,12 +118,6 @@ trigger OnObjectMenuSelect(obj_id player, int item) return SCRIPT_CONTINUE; } -/***** MESSAGEHANDLERS *************************************************/ - - -/***** COMMANDHANDLERS *************************************************/ - - /***** FUNCTIONS *******************************************************/ boolean createExtractionWaypoint(obj_id player, location loc) { diff --git a/sku.0/sys.server/compiled/game/script/npc/pet_deed/reward_pet_deed.script b/sku.0/sys.server/compiled/game/script/npc/pet_deed/reward_pet_deed.script index 6178a79ff..1c07df242 100644 --- a/sku.0/sys.server/compiled/game/script/npc/pet_deed/reward_pet_deed.script +++ b/sku.0/sys.server/compiled/game/script/npc/pet_deed/reward_pet_deed.script @@ -46,7 +46,7 @@ trigger OnObjectMenuSelect (obj_id player, int item) string creatureType = getStringObjVar(self, "creatureName"); // *************************************** - // New Vet Reward Pets and Familiars - PMW + // New Vet Reward Pets and Familiars if( pet_lib.isFamiliarPetTypeByCreatureName(creatureType) ) { obj_id controlDevice = pet_lib.generatePetOfTypeFamiliar(creatureType, player); diff --git a/sku.0/sys.server/compiled/game/script/npc/random_quest/quest_convo.script b/sku.0/sys.server/compiled/game/script/npc/random_quest/quest_convo.script index e8be9051a..d23ced9eb 100644 --- a/sku.0/sys.server/compiled/game/script/npc/random_quest/quest_convo.script +++ b/sku.0/sys.server/compiled/game/script/npc/random_quest/quest_convo.script @@ -52,7 +52,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (checkForFetchItem(playerInv, speaker, questNum) == true) { string_id reward = new string_id(CONVO, "npc_reward_" + questNum); - chat.chat (self, reward); + chat.chat (self, speaker, reward); giveReward(self, speaker, questNum); return SCRIPT_CONTINUE; } @@ -76,7 +76,7 @@ trigger OnStartNpcConversation (obj_id speaker) else { string_id reward = new string_id(CONVO, "npc_reward_" + questNum); - chat.chat (self, reward); + chat.chat (self, speaker, reward); giveReward(self, speaker, questNum); return SCRIPT_CONTINUE; @@ -191,7 +191,7 @@ trigger OnNpcConversationResponse (string convo, obj_id player, string_id respon { string noLoc = "npc_noloc_" + questNum; string_id message = new string_id (CONVO, noLoc); - chat.chat (self, message); + chat.chat (self, player, message); npcEndConversation(player); return SCRIPT_OVERRIDE; } @@ -520,4 +520,4 @@ void resetOtherQuest (obj_id self, obj_id player) removeObjVar (player, "quest_table"); removeObjVar (player, "questNum"); return; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/npc/random_quest/quest_npc.script b/sku.0/sys.server/compiled/game/script/npc/random_quest/quest_npc.script index d1459d072..c9e78a022 100644 --- a/sku.0/sys.server/compiled/game/script/npc/random_quest/quest_npc.script +++ b/sku.0/sys.server/compiled/game/script/npc/random_quest/quest_npc.script @@ -35,7 +35,7 @@ trigger OnStartNpcConversation (obj_id speaker) { string reward = "npc_takeme_" + questNum; string_id message = new string_id (CONVO, reward); - chat.chat (self, message); + chat.chat (self, speaker, message); dictionary parms = new dictionary(); parms.put ("player", speaker); messageTo (self, "followPlayer", parms, 2, true); @@ -50,14 +50,14 @@ trigger OnStartNpcConversation (obj_id speaker) { string reward = "npc_smuggle_" + questNum; string_id message = new string_id (CONVO, reward); - chat.chat (self, message); + chat.chat (self, speaker, message); messageTo (speaker, "finishRandomQuest", null, 2, true); return SCRIPT_OVERRIDE; } else { string_id work = new string_id(CONVO, "gotowork"); - chat.chat (self, work); + chat.chat (self, speaker, work); return SCRIPT_CONTINUE; } } @@ -66,14 +66,14 @@ trigger OnStartNpcConversation (obj_id speaker) else { string_id work = new string_id(CONVO, "otherescort"); - chat.chat (self, work); + chat.chat (self, speaker, work); return SCRIPT_CONTINUE; } } else { string_id blah = new string_id (CONVO, "dontknowyou"); - chat.chat (self, blah); + chat.chat (self, speaker, blah); return SCRIPT_CONTINUE; } } @@ -162,7 +162,7 @@ messageHandler saySomething() string something = "npc_breech_" + questNum; string_id message = new string_id (CONVO, something); - chat.chat (self, message); + chat.chat (self, player, message); if (type == "destroy" || type == "fetch") { diff --git a/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_armorsmith.script b/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_armorsmith.script index bc519bb55..22325a88b 100644 --- a/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_armorsmith.script +++ b/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_armorsmith.script @@ -90,7 +90,7 @@ trigger OnStartNpcConversation (obj_id speaker) fullSchematicConversion(speaker); else bootSchematicConversion(speaker); - chat.chat(self, SID_CONVERSION); + chat.chat(self, speaker, SID_CONVERSION); npcEndConversation(speaker); return SCRIPT_CONTINUE; } @@ -100,7 +100,7 @@ trigger OnStartNpcConversation (obj_id speaker) { /*case -1: string_id message = new string_id("quest_armorsmith", "no_skill"); - chat.chat (self, message); + chat.chat (self, speaker, message); break;*/ case 0: // The armorsmith has yet to start the quest. @@ -171,7 +171,7 @@ trigger OnStartNpcConversation (obj_id speaker) default: // Player is not eligable for the quest. Must be a master armorsmith. //npcSpeak - chat.chat(self, SID_GREETING); + chat.chat(self, speaker, SID_GREETING); npcEndConversation(speaker); break; } @@ -365,19 +365,19 @@ trigger OnNpcConversationResponse (string convoName, obj_id speaker, string_id r /***** MESSAGEHANDLERS *************************************************/ messageHandler armorsmithQuestPayment() { + obj_id player = params.getObjId("player"); // Check to see if the payment was sucessful if (params.containsKey(money.DICT_CODE)) { int return_code = params.getInt(money.DICT_CODE); if (return_code == money.RET_FAIL) { - chat.chat(self, SID_NOT_ENOUGH_MONEY); + chat.chat(self, player, SID_NOT_ENOUGH_MONEY); return SCRIPT_CONTINUE; } } // On a successful payment, start the quest - obj_id player = params.getObjId("player"); LOG("LOG_CHANNEL", "player ->" + player); if (!isIdValid(player)) { @@ -398,8 +398,6 @@ messageHandler armorsmithQuestPayment() return SCRIPT_CONTINUE; } -/***** COMMANDHANDLERS *************************************************/ - /***** FUNCTIONS *******************************************************/ string_id[] getConversationResponses(obj_id player, obj_id npc, int progress) diff --git a/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_convo.script b/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_convo.script index 193264c29..fff2c47f7 100644 --- a/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_convo.script +++ b/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_convo.script @@ -118,7 +118,7 @@ trigger OnStartNpcConversation (obj_id speaker) if(questNum == 0) { string_id deactivated = new string_id(ALT_CONVO, "deactivated"); - chat.chat(self, deactivated); + chat.chat(self, speaker, deactivated); return SCRIPT_CONTINUE; } @@ -132,7 +132,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (value > 1) { string_id leave = new string_id (CONVO, "go_away"); - chat.chat (self, leave); + chat.chat (self, speaker, leave); npcEndConversation(speaker); return SCRIPT_CONTINUE; } @@ -143,7 +143,7 @@ trigger OnStartNpcConversation (obj_id speaker) { CONVO = dataTableGetString (datatable, 1, "convo"); string_id next = new string_id(CONVO, "next" ); - chat.chat (self, next); + chat.chat (self, speaker, next); return SCRIPT_OVERRIDE; } @@ -162,14 +162,14 @@ trigger OnStartNpcConversation (obj_id speaker) if (gatingFaction == "Imperial" && !factions.isImperial (speaker)) { string_id notyet = new string_id(CONVO, "notyet" ); - chat.chat (self, notyet); + chat.chat (self, speaker, notyet); return SCRIPT_OVERRIDE; } else if (gatingFaction == "Rebel" && !factions.isRebel(speaker)) { string_id notyet = new string_id(CONVO, "notyet" ); - chat.chat (self, notyet); + chat.chat (self, speaker, notyet); return SCRIPT_OVERRIDE; } @@ -178,7 +178,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (factions.isOnLeave (speaker)) { string_id notyet = new string_id (CONVO, "notyet"); - chat.chat(self, notyet); + chat.chat(self, speaker, notyet); return SCRIPT_OVERRIDE; } } @@ -192,7 +192,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (playerFaction < neededFaction) { string_id notyet = new string_id (CONVO, "notyet"); - chat.chat(self, notyet); + chat.chat(self, speaker, notyet); return SCRIPT_OVERRIDE; } } @@ -212,7 +212,7 @@ trigger OnStartNpcConversation (obj_id speaker) if(isJedi(speaker)) { string_id jedi = new string_id(CONVO, "jedi" ); - chat.chat (self, jedi); + chat.chat (self, speaker, jedi); return SCRIPT_OVERRIDE; } } @@ -232,7 +232,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (checkForGatingItem(playerInv, speaker, questNum, datatable) != true) { string_id rewardMessage = new string_id (CONVO, "notyet"); - chat.chat (self, rewardMessage); + chat.chat (self, speaker, rewardMessage); return SCRIPT_OVERRIDE; } } @@ -247,7 +247,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (!hasObjVar (speaker, gatingObjVar)) { string_id notyet = new string_id (CONVO, "notyet"); - chat.chat (self, notyet); + chat.chat (self, speaker, notyet); return SCRIPT_OVERRIDE; } else @@ -257,7 +257,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (playerGate < gatingAmt) { string_id notyet = new string_id (CONVO, "notyet"); - chat.chat (self, notyet); + chat.chat (self, speaker, notyet); return SCRIPT_OVERRIDE; } } @@ -280,7 +280,7 @@ trigger OnStartNpcConversation (obj_id speaker) else if (questNum > maxGating) { string_id next = new string_id(CONVO, "next" ); - chat.chat (self, next); + chat.chat (self, speaker, next); return SCRIPT_OVERRIDE; } @@ -296,7 +296,7 @@ trigger OnStartNpcConversation (obj_id speaker) failMessage = new string_id (CONVO, "npc_failure"); } - chat.chat (self, failMessage); + chat.chat (self, speaker, failMessage); missionFailure(self,speaker,questNum); return SCRIPT_OVERRIDE; } @@ -306,7 +306,7 @@ trigger OnStartNpcConversation (obj_id speaker) else if (hasObjVar (speaker, questID + ".noloc")) { string_id noLocMessage = new string_id (CONVO, "npc_noloc_" + questNum); - chat.chat (self, noLocMessage); + chat.chat (self, speaker, noLocMessage); resetPlayer(self, speaker, questNum); return SCRIPT_OVERRIDE; } @@ -320,7 +320,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (checkForItem(playerInv, speaker, questNum) == true) { string_id rewardMessage = new string_id (CONVO, "npc_reward_" + questNum); - chat.chat (self, rewardMessage); + chat.chat (self, speaker, rewardMessage); obj_id retrieveObject = getObjIdObjVar (speaker, questID + ".deliver"); destroyObject (retrieveObject); giveReward(self, speaker, questNum); @@ -386,14 +386,14 @@ trigger OnStartNpcConversation (obj_id speaker) if (goodEscort = true) { string_id reward = new string_id(CONVO, "npc_reward_" + questNum); - chat.chat (self, reward); + chat.chat (self, speaker, reward); giveReward(self, speaker, questNum); return SCRIPT_CONTINUE; } else { string_id didnt = new string_id (CONVO, "npc_failure_" + questNum); - chat.chat (self, didnt); + chat.chat (self, speaker, didnt); return SCRIPT_CONTINUE; } } @@ -401,7 +401,7 @@ trigger OnStartNpcConversation (obj_id speaker) { string_id reward = new string_id(CONVO, "npc_reward_" + questNum); - chat.chat (self, reward); + chat.chat (self, speaker, reward); giveReward(self, speaker, questNum); return SCRIPT_CONTINUE; } @@ -485,7 +485,7 @@ trigger OnStartNpcConversation (obj_id speaker) string_id greeting = new string_id (ALT_CONVO,tooWeak); - chat.chat (self, greeting); + chat.chat (self, speaker, greeting); } @@ -682,7 +682,7 @@ trigger OnNpcConversationResponse (string convo, obj_id player, string_id respon { string noLoc = "npc_noloc_" + questNum; string_id message = new string_id (CONVO, noLoc); - chat.chat (self, message); + chat.chat (self, player, message); npcEndConversation(player); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_finish.script b/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_finish.script index 83c7cdc73..5796ebb07 100644 --- a/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_finish.script +++ b/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_finish.script @@ -29,7 +29,7 @@ trigger OnStartNpcConversation (obj_id speaker) { if (type == "rescue" || type == "escort" || type == "arrest") { - string restart = "I'm sorry, could you say that one more time?"; + string restart = ("I'm sorry, could you say that one more time?"); chat.chat (self, restart); attachScript (self, "npc.static_npc.quest_npc"); detachScript (self, "npc.static_npc.quest_finish"); @@ -89,7 +89,7 @@ trigger OnStartNpcConversation (obj_id speaker) else { string_id work = new string_id(CONVO, "gotowork"); - chat.chat (self, work); + chat.chat (self, speaker, work); return SCRIPT_CONTINUE; } @@ -99,7 +99,7 @@ trigger OnStartNpcConversation (obj_id speaker) else { string_id work = new string_id(CONVO, "otherescort"); - chat.chat (self, work); + chat.chat (self, speaker, work); return SCRIPT_CONTINUE; } } @@ -242,7 +242,7 @@ messageHandler saySomething() string something = "npc_breech_" + questNum; string_id message = new string_id (CONVO, something); - chat.chat (self, message); + chat.chat (self, player, message); if (type == "destroy" || type == "fetch") { diff --git a/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_npc.script b/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_npc.script index b086e75e5..b67b36b3c 100644 --- a/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_npc.script +++ b/sku.0/sys.server/compiled/game/script/npc/static_quest/quest_npc.script @@ -39,7 +39,7 @@ trigger OnStartNpcConversation (obj_id speaker) { string reward = "npc_takeme_" + questNum; string_id message = new string_id (CONVO, reward); - chat.chat (self, message); + chat.chat (self, speaker, message); dictionary parms = new dictionary(); parms.put ("player", speaker); messageTo (self, "followPlayer", parms, 0, true); @@ -127,7 +127,7 @@ trigger OnStartNpcConversation (obj_id speaker) if (convoType == "terse") { string_id npcGreet = new string_id (CONVO, "npc_smuggle_" + questNum); - chat.chat (self, npcGreet); + chat.chat (self, speaker, npcGreet); return SCRIPT_CONTINUE; } @@ -183,7 +183,7 @@ trigger OnStartNpcConversation (obj_id speaker) work = new string_id (CONVO, "gotowork_" + questNum); } - chat.chat (self, work); + chat.chat (self, speaker, work); return SCRIPT_CONTINUE; } @@ -214,7 +214,7 @@ trigger OnStartNpcConversation (obj_id speaker) string npcGreet = "npc_smuggle_" + questNum; string_id greeting = new string_id (CONVO, npcGreet); - chat.chat (self, greeting); + chat.chat (self, speaker, greeting); npcEndConversation(speaker); } @@ -271,7 +271,7 @@ trigger OnStartNpcConversation (obj_id speaker) work = new string_id (CONVO, "gotowork_" + questNum); } - chat.chat (self, work); + chat.chat (self, speaker, work); return SCRIPT_CONTINUE; } @@ -281,7 +281,7 @@ trigger OnStartNpcConversation (obj_id speaker) { string reward = "npc_takeme_" + questNum; string_id message = new string_id (CONVO, reward); - chat.chat (self, message); + chat.chat (self, speaker, message); if (convoType == "terse") { messageTo (speaker, "finishStaticQuest", null, 0, true); @@ -339,14 +339,14 @@ trigger OnStartNpcConversation (obj_id speaker) else { string_id work = new string_id(CONVO, "otherescort"); - chat.chat (self, work); + chat.chat (self, speaker, work); return SCRIPT_CONTINUE; } } else { string_id blah = new string_id (CONVO, "dontknowyou_" + questNum); - chat.chat (self, blah); + chat.chat (self, speaker, blah); return SCRIPT_CONTINUE; } } @@ -510,7 +510,7 @@ messageHandler saySomething() { if (ai_lib.isNpc(self)) { - chat.chat (self, message); + chat.chat (self, player, message); } } } diff --git a/sku.0/sys.server/compiled/game/script/npc/vendor/vendor.script b/sku.0/sys.server/compiled/game/script/npc/vendor/vendor.script index 456489d2d..c6ce68fef 100644 --- a/sku.0/sys.server/compiled/game/script/npc/vendor/vendor.script +++ b/sku.0/sys.server/compiled/game/script/npc/vendor/vendor.script @@ -272,4 +272,4 @@ messageHandler showNonClassInventory() queueCommand(player, ##"openContainer", container, "", COMMAND_PRIORITY_DEFAULT); return SCRIPT_CONTINUE; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/player/base/base_player.script b/sku.0/sys.server/compiled/game/script/player/base/base_player.script index 8dbc74ac0..61c1ffb32 100644 --- a/sku.0/sys.server/compiled/game/script/player/base/base_player.script +++ b/sku.0/sys.server/compiled/game/script/player/base/base_player.script @@ -4867,7 +4867,7 @@ commandHandler cmdTipFail() commandHandler cmdCheckForceStatus() { -/* COMMENTED OUT AS PART OF NPE/CLICKY-COMBAT CHANGES -- RcT -- 10/11/05 +/* COMMENTED OUT //LOG("quest", "base_player.checkForceStatus"); int progress_level = 0; if (fs_quests.fsBadgeCheck(self)) @@ -6217,7 +6217,7 @@ commandHandler maskscent() commandHandler failMaskscent() { // The player can't creature sneak. Probably because of his position. - sendSystemMessage( self, SID_SYS_SCENTMASK_FAIL ); + //sendSystemMessage( self, SID_SYS_SCENTMASK_FAIL ); return SCRIPT_CONTINUE; } @@ -8261,7 +8261,7 @@ messageHandler handleSTFeeFail() //------------------------------------------------ // /cityInfo -// LIVE 12/15/2004 - CSR command to get city info. +// LIVE CSR command to get city info. // UNLOCALIZED CSR COMMAND //------------------------------------------------ diff --git a/sku.0/sys.server/compiled/game/script/player/player_beastmaster.script b/sku.0/sys.server/compiled/game/script/player/player_beastmaster.script index ce84fcda6..850db69f9 100644 --- a/sku.0/sys.server/compiled/game/script/player/player_beastmaster.script +++ b/sku.0/sys.server/compiled/game/script/player/player_beastmaster.script @@ -63,9 +63,11 @@ trigger OnDeath(obj_id killer, obj_id corpseId) obj_id beast = beast_lib.getBeastOnPlayer(self); - blog("Player killed. Killing beast: " + beast + " killer: " + killer); + obj_id bcd = beast_lib.getBeastBCD(beast); - beast_lib.killBeast(beast, killer); + blog("Player killed. Packing beast: " + beast + " killer: " + killer); + + beast_lib.playerDeathStoreBeast(bcd); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/player/player_faction.script b/sku.0/sys.server/compiled/game/script/player/player_faction.script index 3d2c9fbe2..4df4d0e07 100644 --- a/sku.0/sys.server/compiled/game/script/player/player_faction.script +++ b/sku.0/sys.server/compiled/game/script/player/player_faction.script @@ -238,7 +238,7 @@ messageHandler msgResignFromFaction() { if (hasSkill(self, "force_rank_light_novice") || hasSkill(self, "force_rank_dark_novice")) { - sendSystemMessage(self, new string_id("faction_recruiter", "jedi_cant_resign")); + //sendSystemMessage(self, new string_id("faction_recruiter", "jedi_cant_resign")); return SCRIPT_CONTINUE; } factions.resignFromFaction(self); @@ -261,7 +261,7 @@ messageHandler msgGoCovert() } if (hasScript(self, "force_rank_light_novice") || hasScript(self, "force_rank_dark_novice")) { - sendSystemMessage(self, new string_id("faction_recruiter", "jedi_cant_go_covert")); + //sendSystemMessage(self, new string_id("faction_recruiter", "jedi_cant_go_covert")); removeObjVar(self, "intChangingFactionStatus"); return SCRIPT_CONTINUE; @@ -286,7 +286,7 @@ messageHandler msgGoOnLeave() { if (hasScript(self, "force_rank_light_novice") || hasScript(self, "force_rank_dark_novice")) { - sendSystemMessage(self, new string_id("faction_recruiter", "jedi_cant_go_covert")); + //sendSystemMessage(self, new string_id("faction_recruiter", "jedi_cant_go_covert")); return SCRIPT_CONTINUE; } @@ -300,7 +300,7 @@ messageHandler msgGoOvert() { if (hasScript(self, "force_rank_light_novice") || hasScript(self, "force_rank_dark_novice")) { - sendSystemMessage(self, new string_id("faction_recruiter", "jedi_cant_go_covert")); + //sendSystemMessage(self, new string_id("faction_recruiter", "jedi_cant_go_covert")); return SCRIPT_CONTINUE; } @@ -372,7 +372,7 @@ messageHandler handleLeaveFactionSui() if (hasSkill(player, "force_rank_light_novice") || hasSkill(player, "force_rank_dark_novice")) { - sendSystemMessage(player, new string_id("faction_recruiter", "jedi_cant_resign")); + //sendSystemMessage(player, new string_id("faction_recruiter", "jedi_cant_resign")); return SCRIPT_CONTINUE; } @@ -416,7 +416,7 @@ messageHandler handleGoCovert() if (hasSkill(player, "force_rank_light_novice") || hasSkill(player, "force_rank_dark_novice")) { - sendSystemMessage(player, new string_id("faction_recruiter", "jedi_cant_go_covert")); + //sendSystemMessage(player, new string_id("faction_recruiter", "jedi_cant_go_covert")); return SCRIPT_CONTINUE; } string_id strSpam = new string_id("gcw", "handle_go_covert"); @@ -450,7 +450,7 @@ messageHandler handleGoOvert() if (hasSkill(player, "force_rank_light_novice") || hasSkill(player, "force_rank_dark_novice")) { - sendSystemMessage(player, new string_id("faction_recruiter", "jedi_cant_go_covert")); + //sendSystemMessage(player, new string_id("faction_recruiter", "jedi_cant_go_covert")); return SCRIPT_CONTINUE; } string_id strSpam = new string_id("gcw", "handle_go_covert"); diff --git a/sku.0/sys.server/compiled/game/script/player/player_travel.script b/sku.0/sys.server/compiled/game/script/player/player_travel.script index 3c8599c87..2be142486 100644 --- a/sku.0/sys.server/compiled/game/script/player/player_travel.script +++ b/sku.0/sys.server/compiled/game/script/player/player_travel.script @@ -1400,7 +1400,7 @@ boolean canCallForPickup(obj_id player) return false; } - // 10/02/07 Blocking in any region of geo type "city" + // 10/02/13 Blocking in any region of geo type "city" // This will take care of Aurilia as well as some other military outposts that have been bugged. region geoCities[] = getRegionsWithGeographicalAtPoint(here, regions.GEO_CITY); if(geoCities != null && geoCities.length > 0) diff --git a/sku.0/sys.server/compiled/game/script/player/skill/player_teaching.script b/sku.0/sys.server/compiled/game/script/player/skill/player_teaching.script index 7ca2b7b31..251cbab91 100644 --- a/sku.0/sys.server/compiled/game/script/player/skill/player_teaching.script +++ b/sku.0/sys.server/compiled/game/script/player/skill/player_teaching.script @@ -98,7 +98,7 @@ messageHandler msgTeachSkillSelected() if (!student.isLoaded()) { LOG("LOG_CHANNEL", self + " ->Your student must be nearby in order to teach."); - sendSystemMessage(self, SID_STUDENT_TOO_FAR); + //sendSystemMessage(self, SID_STUDENT_TOO_FAR); return SCRIPT_CONTINUE; } @@ -113,7 +113,7 @@ messageHandler msgTeachSkillSelected() { LOG("LOG_CHANNEL", self + " ->You are too far away from " + student_name + " to teach."); prose_package pp = prose.getPackage(SID_STUDENT_TOO_FAR_TARGET, student); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); return SCRIPT_CONTINUE; } @@ -122,7 +122,7 @@ messageHandler msgTeachSkillSelected() { LOG("LOG_CHANNEL", self + " ->" + student_name + " already has an offer to learn."); prose_package pp = prose.getPackage(SID_STUDENT_HAS_OFFER_TO_LEARN, student); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); return SCRIPT_CONTINUE; } @@ -167,7 +167,7 @@ messageHandler msgTeachSkillSelected() string_id skill_id = utils.unpackString("@skl_n:" + selected_skill); LOG("LOG_CHANNEL", "skill_id ->" + skill_id); prose_package pp = prose.getPackage(SID_OFFER_GIVEN, self, student, skill_id, 0); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); // Set the selected skill on the student and send him the confirmation ui. utils.setScriptVar(student, VAR_SKILL_TO_LEARN, selected_skill); @@ -205,7 +205,7 @@ messageHandler msgTeachSkillConfirmed() { LOG("LOG_CHANNEL", teacher + " ->" + getFirstName(self) + " has refused your offer to teach."); prose_package pp = prose.getPackage(SID_OFFER_REFUSED, self); - sendSystemMessageProse(teacher, pp); + //sendSystemMessageProse(teacher, pp); } return SCRIPT_CONTINUE; @@ -226,7 +226,7 @@ messageHandler msgTeachSkillConfirmed() if (!teacher.isLoaded()) { LOG("LOG_CHANNEL", self + " ->Your teacher must be nearby in order to learn."); - sendSystemMessage(self, SID_TEACHER_TOO_FAR); + //sendSystemMessage(self, SID_TEACHER_TOO_FAR); return SCRIPT_CONTINUE; } @@ -241,7 +241,7 @@ messageHandler msgTeachSkillConfirmed() { LOG("LOG_CHANNEL", self + " ->You are too far away from " + teacher_name + " to learn."); prose_package pp = prose.getPackage(SID_TEACHER_TOO_FAR_TARGET, teacher); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); utils.removeScriptVarTree(self, VAR_TEACHING); return SCRIPT_CONTINUE; } @@ -254,9 +254,9 @@ messageHandler msgTeachSkillConfirmed() LOG("LOG_CHANNEL", self + " ->You learn " + selected_skill + " from " + teacher_name + "."); LOG("LOG_CHANNEL", teacher + " ->" + student_name + " learns " + selected_skill + " from you."); prose_package pp = prose.getPackage(SID_STUDENT_SKILL_LEARNED, teacher, skill_id); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); pp = prose.getPackage(SID_TEACHER_SKILL_LEARNED, self, skill_id); - sendSystemMessageProse(teacher, pp); + //sendSystemMessageProse(teacher, pp); // DISABLED int exp = 0; //getSkillPointCost(selected_skill) * 10; @@ -275,8 +275,8 @@ messageHandler msgTeachSkillConfirmed() { LOG("LOG_CHANNEL", self + " -> Learning failed."); LOG("LOG_CHANNEL", teacher + " -> Teaching failed."); - sendSystemMessage(self, SID_LEARNING_FAILED); - sendSystemMessage(teacher, SID_TEACHING_FAILED); + //sendSystemMessage(self, SID_LEARNING_FAILED); + //sendSystemMessage(teacher, SID_TEACHING_FAILED); } return SCRIPT_CONTINUE; @@ -297,7 +297,7 @@ commandHandler teach() if (!isIdValid(target)) { LOG("LOG_CHANNEL", self + " ->Whom do you want to teach?"); - sendSystemMessage(self, SID_NO_TARGET); + //sendSystemMessage(self, SID_NO_TARGET); return SCRIPT_CONTINUE; } } @@ -305,7 +305,7 @@ commandHandler teach() if (target == self) { LOG("LOG_CHANNEL", self + " ->You cannot teach yourself."); - sendSystemMessage(self, SID_NO_TEACH_SELF); + //sendSystemMessage(self, SID_NO_TEACH_SELF); return SCRIPT_CONTINUE; } @@ -313,7 +313,7 @@ commandHandler teach() { LOG("LOG_CHANNEL", self + " ->" + getFirstName(target) + " does not feel like being taught right now."); prose_package pp = prose.getPackage(SID_STUDENT_DEAD, target); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); return SCRIPT_CONTINUE; } @@ -330,7 +330,7 @@ commandHandler teach() if (distance > TEACHING_RANGE) { LOG("LOG_CHANNEL", self + " ->You must be closer in order to teach."); - sendSystemMessage(self, SID_STUDENT_TOO_FAR); + //sendSystemMessage(self, SID_STUDENT_TOO_FAR); return SCRIPT_CONTINUE; } @@ -339,7 +339,7 @@ commandHandler teach() { LOG("LOG_CHANNEL", self + " ->" + target_name + " already has an offer to learn."); prose_package pp = prose.getPackage(SID_STUDENT_HAS_OFFER_TO_LEARN, target); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); return SCRIPT_CONTINUE; } @@ -348,7 +348,7 @@ commandHandler teach() if (teacher_skills == null) { LOG("LOG_CHANNEL", self + " ->You have no skills to teach."); - sendSystemMessage(self, SID_NO_SKILLS); + //sendSystemMessage(self, SID_NO_SKILLS); return SCRIPT_CONTINUE; } @@ -359,7 +359,7 @@ commandHandler teach() { LOG("LOG_CHANNEL", self + " -> You have no skills that " + target_name + " can currently learn."); prose_package pp = prose.getPackage(SID_NO_SKILLS_FOR_STUDENT, target); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); return SCRIPT_CONTINUE; } @@ -382,7 +382,7 @@ commandHandler teach() { LOG("LOG_CHANNEL", self + " -> You have no skills that " + target_name + " can currently learn."); prose_package pp = prose.getPackage(SID_NO_SKILLS_FOR_STUDENT, target); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); return SCRIPT_CONTINUE; } @@ -391,7 +391,7 @@ commandHandler teach() { LOG("LOG_CHANNEL", self + " ->You must be within the same group as " + target_name + " in order to teach."); prose_package pp = prose.getPackage(SID_NOT_IN_SAME_GROUP, target); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/player/skill/taming.script b/sku.0/sys.server/compiled/game/script/player/skill/taming.script index 5413bded4..56d11d3cd 100644 --- a/sku.0/sys.server/compiled/game/script/player/skill/taming.script +++ b/sku.0/sys.server/compiled/game/script/player/skill/taming.script @@ -80,6 +80,10 @@ commandHandler mount() LOG("mount", "mount(): enter self: " + self + " target: " + target); debugServerConsoleMsg(self, "+++ PLAYER.skill.taming +++ commandHandler mount() +++ just entered commandHandler mount()"); + location here = getLocation (self); + location term = getLocation (target); + float dist = getDistance(here, term); + if(!isIdValid(self) || !isIdValid(target)) { debugServerConsoleMsg(self, "+++ PLAYER.skill.taming +++ commandHandler mount() +++ either isIdValid(self) or isIdValid(target) failed"); @@ -97,6 +101,11 @@ commandHandler mount() return SCRIPT_CONTINUE; } + if (isDead(self) || isIncapacitated(self) || dist > 5.0) + { + return SCRIPT_CONTINUE; + } + //Can't mount a vehicle while in shapechange. int shapechange = buff.getBuffOnTargetFromGroup(self, "shapechange"); obj_id playerCurrentMount = getMountId(self); diff --git a/sku.0/sys.server/compiled/game/script/player/skill/teraskasi.script b/sku.0/sys.server/compiled/game/script/player/skill/teraskasi.script index 3e53da800..70d2c29de 100644 --- a/sku.0/sys.server/compiled/game/script/player/skill/teraskasi.script +++ b/sku.0/sys.server/compiled/game/script/player/skill/teraskasi.script @@ -35,14 +35,14 @@ commandHandler cmdForceOfWill() if ( getPosture(self) != POSTURE_INCAPACITATED ) { - sendSystemMessage(self, meditation.SID_FORCEOFWILL_FAIL); + //sendSystemMessage(self, meditation.SID_FORCEOFWILL_FAIL); return SCRIPT_CONTINUE; } int stamp = getIntObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE); if ( stamp < 0 ) { - sendSystemMessage(self, meditation.SID_FORCEOFWILL_LOST); + //sendSystemMessage(self, meditation.SID_FORCEOFWILL_LOST); return SCRIPT_CONTINUE; } @@ -52,14 +52,14 @@ commandHandler cmdForceOfWill() { string time_string = player_structure.assembleTimeRemaining(player_structure.convertSecondsTime(-delta)); prose_package ppUnavailable = prose.getPackage(meditation.SID_FORCEOFWILL_UNAVAILABLE, time_string); - sendSystemMessageProse(self, ppUnavailable); + //sendSystemMessageProse(self, ppUnavailable); return SCRIPT_CONTINUE; } int roll = rand(0, 100); if ( roll < 5 || modval < roll ) { - sendSystemMessage(self, meditation.SID_FORCEOFWILL_UNSUCCESSFUL); + //sendSystemMessage(self, meditation.SID_FORCEOFWILL_UNSUCCESSFUL); setObjVar(self, meditation.VAR_FORCE_OF_WILL_ACTIVE, -1); return SCRIPT_CONTINUE; } @@ -74,7 +74,7 @@ commandHandler cmdForceOfWill() commandHandler cmdForceOfWillFail() { - sendSystemMessage(self, meditation.SID_FORCEOFWILL_FAIL); + //sendSystemMessage(self, meditation.SID_FORCEOFWILL_FAIL); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/player/species_innate.script b/sku.0/sys.server/compiled/game/script/player/species_innate.script index cea7fc11f..8251e68fc 100644 --- a/sku.0/sys.server/compiled/game/script/player/species_innate.script +++ b/sku.0/sys.server/compiled/game/script/player/species_innate.script @@ -215,7 +215,7 @@ commandHandler cmdInnate() prose.setTO(ppValidInnate, msg); } - sendSystemMessageProse(self, ppValidInnate); + //sendSystemMessageProse(self, ppValidInnate); return SCRIPT_CONTINUE; } @@ -225,7 +225,7 @@ commandHandler cmdInnate() { prose_package ppNotValid = prose.getPackage(SID_NOT_VALID_PARAM_INNATE); prose.setTO(ppNotValid, params); - sendSystemMessageProse(self, ppNotValid); + //sendSystemMessageProse(self, ppNotValid); return SCRIPT_CONTINUE; } else @@ -257,14 +257,14 @@ commandHandler cmdInnate() } prose_package pp = prose.getPackage(innate.PROSE_INNATE_NA, cmd); - sendSystemMessageProse(self, pp); + //sendSystemMessageProse(self, pp); return SCRIPT_CONTINUE; } commandHandler cmdInnateFail() { - sendSystemMessage(self, SID_INNATE_ABILITY_FAILED); + //sendSystemMessage(self, SID_INNATE_ABILITY_FAILED); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/player/veteran_rewards.script b/sku.0/sys.server/compiled/game/script/player/veteran_rewards.script old mode 100644 new mode 100755 diff --git a/sku.0/sys.server/compiled/game/script/quest/task/ground/retrieve_item_on_item.script b/sku.0/sys.server/compiled/game/script/quest/task/ground/retrieve_item_on_item.script index 5a9c35fca..b269aa934 100644 --- a/sku.0/sys.server/compiled/game/script/quest/task/ground/retrieve_item_on_item.script +++ b/sku.0/sys.server/compiled/game/script/quest/task/ground/retrieve_item_on_item.script @@ -86,11 +86,15 @@ trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo) trigger OnObjectMenuSelect(obj_id player, int item) { - if (isDead(player) || isIncapacitated(player)) - return SCRIPT_CONTINUE; + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); if( item == menu_info_types.ITEM_USE || item == menu_info_types.CONVERSE_START ) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + if(hasScript(player, "quest.task.ground.retrieve_item")) { if(groundquests.playerNeedsToRetrieveThisItem(player, self)) diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_egg_splurt.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_egg_splurt.script index a4d081a1c..e9b9d680c 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_egg_splurt.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_egg_splurt.script @@ -2,15 +2,22 @@ include library.groundquests; trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if(hasScript(player, "quest.task.ground.retrieve_item")) { if(groundquests.playerNeedsToRetrieveThisItem(player, self)) { - if(item == menu_info_types.ITEM_USE) - { - playClientEffectLoc(player, "clienteffect/item_egg_splurt.cef", getLocation(self), 1f); + if(item == menu_info_types.ITEM_USE) + { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + + playClientEffectLoc(player, "clienteffect/item_egg_splurt.cef", getLocation(self), 1f); + } + } } - } - } return SCRIPT_CONTINUE; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_electrical_spark.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_electrical_spark.script index 1805009a6..52933a6e0 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_electrical_spark.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_electrical_spark.script @@ -2,12 +2,18 @@ include library.groundquests; trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if(hasScript(player, "quest.task.ground.retrieve_item")) { if(groundquests.playerNeedsToRetrieveThisItem(player, self)) { if( item == menu_info_types.ITEM_USE || item == menu_info_types.CONVERSE_START ) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; if ( isMob(self) ) { diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_explosion.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_explosion.script index ad29ef959..cb7068be8 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_explosion.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_explosion.script @@ -2,6 +2,10 @@ include library.groundquests; trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if( hasScript(player, "quest.task.ground.retrieve_item") || hasScript(player, "quest.task.ground.wave_event_player")) { @@ -10,6 +14,9 @@ trigger OnObjectMenuSelect(obj_id player, int item) { if(item == menu_info_types.ITEM_USE) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + playClientEffectLoc(player, "clienteffect/combat_explosion_lair_large.cef", getLocation(self), 1f); } } diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_red_explosion.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_red_explosion.script index 3b6842c7e..2b3f09955 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_red_explosion.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_red_explosion.script @@ -2,12 +2,19 @@ include library.groundquests; trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if(hasScript(player, "quest.task.ground.retrieve_item")) { if(groundquests.playerNeedsToRetrieveThisItem(player, self)) { if(item == menu_info_types.ITEM_USE) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + playClientEffectLoc(player, "clienteffect/npe_systems_terminal.cef", getLocation(self), 1f); } } diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_red_glow.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_red_glow.script index c305db6c4..1d6214ee3 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_red_glow.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_red_glow.script @@ -2,12 +2,19 @@ include library.groundquests; trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if(hasScript(player, "quest.task.ground.retrieve_item")) { if(groundquests.playerNeedsToRetrieveThisItem(player, self)) { if(item == menu_info_types.ITEM_USE) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + playClientEffectLoc(player, "clienteffect/item_ring_hero_mark.cef", getLocation(self), 1f); } } diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_rotate_north.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_rotate_north.script index da03dd1ad..9ef68ad86 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_rotate_north.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_rotate_north.script @@ -25,8 +25,15 @@ messageHandler handleRecordOriginalRotation() trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if(item == menu_info_types.ITEM_USE) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + if( hasScript(player, "quest.task.ground.retrieve_item") || hasScript(player, "quest.task.ground.wave_event_player")) { if( groundquests.playerNeedsToRetrieveThisItem(player, self, "retrieve_item") || diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_shmi_buff.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_shmi_buff.script index a570259bc..e7dee622f 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_shmi_buff.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_shmi_buff.script @@ -3,15 +3,22 @@ include library.buff; trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if(hasScript(player, "quest.task.ground.retrieve_item")) { if(groundquests.playerNeedsToRetrieveThisItem(player, self)) { if(item == menu_info_types.ITEM_USE) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + buff.applyBuff(player, "shmiGraveBuff"); } } } return SCRIPT_CONTINUE; -} \ No newline at end of file +} diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_small_damage.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_small_damage.script index 3a20347d3..d66e9b58e 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_small_damage.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_small_damage.script @@ -2,12 +2,19 @@ include library.groundquests; trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if(hasScript(player, "quest.task.ground.retrieve_item")) { if(groundquests.playerNeedsToRetrieveThisItem(player, self)) { if(item == menu_info_types.ITEM_USE) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + playClientEffectLoc(player, "clienteffect/lair_damage_light.cef", getLocation(self), 1f); } } diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_smoke.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_smoke.script index 5bb9dfcc4..1eeac0458 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_smoke.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_smoke.script @@ -2,12 +2,19 @@ include library.groundquests; trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if(hasScript(player, "quest.task.ground.retrieve_item")) { if(groundquests.playerNeedsToRetrieveThisItem(player, self)) { if(item == menu_info_types.ITEM_USE) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + playClientEffectLoc(player, "clienteffect/lair_med_damage_smoke.cef", getLocation(self), 1f); } } diff --git a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_vulnerable.script b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_vulnerable.script index 09d0f6001..58046ab33 100644 --- a/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_vulnerable.script +++ b/sku.0/sys.server/compiled/game/script/quest/util/retrieve_item_vulnerable.script @@ -9,12 +9,19 @@ trigger OnAttach () trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + if(hasScript(player, "quest.task.ground.retrieve_item")) { if(groundquests.playerNeedsToRetrieveThisItem(player, self)) { if(item == menu_info_types.ITEM_USE) { + if (isDead(player) || isIncapacitated(player) || dist > 5.0) + return SCRIPT_CONTINUE; + playClientEffectLoc(player, "clienteffect/avatar_wke_electric_01.cef", getLocation(self), 1f); if ( isMob(self) ) { diff --git a/sku.0/sys.server/compiled/game/script/systems/combat/combat_player.script b/sku.0/sys.server/compiled/game/script/systems/combat/combat_player.script index d5c528345..24c07519b 100644 --- a/sku.0/sys.server/compiled/game/script/systems/combat/combat_player.script +++ b/sku.0/sys.server/compiled/game/script/systems/combat/combat_player.script @@ -1,3 +1,5 @@ +// + include library.buff; include library.callable; include library.utils; @@ -99,7 +101,7 @@ trigger OnEnteredCombat() } commandHandler combatModeCheck() { - +/* obj_id objTarget = getTarget(self); if(isIdValid(objTarget)) { @@ -123,7 +125,7 @@ commandHandler combatModeCheck() } - +*/ return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/systems/gcw/player_force_rank.script b/sku.0/sys.server/compiled/game/script/systems/gcw/player_force_rank.script index d637ad702..c6b288baf 100644 --- a/sku.0/sys.server/compiled/game/script/systems/gcw/player_force_rank.script +++ b/sku.0/sys.server/compiled/game/script/systems/gcw/player_force_rank.script @@ -1993,6 +1993,7 @@ messageHandler msgValidateFRSPlayerData() * ***********************************************************************/ commandHandler cmdShowCouncilRank() { +/* int council = force_rank.getCouncilAffiliation(self); if (council == -1) { @@ -2025,6 +2026,8 @@ commandHandler cmdShowCouncilRank() return SCRIPT_CONTINUE; } +*/ +return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/base/mission_dynamic_base.script b/sku.0/sys.server/compiled/game/script/systems/missions/base/mission_dynamic_base.script index 0f5b8d365..8206e17cf 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/base/mission_dynamic_base.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/base/mission_dynamic_base.script @@ -4919,13 +4919,13 @@ boolean areMissionsAllowed(location locTest) return true; } -void doIncorrectPlayerBlurb(obj_id objNPC) +void doIncorrectPlayerBlurb(obj_id objNPC, obj_id player) { int lastBlurb = utils.getIntScriptVar(objNPC, "mission.blurbTime"); int gameTime = getGameTime(); - if(gameTime - lastBlurb < 6) + if(gameTime - lastBlurb < 2) { return; } @@ -4942,7 +4942,7 @@ void doIncorrectPlayerBlurb(obj_id objNPC) strId = strId + intId; string_id strSpam = new string_id("mission/mission_generic", strId); - chat.chat(objNPC, strSpam); + chat.chat(objNPC, player, strSpam); return; } diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_bounty_informant.script b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_bounty_informant.script index 8424a77b0..f57c35fc1 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_bounty_informant.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_bounty_informant.script @@ -103,7 +103,7 @@ trigger OnStartNpcConversation (obj_id speaker) { - doIncorrectPlayerBlurb(self); + doIncorrectPlayerBlurb(self, speaker); return SCRIPT_CONTINUE; } @@ -233,4 +233,4 @@ trigger OnDestroy() return SCRIPT_CONTINUE; } -*/ \ No newline at end of file +*/ diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_crafting_dropoff.script b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_crafting_dropoff.script index e4d511d38..d9bdc131a 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_crafting_dropoff.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_crafting_dropoff.script @@ -47,7 +47,7 @@ trigger OnStartNpcConversation (obj_id speaker) { if(speaker!=objMissionHolder) { - doIncorrectPlayerBlurb(self); + doIncorrectPlayerBlurb(self, speaker); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_crafting_pickup.script b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_crafting_pickup.script index 8ed9e341a..c1f0de34c 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_crafting_pickup.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_crafting_pickup.script @@ -71,7 +71,7 @@ trigger OnStartNpcConversation (obj_id speaker) obj_id objPlayer = getObjIdObjVar(self, "objPlayer"); if(speaker!=objMissionHolder) { - doIncorrectPlayerBlurb(self); + doIncorrectPlayerBlurb(self, speaker); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_dropoff.script b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_dropoff.script index 28c135f06..f9767c4b4 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_dropoff.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_dropoff.script @@ -40,7 +40,7 @@ trigger OnStartNpcConversation (obj_id speaker) if(speaker!=objMissionHolder) { - doIncorrectPlayerBlurb(self); + doIncorrectPlayerBlurb(self, speaker); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_npc.script b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_npc.script index cb0b88a03..19aec2731 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_npc.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_npc.script @@ -43,7 +43,7 @@ trigger OnStartNpcConversation (obj_id speaker) { sendSystemMessageTestingOnly(speaker, "Error 1, Mission list is null"); } - doIncorrectPlayerBlurb(self); + doIncorrectPlayerBlurb(self, speaker); return SCRIPT_CONTINUE; } @@ -105,7 +105,7 @@ trigger OnStartNpcConversation (obj_id speaker) sendSystemMessageTestingOnly(speaker, "Distance is "+dist+" and erroring out"); } - doIncorrectPlayerBlurb(self); + doIncorrectPlayerBlurb(self, speaker); return SCRIPT_CONTINUE; } missionInfo = onlyMission; @@ -173,7 +173,7 @@ trigger OnStartNpcConversation (obj_id speaker) sendSystemMessageTestingOnly(speaker, "rightSpot is false after our loop, erroring out"); } - doIncorrectPlayerBlurb (self); + doIncorrectPlayerBlurb (self, speaker); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_pickup.script b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_pickup.script index 8b5d4a287..3771129ca 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_pickup.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_deliver_pickup.script @@ -70,7 +70,7 @@ trigger OnStartNpcConversation (obj_id speaker) if(speaker!=objMissionHolder) { - doIncorrectPlayerBlurb(self); + doIncorrectPlayerBlurb(self, speaker); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_escort_target.script b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_escort_target.script index d3aa50382..d82057451 100644 --- a/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_escort_target.script +++ b/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/mission_escort_target.script @@ -31,7 +31,7 @@ trigger OnStartNpcConversation (obj_id speaker) obj_id objEscorter = getObjIdObjVar(self, "objEscorter"); if(speaker!=objEscorter) { - doIncorrectPlayerBlurb(self); + doIncorrectPlayerBlurb(self, speaker); return SCRIPT_CONTINUE; diff --git a/sku.0/sys.server/compiled/game/script/terminal/terminal_city.script b/sku.0/sys.server/compiled/game/script/terminal/terminal_city.script index 68f1c02cc..0326bc29f 100644 --- a/sku.0/sys.server/compiled/game/script/terminal/terminal_city.script +++ b/sku.0/sys.server/compiled/game/script/terminal/terminal_city.script @@ -235,10 +235,10 @@ trigger OnObjectMenuRequest(obj_id player, menu_info mi) mi.addSubMenu(menu, menu_info_types.SERVER_MENU8, SID_CITY_FIX_MAYOR); //Remove old Skill Trainers - if(citySkillTrainersExist(city_id)) - { - mi.addRootMenu(menu_info_types.SERVER_MENU10, SID_CITY_REMOVE_OLD_TRAINERS); - } + //if(citySkillTrainersExist(city_id)) + //{ + // mi.addRootMenu(menu_info_types.SERVER_MENU10, SID_CITY_REMOVE_OLD_TRAINERS); + //} //Add Citizen Protection Menu mi.addSubMenu(menu, menu_info_types.SERVER_MENU13, SID_CITY_CITIZEN_PROTECTION); diff --git a/sku.0/sys.server/compiled/game/script/test/qasetup.script b/sku.0/sys.server/compiled/game/script/test/qasetup.script index 941496aea..cc86c41e7 100644 --- a/sku.0/sys.server/compiled/game/script/test/qasetup.script +++ b/sku.0/sys.server/compiled/game/script/test/qasetup.script @@ -969,6 +969,7 @@ trigger OnSpeaking(string text) if (text == "qasetup") { + sendSystemMessage(self, "*******************************************************", null); sendSystemMessage(self, "QA-Setup Commands - Say 'qasetup' to show this list", null); sendSystemMessage(self, "Using a template code will set your character to level 90 with a preset expertise template, suitable weapon(s), ", null); sendSystemMessage(self, "modded armor and clothing as well as some generic items that high level players would normally carry.", null); @@ -989,12 +990,13 @@ trigger OnSpeaking(string text) sendSystemMessage(self, "'qa_buff' to grant your character a full set of buffs (Entertainer, Medic, Food and Mustafarian Injector buff", null); sendSystemMessage(self, "", null); sendSystemMessage(self, "For a list of commands to gain ONLY modded armor, clothing, and weapons, say 'qaobjects'", null); - + sendSystemMessage(self, "*******************************************************", null); } if (text == "qaobjects") { + sendSystemMessage(self, "*******************************************************", null); sendSystemMessage(self, "QA-Objects Commands - Say 'qaobjects' to show this list", null); sendSystemMessage(self, "Using a template code will set your character with suitable weapon(s), ", null); sendSystemMessage(self, "modded armor and clothing as well as some generic items that high level players would normally carry.", null); @@ -1015,7 +1017,8 @@ trigger OnSpeaking(string text) sendSystemMessage(self, "", null); sendSystemMessage(self, "'qa_buff' to grant your character a full set of buffs (Entertainer, Medic, Food and Mustafarian Injector buff", null); sendSystemMessage(self, "", null); - sendSystemMessage)self, "For a list of commands to set your character to level 90 with a preset expertise template, say 'qasetup'", null); + sendSystemMessage(self, "For a list of commands to set your character to level 90 with a preset expertise template, say 'qasetup'", null); + sendSystemMessage(self, "*******************************************************", null); } @@ -1034,6 +1037,7 @@ trigger OnSpeaking(string text) issueClothes((self), CLOTHES, "rangedDps", "shirtRifle"); createPup ((self), "expertise_action_weapon_0", POWERUP_ITEMS, 10); static_item.createNewItemFunction("weapon_tow_rifle_lightning_cannon_04_01", pInv); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_bh_carbine") @@ -1049,6 +1053,7 @@ trigger OnSpeaking(string text) issueAssaultArmorSet((self), ARMOR_SET_ASSAULT_4, "rangedDps", "shirtCarbine"); issueClothes((self), CLOTHES, "rangedDps", "shirtCarbine"); createPup ((self), "expertise_action_weapon_1", POWERUP_ITEMS, 10); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_commando") @@ -1070,6 +1075,7 @@ trigger OnSpeaking(string text) static_item.createNewItemFunction("weapon_tow_heavy_acid_beam_04_01", pInv); static_item.createNewItemFunction("weapon_tow_cannon_04_02", pInv); static_item.createNewItemFunction("weapon_mandalorian_heavy_04_01",pInv); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_officer_Melee") @@ -1089,6 +1095,7 @@ trigger OnSpeaking(string text) createPup ((self), "expertise_critical_1h", POWERUP_ITEMS, 10); obj_id melee = weapons.createWeapon("object/weapon/melee/sword/sword_acid.iff", pInv, weapons.VIA_TEMPLATE, WEAPON_SPEED, WEAPON_DAMAGE, WEAPON_EFFECIENCY, WEAPON_ELEMENTAL); attachMods(melee, "shirt1h"); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_officer_Ranged") @@ -1104,6 +1111,7 @@ trigger OnSpeaking(string text) issueBattleArmorSet((self), ARMOR_SET_BATTLE_4, "rangedDps", "shirtTank"); issueClothes((self), CLOTHES, "rangedDps", "shirtTank"); createPup ((self), "expertise_action_weapon_1", POWERUP_ITEMS, 10); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_jedi_tank") @@ -1133,6 +1141,7 @@ trigger OnSpeaking(string text) static_item.createNewItemFunction("item_tow_lava_crystal_06_01", pInv); obj_id lightsaber = createObject("object/weapon/melee/2h_sword/crafted_saber/sword_lightsaber_two_handed_gen4_must.iff", pInv, ""); attachMods(lightsaber, "shirtTank"); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_jedi_solo") @@ -1162,6 +1171,7 @@ trigger OnSpeaking(string text) static_item.createNewItemFunction("item_tow_lava_crystal_06_01", pInv); obj_id lightsaber = createObject("object/weapon/melee/2h_sword/crafted_saber/sword_lightsaber_two_handed_gen4_must.iff", pInv, ""); attachMods(lightsaber, "shirtTank"); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_medic_support") @@ -1177,6 +1187,7 @@ trigger OnSpeaking(string text) issueBattleArmorSet((self), ARMOR_SET_BATTLE_3, "healer", "shirtHealer"); issueClothes((self), CLOTHES, "healer", "shirtHealer"); createPup ((self), "expertise_healing_all", POWERUP_ITEMS, 8); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_medic_carbine") @@ -1192,6 +1203,7 @@ trigger OnSpeaking(string text) issueBattleArmorSet((self), ARMOR_SET_BATTLE_3, "healer", "shirtTank"); issueClothes((self), CLOTHES, "healer", "shirtTank"); createPup ((self), "expertise_healing_all", POWERUP_ITEMS, 8); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_spy_melee") @@ -1211,6 +1223,7 @@ trigger OnSpeaking(string text) createPup ((self), "expertise_critical_1h", POWERUP_ITEMS, 10); obj_id melee = weapons.createWeapon("object/weapon/melee/sword/sword_acid.iff", pInv, weapons.VIA_TEMPLATE, WEAPON_SPEED, WEAPON_DAMAGE, WEAPON_EFFECIENCY, WEAPON_ELEMENTAL); attachMods(melee, "shirt1h"); + sendSystemMessage(self, "You have received your objects.", null); } @@ -1227,6 +1240,7 @@ trigger OnSpeaking(string text) issueReconArmorSet((self), ARMOR_SET_RECON_2, "rangedSpy", "shirtCarbine"); issueClothes((self), CLOTHES, "rangedSpy", "shirtCarbine"); createPup ((self), "expertise_action_weapon_1", POWERUP_ITEMS, 10); + sendSystemMessage(self, "You have received your objects.", null); } @@ -1247,6 +1261,7 @@ trigger OnSpeaking(string text) createPup ((self), "combat_dodge", POWERUP_ITEMS, 8); obj_id melee = weapons.createWeapon("object/weapon/melee/sword/sword_acid.iff", pInv, weapons.VIA_TEMPLATE, WEAPON_SPEED, WEAPON_DAMAGE, WEAPON_EFFECIENCY, WEAPON_ELEMENTAL); attachMods(melee, "shirt1h"); + sendSystemMessage(self, "You have received your objects.", null); } @@ -1267,6 +1282,7 @@ trigger OnSpeaking(string text) createPup ((self), "expertise_action_weapon_4", POWERUP_ITEMS, 10); obj_id melee = weapons.createWeapon("object/weapon/melee/sword/sword_acid.iff", pInv, weapons.VIA_TEMPLATE, WEAPON_SPEED, WEAPON_DAMAGE, WEAPON_EFFECIENCY, WEAPON_ELEMENTAL); attachMods(melee, "shirt1h"); + sendSystemMessage(self, "You have received your objects.", null); } if (text == "qa_buff") @@ -1625,6 +1641,7 @@ void addEntBuff (obj_id recipientId) buff.applyBuff((recipientId), "me_buff_precision_3", 3600); buff.applyBuff((recipientId), "towPoisonResistAbsorb_3", 3600); buff.applyBuff((recipientId), "drink_flameout", 3600); + sendSystemMessage(recipientId, "Buffs granted.", null); } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/nym/computer.script b/sku.0/sys.server/compiled/game/script/theme_park/nym/computer.script index d69aae7dd..39b3ebfe0 100644 --- a/sku.0/sys.server/compiled/game/script/theme_park/nym/computer.script +++ b/sku.0/sys.server/compiled/game/script/theme_park/nym/computer.script @@ -19,6 +19,13 @@ messageHandler makeNewDrive () trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + + if (isDead(player) || isIncapacitated(player) || dist > 6.0) + return SCRIPT_CONTINUE; + if(item != menu_info_types.ITEM_USE) return SCRIPT_CONTINUE; diff --git a/sku.0/sys.server/compiled/game/script/theme_park/nym/droid_module.script b/sku.0/sys.server/compiled/game/script/theme_park/nym/droid_module.script index c860f4749..a61f9ac34 100644 --- a/sku.0/sys.server/compiled/game/script/theme_park/nym/droid_module.script +++ b/sku.0/sys.server/compiled/game/script/theme_park/nym/droid_module.script @@ -19,6 +19,13 @@ trigger OnObjectMenuRequest(obj_id player, menu_info item) trigger OnObjectMenuSelect(obj_id player, int item) { + location here = getLocation (player); + location term = getLocation (self); + float dist = getDistance(here, term); + + if (isDead(player) || isIncapacitated(player) || dist > 6.0) + return SCRIPT_CONTINUE; + if(item != menu_info_types.ITEM_USE) return SCRIPT_CONTINUE; @@ -40,4 +47,4 @@ trigger OnInitialize() detachScript(self, "item.container.base.base_container"); } return SCRIPT_CONTINUE; -} \ No newline at end of file +}