include library.callable; include library.locations; include library.loot; include library.npe; include library.static_item; include library.vehicle; include library.armor; include library.chat; include library.space_quest; include library.anims; include library.sequencer; include library.sui; include library.gcw; include library.space_pilot_command; include library.factions; include library.healing; include library.planetary_map; include library.player_structure; include library.space_battlefield; include library.space_utils; include library.ship_ai; include library.space_combat; include library.space_transition; include library.space_crafting; include library.datatable; include library.battlefield; include library.create; include library.utils; include library.skill; include library.pclib; include library.regions; include library.dot; include library.pet_lib; include library.space_create; include library.trial; const int SPAWN_TEMPLATE_CHECK_DISTANCE = 128; const int SPAWN_CHECK_TEMPLATE_LIMIT = 140; // 14 templates allowed in an area const int SPAWN_THEATER_CHECK_DISTANCE = 200; const int SPAWN_CHECK_DISTANCE = 64; // you must move X meters before you get more spawns after the limit const int SPAWN_CHECK_LIMIT = 15; // you get X creatures! const int SPAWN_CHECK_THEATER_LIMIT = 1; string getLevelString(int intLevel) { if(intLevel<=10) { return "1_10"; } if(intLevel<=20) { return "11_20"; } if(intLevel<=30) { return "21_30"; } if(intLevel<=40) { return "31_40"; } if(intLevel<=50) { return "41_50"; } if(intLevel<=60) { return "51_60"; } if(intLevel<=70) { return "61_70"; } if(intLevel<=80) { return "71_80"; } if(intLevel<=90) { return "81_90"; } return "81_90"; } messageHandler checkDifficulty() { int intRawDifficulty = getLevel(self); sendSystemMessageTestingOnly(self, "getLevel returned "+intRawDifficulty); if(intRawDifficulty==0) { sendSystemMessageTestingOnly(self, "you lost your difficulty!"); deltadictionary dctScriptVars = self.getScriptVars(); sendSystemMessageTestingOnly(self, "Scriptvars are "+dctScriptVars.toString()); } messageTo(self, "checkDifficulty", null, 3, false); return SCRIPT_CONTINUE; } void setupJediTrainer(obj_id self) { //const string[] TRAINER_TYPES = { "trainer_brawler", "trainer_artisan", "trainer_scout", "trainer_marksman", "trainer_entertainer", "trainer_medic"}; const string[] TRAINER_TYPES = { "trainer_brawler"};//, "trainer_artisan", "trainer_scout", "trainer_marksman", "trainer_entertainer", "trainer_medic"}; string strPrimaryCategory = "trainer"; string strSecondaryCategory = TRAINER_TYPES[rand(0, TRAINER_TYPES.length-1)]; map_location[] mapLocations = getPlanetaryMapLocations(strPrimaryCategory, strSecondaryCategory); if((mapLocations==null)||(mapLocations.length==0)) { location locTest = getLocation(self); LOG("DESIGNER_FATAL", "JEDI : For planet "+locTest.area+", primary category : "+strPrimaryCategory+" and secondary category "+strSecondaryCategory+" No planetary map location was found"); return; } int intRoll = rand(0, mapLocations.length-1); location locHome = getLocation(self); location locTest = new location(); locTest.x = mapLocations[intRoll].getX(); locTest.z = mapLocations[intRoll].getY(); locTest.area = locHome.area; setObjVar(self, "jedi.locTrainerLocation", locTest); return; } trigger OnSpeaking(string strText) { string[] strCommands = split(strText, ' ' ); if(strCommands[0].equalsIgnoreCase("march")) { play2dNonLoopingMusic(self, "sound/mus_imperial_march_excerpt.snd"); return SCRIPT_CONTINUE; } if(strCommands[0].equalsIgnoreCase("hangar")) { location myLoc = new location( getLocation( self )); obj_id bldg = getTopMostContainer( self ); warpPlayer(self, "space_light1", 0, 0, 0, bldg, "elevator_e3_down", -74.5f, 204.9f, 330.8f); return SCRIPT_CONTINUE; } if(strCommands[0]=="exception") { obj_id objTest = null; space_utils.notifyObject(objTest, "fixit", null); } if(strCommands[0]=="shipStatus") { obj_id objShip = getPilotedShip(self); int[] intSlots = space_crafting.getShipInstalledSlots(objShip); for(int intI = 0; intI < intSlots.length; intI++) { string strName = ship_chassis_slot_type.names[intSlots[intI]]; debugConsoleMsg(self, "Item: "+strName); debugConsoleMsg(self, "General Efficiency: "+ getShipComponentEfficiencyGeneral(objShip, intSlots[intI])); debugConsoleMsg(self, "Energy Efficiency: "+ getShipComponentEfficiencyEnergy(objShip, intSlots[intI])); debugConsoleMsg(self, "Current Hitpoints: "+ getShipComponentHitpointsCurrent(objShip, intSlots[intI])); debugConsoleMsg(self, "Maximum Hitpoints: "+ getShipComponentHitpointsMaximum(objShip, intSlots[intI])); } } if(strCommands[0]=="validateCharacter") { string strObject = strCommands[1]; sendSystemMessageTestingOnly(self, "strCommands[1] is "+strObject); obj_id objTarget = utils.stringToObjId(strObject); obj_id objWeapon = getDefaultWeapon(objTarget); sendSystemMessageTestingOnly(self, "Weapon Speed is "+getWeaponAttackSpeed(objWeapon)); sendSystemMessageTestingOnly(self, "template is "+getTemplateName(objWeapon)); sendSystemMessageTestingOnly(self, "Run Speed of target is "+getRunSpeed(objTarget)); } if(strCommands[0]== "moveTestOn") { applySkillStatisticModifier(self, "slope_move", 30); sendSystemMessageTestingOnly(self, "on"); } if(strCommands[0]== "moveTestOff") { applySkillStatisticModifier(self, "slope_move", -10); sendSystemMessageTestingOnly(self, "off"); } if(strCommands[0]== "gcwCrap") { gcw.incrementGCWStanding(self, self); sendSystemMessageTestingOnly(self, "YEAH"); //void incrementGCWStanding(obj_id killer, obj_id target) } if(strCommands[0]=="unarmedSpeed") { obj_id objWeapon = getDefaultWeapon(self); sendSystemMessageTestingOnly(self, "Weapon Speed s "+getWeaponAttackSpeed(objWeapon)); sendSystemMessageTestingOnly(self, "template is "+getTemplateName(objWeapon)); } if(strCommands[0]=="setVehicleSpeed") { obj_id objVehicle = getMountId(self); vehicle.initializeVehicle (objVehicle, self); sendSystemMessageTestingOnly(self, "= "+getTemplateName (objVehicle)); //vehicle.setMaximumSpeed (objVehicle, 40f); // ..vehicle.setHoverHeight(objVehicle, 1f); // vehicle.da(objVehicle, 1f); // vehicle.setMaximumSpeed (objVehicle, 17f); sendSystemMessageTestingOnly(self, "set spoeed"); } if(strCommands[0]=="testTarget") { setCombatTarget(self, getLookAtTarget(self)); sendSystemMessageTestingOnly(self, "asdsa"); } if(strCommands[0]=="show3po") { //Npe.commTutorialPlayer(obj_id owner, obj_id player, float duration, string_id text, string sfx, string appearance) string_id strSpam = new string_id("beta", "blank_line"); npe.commTutorialPlayer(self, self, 20, strSpam, "", "object/mobile/c_3po.iff"); sendSystemMessageTestingOnly(self, "asdadasd"); } if(strCommands[0]=="testStatup") { skill.recalcPlayerPools(self, true); sendSystemMessageTestingOnly(self, "asdsa"); } if(strCommands[0]=="checkReimburse") { string[] strArray = new string[2]; strArray[0] = "object/weapon/ranged/rifle/rifle_dlt20.iff"; strArray[1] = "object/weapon/ranged/rifle/rifle_t21.iff"; setObjVar(self, "item_reimbursement_list", strArray); sendSystemMessageTestingOnly(self, "Set"); } if(strCommands[0]=="checkStringId") { string_id strSpam = new string_id("faction/faction_hq/faction_hq_response", "terminal_response23"); sendSystemMessage(self, strSpam); string strTest = getString(strSpam); sendSystemMessageTestingOnly(self, "strTest is "+strTest); strSpam = new string_id("gcw", "newsnet_extra"); strTest = getString(strSpam); sendSystemMessageTestingOnly(self, "strTest is "+strTest); } if(strCommands[0]=="countMobs") { int intMobs = 0; obj_id[] objObjects = getObjectsInRange(getLocation(self), 320000); for( int intI = 0; intI < objObjects.length; intI++) { if(isMob(objObjects[intI])) { intMobs++; } else { obj_id[] objContents = utils.getContents(objObjects[intI], true); if(objContents!=null) { for(int intJ = 0; intJ < objContents.length; intJ++) { if(isMob(objContents[intJ])) { sendSystemMessageTestingOnly(self, "Found mob in "+objContents[intI]); intMobs++; } } } } } sendSystemMessageTestingOnly(self, "Found "+intMobs); } if(strCommands[0]=="findMobs") { obj_id[] objMobs = getAllObjectsWithObjVar(getLocation(self), 32000f, "ai"); int intRoll = rand(0, objMobs.length-1); sendSystemMessageTestingOnly(self, "Try "); int intTest = 0; string strTest= ""; resizeable obj_id[] objDungeons = new obj_id[0]; resizeable int[] intCounts= new int[0]; for(int intI = 0; intI < objMobs.length; intI++) { if(hasCondition(objMobs[intI], CONDITION_HIBERNATING)) { intTest++; } obj_id objTest = getTopMostContainer(objMobs[intI]); int intIndex = utils.getElementPositionInArray(objDungeons, objTest); if(intIndex<0) { // add objDungeons = utils.addElement(objDungeons, objTest); intCounts = utils.addElement(intCounts, 0); } else { int intCount = intCounts[intIndex]; intCount++; intCounts[intIndex] = intCount; } } for(int intI = 0; intI < objDungeons.length; intI++) { strTest+="For "+getTemplateName(objDungeons[intI])+" NPC Count is "+intCounts[intI]+"\r\n"; sendSystemMessageTestingOnly(self, "For "+getTemplateName(objDungeons[intI])+" NPC Count is "+intCounts[intI]); LOG("npe", "For "+getTemplateName(objDungeons[intI])+" NPC Count is "+intCounts[intI]); } sendSystemMessageTestingOnly(self, "Total Hibernating Mob Count is "+intTest+" from "+objMobs.length); strTest+="Total Hibernating Mob Count is "+intTest+" from "+objMobs.length; saveTextOnClient(self, "dungeon1.txt", strTest); //setLocation(self, getLocation(objMobs[intRoll])); } if(strCommands[0]=="dumpLocations") { string strTest = ""; obj_id objBuilding = getTopMostContainer(self); obj_id[] objContents = getShipContents(objBuilding); for(int intI = 0; intI < objContents.length; intI++) { if(hasScript(objContents[intI], "systems.spawning.spawner_area")) { string strName= getStringObjVar(objContents[intI], "strName"); strTest += getDumpString(objContents[intI], strName); // and location } else if(!hasScript(objContents[intI], "content_tools.sequencer_object")) { // are you a spawned mob? if so we hate you if(!hasScript(objContents[intI], "systems.spawning.spawned_tracker")) { // WOOOH string strName = getEncodedName(objContents[intI]); if(strName == null) { strName = getName(objContents[intI]); } int intIndex = strName.indexOf("@"); if(intIndex>-1) { strName = getString(utils.unpackString(strName)); } strTest += getDumpString(objContents[intI], strName); } } } saveTextOnClient(self, "everything.txt", strTest); sendSystemMessageTestingOnly(self, "length was "+objContents.length); } if(strCommands[0]=="checkForceRegen") { int baseRegenRate = getSkillStatisticModifier(self, "jedi_force_power_regen"); float regenRate = (float)baseRegenRate; sendSystemMessageTestingOnly(self, "regen Rate base is "+regenRate); float fltActualRegen = getForcePowerRegenRate(self); sendSystemMessageTestingOnly(self, "Actual Modified Regen is "+fltActualRegen); } if(strCommands[0]=="checkRate") { obj_id objTarget = getLookAtTarget(self); int intRate = player_structure.getMaintenanceRate(objTarget); sendSystemMessageTestingOnly(self, "rate is "+intRate); } if(strCommands[0]=="goOnLeave") { factions.goOnLeaveWithDelay(self, 1.0f); sendSystemMessageTestingOnly(self, "GOING"); } if(strCommands[0]=="startFlash") { newbieTutorialHighlightUIElement (self, "/GroundHUD.Toolbar.volume.0", true); sendSystemMessageTestingOnly(self, "ON"); } if(strCommands[0]=="stopFlash") { newbieTutorialHighlightUIElement (self, "/GroundHUD.Toolbar.volume.0", false); sendSystemMessageTestingOnly(self, "OFF"); } if(strCommands[0]=="fixLots") { //public static native boolean adjustLotCount(obj_id player, int amount); adjustLotCount(self, 10); sendSystemMessageTestingOnly(self, "fixed"); } if(strCommands[0]=="startLoop") { messageTo(getLookAtTarget(self), "updateGCWInfo", null, 30, false); sendSystemMessageTestingOnly(self, "Looping"); } if(strCommands[0]=="setHyperspaceLoc") { setObjVar(self, "trHyperspace", getTransform_o2p(space_transition.getContainingShip(self))); sendSystemMessageTestingOnly(self, "Set Transform"); } if(strCommands[0]=="fakeHyperspace") { //obj_id[] objTestObjects = getAllObjectsWithTemplate(getLocation(self), 320000, "object/ship/player/player_star_destroyer.iff"); //obj_id objDestroyer = objTestObjects[0]; transform trTest = getTransformObjVar(self, "trHyperspace"); //vctPoint.x = -7232f; //vctPoint.y = 2104f; //vctPoint.z = 2896f; obj_id objTest = space_create.createShipHyperspace("imp_tie_bomber_tier1", trTest, null); setLookAtTarget(self, objTest); sendSystemMessageTestingOnly(self, "Made "+objTest +" at "+getLocation(objTest)+" and you are at "+getLocation(space_transition.getContainingShip(self))); } if(strCommands[0]=="hitMe") { startCombat(getLookAtTarget(self), self ); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="welcomeAboard") { obj_id objTarget = getLookAtTarget(self); chat.chat(objTarget, "Welcome aboard, Sir. Lord Vader is waiting for you on the bridge."); doAnimationAction( objTarget, anims.PLAYER_SALUTE2); return SCRIPT_OVERRIDE; } if(strCommands[0]=="resetStormtroopers") { obj_id[] objTestObjects = getAllObjectsWithTemplate(getLocation(self), 2000, "object/mobile/stormtrooper.iff"); for(int intI = 0; intI < objTestObjects.length; intI++) { detachScript(objTestObjects[intI], "e3demo.e3_stormtrooper"); attachScript(objTestObjects[intI], "e3demo.e3_stormtrooper"); } return SCRIPT_CONTINUE; } if(strCommands[0]=="makeStormtroopers") { location locTest = getLocation(self); locTest.x = 30; locTest.y = 205; locTest.z = 318; for(int intI = 0; intI < 6; intI++) { obj_id objTest = createObject("object/mobile/stormtrooper.iff", locTest); attachScript(objTest, "e3demo.e3_stormtrooper"); locTest.z = locTest.z - 1.5f; } locTest.x = 28; locTest.y = 205; locTest.z = 318; for(int intI = 0; intI < 6; intI++) { obj_id objTest = createObject("object/mobile/stormtrooper.iff", locTest); attachScript(objTest, "e3demo.e3_stormtrooper"); locTest.z = locTest.z - 1.5f; } } if(strCommands[0]=="lifeDay") { location locTest = getLocation(self); const string[] strItems ={ "object/tangible/furniture/decorative/event_chewbacca_toy.iff", "object/tangible/furniture/decorative/event_lifeday05_painting_01.iff", "object/tangible/furniture/decorative/event_lifeday05_painting_02.iff", "object/tangible/furniture/decorative/event_lifeday05_painting_03.iff", "object/tangible/furniture/decorative/event_wookiee_rifle_display.iff", "object/tangible/furniture/decorative/event_wookiee_shield.iff", "object/tangible/furniture/decorative/event_wroshyr_tree.iff", // OLD "object/tangible/painting/painting_wookiee_m.iff", "object/tangible/painting/painting_wookiee_f.iff", "object/tangible/painting/painting_trees_s01.iff", "object/tangible/loot/quest/lifeday_orb.iff", "object/tangible/wearables/wookiee/wke_lifeday_robe.iff"}; for(int intI = 0; intI < strItems.length; intI++) { locTest.x = locTest.x +3; obj_id objTest = createObject(strItems[intI], locTest); } sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="decrementScore") { setObjVar(self, "faction", strCommands[1]); gcw.decrementGCWScore(self); sendSystemMessageTestingOnly(self, "Decrementing"); } if(strCommands[0]=="steal") { obj_id myPack = utils.getInventoryContainer(self); loot.generateTheftLoot(myPack, getLookAtTarget(self), 0, 1); } if(strCommands[0]=="incrementScore") { setObjVar(self, "faction", strCommands[1]); gcw.incrementGCWScore(self); sendSystemMessageTestingOnly(self, "Incrementing"); } if(strCommands[0]=="forceSpawn") { messageTo(getLookAtTarget(self), "doSpawnEvent", null, 1, false); sendSystemMessageTestingOnly(self, "Doing spawny thing"); } if(strCommands[0]=="forceMaintenance") { obj_id objTarget = getLookAtTarget(self); int intLoops = 5; int intTimeStamp = intLoops * 1800; int intTime = getGameTime(); intTime = intTime - intTimeStamp; setObjVar(objTarget, player_structure.VAR_LAST_MAINTANENCE, intTimeStamp); dictionary dctParams = new dictionary(); dctParams.put("objSender", self); messageTo(objTarget, "OnMaintenanceLoop", dctParams, 0, false); sendSystemMessageTestingOnly(self, "Sent maintenance loop request to "+objTarget); } if(strCommands[0]=="shootTest") { setState(self, STATE_COMBAT, true); setCombatTarget(self, getLookAtTarget(self)); sequencer.doCombatAnimation(self, getLookAtTarget(self), "fire_1_single_light"); sendSystemMessageTestingOnly(self, "s"); } if(strCommands[0]=="twiddle") { //doAnimationAction (obj_id target, String animationActionName) //doAnimationAction (self, anims.PLAYER_STOW_OBJECT_UTILITY_BELT); //doAnimationAction (self, anims.PLAYER_USE_WRIST_COMLINK); doAnimationAction (self, anims.PLAYER_USE_GENERIC_OBJECT_MEDIUM); //const string PLAYER_USE_GENERIC_OBJECT_HIGH = "use_generic_object_high"; //const string PLAYER_USE_GENERIC_OBJECT_MEDIUM = "use_generic_object_medium"; //const string PLAYER_USE_WRIST_COMLINK = "use_wrist_comlink"; //const string PLAYER_VIEW_HELD_ITEM = "view_held_item"; sendSystemMessageTestingOnly(self, "Asda"); } if(strCommands[0].equals("validateSequencer")) { obj_id master =sequencer.getSequenceObject(strCommands[1]); sendSystemMessageTestingOnly(self, ""+master); return SCRIPT_CONTINUE; } if(strCommands[0]=="forceMaintenanceLong") { obj_id objTarget = getLookAtTarget(self); int intLoops = 45; int intTimeStamp = intLoops * 1800; int intTime = getGameTime(); intTime = intTime - intTimeStamp; setObjVar(objTarget, player_structure.VAR_LAST_MAINTANENCE, intTimeStamp); messageTo(objTarget, "OnMaintenanceLoop", null, 0, false); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="sellItemTest") { obj_id objItem= createObject("object/weapon/ranged/rifle/rifle_t21.iff", getLocation(self)); setObjVar(objItem, "junkDealer.intPrice", 100); attachScript(objItem, "object.autostack"); } if(strCommands[0]=="verboseDebug") { setObjVar(self, "verboseDebug", 1); sendSystemMessageTestingOnly(self, "Debug on"); } if(strCommands[0]=="makeGuy") { location here = getLocation(self); obj_id npc = create.object("commoner", here); attachScript (npc, "systems.missions.dynamic.mission_deliver_npc"); } if(strCommands[0]=="checkMissions") { obj_id[] objMissions = getMissionObjects (self); for(int intI = 0; intI < objMissions.length; intI++) { location locTest = getMissionStartLocation (objMissions[intI]); sendSystemMessageTestingOnly(self, "Start: "+locTest); float dist = utils.getDistance2D (getLocation(self), locTest); sendSystemMessageTestingOnly(self, "dist is "+dist); locTest = getMissionEndLocation (objMissions[intI]); sendSystemMessageTestingOnly(self, "End: "+locTest); dist = utils.getDistance2D (getLocation(self), locTest); sendSystemMessageTestingOnly(self, "dist is "+dist); } } if(strCommands[0]=="verboseDebug") { setObjVar(self, "verboseDebug", 1); sendSystemMessageTestingOnly(self, "Debug on"); } if(strCommands[0]=="makeGuy") { location here = getLocation(self); obj_id npc = create.object("commoner", here); attachScript (npc, "systems.missions.dynamic.mission_deliver_npc"); } if(strCommands[0]=="checkMissions") { obj_id[] objMissions = getMissionObjects (self); for(int intI = 0; intI < objMissions.length; intI++) { location locTest = getMissionStartLocation (objMissions[intI]); sendSystemMessageTestingOnly(self, "Start: "+locTest); float dist = utils.getDistance2D (getLocation(self), locTest); sendSystemMessageTestingOnly(self, "dist is "+dist); locTest = getMissionEndLocation (objMissions[intI]); sendSystemMessageTestingOnly(self, "End: "+locTest); dist = utils.getDistance2D (getLocation(self), locTest); sendSystemMessageTestingOnly(self, "dist is "+dist); } } if(strCommands[0]=="testFaction") { int intFaction = pvpGetAlignedFaction(self); sendSystemMessageTestingOnly(self, "I am "+intFaction); obj_id objTarget =getLookAtTarget(self); intFaction = pvpGetAlignedFaction(objTarget); sendSystemMessageTestingOnly(self, "They are "+intFaction); } if(strCommands[0]=="setupRebelFaction") { factions.addFactionStanding(self, factions.FACTION_REBEL, 30000); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="setupImperialFaction") { factions.addFactionStanding(self, factions.FACTION_IMPERIAL, 30000); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="negativeImperial") { factions.addFactionStanding(self, factions.FACTION_IMPERIAL, -30000); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="negativeRebel") { factions.addFactionStanding(self, factions.FACTION_REBEL, -30000); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="negativeImperial") { factions.addFactionStanding(self, factions.FACTION_IMPERIAL, -30000); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="negativeRebel") { factions.addFactionStanding(self, factions.FACTION_REBEL, -30000); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="setupImperialFaction") { factions.addFactionStanding(self, factions.FACTION_IMPERIAL, 30000); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="logTest") { LOG("space", "WOBBLE"); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="testReload") { obj_id ship = space_transition.getContainingShip(self); int[] slots = space_crafting.getShipInstalledSlots(ship); for(int i = 0; i< slots.length; i++) { sendSystemMessageTestingOnly(self, "checking slot "+slots[i]); if (space_crafting.isMissileSlot(ship, slots[i])) { space_pilot_command.weaponLauncherSpaceReload (ship, self, slots[i]); } else if (space_crafting.isCounterMeasureSlot(ship, slots[i])) { sendSystemMessageTestingOnly(self, "aweads"); space_pilot_command.countermeasureLauncherSpaceReload (ship, self, slots[i]); } } sendSystemMessageTestingOnly(self, "WACHSD"); } if(strCommands[0]=="registerRecruiter") { obj_id objTarget = getLookAtTarget(self); string strMapName = "pilot_recruiter"; string strPrimaryCategory = "space"; string strSecondaryCategory = "space_recruiter"; string_id strMapNameId = new string_id("map_loc_type_n", strMapName); obj_id objContainer = getTopMostContainer(objTarget); location locTest = getLocation(objTarget); if(isIdValid(objContainer)) { locTest = getLocation(objContainer); } addPlanetaryMapLocation(objTarget, utils.packStringId(strMapNameId), (int)locTest.x, (int)locTest.z, strPrimaryCategory, strSecondaryCategory, MLT_STATIC, planetary_map.NO_FLAG); sendSystemMessageTestingOnly(self, "Registered the whozit"); } if(strCommands[0]=="countShips") { obj_id[] objStuff= getAllObjectsWithScript(getLocation(space_transition.getContainingShip(self)), 32000, "space.combat.combat_ship"); sendSystemMessageTestingOnly(self, "objStuff length is "+objStuff.length); } if(strCommands[0]=="countLair") { obj_id[] objStuff= getAllObjectsWithTemplate(getLocation(self), 32000, "object/creature/player/bothan_male.iff"); sendSystemMessageTestingOnly(self, "objStuff length is "+objStuff.length); int intCount = 0; objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_32.iff"); intCount = intCount +objStuff.length; objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_48.iff"); intCount = intCount +objStuff.length; objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_64.iff"); intCount = intCount +objStuff.length; objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_80.iff"); intCount = intCount +objStuff.length; objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_96.iff"); intCount = intCount +objStuff.length; sendSystemMessageTestingOnly(self, "intCount is "+intCount); } if(strCommands[0]=="clearImperialFaction") { factions.addFactionStanding(self, factions.FACTION_IMPERIAL, -1000); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="zoneStatus") { obj_id objShip = getPilotedShip(self); obj_id[] objSpawnedShips = getAllObjectsWithObjVar(getLocation(objShip), 32000, "objParent"); obj_id[] objAllShips = getAllObjectsWithScript(getLocation(objShip),32000, "space.combat.combat_ship"); sendSystemMessageTestingOnly(self, "Ships From Spawners: "+objSpawnedShips.length); sendSystemMessageTestingOnly(self, "Ships From Spawners and Missions: "+objAllShips.length); obj_id[] objSpawners = getAllObjectsWithTemplate(getLocation(objShip), 32000, "object/tangible/space/content_infrastructure/basic_spawner.iff"); for(int intI = 0; intIintSpawnCount) { sendSystemMessageTestingOnly(self, "WARNING! WARNING! WARNING! SPAWN COUNT IS OVER SET COUNT!@!@"); } } } if(strCommands[0]=="youDead") { attachScript(getLookAtTarget(self), "e3demo.e3_deadguy"); } if(strCommands[0]=="ownYou") { obj_id objTest = getTopMostContainer(self); setOwner(objTest, self); sendSystemMessageTestingOnly(self, "Owned"); } if(strCommands[0]=="makeShip") { obj_id objTest = space_transition.getContainingShip(self); if(!isIdValid(objTest)) { objTest = self; } if(strCommands.length>1) { obj_id objShip = createObject(strCommands[1], getLocation(objTest)); setOwner(objShip, self); } } if(strCommands[0]=="whereAmI") { obj_id objTest = space_transition.getContainingShip(self); sendSystemMessageTestingOnly(self, "I am at "+getLocation(objTest)); } if(strCommands[0]=="trainerTest") { space_utils.openCommChannelAfterLoad(getPilotedShip(self), getPilotedShip(self)); sendSystemMessageTestingOnly(self, "done"); } if(strCommands[0]=="fixChassis") { obj_id objTarget = getLookAtTarget(self); setShipMaximumChassisHitPoints(objTarget, 10000); setShipCurrentChassisHitPoints(objTarget, 10000); } if(strCommands[0]=="addBooster") { boolean boolTest = shipPseudoInstallComponent(space_transition.getContainingShip(self), space_crafting.BOOSTER, ##"bst_generic"); sendSystemMessageTestingOnly(self, "Added booster, "+boolTest); } if(strCommands[0]=="radialCrash") { for(int intI = 0; intI < 100000; intI++) { menu_info mi = new menu_info(); string_id strSpam = new string_id("space/foo", "spam"); mi.addRootMenu( menu_info_types.CRAFT_START, strSpam); Object[] newParams = new Object[3]; newParams [0] = getLookAtTarget(self); newParams [1] = self; newParams[2] = mi; space_utils.callTrigger("OnObjectMenuRequest", newParams ); newParams [0] = getLookAtTarget(self); newParams [1] = self; Integer intTest = new Integer(menu_info_types.CRAFT_START); newParams[2] = intTest; space_utils.callTrigger("OnObjectMenuSelect", newParams); queueCommand(self, ##"stopCrafting", getLookAtTarget(self), "", COMMAND_PRIORITY_IMMEDIATE); } sendSystemMessageTestingOnly(self, "DONE DONE DONE"); sendSystemMessageTestingOnly(self, "DONE DONE DONE"); sendSystemMessageTestingOnly(self, "DONE DONE DONE"); sendSystemMessageTestingOnly(self, "DONE DONE DONE"); } if(strText=="shotTest") { obj_id objMonsters [] = getAllObjectsWithObjVar(getLocation(self), 320000, "ai"); obj_id objTarget = objMonsters[0]; queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); queueCommand(self, ##"rangedShotPistol", objTarget, "", COMMAND_PRIORITY_FRONT); } if(strText=="healClone") { healing.healClone(self, true); sendSystemMessageTestingOnly(self, "f"); return SCRIPT_CONTINUE; } if(strText=="mapTest") { string[] strTest = planetary_map.getUniquePlanetaryMapCategories(null); for(int intI = 0; intI < strTest.length; intI++) { sendSystemMessageTestingOnly(self, "strTest "+intI+" is "+strTest[intI]); } strTest = planetary_map.getUniquePlanetaryMapCategories("space"); for(int intI = 0; intI < strTest.length; intI++) { sendSystemMessageTestingOnly(self, "strTest "+intI+" is "+strTest[intI]); } } if(strText=="testRegen") { //setRegenRate(self,HEALTH, 40f); //setRegenRate(self,ACTION, 20f); //setRegenRate(self,MIND, 10f); sendSystemMessageTestingOnly(self, "regen is "+getHealthRegenRate(self)); setAttrib(self, HEALTH, 1); setAttrib(self, ACTION, 1); setAttrib(self, MIND, 1); } if(strText=="lootTest") { obj_id objInventory = utils.getInventoryContainer(self); string strTable = "npc/generic_1_10"; loot.makeLootInContainer(objInventory, strTable, 10, 10); sendSystemMessageTestingOnly(self, "Loot"); } if(strText=="asd") { string strSource = "datatables/mob/creatures.iff"; string[] strLootTables = dataTableGetStringColumn(strSource, "lootList"); string[] strNames = dataTableGetStringColumn(strSource, "creatureName"); for(int intI = 0; intI < strLootTables.length; intI++) { int intIndex = strNames[intI].indexOf("ep3"); if(intIndex>-1) { //sendSystemMessageTestingOnly(self, "creaturenname is "+strNames[intI]); if(strLootTables[intI]!="") { sendSystemMessageTestingOnly(self, "loot table is "+strLootTables[intI]); } } } } if(strText=="redoLoot") { // niche // e(none=0,pc=1,ai=2,droid=3,vehicle=4,npc=5,monster=6,herbivore=7,carnivore=8,predator=9,android=10)[monster] // meatType // s[none] string strSource = "datatables/mob/creatures.iff"; string[] strLootTables = dataTableGetStringColumn(strSource, "lootTable"); string[] strOldLootTables = dataTableGetStringColumn(strSource, "lootList"); int[] intNiches = dataTableGetIntColumn(strSource, "niche"); string[] strMeatTypes = dataTableGetStringColumn(strSource, "meatType"); int[] intLevels = dataTableGetIntColumn(strSource, "BaseLevel"); string strTableToWrite = "datatables/loot/test_rewrite.tab"; string[] strHeaders = new string[1]; strHeaders[0] = "strTest"; string[] strTypes = new string[1]; strTypes[0] = "s"; boolean boolTest = datatable.createDataTable(strTableToWrite, strHeaders, strTypes); for(int intI = 0; intI < strLootTables.length; intI++) { string strTest = ""; if(strLootTables[intI]=="") { string strLevelString = getLevelString(intLevels[intI]); // do stuff if((intNiches[intI]==3)||(intNiches[intI]==10)) { // droid //C:\swg\s1\dsrc\sku.0\sys.server\compiled\game\datatables\loot\loot_types\droid //droid/droid_1_10 strTest = "droid/droid_"+strLevelString; } else if(intNiches[intI]== 5) { // npc //C:\swg\s1\dsrc\sku.0\sys.server\compiled\game\datatables\loot\loot_types\npc // npc/npc_1_10 strTest = "npc/npc_"+strLevelString; } else { // creature // check what kinda meat it has.. // mmmm.. meat int intIndex = strMeatTypes[intI].indexOf("insect"); if(intIndex>-1) { //C:\swg\s1\dsrc\sku.0\sys.server\compiled\game\datatables\loot\loot_types\creature //creature/insect_1_10 strTest = "creature/insect_"+strLevelString; } else { //creature //creature/creature_1_10 strTest = "creature/creature_"+strLevelString; } } } else { strTest = strLootTables[intI]; } dictionary dctTest = new dictionary(); dctTest.put("strTest", strTest); datatable.serverDataTableAddRow(strTableToWrite,dctTest); } /* string strSource = "datatables/loot/test.iff"; string[] strNames = dataTableGetStringColumn(strSource, "npc_type"); string[] strContents = dataTableGetStringColumn(strSource, "table"); string strTableToWrite = ""; for(int intI = 0; intI < strNames.length; intI++) { if(strNames[intI]!="") { int intIndex = strContents[intI].indexOf("kashyyyk"); if(intIndex>-1) { strTableToWrite = "datatables/loot/loot_types/kashyyyk/"+strNames[intI]+".tab"; } else { strTableToWrite = "datatables/loot/loot_types/mustafar/"+strNames[intI]+".tab"; } string[] strHeaders = new string[2]; strHeaders[0] = "strItems"; strHeaders[1] = "strRequiredItems"; string[] strTypes = new string[2]; strTypes[0] = "s"; strTypes[1] = "s"; boolean boolTest = datatable.createDataTable(strTableToWrite, strHeaders, strTypes); sendSystemMessageTestingOnly(self, "Creating "+strTableToWrite+ " with value of "+boolTest); } dictionary dctTest = new dictionary(); dctTest.put("strItems", strContents[intI]); dctTest.put("strRequiredItems", ""); sendSystemMessageTestingOnly(self, "Writing to "+strTableToWrite+ "contents are "+strContents[intI]); datatable.serverDataTableAddRow(strTableToWrite,dctTest); } //public static native String[] dataTableGetColumnNames(String table); //string strStartName = /* string[] strTables = { "boss_creature.iff", "boss_droid.iff", "boss_insect.iff", "boss_npc.iff", "consumables_1_stat_all.iff", "elite_creature.iff", "elite_droid.iff", "elite_insect.iff", "elite_npc.iff" , "generic_creature.iff", "generic_droid.iff", "generic_insect.iff", "generic_npc.iff", "guns_general.iff" }; //string[] strTables = { //"datatables/loot/loot_types/mustafar/mustafar_creature_loot.iff ", //"datatables/loot/loot_types/mustafar/mustafar_npc_loot.iff ", //"datatables/loot/loot_types/mustafar/mustafar_npc_loot_b.iff " // "datatables/loot/loot_types/kashyyyk/kashyyyk_creature_loot.iff" // }; string[] strHeader = new string[1]; string[] strTypes = new string[1]; strHeader[0] = "strItemType"; strTypes[0] = "s"; for(int intI = 0; intI < strTables.length; intI++) { string strP = "datatables/loot/new_loot/"+strTables[intI]; string[] strHeaders = dataTableGetColumnNames(strP); for(int intJ = 0; intJ < strHeaders.length; intJ++) { int intTest = dataTableGetColumnType(strP, strHeaders[intJ]); //int //float //string string strRoot = strTables[intI].substring(0, strTables[intI].length()-4); if(intTest==2) { string strTableToWrite = "datatables/loot/new_loot/"+strRoot+strHeaders[intJ]+".tab"; boolean boolTest = datatable.createDataTable(strTableToWrite, strHeader, strTypes); string[] strFoo = dataTableGetStringColumn(strP, strHeaders[intJ]); for(int intK = 0; intK < strFoo.length; intK++) { dictionary dctTest = new dictionary(); dctTest.put("strItemType", strFoo[intK]); datatable.serverDataTableAddRow(strTableToWrite,dctTest); } } } } /* //public static native String[] dataTableGetColumnNames(String table); //string strStartName = string strTable = "datatables/loot/moo.iff"; string[] strTables = dataTableGetStringColumn(strTable, "strTable"); string[] strHeader = new string[1]; string[] strTypes = new string[1]; strHeader[0] = "strItemType"; strTypes[0] = "s"; boolean boolTest = datatable.createDataTable("datatables/loot/foo.tab", strHeader, strTypes); resizeable string[] strDupes= new string[0]; for(int intI = 0; intI < strTables.length; intI++) { string strP = "datatables/loot/npc/"+strTables[intI]; string[] strHeaders = dataTableGetColumnNames(strP); for(int intJ = 0; intJ < strHeaders.length; intJ++) { int intTest = dataTableGetColumnType(strP, strHeaders[intJ]); //int //float //string if(intTest==2) { string[] strFoo = dataTableGetStringColumn(strP, strHeaders[intJ]); for(int intK = 0; intK < strFoo.length; intK++) { if(!utils.isElementInArray(strDupes, strFoo[intK])) { strDupes = utils.addElement(strDupes, strFoo[intK]); dictionary dctTest = new dictionary(); dctTest.put("strItemType", strFoo[intK]); datatable.serverDataTableAddRow("datatables/loot/foo.tab",dctTest); } } } } } /*string strMasterTable = "datatables/loot/master_loot.iff"; string[] strNPC = dataTableGetStringColumn(strMasterTable, "npc_type"); string[] strTable = dataTableGetStringColumn(strMasterTable, "table"); string strNewTable= ""; string[] strHeader = new string[1]; string[] strTypes = new string[1]; strHeader[0] = "strItemType"; strTypes[0] = "s"; dictionary dctTest = new dictionary(); int intT = 1; string strMob = strNPC[intT].substring(0, strNPC[intT].length()-1); strNewTable = "datatables/loot/"+strMob+".tab"; boolean boolTest = datatable.createDataTable(strNewTable, strHeader, strTypes); //intI < strNPC.length; intI++) for(int intI = 1; intI < strNPC.length; intI++) { datatables/loot/npc/aakuan.iff:clothing object/tangible/wearables/bandolier/bandolier_s05.iff object/tangible/wearables/bracelet/bracelet_s03_l.iff object/tangible/wearables/bracelet/bracelet_s03_r.iff object/tangible/wearables/ring/ring_s01.iff object/tangible/loot/tool/datapad_broken.iff object/tangible/loot/loot_schematic/chemical_recycler_schematic.iff // if it has datatables in it, ignore wearables go to clothing loot goes to junk_loot level: skip skill_buff (goes into skill buff table) loot_schematic static_item goes to static_items for sorting string strTest = strNPC[intI]; sendSystemMessageTestingOnly(self, "strTest is "+strTest); if(strTest!="") { if((strTest.endsWith("1")||(strTest.endsWith("2"))||(strTest.endsWith("3"))||(strTest.endsWith("4"))||(strTest.endsWith("5"))||(strTest.endsWith("6"))||(strTest.endsWith("7"))||(strTest.endsWith("8"))||(strTest.endsWith("9")))) { string strSubName1 = strNPC[intI].substring(0, strNPC[intI].length()-1); sendSystemMessageTestingOnly(self, "strSubName 1 is "+strSubName1); string strSubName2 = strMob;//.substring(0, strMob.length()-1); sendSystemMessageTestingOnly(self, "strSubName 2 is "+strSubName2); if(strSubName1.endsWith("_")) { strSubName1 = strSubName1.substring(0, strSubName1.length()-1); } sendSystemMessageTestingOnly(self, "strSubName 1 is "+strSubName1); if(strSubName2.endsWith("_")) { strSubName2 = strMob.substring(0, strSubName2.length()-1); } sendSystemMessageTestingOnly(self, "strSubName 2 is "+strSubName2); if(!(strSubName1.equals(strSubName2))) { strMob = strSubName1; strNewTable = "datatables/loot/"+strMob+".tab"; sendSystemMessageTestingOnly(self, "Newing up a table for "+strMob); boolTest = datatable.createDataTable(strNewTable, strHeader, strTypes); } } else { strMob = strNPC[intI]; strNewTable = "datatables/loot/"+strMob+".tab"; sendSystemMessageTestingOnly(self, "Newing 2 up a table for "+strMob); boolTest = datatable.createDataTable(strNewTable, strHeader, strTypes); sendSystemMessageTestingOnly(self, "Writing "+strNewTable); } } else { sendSystemMessageTestingOnly(self, "Writing additional value to "+strNewTable); } //datatables/loot/npc/aakuan.iff:aakuan1 string[] strMoo = split(strTable[intI], ':'); // 0 is the table, 1 is the column // we want to convert 0 into a valid entry int intIndex1 = strMoo[0].indexOf(".iff"); int intIndex2 = 16; string strEntry = strMoo[0].substring(intIndex2, intIndex1); dctTest.put("strItemType", strEntry); sendSystemMessageTestingOnly(self, "Writing data "+strEntry +" to table "+strNewTable); datatable.serverDataTableAddRow(strNewTable,dctTest); //string strFileName = strTest[0]; ///string strColumnName = strTest[1]; //string[] strItems = dataTableGetStringColumnNoDefaults(strFileName, strColumnName); } /* // dictionary of arrays // do a wile loop // loop through every array // if we're>length for all of them string[] strFinalHeaders = new string[strHeaders.length]; string[] strFinalTypes = new string[strTypes.length]; for(int intI = 0; intI < strHeaders.length; intI++) { strFinalHeaders[intI] = strHeaders[intI]; strFinalTypes[intI] = strTypes[intI]; } string strFinalTable = "datatables/loot/foo.tab"; boolean boolTest = datatable.createDataTable(strFinalTable, strFinalHeaders, strFinalTypes); int intCount = 0; dictionary dctRowToAdd = new dictionary(); boolean boolFinished = false; boolean boolEmpty = false; int intI = 0; int intFoo = 0; while (!boolFinished) { //sendSystemMessageTestingOnly(self, "retrieving "+strFinalHeaders[intI]); string[] strArray = dctTest.getStringArray(strFinalHeaders[intI]); sendSystemMessageTestingOnly(self, "getting "+strFinalHeaders[intI]); // we get an array // we add the current value at the intCount index if(intCountstrFinalHeaders.length-1) { if(boolEmpty) { boolFinished = true; } boolEmpty = true; intI = 0; // restart intCount++; sendSystemMessageTestingOnly(self, "Adding row"); datatable.serverDataTableAddRow(strFinalTable,dctRowToAdd); dctRowToAdd = new dictionary(); } intFoo++; if(intFoo>500) { boolFinished = true; } } */ } if(strText=="makeDynamicWeapon") { //obj_id makeDynamicObject(string strName, obj_id objContainer, int intLevel) //static_item.makeDynamicObject("dynamic_weapon_minor_fire", utils.getInventoryContainer(self), 85); static_item.makeDynamicObject("dynamic_weapon_basic_all", utils.getInventoryContainer(self), rand(5,60)); //dynamic_weapon_minor_fire //dynamic_weapon_major_fire sendSystemMessageTestingOnly(self, "woof"); } if(strText=="makeStaticWeapon") { obj_id objInventory = utils.getInventoryContainer(self); //obj_id lootItem = static_item.createNewItemFunction("weapon_carbine_02_03", objInventory); //obj_id lootItem = static_item.createNewItemFunction("weapon_pistol_02_02", objInventory); //lootItem = static_item.createNewItemFunction("weapon_tow_rifle_05_01", objInventory); obj_id lootItem = static_item.createNewItemFunction("weapon_tow_pistol_02_01", objInventory); //obj_id lootItem = static_item.createNewItemFunction("weapon_pistol_02_03", objInventory); //lootItem = static_item.createNewItemFunction("weapon_npe_carbine_spy_03_01", objInventory); //obj_id lootItem = static_item.createNewItemFunction("weapon_grenade_fragmentation_01_01", objInventory); sendSystemMessageTestingOnly(self, "made "+lootItem); } if(strText=="checkStats") { skill.recalcPlayerPools(self, false); sendSystemMessageTestingOnly(self, "Action Max is "+getMaxAttrib(self, ACTION)); sendSystemMessageTestingOnly(self, "Health Max is "+getMaxAttrib(self, HEALTH)); } if(strText=="weaponUpdates") { //setWeaponAttackSpeed(object, (float)attackSpeed/100.0f); obj_id objInventory = utils.getInventoryContainer(self); obj_id[] objContents = utils.getContents(self, true); for(int intI = 0; intI < objContents.length; intI++) { if(hasScript(objContents[intI],"systems.combat.combat_weapon")) { //float fltSpeed = getWeaponAttackSpeed(objContents[intI]); setWeaponAttackSpeed(objContents[intI], .25f); setWeaponMinDamage(objContents[intI], 5); setWeaponMaxDamage(objContents[intI], 10); //sendSystemMessageTestingOnly(self, "speed is "+fltSpeed+" for "+objContents[intI]); } } sendSystemMessageTestingOnly(self, "Done length was "+objContents.length); } if(strCommands[0]=="setupMonster") { obj_id objMonsters [] = getAllObjectsWithObjVar(getLocation(self), 320000, "ai"); for(int intI = 0; intI < objMonsters.length; intI++) { setMaxAttrib(objMonsters[intI], HEALTH, 50); setAttrib(objMonsters[intI], HEALTH, 50); debugSpeakMsg(objMonsters[intI], "SET HEALTH AND STUFF"); } sendSystemMessageTestingOnly(self, "as"); } if(strCommands[0]=="engineTesting") { obj_id objInventory = utils.getInventoryContainer(self); obj_id objItem= createObject("object/tangible/ship/components/engine/eng_gallofree_jx2.iff", objInventory, ""); setName(objItem, "Tier 1"); objItem= createObject("object/tangible/ship/components/engine/eng_kse_a5x.iff", objInventory, ""); setName(objItem, "Tier 2"); objItem= createObject("object/tangible/ship/components/engine/eng_kse_a7x.iff", objInventory, ""); setName(objItem, "Tier 3"); objItem= createObject("object/tangible/ship/components/engine/eng_novaldex_x7.iff", objInventory, ""); setName(objItem, "Tier 4"); objItem= createObject("object/tangible/ship/components/engine/eng_kse_advanced.iff", objInventory, ""); setName(objItem, "Tier 5"); sendSystemMessageTestingOnly(self, "Made stuff"); } if(strCommands[0]=="chassisRepairTest") { obj_id objInventory = utils.getInventoryContainer(self); for(int intI = 0; intI < 5; intI++) { obj_id objKit = createObject("object/tangible/ship/crafted/repair/repair_kit_chassis.iff", objInventory, ""); setCount(objKit, 400); } obj_id[] objPcds = space_transition.findShipControlDevicesForPlayer(self); obj_id objShip = space_transition.getShipFromShipControlDevice(objPcds[0]); setShipCurrentChassisHitPoints(objShip, 10); } if(strCommands[0]=="getShipIds") { obj_id [] objControlDevices = space_transition.findShipControlDevicesForPlayer(self); for(int intI = 0; intI< objControlDevices.length; intI++) { obj_id objTestShip = space_transition.getShipFromShipControlDevice(objControlDevices[intI]); sendSystemMessageTestingOnly(self, "Ship from PCD "+objControlDevices[intI]+" is "+objTestShip); } } if(strCommands[0]=="woozle") { space_quest.grantNewbieShip( self, "neutral"); sendSystemMessageTestingOnly(self, "asd"); } if(strCommands[0]=="zeroShip") { obj_id objDefender = getLookAtTarget(self); int[] intRawSlots= getShipChassisSlots(objDefender); for(int intI = 0; intI-1) { sendSystemMessageTestingOnly(self, objPlasmaConduits[intI]+" is in the list"); } else { sendSystemMessageTestingOnly(self, objPlasmaConduits[intI]+" is NOT IN THE LIST"); } } } } } if(strCommands[0]=="fixConduits") { obj_id objShip = space_transition.getContainingShip(self); space_crafting.fixAllPlasmaConduits(objShip); sendSystemMessageTestingOnly(self, "Fixed"); } if(strCommands[0]=="fillInventory") { obj_id objInventory = utils.getInventoryContainer(self); for(int intI = 0; intI < 60; intI++) { obj_id objItem= createObject("object/tangible/ship/components/engine/eng_kse_a5x.iff", objInventory, ""); } sendSystemMessageTestingOnly(self, "Filled"); } if(strCommands[0]=="bridge1") { attachScript(getLookAtTarget(self), "e3demo.e3_bridge_worker_1"); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="setLaunchLocation") { obj_id[] objTestObjects = getAllObjectsWithTemplate(getLocation(self), 320000, "object/ship/player/player_star_destroyer.iff"); obj_id objShip = objTestObjects[0]; obj_id objMe = space_transition.getContainingShip(self); setObjVar(objShip, "trLaunchLocation", getTransform_o2p(objMe)); setObjVar(objShip, "locLaunchLocation", getLocation(objMe)); sendSystemMessageTestingOnly(self, "Done"); } if(strCommands[0]=="testExit") { } if(strCommands[0]=="destroyerUp") { location locTest = new location(); obj_id objShip = space_transition.getContainingShip(self); //locTest.z = 650; obj_id objCell = getCellId(objShip, "elevator05"); //obj_id objCell = getCellId(objShip, "communications"); locTest.cell = objCell; setLocation(self, locTest); playClientEffectObj(self, "clienteffect/elevator_rise.cef", self, null); elevatorMove (self, 1); } if(strCommands[0]=="destroyerDown") { location locTest = new location(); obj_id objShip = space_transition.getContainingShip(self); obj_id objCell = getCellId(objShip, "elevator_e3"); locTest.cell = objCell; setLocation(self, locTest); } if(strCommands[0]=="equipClothes") { //depot/swg/s0/dsrc/sku.0/sys.server/compiled/game/object/tangible/wearables/pants/pants_s01.tpf //depot/swg/s0/dsrc/sku.0/sys.server/compiled/game/object/tangible/wearables/shirt/shirt_s14.tpf //depot/swg/s0/dsrc/sku.0/sys.server/compiled/game/object/tangible/wearables/boots/boots_s05.tpf } if(strCommands[0]=="breakShipInDatapad") { obj_id objInventory = utils.getInventoryContainer(self); //obj_id objKit = createObject("object/tangible/ship/crafted/repair/repair_kit_engine.iff", objInventory, ""); //objKit = createObject("object/tangible/ship/crafted/repair/repair_kit_reactor.iff", objInventory, ""); //objKit = createObject("object/tangible/ship/crafted/repair/repair_kit_droid_interace.iff", objInventory, ""); //objKit = createObject("object/tangible/ship/crafted/repair/repair_kit_weapon_capacitor.iff", objInventory, ""); //objKit = createObject("object/tangible/ship/crafted/repair/repair_kit_weapon.iff", objInventory, ""); obj_id[] objPcds = space_transition.findShipControlDevicesForPlayer(self); obj_id objShip = space_transition.getShipFromShipControlDevice(objPcds[0]); int intSlot = space_crafting.ENGINE; setShipComponentHitpointsCurrent(objShip, intSlot, 0); setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); space_combat.recalculateEfficiency(intSlot, objShip); intSlot = space_crafting.WEAPON_0; setShipComponentHitpointsCurrent(objShip, intSlot, 0); setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); space_combat.recalculateEfficiency(intSlot, objShip); intSlot = space_crafting.REACTOR; setShipComponentHitpointsCurrent(objShip, intSlot, 0); setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); space_combat.recalculateEfficiency(intSlot, objShip); intSlot = space_crafting.CAPACITOR; setShipComponentHitpointsCurrent(objShip, intSlot, 0); setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); space_combat.recalculateEfficiency(intSlot, objShip); intSlot = space_crafting.DROID_INTERFACE; setShipComponentHitpointsCurrent(objShip, intSlot, 0); setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); space_combat.recalculateEfficiency(intSlot, objShip); sendSystemMessageTestingOnly(self, "whacked "+getShipComponentName(objShip, intSlot)); } if(strCommands[0]=="setBackShields") { obj_id objShip = space_transition.getContainingShip(self); int intSide = space_combat.BACK; //float fltShieldHitPointsMaximum = space_combat.getShieldHitPointsMaximum(objShip, intSide); space_combat.setShieldHitPoints(objShip, intSide, 5.0f); //setShieldHitPoints(objDefender, intSide, 0); } if(strCommands[0]=="damageShip") { obj_id objAttacker = space_transition.getContainingShip(self); float fltDamage = 200; int intSide = 1; int intTargetedComponent = 112; int intWeaponSlot = space_crafting.WEAPON_0; space_combat.doShieldDamage(objAttacker, objAttacker, intWeaponSlot, fltDamage, intSide); space_combat.doArmorDamage(objAttacker, objAttacker, intWeaponSlot, fltDamage, intSide); space_combat.doComponentDamage(objAttacker, objAttacker, intWeaponSlot, intTargetedComponent, fltDamage, intSide); } if(strCommands[0]=="registerRecruiter") { obj_id objTarget = getLookAtTarget(self); string strMapName = "pilot_recruiter"; string strPrimaryCategory = "space"; string strSecondaryCategory = "recruiter"; string_id strMapNameId = new string_id("map_loc_type_n", strMapName); obj_id objContainer = getTopMostContainer(objTarget); location locTest = getLocation(objTarget); if(isIdValid(objContainer)) { locTest = getLocation(objContainer); } addPlanetaryMapLocation(objTarget, utils.packStringId(strMapNameId), (int)locTest.x, (int)locTest.z, strPrimaryCategory, strSecondaryCategory, MLT_STATIC, planetary_map.NO_FLAG); sendSystemMessageTestingOnly(self, "Registered the whozit"); } if(strCommands[0]=="fixChassis") { obj_id[] objPcds = space_transition.findShipControlDevicesForPlayer(self); obj_id objShip = space_transition.getShipFromShipControlDevice(objPcds[0]); dictionary dctParams = new dictionary(); dctParams.put("strSlot", ""+space_crafting.CHASSIS); dctParams.put("objShip", objShip); space_utils.notifyObject(self, "fixit", dctParams); } if(strCommands[0]=="damageReactor") { obj_id objShip = getPilotedShip(self); float fltCurrentHitPoints = getShipComponentHitpointsCurrent(objShip, ship_chassis_slot_type.SCST_reactor); sendSystemMessageTestingOnly(self, "changing hp from "+fltCurrentHitPoints+" to "+fltCurrentHitPoints/2); fltCurrentHitPoints = fltCurrentHitPoints /2; setShipComponentHitpointsCurrent(objShip, ship_chassis_slot_type.SCST_reactor, fltCurrentHitPoints); space_combat.recalculateEfficiency(ship_chassis_slot_type.SCST_reactor, objShip); } if(strCommands[0]=="tauntMe") { string_id strSpam = new string_id("space/space_interaction", "aborting_reactor_pump"); space_utils.tauntPlayer(self, getLookAtTarget(self), strSpam); } if(strCommands[0]=="checkKessel") { obj_id objKesselObject = getPlanetByName("space_light1"); obj_id objKesselManager = utils.getObjIdScriptVar(objKesselObject, "objKesselManager"); sendSystemMessageTestingOnly(self, "on planet "+objKesselObject+" got "+objKesselManager); } if(strCommands[0]=="damageUp") { obj_id objShip = space_transition.getContainingShip(self); setShipCapacitorEnergyMaximum(objShip, 300000); setShipCapacitorEnergyRechargeRate(objShip, 1200000); setShipWeaponDamageMaximum(objShip, space_crafting.WEAPON_0, 2500000); } if(strCommands[0]=="hasReactor") { boolean boolTest = isShipSlotInstalled(getLookAtTarget(self), 2); sendSystemMessageTestingOnly(self, "boolTest is "+boolTest); int intChassisSlot = space_crafting.getComponentSlotInt("reactor"); sendSystemMessageTestingOnly(self, "slot is "+intChassisSlot); } if(strCommands[0]=="resetSpaceFaction") { int spaceFaction = space_transition.getPlayerSpaceFaction(self); shipSetSpaceFaction(space_transition.getContainingShip(self), spaceFaction); sendSystemMessageTestingOnly(self, "Reset faction"); } if(strCommands[0]=="checkTargetFaction") { obj_id objTarget = getLookAtTarget(self); string strFaction = "rebel"; sendSystemMessageTestingOnly(self, "set "+objTarget+ " to Faction "+strFaction); //shipSetSpaceFaction(objTarget, strFaction); } if(strCommands[0]=="getShip") { } if(strCommands[0]=="updateShipFaction") { space_transition.updateShipFaction(space_transition.getContainingShip(self), self); sendSystemMessageTestingOnly(self, "updated faction "); int intTest = ##"imperial"; sendSystemMessageTestingOnly(self, "Imperial : "+intTest); intTest = ##"rebel"; sendSystemMessageTestingOnly(self, "Rebel : "+intTest); } if(strCommands[0]=="testSM") { obj_id objShip = space_transition.getContainingShip(self); string_id strSpam = new string_id("fpp", "fooo"); space_utils.sendSystemMessageShip(objShip, strSpam, true, false, true, true); //space_utils.sendSystemMessageShip(objShip, strSpam, true, true, true, true); space_utils.sendSystemMessageToOperations(objShip, strSpam); obj_id objOfficer = space_utils.getOperationsOfficer(objShip); sendSystemMessageTestingOnly(self, "objOfficer is "+objOfficer); } if(strCommands[0]=="makeShipImperial") { int intTest = ##"imperial"; obj_id objShip = space_transition.getContainingShip(self); shipSetSpaceFaction(objShip, intTest); sendSystemMessageTestingOnly(self, "Set Ship Faction to Imperial"); } if(strCommands[0]=="makeShipRebel") { obj_id objShip = space_transition.getContainingShip(self); int intTest = ##"rebel"; shipSetSpaceFaction(objShip, intTest); sendSystemMessageTestingOnly(self, "Set Ship Faction to Rebel"); } if(strCommands[0]=="clearOvert") { obj_id objShip = space_transition.getContainingShip(self); space_transition.clearOvertStatus(objShip); space_transition.updatePVPStatus(objShip); } if(strCommands[0]=="checkOvert") { if(pvpGetType( self) == PVPTYPE_DECLARED ) { sendSystemMessageTestingOnly(self, "Overt"); } else { sendSystemMessageTestingOnly(self, "covert"); } } if(strCommands[0]=="asd") { factions.goCovert(self); } if(strCommands[0]=="checkMe") { sendSystemMessageTestingOnly(self, "Faction "+space_transition.getPlayerSpaceFaction(self)); obj_id objShip = space_transition.getContainingShip(self); sendSystemMessageTestingOnly(self, "ship Faction "+shipGetSpaceFaction(objShip)); int intTest = ##"imperial"; sendSystemMessageTestingOnly(self, "Imperial : "+intTest); intTest = ##"rebel"; sendSystemMessageTestingOnly(self, "Rebel : "+intTest); } if(strCommands[0]=="deckOut") { space_combat.setupCapitalShipFromTurretDefinition(getLookAtTarget(self), "star_destroyer"); sendSystemMessageTestingOnly(self, "DECKED"); } if(strCommands[0]=="testFoo") { space_crafting.setEngineMaximumPitch(self, 100); return SCRIPT_CONTINUE; } if(strCommands[0]=="lookAtTarget") { obj_id objTarget = getLookAtTarget(self); sendSystemMessageTestingOnly(self, "lookAtTarget is "+objTarget); } if(strCommands[0]=="myScriptVars") { deltadictionary dctScriptVars = self.getScriptVars(); sendSystemMessageTestingOnly(self, "Script Vars are :"+dctScriptVars.toString()); } if(strCommands[0]=="nameShip") { obj_id shipControlDevice = space_transition.findEmptyShipControlDeviceForPlayer(self); obj_id objShip = getPilotedShip(self); space_transition.setShipName(objShip, self, shipControlDevice); sendSystemMessageTestingOnly(self, "asd"); } if(strCommands[0]=="dumpShip") { obj_id[] shipControlDevices = space_transition.findShipControlDevicesForPlayer(self); obj_id shipControlDevice = shipControlDevices[0]; obj_id ship = space_transition.getShipFromShipControlDevice(shipControlDevice); location x = getLocation(self); setLocation(ship, x); debugSpeakMsg(self, "Ship ID = " + ship); return SCRIPT_CONTINUE; } if(strCommands[0]=="yourScriptVars") { obj_id objTest = getLookAtTarget(self); deltadictionary dctScriptVars = objTest.getScriptVars(); sendSystemMessageTestingOnly(self, "Script Vars are :"+dctScriptVars.toString()); } if(strCommands[0]=="checkLocation") { sendSystemMessageTestingOnly(self, "i am at "+getLocation(self)); } if(strCommands[0]=="resendMail") { obj_id objTarget = getLookAtTarget(self); removeObjVar(objTarget, player_structure.VAR_LAST_MESSAGE); player_structure.sendMaintenanceMail(objTarget); sendSystemMessageTestingOnly(self, "Resetn"); } if(strCommands[0]=="checkMail") { player_structure.sendCondemnedMail(getLookAtTarget(self)); sendSystemMessageTestingOnly(self, "sentMial"); } if(strCommands[0]=="sendNewbieMail") { string_id strSubject = new string_id("space/space_interaction", "email_subject_"+strCommands[1]); string_id strBody = new string_id("space/space_interaction", "email_body_"+strCommands[1]); string_id strSender = new string_id("space/space_interaction", "email_sender_"+strCommands[1]); //string strSenderName = getString(strSender); string strSenderName = utils.packStringId(strSender); sendSystemMessageTestingOnly(self, "sending mail "+strCommands[1]); utils.sendMail(strSubject, strBody, self, strSenderName); } if(strCommands[0]=="sendNewbieMailMessage") { // SEND N00b MAILS! if(strCommands[1].equals("1")) { dictionary dctParams = new dictionary(); dctParams.put("intMail", 1); messageTo(self, "sendNewbieMails", dctParams, rand(10, 11), true); sendSystemMessageTestingOnly(self, "Email 1"); } if(strCommands[1].equals("2")) { dictionary dctParams = new dictionary(); dctParams.put("intMail", 2); messageTo(self, "sendNewbieMails", dctParams, rand(10, 11), true); sendSystemMessageTestingOnly(self, "Email 2"); } if(strCommands[1].equals("3")) { dictionary dctParams = new dictionary(); dctParams.put("intMail", 3); messageTo(self, "sendNewbieMails", dctParams, rand(10, 11), true); sendSystemMessageTestingOnly(self, "Email 2"); } } if(strCommands[0]=="testItem1") { obj_id objInventory = utils.getInventoryContainer(self); obj_id objItem = createObjectOverloaded("object/tangible/ship/components/shield_generator/shd_seinar_experimental_a1.iff", objInventory); sendSystemMessageTestingOnly(self, "made item "+objItem+" in "+objInventory); } if(strCommands[0]=="testItem2") { obj_id objItem = createObject("object/tangible/ship/components/weapon/wpn_armek_sw4.iff", getLocation(self)); sendSystemMessageTestingOnly(self, "made item "+objItem); } if(strCommands[0]=="hitMe") { obj_id objTarget = getLookAtTarget(self); obj_id objShip = getPilotedShip(self); dictionary dctParams = new dictionary(); dctParams.put("objShip", objTarget); space_utils.notifyObject(objShip, "megaDamage", dctParams); sendSystemMessageTestingOnly(self, "objTarget of "+objTarget+" is attacking "+objShip); //ship_ai.spaceAttack(objTarget, objShip); } if(strCommands[0]=="findStationEggs") { obj_id objStationEggs[] = getAllObjectsWithObjVar(getLocation(self), 320000, "intStationRespawner"); for(int intI = 0; intI< objStationEggs.length; intI++) { sendSystemMessageTestingOnly(self, "Egg is "+objStationEggs[intI]); } } if(strCommands[0]=="destroyerPhase") { obj_id objManager = space_battlefield.getManagerObject(); space_battlefield.doDestroyerPhase(objManager); sendSystemMessageTestingOnly(self, "DESTROYER"); } if(strCommands[0]=="makeSquad") { //obj_id[] spawnSquad(obj_id objParent, string strSquad, transform trSpawnLocation, float fltDistance, obj_id objCell) space_create.createSquad(self, "squad_test", getTransform_o2p(self), 10, null); sendSystemMessageTestingOnly(self, "spawned"); } if(strCommands[0]=="breakThing1") { obj_id objTest = getLookAtTarget(self); setInvulnerableHitpoints(objTest, 1); sendSystemMessageTestingOnly(self, "Hitpoints are "+getHitpoints(objTest)); } if(strCommands[0]=="breakThing50") { obj_id objTest = getLookAtTarget(self); setInvulnerableHitpoints(objTest, 50); sendSystemMessageTestingOnly(self, "Hitpoints are "+getHitpoints(objTest)); } if(strCommands[0]=="breakThing100") { obj_id objTest = getLookAtTarget(self); setInvulnerableHitpoints(objTest, 100); sendSystemMessageTestingOnly(self, "Hitpoints are "+getHitpoints(objTest)); } if(strCommands[0]=="breakThing500") { obj_id objTest = getLookAtTarget(self); setInvulnerableHitpoints(objTest, 500); sendSystemMessageTestingOnly(self, "Hitpoints are "+getHitpoints(objTest)); } if(strCommands[0]=="fixThing") { obj_id objTest = getLookAtTarget(self); setInvulnerableHitpoints(objTest, 1000); sendSystemMessageTestingOnly(self, "Hitpoints are "+getHitpoints(objTest)); } if(strCommands[0]=="setDifficulty") { int intRawDifficulty = getLevel(self); } if(strCommands[0]=="testDirectDamage") { int intSlot = space_crafting.ENGINE; float fltPercent = utils.stringToFloat(strCommands[1]); fltPercent = fltPercent / 100; dictionary dctParams = new dictionary(); dctParams.put("intSlot", intSlot); fltPercent = 1000 * fltPercent; dctParams.put("fltCurrentHitpoints", fltPercent); LOG("space", "Put"); dctParams.put("fltMaximumHitpoints", 1000f); LOG("space", "DctParams is "+ dctParams); space_utils.notifyObject(space_transition.getContainingShip(self), "componentEfficiencyChanged", dctParams); sendSystemMessageTestingOnly(self, "set "+intSlot+" to "+fltPercent); } if(strCommands[0]=="bustEngine") { int intSlot = space_crafting.ENGINE; setShipComponentHitpointsCurrent(getTopMostContainer(self), intSlot, 0); setShipComponentArmorHitpointsCurrent(getTopMostContainer(self), intSlot, 0); space_combat.recalculateEfficiency(intSlot, getTopMostContainer(self)); sendSystemMessageTestingOnly(self, "WHACk!@"); } if(strCommands[0]=="breakHull") { obj_id objTest = getLookAtTarget(self); obj_id objShip = space_transition.getContainingShip(self); space_crafting.breakHullPanel(objTest, objShip, getLocation(objTest), true); sendSystemMessageTestingOnly(self, "broke"); } if(strCommands[0]=="fixHull") { obj_id objTest = getLookAtTarget(self); obj_id objShip = space_transition.getContainingShip(self); space_crafting.fixHullPanel(objTest, objShip, getLocation(objTest)); sendSystemMessageTestingOnly(self, "fix "); } if(strCommands[0]=="checkItemCount") { int intCount = player_structure.getStructureNumItems(space_transition.getContainingShip(self)); sendSystemMessageTestingOnly(self, "intCount is "+intCount); } if(strCommands[0]=="checkTrainer") { string strPrimary ="trainer"; string strSub = "trainer_pilot_privateer"; map_location[] map_locs = getPlanetaryMapLocations(strPrimary, strSub); if(map_locs.length==0) { sendSystemMessageTestingOnly(self, "000000000"); } sendSystemMessageTestingOnly(self, "map_locs x is "+map_locs[0].getX()+" y is "+map_locs[0].getY()); } if(strCommands[0]=="fixEngine") { int intSlot = space_crafting.ENGINE; setShipComponentHitpointsCurrent(getTopMostContainer(self), intSlot, 100); space_combat.recalculateEfficiency(intSlot, getTopMostContainer(self)); sendSystemMessageTestingOnly(self, "WHACk!@"); } if(strCommands[0]=="testCells") { location locTest = getLocation(self); obj_id objCell = locTest.cell; obj_id objBuilding = getContainedBy(objCell); string[] strCells = getCellNames(objBuilding); if(strCells==null) { sendSystemMessageTestingOnly(self, "objCell is "+objCell+" building i s"+objBuilding); } } if(strCommands[0]=="testItemCreation") { obj_id objFoo = createObject("object/weapon/ranged/rifle/rifle_dlt20.iff", getTransform_o2p(self),null); sendSystemMessageTestingOnly(self, "Made object type "+objFoo); } if(strCommands[0]=="setupShip") { resizeable obj_id[] objSparkers = new obj_id[0]; location locTest = getLocation(self); obj_id objObject = getContainedBy(locTest.cell); resizeable obj_id[] objContents = new obj_id[0]; obj_id[] objCells = getContents(objObject); for(int intI = 0; intI< objCells.length; intI++) { obj_id[] objTestContents = getContents(objCells[intI]); if((objTestContents!=null)&&(objTestContents.length>0)) { for(int intJ = 0; intJ < objTestContents.length; intJ++) { string strTest = getTemplateName(objTestContents[intJ]); if(strTest=="object/tangible/space/content_infrastructure/generic_egg_small.iff") { objSparkers = utils.addElement(objSparkers, objTestContents[intJ]); } } } } utils.setScriptVar(objObject, "objSparkers", objSparkers); sendSystemMessageTestingOnly(self, "set sparkers of length "+objSparkers+" on "+objObject); } if(strCommands[0]=="locationTesting") { obj_id objTarget = getLookAtTarget(self); location locTest = getLocation(objTarget); resizeable location[] locTests = new location[0]; locTests = utils.addElement(locTests, locTest); setObjVar(self, "locTest2", locTest); } if(strCommands[0]=="validateLocations") { obj_id objTarget = getLookAtTarget(self); location locTest = getLocation(objTarget); resizeable location[] locTests = getResizeableLocationArrayObjVar(self, "locTest"); for(int intI = 0; intI < locTests.length; intI++) { sendSystemMessageTestingOnly(self, "locTest is "+locTest); sendSystemMessageTestingOnly(self, "locTests["+intI+"] is "+locTests[intI]); if(locTest==locTests[intI]) { sendSystemMessageTestingOnly(self, "Equality comparison is true"); } else { sendSystemMessageTestingOnly(self, "Equality comparison is false"); } } } if(strCommands[0]=="fixConduit") { space_crafting.fixPlasmaConduit(getLookAtTarget(self), space_transition.getContainingShip(self), getLocation(getLookAtTarget(self))); sendSystemMessageTestingOnly(self, "Fixing "+getLookAtTarget(self)); } if(strCommands[0]=="fixCombat") { setState(self, STATE_COMBAT, false); sendSystemMessageTestingOnly(self, "done"); } if(strCommands[0]=="breakConduit") { //obj_id objTarget = getLookAtTarget(self); ////setInvulnerableHitpoints(objTarget, 1); //setCondition(objTarget, CONDITION_ON); space_crafting.breakPlasmaConduit(getLookAtTarget(self), space_transition.getContainingShip(self), getLocation(getLookAtTarget(self)), true); sendSystemMessageTestingOnly(self, "BROKE"); } if(strCommands[0]=="checkCondition") { sendSystemMessageTestingOnly(self, "Condition is "+hasCondition(getLookAtTarget(self), CONDITION_ON)); } if(strCommands[0]=="closestStation") { obj_id objClosestStation = space_combat.getClosestSpaceStation(self); sendSystemMessageTestingOnly(self, "Found "+objClosestStation); } if(strCommands[0]=="getSpawnerData") { space_utils.notifyObject(getLookAtTarget(self), "getSpawnerData", null); sendSystemMessageTestingOnly(self, "weh"); } if(strCommands[0]=="checkStations") { obj_id objManager = space_battlefield.getManagerObject(); obj_id objStationEggs[] = getAllObjectsWithObjVar(getLocation(objManager), 320000, "intStationRespawner"); if(objStationEggs!=null) { for(int intI = 0; intI -1 ) { script = script.substring( 7 ); } if(script!="") { if ( !hasScript( objStation, script ) ) attachScript( objStation, script ); } space_create.setupShipFromObjVars(objStation); } } */ } } // remade teh stations } if(strCommands[0]=="getShipId") { obj_id objShip = space_transition.getContainingShip(self); sendSystemMessageTestingOnly(self, "I am in "+objShip); } if(strCommands[0]=="pingObject") { string strObject = strCommands[1]; sendSystemMessageTestingOnly(self, "strCommands[1] is "+strObject); obj_id objTarget = utils.stringToObjId(strObject); dictionary dctParams = new dictionary(); dctParams.put("objSender", self); messageTo(objTarget, "pingObject", dctParams, 0, false); sendSystemMessageTestingOnly(self, "Sent message to "+objTarget+" with ping message"); } if(strCommands[0]=="doSpawns") { messageTo(space_transition.getContainingShip(self), "delayedSpawn", null, 1, false); sendSystemMessageTestingOnly(self, "going"); } if(strCommands[0]=="damageParticleTest") { int intDamageType= 0; if(strCommands[1]=="chassis") { intDamageType = 1; } else if(strCommands[1]=="component") { intDamageType = 2; } else if(strCommands[1]=="shield") { intDamageType = 3; } else if(strCommands[1]=="armor") { intDamageType = 4; } int intDamageIntensity = 0; if(strCommands[2]=="light") { intDamageIntensity = 1; } if(strCommands[2]=="heavy") { intDamageIntensity = 2; } dictionary dctParams = new dictionary(); dctParams.put("intDamageType", intDamageType); dctParams.put("intDamageIntensity", intDamageIntensity); location locTest = getLocation(self); obj_id objCell = locTest.cell; obj_id objShip = getContainedBy(objCell); space_utils.notifyObject(objShip, "interiorDamageNotification", dctParams); sendSystemMessageTestingOnly(self, "text : "+strText+" sent to "+objShip+ "type is "+intDamageType+" and intensity is "+ intDamageIntensity); } if(strCommands[0]=="checkDroid") { obj_id[] shipControlDevices = space_transition.findShipControlDevicesForPlayer(self); if (shipControlDevices != null) { for (int i = 0; i < shipControlDevices.length; ++i) { sendSystemMessageTestingOnly(self, "objPcd is "+shipControlDevices[i]); obj_id objShip = space_transition.getShipFromShipControlDevice(shipControlDevices[i]); sendSystemMessageTestingOnly(self, "objShip is "+objShip); obj_id objDroid = getDroidControlDeviceForShip(objShip); sendSystemMessageTestingOnly(self, "objDroid is "+objDroid); } } } if(strCommands[0]=="reset world sure") { obj_id[] objObjects = getObjectsInRange(self, 32000); sendSystemMessageTestingOnly(self, "Destroying world"); for(int intI = 0; intI1) { if(strCommands[1]=="sure") { obj_id[] objObjects = getObjectsInRange(self, 32000); sendSystemMessageTestingOnly(self, "Destroying world"); for(int intI = 0; intI100) { fltMinSpawnDistance = 100; } float fltMaxSpawnDistance = 200; location locSpawnLocation = new location(); int intI = 0; resizeable location[] locSpawnLocations = new location[0]; while(intI<3) { const float[] QUADRANT_START_ANGLE = {0, 47, -47}; const float[] QUADRANT_SIZE = {12, 20, 20}; // how far away float fltSpawnDistance = rand(fltMinSpawnDistance, fltMaxSpawnDistance); locSpawnLocation = utils.getLocationInArc(self, QUADRANT_START_ANGLE[intI], QUADRANT_SIZE[intI], fltSpawnDistance); //LOG("spawning", self+" intSize is "+intSize); //LOG("spawning", self+" Pre good location, locSpawnLocation is "+locSpawnLocation); int intSize = rand(30, 72); location goodLocation = locations.getGoodLocationAroundLocation(locSpawnLocation, intSize,intSize, 75, 75, false, true); if(goodLocation == null) { sendSystemMessageTestingOnly(self, "Null location"); //return SCRIPT_CONTINUE; } else { float fltY = getHeightAtLocation(goodLocation.x, goodLocation.z); goodLocation.y = fltY; locSpawnLocations = utils.addElement(locSpawnLocations, goodLocation); } intI = intI+1; } intI = 0; boolean boolCheckForTheaters = true; location locCurrentLocation = getLocation(self); while(intI100) { fltMinSpawnDistance = 100; } float fltMaxSpawnDistance = 200; location locSpawnLocation = new location(); int intI = 0; resizeable location[] locSpawnLocations = new location[0]; while(intI<3) { const float[] QUADRANT_START_ANGLE = {0, 47, -47}; const float[] QUADRANT_SIZE = {12, 20, 20}; // how far away float fltSpawnDistance = rand(fltMinSpawnDistance, fltMaxSpawnDistance); locSpawnLocation = utils.getLocationInArc(self, QUADRANT_START_ANGLE[intI], QUADRANT_SIZE[intI], fltSpawnDistance); //LOG("spawning", self+" intSize is "+intSize); //LOG("spawning", self+" Pre good location, locSpawnLocation is "+locSpawnLocation); int intSize = rand(30, 72); location goodLocation = locations.getGoodLocationAroundLocation(locSpawnLocation, intSize,intSize, 75, 75, false, true); if(goodLocation == null) { sendSystemMessageTestingOnly(self, "Null location"); //return SCRIPT_CONTINUE; } else { float fltY = getHeightAtLocation(goodLocation.x, goodLocation.z); goodLocation.y = fltY; locSpawnLocations = utils.addElement(locSpawnLocations, goodLocation); } intI = intI+1; } intI = 0; boolean boolCheckForTheaters = true; location locCurrentLocation = getLocation(self); while(intI0) { string strSpam = objPlayer+ " Too many lairs in the area, kicking out, area was "+locHome+" number of lairs is "+objLairs.length; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); return false; } } if(strObjectType!=null) { int intIndex = strObjectType.indexOf("theater"); if(intIndex>-1) { // it's a theater, so do our uber check objLairs = getAllObjectsWithTemplate(locHome, 200, "object/creature/planet/bothan_male.iff"); int intCount = utils.countSubStringObjVars(objLairs, "spawing.lairType", "theater"); if(intCount>0) { string strSpam = objPlayer+ " theaters in range is "+intCount+" too many at location "+locHome; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); return false; } } } /* objTheaters = getAllObjectsWithObjVar(locHome, 200, "theater.stamp"); // look for parents if(objTheaters!=null) { //////LOG("spawning", objPlayer+ " objTheaters.length is "+objTheaters.length); //////LOG("spawning", objPlayer+ " locHome is "+locHome); if(objTheaters.length>0) { //////LOG("spawning", objPlayer+ " Parent object found in range, returning false"); //////LOG("spawning", objPlayer+ " objTheaters length of "+objTheaters.length+" is greater than 0"); return false; } } */ obj_id[] objTheaters = getAllObjectsWithObjVar(locHome, 200, "isScenario"); // scenario check if(objTheaters!=null) { if(objTheaters.length>0) { string strSpam = objPlayer+ " too many scenarios neat "+locHome+" count was "+objTheaters.length; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); return false; } } } if(objTemplates.length>SPAWN_CHECK_TEMPLATE_LIMIT) { if(boolLogFailures) { string strSpam = objPlayer+ " found too many normal templates in range of "+locHome+" count was "+objTemplates.length; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); } return false; } } //////LOG("spawning", objPlayer+ " returning true from checkTemplatesInRange"); return true; } boolean canSpawn(obj_id objPlayer, location locSpawnLocation, boolean boolCheckForTheaters, string strObjectType) { boolean boolLogFailures = true; boolean boolVerboseMode = true; if(!isSpawningAllowed(locSpawnLocation)) { string strSpam = objPlayer+ " spawning not allowed on "+locSpawnLocation.area; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); return false; } ////LOG("spawning", "canSpawn: running check for " + objPlayer); //////LOG("spawning", "canspawn check"); int intServerSpawnLimit = 0; string strSpam = ""; //string strSpam = objPlayer +" intserverspawnlimit is "+intServerSpawnLimit; //sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); // we need to compare our current location distance to the last couple of spawns... // AM I IN A STRUCTURE?!?!?! // if so, we're kicking out //////////LOG("spawn_spam", "objPlayer is "+objPlayer); /// check number of everything to make sure we're good location locCurrentLocation = getLocation(objPlayer); if(locCurrentLocation.area=="tutorial") { strSpam = objPlayer+ " canSpawn failed: spawning disabled in tutorial"; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); ////LOG("spawning", "IN TUTORIAL, FAILING CANSPAWN"); return false; // tutorial } region[] rgnCities = getRegionsWithMunicipalAtPoint(locCurrentLocation, regions.MUNI_TRUE); if(rgnCities!=null) { // in a city strSpam = objPlayer+ " canSpawn failed: spawning not allowed in cities"; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); ////////LOG("spawning", "In A city returnig false from canspawn"); return false; } region rgnBattlefield= battlefield.getBattlefield(locCurrentLocation); if(rgnBattlefield!=null) { strSpam = objPlayer+ " canSpawn failed: spawning disabled in battlefields"; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); ////////LOG("spawning", "In A battlefield returnig false from canspawn"); return false; } rgnCities = getRegionsWithGeographicalAtPoint(locCurrentLocation, regions.GEO_CITY); if(rgnCities!=null) { strSpam = objPlayer+" canSpawn failed: spawning not allowed in cities"; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); // in a city ////////LOG("spawning", "In A city returnig false from canspawn"); return false; } obj_id objMasterSpawner = getPlanetByName(locCurrentLocation.area); if(hasObjVar(objMasterSpawner, "boolSpawnerIsOn")) { //////////LOG("spawn_spam", "Spawner has objvar"); boolean boolSpawnerIsOn; boolSpawnerIsOn = getBooleanObjVar(objMasterSpawner, "boolSpawnerIsOn"); //////////LOG("spawn_spam", "objVar is "+boolSpawnerIsOn); // is it set to on? if(boolSpawnerIsOn==false) { strSpam = objPlayer+" canSpawn failed: spawning is disabled"; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); ////////LOG("spawning", "Spawn system is turned off, returnign false"); return boolSpawnerIsOn; } } //////////LOG("player_spawner", "Cell is "+locCurrentLocation.cell); if(locCurrentLocation.cell!=obj_id.NULL_ID) { // INSIDE OF A CELL! BAD! strSpam = objPlayer+ " canSpawn failed: spawnig is disabled in cells"; sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); return false; } if(hasObjVar(objPlayer, "spawning.locSpawnLocation")) { // check quantitities int intSpawnedTemplates = 0; if(hasObjVar(objPlayer, "spawning.intSpawnedTemplates")) { intSpawnedTemplates = getIntObjVar(objPlayer, "spawning.intSpawnedTemplates"); // how many we spawned in the current area ////////LOG("player_spawner", objPlayer + "'s intSpawnedTemplates is "+intSpawnedTemplates); } if(intSpawnedTemplates>=SPAWN_CHECK_LIMIT) { // greater than.. check our location ////////LOG("player_spawner", objPlayer+ " greater than "+SPAWN_CHECK_LIMIT); location locLastSpawnLocation = getLocationObjVar(objPlayer, "spawning.locSpawnLocation"); ////////LOG("spawner", "locCurrentLocation is "+locCurrentLocation); ////////LOG("spawner", "locLastSpawnLocation is "+locLastSpawnLocation); float fltDistance = utils.getDistance(locLastSpawnLocation, locCurrentLocation); ////////LOG("player_spawner",objPlayer+ " fltDistance is "+fltDistance); if(fltDistance6) { obj_id[] objContents = getShipContents(self); if((objContents!=null)&&(objContents.length>0)) { for(int intI = 0; intI< objContents.length; intI++) { if(isPlayer(objContents[intI])) { sendSystemMessageTestingOnly(objContents[intI], "playing effect"); playClientEffectLoc(objContents[intI], "clienteffect/int_camshake_light.cef", getLocation(objContents[intI]), 0); } } } } return SCRIPT_CONTINUE; } obj_id[] getShipContents(obj_id objObject) { resizeable obj_id[] objContents = new obj_id[0]; obj_id[] objCells = getContents(objObject); for(int intI = 0; intI< objCells.length; intI++) { obj_id[] objTestContents = getContents(objCells[intI]); if((objTestContents!=null)&&(objTestContents.length>0)) { for(int intJ = 0; intJ < objTestContents.length; intJ++) { objContents = utils.addElement(objContents, objTestContents[intJ]); } } } return objContents; } messageHandler checkEngineValue() { int intLoops = params.getInt("intLoops"); intLoops = intLoops - 1; if(intLoops<1) { LOG("space", "DONE CHECKING"); sendSystemMessageTestingOnly(self, "DONE CHECKING"); return SCRIPT_CONTINUE; } obj_id objShip = space_transition.getContainingShip(self); //sendSystemMessageTestingOnly(self, "==============================================================="); sendSystemMessageTestingOnly(self, "Current Ship Speed: "+ getShipCurrentSpeed(objShip)+" Actual Pitch: "+getShipActualPitchRateMaximumDegrees(objShip)); LOG("space", "==============================================================="); LOG("space", "Loops left: "+intLoops); LOG("space", "Current Ship Speed: "+ getShipCurrentSpeed(objShip)); //LOG("space", "Current Ship Yaw: "+getShipCurrentYaw(objShip)); //LOG("space", "Current Ship Pitch: "+getShipCurrentPitch(objShip)); //LOG("space", "Current Ship Roll: "+getShipCurrentRoll(objShip)); LOG("space", "Actual Yaw: "+getShipActualYawRateMaximumDegrees(objShip)); LOG("space", "Actual Pitch: "+getShipActualPitchRateMaximumDegrees(objShip)); LOG("space", "Actual Roll: "+getShipActualRollRateMaximumDegrees(objShip)); params.put("intLoops", intLoops); messageTo(self, "checkEngineValue", params, .25f, false); return SCRIPT_CONTINUE; } string getDumpString(obj_id objTest, string strName) { string strTest = ""; location locTest = getWorldLocation(objTest); location locFoo = getLocation(objTest); string strCell = getCellName(locFoo.cell); strTest = strName+" "+(int)locTest.x+" "+(int)locTest.y+" "+(int)locTest.z+" "+strCell+"\r\n"; return strTest; } messageHandler pingResponse() { // respond to sender with my locatoin location locTest = params.getLocation("locTest"); obj_id objSender = params.getObjId("objSender"); sendSystemMessageTestingOnly(self, "Response from "+objSender+" they are at location "+locTest); obj_id objTopMost = params.getObjId("objTopMost"); if(isIdValid(objTopMost)) { location locTopMost = params.getLocation("locTopMost"); sendSystemMessageTestingOnly(self, "Top Most Container is "+objTopMost+" at "+locTopMost); } else { sendSystemMessageTestingOnly(self, "Target is in the world, not top most"); } return SCRIPT_CONTINUE; }