Fixed the Following:

Updated Generic Spawner Script
Removed OP Buff from GCW City Generals
Turrets in Bestine no longer shoot Bounty Hunters
GCW Defensive Generals are Invulnerable until the last 15 minutes of the invasion.
Fixed GM Kill command
This commit is contained in:
Redacted by Stellabellum INC
2015-02-13 18:28:39 -08:00
parent f314930c92
commit b93530b6c8
9 changed files with 116 additions and 20 deletions
@@ -26,7 +26,6 @@ delayAction:invasionHalfWayPoint:900 invasion
signalMaster;invasionHalfWayPoint;none invasionHalfWayPoint
delayAction:cityAttackUnsuccessful:1800 invasion
signalMaster;cityAttackUnsuccessful;none cityAttackUnsuccessful
messageTo;defense_camp;wsToggleInvulnerability;none invasion
delayAction:invasionCleanup:1 invasionCompleted
delayAction:defendersEvacuate:1 defenseLostCity
signalMaster;defendersEvacuate;none defendersEvacuate Cleanup objects from the battlefield
@@ -26,7 +26,6 @@ delayAction:cityAttackUnsuccessful:1800 invasion
signalMaster;cityAttackUnsuccessful;none cityAttackUnsuccessful
delayAction:invasionEndsSoon:1500 invasion
signalMaster;invasionEndsSoon;none invasionEndsSoon
messageTo;defense_camp;wsToggleInvulnerability;none invasion
delayAction:invasionCleanup:1 invasionCompleted
delayAction:defendersEvacuate:1 defenseLostCity
signalMaster;defendersEvacuate;none defendersEvacuate Cleanup objects from the battlefield
@@ -26,7 +26,6 @@ delayAction:cityAttackUnsuccessful:1800 invasion
signalMaster;cityAttackUnsuccessful;none cityAttackUnsuccessful
delayAction:invasionEndsSoon:1500 invasion
signalMaster;invasionEndsSoon;none invasionEndsSoon
messageTo;defense_camp;wsToggleInvulnerability;none invasion
delayAction:invasionCleanup:1 invasionCompleted
delayAction:defendersEvacuate:1 defenseLostCity
signalMaster;defendersEvacuate;none defendersEvacuate Cleanup objects from the battlefield
@@ -411,9 +411,9 @@ commandHandler cmdKill()
commandHandler cmdKillPlayer()
{
if ( !isIdValid(target) || !isPlayer(target) )
if ( !isIdValid(target) || !isPlayer(target) || isDead(target) )
{
sendSystemMessageTestingOnly(self, "/killPlayer: you must have a valid player target to use this command");
sendSystemMessageTestingOnly(self, "/killPlayer: you must have a valid, alive player target to use this command");
return SCRIPT_CONTINUE;
}
@@ -427,7 +427,8 @@ commandHandler cmdKillPlayer()
return SCRIPT_CONTINUE;
}
pclib.killPlayer(target, target);
setPosture(target, POSTURE_INCAPACITATED);
pclib.coupDeGrace(target, target, true, true);
return SCRIPT_CONTINUE;
}
@@ -387,6 +387,18 @@ boolean isValidTarget(obj_id turret, obj_id target)
return false;
}
if(hasScript(turret, "systems.gcw.gcw_turret") && hasScript(target, "ai.smuggler_spawn_enemy"))
{
return false;
//2/1/15: Temp hack so turrets focus on enemy rather than BH NPC's in Bestine
}
if(ai_lib.isAnimal(target) && hasScript(turret, "systems.gcw.gcw_turret"))
{
return false;
//2/1/15: Temp hack so turrets focus on enemy rather than wild creatures.
}
if(isMob(target) && isIdValid(getMaster(target)))
{
obj_id cd = callable.getCallableCD(target);
@@ -713,4 +725,4 @@ void executeAttackAction(obj_id turret, obj_id target)
void doLogging(string section, string message)
{
LOG("doLogging/advanced_turret.scriptlib/"+section, message);
}
}
@@ -4686,12 +4686,14 @@ commandHandler gmRevive()
obj_id mountId = getMountId(targetCreature);
if (isIdValid(mountId))
utils.dismountRiderJetpackCheck(targetCreature);
/*
if (isJedi(targetCreature))
{
setForcePower(targetCreature, getMaxForcePower(targetCreature));
sendSystemMessageTestingOnly(targetCreature, "Force Power Maxed");
}
*/
if (pclib.resurrectPlayer(targetCreature))
{
sendSystemMessageTestingOnly(targetCreature, "You have been restored...");
@@ -4706,6 +4708,7 @@ commandHandler gmRevive()
setPosture(targetCreature, POSTURE_UPRIGHT);
queueCommand(targetCreature, ##"stand", targetCreature, "", COMMAND_PRIORITY_IMMEDIATE);
queueCommand(targetCreature, ##"stopCraftingSession", targetCreature, "", COMMAND_PRIORITY_IMMEDIATE);
play2dNonLoopingSound(targetCreature, "sound/music_acq_healer.snd");
utils.removeScriptVar(targetCreature, "pvp_death");
sendSystemMessageTestingOnly(self, "You have /gmRevived "+getName(targetCreature));
@@ -15452,7 +15455,6 @@ commandHandler cmdMeditateFail()
return SCRIPT_CONTINUE;
}
//IMMA CHARGIN MAH LASZERS
messageHandler handleMeditationTick()
{
if ( !meditation.isMeditating(self) )
@@ -1,3 +1,5 @@
//
include library.ai_lib;
include library.colors_hex;
include library.factions;
@@ -1022,6 +1024,7 @@ messageHandler invasionHalfWayPoint()
CustomerServiceLog("gcw_city_invasion", "gcw_city.invasionHalfWayPoint: invasionHalfWayPoint has sent all players messages regarding the combat phase being half over Message sent at: "+getGameTime()+" session: "+params.getInt(trial.MESSAGE_SESSION));
messageToPlayersOnPlanet("notifyPlayerOfGcwCityEventAnnouncement", webster, 0.0f, announcementOrigin, announcementRadius, false);
setInvulnerable(defendingGeneral, false);
return SCRIPT_CONTINUE;
}
@@ -1639,4 +1642,4 @@ messageHandler checkGeneral()
}
return SCRIPT_CONTINUE;
}
}
@@ -1,3 +1,5 @@
//
include java.util.HashSet;
include java.util.Iterator;
@@ -468,9 +470,7 @@ messageHandler calculateGeneralHealthAndAbilities()
}
//Defenses have changed! Adjust the General Health and Resistances
if(currentDefenseCount < defenseObjectCount ||
(!buff.hasBuff(self, gcw.BUFF_GENERAL_RESIST_STACK_IMP) &&
!buff.hasBuff(self, gcw.BUFF_GENERAL_RESIST_STACK_REB)))
if(currentDefenseCount < defenseObjectCount || (!buff.hasBuff(self, gcw.BUFF_GENERAL_RESIST_STACK_IMP) && !buff.hasBuff(self, gcw.BUFF_GENERAL_RESIST_STACK_REB)))
{
blog("calculateGeneralHealthAndAbilities the currentDefenseCount has changed and is lower than the OG defenseObjectCount");
@@ -520,7 +520,7 @@ messageHandler calculateGeneralHealthAndAbilities()
buff.removeBuff(self, gcwBuffName);
blog("calculateGeneralHealthAndAbilities making buff stack: "+newstackAmt);
buff.applyBuffWithStackCount(self, gcwBuffName, newstackAmt);
//buff.applyBuffWithStackCount(self, gcwBuffName, newstackAmt);
utils.setScriptVar(self, armor.SCRIPTVAR_CACHED_GENERAL_PROTECTION, newMobGeneralArmor);
}
@@ -5,6 +5,8 @@ include library.create;
include library.trial;
include library.space_dungeon;
include library.instance;
include library.locations;
include library.spawning;
const string SPAWNED_LIST = "spawned";
const string SPAWNED = SPAWNED_LIST+"."+"spawnNumber_";
@@ -322,14 +324,39 @@ void spawnCreatures(int x, string datatable, obj_id self )
}
}
//Boss Mob Check is done, and if he's there our spawn string has been updated
obj_id spawnedCreature = create.object (spawn, spawnPoint);
if (!isIdValid(spawnedCreature))
location locTest = spawnPoint;
//Radius check
if(dataTableHasColumn(datatable, "radius"))
{
CustomerServiceLog("bad_spawner_data", "spawner " + self + ", datatable " + datatable + ", row " + x + ", mob " + spawn + " doesn't exist");
removeObjVar (self, SPAWNED + x);
return;
float fltRadius = dataTableGetFloat(datatable, x, "radius");
if(fltRadius != 0)
{
locTest = spawning.getRandomLocationInCircle(locTest, fltRadius);
}
}
//Planet Level Check
int level = -1;
if(dataTableHasColumn(datatable, "planet_level"))
{
int useLevel = dataTableGetInt(datatable, x, "planet_level");
if(useLevel != 0)
{
level = getRandomPlanetCreatureLevel(self, spawn, locTest);
}
}
obj_id spawnedCreature = create.object (spawn, locTest, level);
if (!isIdValid(spawnedCreature))
{
CustomerServiceLog("bad_spawner_data", "spawner " + self + ", datatable " + datatable + ", row " + x + ", mob " + spawn + " doesn't exist");
removeObjVar (self, SPAWNED + x);
return;
}
if (dataTableHasColumn (datatable, "convo_script"))
{
@@ -491,3 +518,57 @@ boolean canSpawnByConfigSetting()
return true;
}
//Stolen from interior_spawner
int getRandomPlanetCreatureLevel(obj_id spawner, string npcType, location here)
{
// get planet level range
int minLevel = locations.getMinDifficultyForPlanet(here.area);
int maxLevel = locations.getMaxDifficultyForPlanet(here.area);
utils.setScriptVar(spawner, "testing_planetMinLevel", minLevel);
utils.setScriptVar(spawner, "testing_planetMaxLevel", maxLevel);
utils.setScriptVar(spawner, "testing_here.area", here.area);
int level = minLevel;
//get creature data
dictionary creatureDict = utils.dataTableGetRow(create.CREATURE_TABLE, npcType);
//dynamic level for planet
if( creatureDict != null )
{
int baseLevel = creatureDict.getInt("BaseLevel");
level = baseLevel;
if ( minLevel > 0 && maxLevel > 0 )
{
if ( level < minLevel || level > maxLevel )
{
if ( level < minLevel )
{
level = minLevel;
}
else if ( level > maxLevel )
{
level = maxLevel;
}
CustomerServiceLog ("interior_spawner_level", "Spawner " + spawner + " tried to spawn a creature whose base level from creatures.tab ("+ baseLevel +") was outside of the planet's range ("+ minLevel +" to "+ maxLevel +").");
}
}
}
//validate level
if( level < 1 )
{
level = 1;
}
/*if( level > 90 )
{
level = 90;
}*/
return level;
}