AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   TF2 Trade Server Plugin Request (https://forums.alliedmods.net/showthread.php?t=252711)

CanIYellNow 12-07-2014 20:03

TF2 Trade Server Plugin Request
 
Hello and thanks for taking your time to read this.

Me I'm a member of a gaming community and I have a bit of a issue with monoculus.
The map is trade_clocktown_b2a. And for some apparent reason he will spawn as a entity instead of a actual boss fight. As in purple cloud, will shoot six times, and then vanish the way he came. Is there anything you can recommend to fix that? Since he needs to be damageable so players can access a certain part of the map.

Me I've been looking and just been confused on which might be the right plugin to use. So if you can help me please.

Oshizu 12-08-2014 03:11

Re: TF2 Trade Server Plugin Request
 
Hi,

You can try perhaps changing cvar 'tf_eyeball_boss_lifetime' to '9999999' to prevent him from dissappearing?
Try adding this to server.cfg:
PHP Code:

sm_cvar tf_eyeball_boss_lifetime 9999999 


ddhoward 12-08-2014 03:26

Re: TF2 Trade Server Plugin Request
 
The issue likely stems from the 2013 Scream Fortress Update. The eyeboss now has a team netprop or something. It is what allows a player to summon the eyeboss (with the spellbook) and have it only attack the opposite team. You will notice that the boss only shoots at players on one team, while other players aren't targeted, nor are they harmed by eye rockets that happen to explode near them.

Is the eyeboss being spawned by the map itself? Or are you using a plugin?

Oshizu 12-08-2014 03:32

Re: TF2 Trade Server Plugin Request
 
Quote:

Originally Posted by ddhoward (Post 2232429)
The issue likely stems from the 2013 Scream Fortress Update. The eyeboss now has a team netprop or something. It is what allows a player to summon the eyeboss (with the spellbook) and have it only attack the opposite team. You will notice that the boss only shoots at players on one team, while other players aren't targeted, nor are they harmed by eye rockets that happen to explode near them.

Is the eyeboss being spawned by the map itself? Or are you using a plugin?

Depending on how is he spawned plugin/map we could perhaps change it's m_iTeamNum before appearance?

friagram 12-08-2014 08:10

Re: TF2 Trade Server Plugin Request
 
People still use that map?
Last time i checked it was crashing more clients than Malaysia Airlines.

CanIYellNow 12-08-2014 12:29

Re: TF2 Trade Server Plugin Request
 
Quote:

Originally Posted by Oshizu (Post 2232431)
Depending on how is he spawned plugin/map we could perhaps change it's m_iTeamNum before appearance?

Quote:

Originally Posted by ddhoward (Post 2232429)
The issue likely stems from the 2013 Scream Fortress Update. The eyeboss now has a team netprop or something. It is what allows a player to summon the eyeboss (with the spellbook) and have it only attack the opposite team. You will notice that the boss only shoots at players on one team, while other players aren't targeted, nor are they harmed by eye rockets that happen to explode near them.

Is the eyeboss being spawned by the map itself? Or are you using a plugin?

Well I can tell you more then, but try what you suggested.
Since I believe that he is the only way to get players to the big tree the map. And that is by having the server shoot him, kill him, and then letting his programming leave a portal going there.
And I might as well give you the coding of the plugin I have, so maybe you can tell me what I'm dealing with:
#include <sourcemod>
#include <tf2_stocks>

#define PLUGIN_VERSION "indev"
public Plugin:myinfo = {
name = "Clocktown Mono Spawner",
author = "MasterOfTheXP",
description = "Spawns Monoculus on top of the tower during the Final Hours.",
version = PLUGIN_VERSION,
url = "http://mstr.ca/"
};

new Relays[6];
new DayCount, bool:Nighttime, SecondsCount;
new HourCount, HourSeconds;
new bool:WatchActive; // Only true if the time is validated.
new String:Map[PLATFORM_MAX_PATH];
new bool:Enabled;

new Handle:cvarHealth;
new Handle:cvarHealthPerPlayer;
new Handle:cvarHealthPerLevel;

public OnPluginStart()
{
HookEvent("teamplay_round_start", Event_RoundStart);
HookEntityOutput("logic_relay", "OnTrigger", OnTrigger);
Enabled = (StrContains(Map, "trade_clocktown_", false) == 0 && !StrEqual(Map, "trade_clocktown_b1", false));
if (!Enabled) return;
// Late loading
FindTimers();
}

public OnMapStart()
{
GetCurrentMap(Map, sizeof(Map));
Enabled = (StrContains(Map, "trade_clocktown_", false) == 0 && !StrEqual(Map, "trade_clocktown_b1", false));
if (!Enabled) return;
CreateTimer(1.0, Timer_Second, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

public OnConfigsExecuted()
{
cvarHealth = FindConVar("tf_eyeball_boss_health_base");
cvarHealthPerPlayer = FindConVar("tf_eyeball_boss_health_per_player ");
cvarHealthPerLevel = FindConVar("tf_eyeball_boss_health_per_level" );
}

public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
if (!Enabled) return;
FindTimers();
DayCount = 1;
SecondsCount = 0;
HourCount = 6;
HourSeconds = 0;
Nighttime = false;
WatchActive = true;
}

public OnTrigger(const String:output[], caller, activator, Float:delay)
{
if (!Enabled) return;
if (caller == Relays[0]) DayCount = 1;
else if (caller == Relays[2]) DayCount = 2;
else if (caller == Relays[4]) DayCount = 3;
else if (caller == Relays[1]) DayCount = 11;
else if (caller == Relays[3]) DayCount = 12;
else if (caller == Relays[5]) DayCount = 13;
else return;
SecondsCount = 0;
HourCount = 6;
HourSeconds = 0;
if (DayCount > 3)
{
DayCount -= 10;
Nighttime = true;
}
else Nighttime = false;
WatchActive = true;
}

public Action:Timer_Second(Handle:timer)
{
if (!WatchActive) return;
SecondsCount++;
if (++HourSeconds >= 45)
{
if (++HourCount == 13) HourCount -= 12;
HourSeconds = 0;
}
if (DayCount == 3 && HourCount == 12 && !HourSeconds && Nighttime)
{
new BaseHealth = GetConVarInt(cvarHealth), HealthPerPlayer = GetConVarInt(cvarHealthPerPlayer), HealthPerLevel = GetConVarInt(cvarHealthPerLevel);
SetConVarInt(cvarHealth, 4200), SetConVarInt(cvarHealthPerPlayer, 300), SetConVarInt(cvarHealthPerLevel, 2000);
new Ent = CreateEntityByName("eyeball_boss");
TeleportEntity(Ent, Float:{-290.0, -327.0, -92.0}, NULL_VECTOR, NULL_VECTOR);
DispatchSpawn(Ent);
SetConVarInt(cvarHealth, BaseHealth), SetConVarInt(cvarHealthPerPlayer, HealthPerPlayer), SetConVarInt(cvarHealthPerLevel, HealthPerLevel);
}
}

stock FindTimers()
{
new Ent = -1;
while ((Ent = FindEntityByClassname(Ent, "logic_relay")) != -1)
{
new String:entName[35];
GetEntPropString(Ent, Prop_Data, "m_iName", entName, sizeof(entName));
if (StrEqual(entName, "day1relay")) Relays[0] = Ent;
else if (StrEqual(entName, "night1relay")) Relays[1] = Ent;
else if (StrEqual(entName, "day2relay")) Relays[2] = Ent;
else if (StrEqual(entName, "night2relay")) Relays[3] = Ent;
else if (StrEqual(entName, "day3relay")) Relays[4] = Ent;
else if (StrEqual(entName, "night3relay")) Relays[5] = Ent;
}
}

CanIYellNow 12-08-2014 12:31

Re: TF2 Trade Server Plugin Request
 
Quote:

Originally Posted by Oshizu (Post 2232431)
Depending on how is he spawned plugin/map we could perhaps change it's m_iTeamNum before appearance?

Quote:

Originally Posted by ddhoward (Post 2232429)
The issue likely stems from the 2013 Scream Fortress Update. The eyeboss now has a team netprop or something. It is what allows a player to summon the eyeboss (with the spellbook) and have it only attack the opposite team. You will notice that the boss only shoots at players on one team, while other players aren't targeted, nor are they harmed by eye rockets that happen to explode near them.

Is the eyeboss being spawned by the map itself? Or are you using a plugin?

He is an automatic spawn boss.

It happens on the 3rd day at 12am to initiate that. I have notice just a purple cloud that shows up shoots and then leaves. No health bar, no actually battle AI, or anything else.

Oshizu 12-08-2014 13:22

Re: TF2 Trade Server Plugin Request
 
Here:
PHP Code:

#include <sourcemod>
#include <tf2_stocks>

#define PLUGIN_VERSION  "indev"
public Plugin:myinfo = {
    
name "Clocktown Mono Spawner",
    
author "MasterOfTheXP & Moge-ko",
    
description "Spawns Monoculus on top of the tower during the Final Hours.",
    
version PLUGIN_VERSION,
    
url "http://mstr.ca/"
};

new 
Relays[6];
new 
DayCountbool:NighttimeSecondsCount;
new 
HourCountHourSeconds;
new 
bool:WatchActive// Only true if the time is validated.
new String:Map[PLATFORM_MAX_PATH];
new 
bool:Enabled;

new 
Handle:cvarHealth;
new 
Handle:cvarHealthPerPlayer;
new 
Handle:cvarHealthPerLevel;

public 
OnPluginStart()
{
    
HookEvent("teamplay_round_start"Event_RoundStart);
    
HookEntityOutput("logic_relay""OnTrigger"OnTrigger);
    
Enabled = (StrContains(Map"trade_clocktown_"false) == && !StrEqual(Map"trade_clocktown_b1"false));
    if (!
Enabled) return;
    
// Late loading
    
FindTimers();
}

public 
OnMapStart()
{
    
GetCurrentMap(Mapsizeof(Map));
    
Enabled = (StrContains(Map"trade_clocktown_"false) == && !StrEqual(Map"trade_clocktown_b1"false));
    if (!
Enabled) return;
    
CreateTimer(1.0Timer_Second_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

public 
OnConfigsExecuted()
{
    
cvarHealth FindConVar("tf_eyeball_boss_health_base");
    
cvarHealthPerPlayer FindConVar("tf_eyeball_boss_health_per_player");
    
cvarHealthPerLevel FindConVar("tf_eyeball_boss_health_per_level");
}

public 
Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    if (!
Enabled) return;
    
FindTimers();
    
DayCount 1;
    
SecondsCount 0;
    
HourCount 6;
    
HourSeconds 0;
    
Nighttime false;
    
WatchActive true;
}

public 
OnTrigger(const String:output[], calleractivatorFloat:delay)
{
    if (!
Enabled) return;
    if (
caller == Relays[0]) DayCount 1;
    else if (
caller == Relays[2]) DayCount 2;
    else if (
caller == Relays[4]) DayCount 3;
    else if (
caller == Relays[1]) DayCount 11;
    else if (
caller == Relays[3]) DayCount 12;
    else if (
caller == Relays[5]) DayCount 13;
    else return;
    
SecondsCount 0;
    
HourCount 6;
    
HourSeconds 0;
    if (
DayCount 3)
    {
        
DayCount -= 10;
        
Nighttime true;
    }
    else 
Nighttime false;
    
WatchActive true;
}

public 
Action:Timer_Second(Handle:timer)
{
    if (!
WatchActive) return;
    
SecondsCount++;
    if (++
HourSeconds >= 45)
    {
        if (++
HourCount == 13HourCount -= 12;
        
HourSeconds 0;
    }
    if (
DayCount == && HourCount == 12 && !HourSeconds && Nighttime)
    {
        new 
BaseHealth GetConVarInt(cvarHealth), HealthPerPlayer GetConVarInt(cvarHealthPerPlayer), HealthPerLevel GetConVarInt(cvarHealthPerLevel);
        
SetConVarInt(cvarHealth4200), SetConVarInt(cvarHealthPerPlayer300), SetConVarInt(cvarHealthPerLevel2000);
        new 
Ent CreateEntityByName("eyeball_boss"); 
        
TeleportEntity(EntFloat:{-290.0, -327.0, -92.0}, NULL_VECTORNULL_VECTOR);
        
DispatchKeyValue(Ent"teamnum""5")
        
DispatchSpawn(Ent);
        
SetEntProp(EntProp_Send"m_iTeamNum"5)
        
SetConVarInt(cvarHealthBaseHealth), SetConVarInt(cvarHealthPerPlayerHealthPerPlayer), SetConVarInt(cvarHealthPerLevelHealthPerLevel);
    }
}

stock FindTimers()
{
    new 
Ent = -1;
    while ((
Ent FindEntityByClassname(Ent"logic_relay")) != -1)
    {
        new 
String:entName[35];
        
GetEntPropString(EntProp_Data"m_iName"entNamesizeof(entName));
        if (
StrEqual(entName"day1relay")) Relays[0] = Ent;
        else if (
StrEqual(entName"night1relay")) Relays[1] = Ent;
        else if (
StrEqual(entName"day2relay")) Relays[2] = Ent;
        else if (
StrEqual(entName"night2relay")) Relays[3] = Ent;
        else if (
StrEqual(entName"day3relay")) Relays[4] = Ent;
        else if (
StrEqual(entName"night3relay")) Relays[5] = Ent;
    }


It is untested tho...

Edit:

I'm not sure if map has navigation for npcs already generated yet if it does not then it could explain why AI is not working like it should. So you could try following method:
1. Type in console sv_cheats 1
2. *Make sure server is on right map*
3. Type in console nav_generate
4. Wait till navigation is done generating
5. Restart server
6. NPCs should behave correctly now?

CanIYellNow 12-08-2014 13:25

Re: TF2 Trade Server Plugin Request
 
And i'll try it out, but just replace all the code for the current plugin, for it is a smx file.
But yeah it has a nav file, if I don't like it, I'll just make it.

Quote:

Originally Posted by Oshizu (Post 2232595)
Here:
PHP Code:

#include <sourcemod>
#include <tf2_stocks>

#define PLUGIN_VERSION  "indev"
public Plugin:myinfo = {
    
name "Clocktown Mono Spawner",
    
author "MasterOfTheXP & Moge-ko",
    
description "Spawns Monoculus on top of the tower during the Final Hours.",
    
version PLUGIN_VERSION,
    
url "http://mstr.ca/"
};

new 
Relays[6];
new 
DayCountbool:NighttimeSecondsCount;
new 
HourCountHourSeconds;
new 
bool:WatchActive// Only true if the time is validated.
new String:Map[PLATFORM_MAX_PATH];
new 
bool:Enabled;

new 
Handle:cvarHealth;
new 
Handle:cvarHealthPerPlayer;
new 
Handle:cvarHealthPerLevel;

public 
OnPluginStart()
{
    
HookEvent("teamplay_round_start"Event_RoundStart);
    
HookEntityOutput("logic_relay""OnTrigger"OnTrigger);
    
Enabled = (StrContains(Map"trade_clocktown_"false) == && !StrEqual(Map"trade_clocktown_b1"false));
    if (!
Enabled) return;
    
// Late loading
    
FindTimers();
}

public 
OnMapStart()
{
    
GetCurrentMap(Mapsizeof(Map));
    
Enabled = (StrContains(Map"trade_clocktown_"false) == && !StrEqual(Map"trade_clocktown_b1"false));
    if (!
Enabled) return;
    
CreateTimer(1.0Timer_Second_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

public 
OnConfigsExecuted()
{
    
cvarHealth FindConVar("tf_eyeball_boss_health_base");
    
cvarHealthPerPlayer FindConVar("tf_eyeball_boss_health_per_player");
    
cvarHealthPerLevel FindConVar("tf_eyeball_boss_health_per_level");
}

public 
Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    if (!
Enabled) return;
    
FindTimers();
    
DayCount 1;
    
SecondsCount 0;
    
HourCount 6;
    
HourSeconds 0;
    
Nighttime false;
    
WatchActive true;
}

public 
OnTrigger(const String:output[], calleractivatorFloat:delay)
{
    if (!
Enabled) return;
    if (
caller == Relays[0]) DayCount 1;
    else if (
caller == Relays[2]) DayCount 2;
    else if (
caller == Relays[4]) DayCount 3;
    else if (
caller == Relays[1]) DayCount 11;
    else if (
caller == Relays[3]) DayCount 12;
    else if (
caller == Relays[5]) DayCount 13;
    else return;
    
SecondsCount 0;
    
HourCount 6;
    
HourSeconds 0;
    if (
DayCount 3)
    {
        
DayCount -= 10;
        
Nighttime true;
    }
    else 
Nighttime false;
    
WatchActive true;
}

public 
Action:Timer_Second(Handle:timer)
{
    if (!
WatchActive) return;
    
SecondsCount++;
    if (++
HourSeconds >= 45)
    {
        if (++
HourCount == 13HourCount -= 12;
        
HourSeconds 0;
    }
    if (
DayCount == && HourCount == 12 && !HourSeconds && Nighttime)
    {
        new 
BaseHealth GetConVarInt(cvarHealth), HealthPerPlayer GetConVarInt(cvarHealthPerPlayer), HealthPerLevel GetConVarInt(cvarHealthPerLevel);
        
SetConVarInt(cvarHealth4200), SetConVarInt(cvarHealthPerPlayer300), SetConVarInt(cvarHealthPerLevel2000);
        new 
Ent CreateEntityByName("eyeball_boss"); 
        
TeleportEntity(EntFloat:{-290.0, -327.0, -92.0}, NULL_VECTORNULL_VECTOR);
        
DispatchKeyValue(Ent"teamnum""5")
        
DispatchSpawn(Ent);
        
SetEntProp(EntProp_Send"m_iTeamNum"5)
        
SetConVarInt(cvarHealthBaseHealth), SetConVarInt(cvarHealthPerPlayerHealthPerPlayer), SetConVarInt(cvarHealthPerLevelHealthPerLevel);
    }
}

stock FindTimers()
{
    new 
Ent = -1;
    while ((
Ent FindEntityByClassname(Ent"logic_relay")) != -1)
    {
        new 
String:entName[35];
        
GetEntPropString(EntProp_Data"m_iName"entNamesizeof(entName));
        if (
StrEqual(entName"day1relay")) Relays[0] = Ent;
        else if (
StrEqual(entName"night1relay")) Relays[1] = Ent;
        else if (
StrEqual(entName"day2relay")) Relays[2] = Ent;
        else if (
StrEqual(entName"night2relay")) Relays[3] = Ent;
        else if (
StrEqual(entName"day3relay")) Relays[4] = Ent;
        else if (
StrEqual(entName"night3relay")) Relays[5] = Ent;
    }


It is untested tho...


Oshizu 12-08-2014 15:11

Re: TF2 Trade Server Plugin Request
 
1 Attachment(s)
Quote:

Originally Posted by CanIYellNow (Post 2232596)
And i'll try it out, but just replace all the code for the current plugin, for it is a smx file.
But yeah it has a nav file, if I don't like it, I'll just make it.

Installation would be simple:
1. Get Plugin
2 If you have still old plugin file delete it.
3. Place .smx file in plugins
4. Restart Server


All times are GMT -4. The time now is 05:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.