3.9.1 Update

Patched up some TWM2 bugs, re-did the Vardison Boss.
This commit is contained in:
Robert Fritzen 2015-02-12 19:45:18 -06:00
parent e80004bbd8
commit 5ebf31e057
11 changed files with 1697 additions and 1575 deletions

File diff suppressed because it is too large Load diff

View file

@ -831,7 +831,7 @@ function parsePublicCommands(%sender, %command, %args) {
} }
else if (!isBoss(strlwr(%Boss))) { else if (!isBoss(strlwr(%Boss))) {
messageclient(%sender, 'MsgClient', '\c2Invalid Boss Name.'); messageclient(%sender, 'MsgClient', '\c2Invalid Boss Name.');
messageclient(%sender, 'MsgClient', '\c2Bosses: Yvex, CnlWindshear, GOL, GOF, Stormrider, DAVardison.'); messageclient(%sender, 'MsgClient', '\c2Bosses: Yvex, CnlWindshear, GOL, GOF, Stormrider.');
messageclient(%sender, 'MsgClient', '\c2GenVeg, LordRog, Insignia, Trebor, Vardison, ShadeLord.'); messageclient(%sender, 'MsgClient', '\c2GenVeg, LordRog, Insignia, Trebor, Vardison, ShadeLord.');
return 1; return 1;
} }

View file

@ -143,10 +143,6 @@ function parseSuperAdminCommands(%sender, %command, %args) {
%pos = VectorAdd(%sender.player.getPosition(), "0 0 5"); %pos = VectorAdd(%sender.player.getPosition(), "0 0 5");
StartVardison1(%pos); StartVardison1(%pos);
MessageAll('MsgAdminForce', "\c3"@%sender.namebase@"\c2 spawned Lord Vardison, go hide noobs."); MessageAll('MsgAdminForce', "\c3"@%sender.namebase@"\c2 spawned Lord Vardison, go hide noobs.");
case "DAVardison":
%pos = VectorAdd(%sender.player.getPosition(), "0 0 5");
StartDAVardison(%pos);
MessageAll('MsgAdminForce', "\c3"@%sender.namebase@"\c2 spawned Dark Archmage Vardison, run in fear n0bs.");
case "ShadeLord": case "ShadeLord":
%pos = VectorAdd(%sender.player.getPosition(), "0 0 5"); %pos = VectorAdd(%sender.player.getPosition(), "0 0 5");
SpawnShadeLord(%pos); SpawnShadeLord(%pos);
@ -155,7 +151,7 @@ function parseSuperAdminCommands(%sender, %command, %args) {
messageclient(%sender, 'MsgClient', '\c2Invalid Boss Name.'); messageclient(%sender, 'MsgClient', '\c2Invalid Boss Name.');
messageclient(%sender, 'MsgClient', '\c2Bosses: Yvex, CnlWindshear, GhostOfLightning.'); messageclient(%sender, 'MsgClient', '\c2Bosses: Yvex, CnlWindshear, GhostOfLightning.');
messageclient(%sender, 'MsgClient', '\c2GenVegenor, LordRog, Insignia, Trebor, Vardison.'); messageclient(%sender, 'MsgClient', '\c2GenVegenor, LordRog, Insignia, Trebor, Vardison.');
messageclient(%sender, 'MsgClient', '\c2Stormrider, GhostOfFire, ShadeLord, DAVardison.'); messageclient(%sender, 'MsgClient', '\c2Stormrider, GhostOfFire, ShadeLord.');
} }
return 1; return 1;

View file

@ -3,6 +3,15 @@ function InitiateBoss(%Boss, %name) {
error("SERVER: Cannot initiate boss, in horde/helljump"); error("SERVER: Cannot initiate boss, in horde/helljump");
return; return;
} }
if(!isObject($TWM2::BossManager)) {
$TWM2::BossManager = new scriptObject() {
class = "BossManager";
};
}
$TWM2::BossManager.bossKills = 0;
$TWM2::BossManager.bossObject = %Boss;
$TWM2::BossManager.activeBoss = %name;
$TWM2::BossGoing = 1; $TWM2::BossGoing = 1;
switch$(%name) { switch$(%name) {
@ -21,9 +30,9 @@ function InitiateBoss(%Boss, %name) {
case "Vardison1": case "Vardison1":
%print = "<color:FF0000>BOSS BATTLE \n LORD VARDISON"; %print = "<color:FF0000>BOSS BATTLE \n LORD VARDISON";
case "Vardison2": case "Vardison2":
%print = "<color:FF0000>!DANGER! \n VARDISON HAS TRANSFORMED \n AIR FORM"; %print = "<color:FF0000>BOSS ALERT \n LORD VARDISON HAS ENTERED HIS SECOND FORM";
case "Vardison3": case "Vardison3":
%print = "<color:FF0000>!DANGER! \n VARDISON HAS TRANSFORMED AGAIN \n DEMON FORM"; %print = "<color:FF0000>BOSS ALERT \n LORD VARDISON HAS ENTERED HIS FINAL FORM";
case "Trebor": case "Trebor":
%print = "<color:FF0000>BOSS BATTLE \n LORDRANIUS TREVOR"; %print = "<color:FF0000>BOSS BATTLE \n LORDRANIUS TREVOR";
case "Stormrider": case "Stormrider":
@ -49,11 +58,11 @@ function InitiateBoss(%Boss, %name) {
} }
function BossCheckUp(%boss, %name) { function BossCheckUp(%boss, %name) {
%percentage = (mFloor(%boss.getDamageLeft()*100) / mFloor(%boss.getMaxDamage()*100)) * 100;
MessageAll('MsgSPCurrentObjective1', "", "Boss Battle: "@$TWM2::BossName[%name]@" [Boss Kill Count: "@$TWM2::BossManager.bossKills@"]");
MessageAll('MsgSPCurrentObjective2', "", "Boss HP: "@mFloor(%boss.getDamageLeft()*100)@"/"@mFloor(%boss.getMaxDamage()*100)@" ("@%percentage@"%)");
MessageAll('MsgSPCurrentObjective1', "", "Boss Battle: "@$TWM2::BossName[%name]@""); if(%name !$= "CnlWindshear" && %name !$= "Trebor" && %name !$= "Stormrider") {
MessageAll('MsgSPCurrentObjective2', "", "Boss HP: "@mFloor(%boss.getDamageLeft()*100)@"/"@mFloor(%boss.getMaxDamage()*100)@"");
if(%name !$= "CnlWindshear" && %name !$= "Vardison2" && %name !$= "Trebor" && %name !$= "Stormrider") {
if(!isObject(%boss) || %boss.getState() $= "dead") { if(!isObject(%boss) || %boss.getState() $= "dead") {
if(%name $= "Vardison1") { if(%name $= "Vardison1") {
%count = ClientGroup.getCount(); %count = ClientGroup.getCount();
@ -61,7 +70,16 @@ function BossCheckUp(%boss, %name) {
%cl = ClientGroup.getObject(%i); %cl = ClientGroup.getObject(%i);
recordAction(%cl, "BOSS", "Vardison1"); recordAction(%cl, "BOSS", "Vardison1");
} }
StartVardison2(%boss.getPosition()); SpawnVardison2(%boss.getPosition());
return;
}
if(%name $= "Vardison2") {
%count = ClientGroup.getCount();
for(%i = 0; %i < %count; %i++) {
%cl = ClientGroup.getObject(%i);
recordAction(%cl, "BOSS", "Vardison2");
}
SpawnVardison3(%boss.getPosition());
return; return;
} }
//the boss has been defeated, horrah!!! //the boss has been defeated, horrah!!!
@ -81,17 +99,6 @@ function BossCheckUp(%boss, %name) {
} }
else { else {
if(!isObject(%boss)) { if(!isObject(%boss)) {
//the boss has been defeated, horrah!!!
if(%name $= "Vardison2") {
//but not quite so xD
%count = ClientGroup.getCount();
for(%i = 0; %i < %count; %i++) {
%cl = ClientGroup.getObject(%i);
recordAction(%cl, "BOSS", "Vardison2");
}
StartVardison3("0 0 200");
return;
}
%count = ClientGroup.getCount(); %count = ClientGroup.getCount();
for(%i = 0; %i < %count; %i++) { for(%i = 0; %i < %count; %i++) {
%cl = ClientGroup.getObject(%i); %cl = ClientGroup.getObject(%i);
@ -167,11 +174,27 @@ function GameConnection::GiveBossAward(%client, %bossName) {
} }
function FindValidTarget(%boss, %counter) { //This is usefull function FindValidTarget(%boss, %counter) { //This is usefull
%client = ClientGroup.getObject(GetRandom()*ClientGroup.getCount()); if(%counter $= "") {
if(!isObject(%client.player) || %client.player.getState() $= "dead" || %boss == %client.player) { %counter = 10; //10 attempts
return schedule(500,0,"FindValidTarget", %boss, %counter++); //Keep Looking;
} }
return %client; //target is good for(%i = 0; %i < %counter; %i++) {
%test = ClientGroup.getObject(getRandom(0, ClientGroup.getCount()));
if(isObject(%test)) {
%tPL = %test.getControlObject();
if(isObject(%tPL)) {
if(isPlayer(%tPL)) {
if(%tPL.getState() !$= "dead") {
//Got one!
return %test;
}
}
else {
return %test;
}
}
}
}
return -1; //Found nothing.
} }
function CheckBossChallenge(%client, %boss) { function CheckBossChallenge(%client, %boss) {
@ -430,9 +453,46 @@ function GenerateBossChallengeMenu(%client, %tag, %index) {
%index++; %index++;
} }
// //
if(%client.CheckNWChallengeCompletion("VardEasy")) {
messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience - Done");
%index++;
}
else {
messageClient( %client, 'SetLineHud', "", %tag, %index, "The Standard Experience - Defeat Lord Vardison on Easy Difficulty");
%index++;
}
if(%client.CheckNWChallengeCompletion("VardNorm")) {
messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter - Done");
%index++;
}
else {
messageClient( %client, 'SetLineHud', "", %tag, %index, "Demon Hunter - Defeat Lord Vardison on Normal Difficulty");
%index++;
}
if(%client.CheckNWChallengeCompletion("VardHard")) {
messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer - Done");
%index++;
}
else {
messageClient( %client, 'SetLineHud', "", %tag, %index, "Master Demon Slayer - Defeat Lord Vardison on Hard Difficulty");
%index++;
}
if(%client.CheckNWChallengeCompletion("VardWtf")) {
messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm - Done [You are a freaking boss master]");
%index++;
}
else {
messageClient( %client, 'SetLineHud', "", %tag, %index, "God of the Shadow Realm - Against all odds, emerge victorious against WTF difficulty Lord Vardison");
%index++;
}
//
return %index; return %index;
} }
function BossManager::addKill(%this, %tObj) {
%this.bossKills++;
}
//Load The Boss Files //Load The Boss Files
exec("scripts/TWM2/Bosses/LordYvex.cs"); exec("scripts/TWM2/Bosses/LordYvex.cs");
exec("scripts/TWM2/Bosses/ColonelWindshear.cs"); exec("scripts/TWM2/Bosses/ColonelWindshear.cs");

View file

@ -80,6 +80,10 @@ $Challenge::Info["Treb3"] = "Tank Halter\t2\t10000\tNone";
$Challenge::Info["Vard1"] = "Shining Star\t2\t3500\tNone"; $Challenge::Info["Vard1"] = "Shining Star\t2\t3500\tNone";
$Challenge::Info["Vard2"] = "Glare The Dark\t2\t7000\tNone"; $Challenge::Info["Vard2"] = "Glare The Dark\t2\t7000\tNone";
$Challenge::Info["Vard3"] = "Outevil The Wicked\t2\t12500\tLord Vardison Recruitable Ally"; $Challenge::Info["Vard3"] = "Outevil The Wicked\t2\t12500\tLord Vardison Recruitable Ally";
$Challenge::Info["VardEasy"] = "The Standard Experience\t2\t7000\tNone";
$Challenge::Info["VardNorm"] = "Demon Hunter\t2\t1500\tNone";
$Challenge::Info["VardHard"] = "Master Demon Slayer\t2\t25000\tNone";
$Challenge::Info["VardWtf"] = "God of the Shadow Realm\t2\t50000\tNone";
//Blacklist //Blacklist
$Challenge::Info["Acceptance"] = "Acceptance\t3\t1000\tNone"; $Challenge::Info["Acceptance"] = "Acceptance\t3\t1000\tNone";
$Challenge::Info["ListHit"] = "Hitlister of The List\t3\t2500\tNone"; $Challenge::Info["ListHit"] = "Hitlister of The List\t3\t2500\tNone";

View file

@ -182,10 +182,10 @@ function ZPCreateZombie(%obj){
function StartAZombie(%pos, %type){ function StartAZombie(%pos, %type){
if(!isObject(Game)) { if(!isObject(Game)) {
error("UE Blocked..."); error("UE Blocked...");
return; return -1;
} }
if($Game::ZombieCount > $TWM2::MaxZombies || !$TWM2::CanSpawnZ) { if($Game::ZombieCount > $TWM2::MaxZombies || !$TWM2::CanSpawnZ) {
return; return -1;
} }
// //
if(%type $= "") { if(%type $= "") {

View file

@ -286,8 +286,6 @@ function BossFullname(%BossAbbr)
return "Ghost of Fire"; return "Ghost of Fire";
case "vardison": case "vardison":
return "Lord Vardison"; return "Lord Vardison";
case "davardison":
return "Dark Archmage Vardison";
case "shadelord": case "shadelord":
return "The Shade Lord"; return "The Shade Lord";
} }
@ -317,8 +315,6 @@ function isBoss(%Boss)
return 1; return 1;
case "vardison": case "vardison":
return 1; return 1;
case "davardison":
return 1;
case "shadelord": case "shadelord":
return 1; return 1;
} }

View file

@ -235,7 +235,7 @@ function Medrepair(%obj, %targets){
if(%obj.isreping == 0) if(%obj.isreping == 0)
return; return;
if(%targets !$= ""){ if(%targets !$= ""){
%numtrgs = getNumberOfWords(%targets); %numtrgs = getWordCount(%targets);
for(%i = 0; %i < %numtrgs; %i++){ for(%i = 0; %i < %numtrgs; %i++){
%target = getWord(%targets, %i); %target = getWord(%targets, %i);
if(vectorDist(%obj.getWorldBoxCenter(), %target.getWorldBoxCenter()) <= 10 && %target.getDamageLevel() > 0.0){ if(vectorDist(%obj.getWorldBoxCenter(), %target.getWorldBoxCenter()) <= 10 && %target.getDamageLevel() > 0.0){
@ -267,7 +267,7 @@ function Medrepair(%obj, %targets){
function MedstopRepair(%obj){ function MedstopRepair(%obj){
%obj.isreping = 0; %obj.isreping = 0;
if(%obj.reptargets !$= ""){ if(%obj.reptargets !$= ""){
%numtrgs = getNumberOfWords(%obj.reptargets); %numtrgs = getWordCount(%obj.reptargets);
for(%i = 0; %i < %numtrgs; %i++){ for(%i = 0; %i < %numtrgs; %i++){
%target = getWord(%obj.reptargets, %i); %target = getWord(%obj.reptargets, %i);
if(%target.reping == 1){ if(%target.reping == 1){
@ -305,6 +305,10 @@ function checkrevive(%obj){
messageclient(%obj.client, 'MsgClient', "\c2This body is destroyed."); messageclient(%obj.client, 'MsgClient', "\c2This body is destroyed.");
return; return;
} }
if(%Tobj.isBoss == 1){
messageclient(%obj.client, 'MsgClient', "\c2ARE YOU INSANE!?!??! YEAH... LETS JUST REVIVE THE DAMNED BOSS THAT JUST REKT YOU ABOUT 100 TIMES!!!!");
return;
}
if(%Tobj.infected || %Tobj.isZombie) { if(%Tobj.infected || %Tobj.isZombie) {
messageclient(%obj.client, 'MsgClient', "\c2WHOA!!! We don't want to make the Undead.... UnDead AGAIN."); messageclient(%obj.client, 'MsgClient', "\c2WHOA!!! We don't want to make the Undead.... UnDead AGAIN.");
return; return;

View file

@ -26,8 +26,51 @@ datablock AudioProfile(ZombieHOWL)
preload = true; preload = true;
}; };
//USED IN FLAMETHROWER //USED IN FLAMETHROWER / NMM
//DO NOT REMOVE: NEEDED HERE //DO NOT REMOVE: NEEDED HERE
datablock ParticleData(NMMissileBaseParticle) {
dragCoeffiecient = 0.0;
gravityCoefficient = -0.2;
inheritedVelFactor = 0.0;
lifetimeMS = 800;
lifetimeVarianceMS = 500;
useInvAlpha = false;
spinRandomMin = -160.0;
spinRandomMax = 160.0;
animateTexture = true;
framesPerSec = 15;
textureName = "special/cloudflash";
colors[0] = "0.5 0.1 0.9 1.0";
colors[1] = "0.5 0.1 0.9 1.0";
colors[2] = "0.5 0.1 0.9 1.0";
sizes[0] = 2.5;
sizes[1] = 2.7;
sizes[2] = 3.0;
times[0] = 0.0;
times[1] = 0.7;
times[2] = 1.0;
};
datablock ParticleEmitterData(NMMissileBaseEmitter) {
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 1.5;
velocityVariance = 0.3;
thetaMin = 0.0;
thetaMax = 30.0;
particles = "NMMissileBaseParticle";
};
datablock ParticleData(ThrowerBaseParticle) { datablock ParticleData(ThrowerBaseParticle) {
dragCoeffiecient = 0.0; dragCoeffiecient = 0.0;
gravityCoefficient = -0.2; gravityCoefficient = -0.2;

View file

@ -3585,6 +3585,17 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
//now call the "onKilled" function if the client was... you know... //now call the "onKilled" function if the client was... you know...
if(%targetObject.getState() $= "Dead") { if(%targetObject.getState() $= "Dead") {
//Is there a boss going?
if(!%targetObject.isZombie && !%targetObject.isBossMinion) {
if($TWM2::BossGoing) {
//Chalk up the kill count :P
$TWM2::BossManager.addKill(%targetObject);
}
}
if(%targetObject.isVardisonMinion) {
$TWM2::VardisonManager.minionCount--;
}
if($TWM2::PlayingSabo) { if($TWM2::PlayingSabo) {
if(Game.Bomb.Carrier == %targetObject) { if(Game.Bomb.Carrier == %targetObject) {
if(%damageType == $DamageType::FellOff) { if(%damageType == $DamageType::FellOff) {

View file

@ -1,46 +1,3 @@
datablock ParticleData(NMMissileBaseParticle) {
dragCoeffiecient = 0.0;
gravityCoefficient = -0.2;
inheritedVelFactor = 0.0;
lifetimeMS = 800;
lifetimeVarianceMS = 500;
useInvAlpha = false;
spinRandomMin = -160.0;
spinRandomMax = 160.0;
animateTexture = true;
framesPerSec = 15;
textureName = "special/cloudflash";
colors[0] = "0.5 0.1 0.9 1.0";
colors[1] = "0.5 0.1 0.9 1.0";
colors[2] = "0.5 0.1 0.9 1.0";
sizes[0] = 2.5;
sizes[1] = 2.7;
sizes[2] = 3.0;
times[0] = 0.0;
times[1] = 0.7;
times[2] = 1.0;
};
datablock ParticleEmitterData(NMMissileBaseEmitter) {
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 1.5;
velocityVariance = 0.3;
thetaMin = 0.0;
thetaMax = 30.0;
particles = "NMMissileBaseParticle";
};
datablock LinearFlareProjectileData(ShadowRifleBolt) { datablock LinearFlareProjectileData(ShadowRifleBolt) {
projectileShapeName = "turret_muzzlepoint.dts"; projectileShapeName = "turret_muzzlepoint.dts";
scale = "1.0 1.0 1.0"; scale = "1.0 1.0 1.0";