Raised This Month: $32 Target: $400
 8% 

[Request][Paid] Better Bots plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bluscream
New Member
Join Date: Nov 2019
Old 11-07-2019 , 22:22   [Request][Paid] Better Bots plugin
Reply With Quote #1

Hello!

The story behind (please don't sue me, TechAltar):

I have a VAC ban for almost a year now and i still enjoy playing CS:GO here and then playing against bots. But recently it became pretty boring to have the same game over and over again so i first started spicing it up with different botprofiles i found on the Internet. That brought some fresh wind into my sessions but it also made me thirsty for more so i first i set up my own dedicated server with sourcemod on my RaspberryPi 4 but since it needed a x86->ARM emulator i had such a shitty performance and i really wasn't ready to rent a server for offline play so i looked into getting SM to work on my local listen server which works great <3 I started looking at some other plugin's code to get familiar with the APIs provided but since pawn is mostly C/C++ with which i don't have a lot of (good) experience i was only able to get as far as the code i attached on the end of this post.

The request:
I want a plugin that randomly sets various things for each new bot on creation. In particular:

All these should be contained within one plugin with admin vars for each to toggle.
The plugin should be released here and on github open-source so everyone has the chance of improving it or fixing it once a method has been patched so you as original author won't have to provide support later on.

What i've got so far (i know it's not much and highly depends on other plugins working, that's why i created this request):
PHP Code:
#include <sourcemod>
#include <cstrike>
#include <sdkhooks>
#include <sdktools>
#include <clientprefs>

#pragma semicolon 1
#pragma newdecls required

#define PLUGIN_VERSION "1.0"

ConVar g_sm_betterbots_version;
ConVar g_sm_betterbots_neverdefergoals;

public 
Plugin myinfo = {
    
name "Better Bots",
    
author "Bluscream",
    
description "Requires Franc1sco-Franug/Competitive-Rank-and-Coins",
    
version PLUGIN_VERSION,
    
url ""
};

public 
void OnPluginStart() {    
    
g_sm_betterbots_version CreateConVar("sm_betterbots_version"PLUGIN_VERSION"Better Bots SM plugin version"FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
    
g_sm_betterbots_version.SetString(PLUGIN_VERSION);

    
g_sm_betterbots_neverdefergoals CreateConVar("sm_betterbots_neverdefergoals""1""Always execute \"bot_defer_to_human_goals 0;bot_defer_to_human_items 0\" on map start"_true0.0true1.0);
    
}

public 
void OnMapStart() {
    if (
GetConVarBool(g_sm_betterbots_neverdefergoals)){
        
ServerCommand("bot_defer_to_human_goals 0");
        
ServerCommand("bot_defer_to_human_items 0");
    }
}

public 
void OnClientPutInServer(int client) {
}

public 
void OnClientPostAdminCheck(int client) {
    if (!
IsFakeClient(client)) return;
    
OnBotCreated(client);
}

public 
void OnBotCreated(int botId) {
    if (!
IsFakeClient(botId)) return;
    
int userId GetClientUserId(botId);
    
int elo GetRandomInt(018);
    
int pro GetRandomInt(040);
    
int emb GetRandomInt(01) ? GetRandomInt(8746011) : 0;
    
PrintToServer("Giving ranks to bot \"%N\" (#%i). Elo: %i Profile: %i Emblem: %i"botIduserIdeloproemb);
    
ServerCommand("sm_elorank #%i %i"userIdelo);
    
ServerCommand("sm_prorank #%i %i"userIdpro);
    
ServerCommand("sm_emblem #%i %i"userIdemb);
}

 
// OnClientConnected doesnt get called for bots afaik, you'd be better off using OnClientPutInServer or OnClientPostAdminCheck 

Last edited by Bluscream; 11-08-2019 at 04:49.
Bluscream is offline
Bluscream
New Member
Join Date: Nov 2019
Old 11-07-2019 , 22:23   Re: [Request][Paid] Better Bots plugin
Reply With Quote #2

The stuff listed above are mostly Aesthetic improvements (except the loadout) but here are some things that might be improvable with a plugin aswell:
  • When round ended and bot has bomb but bomb isn't planted yet, try to plant the bomb for team money
  • Bots consider money of other players and eco with the player when more than 50% of team don't have money for SMG + Full Armor
  • Bots drop guns when enough money and another player has only money for armor
  • Bots can teabag others when they get revenge on someone who dominated them
  • Bots randomly look at gun after idle for some time

Last edited by Bluscream; 11-08-2019 at 04:37.
Bluscream is offline
GurusGeo
Member
Join Date: Jun 2019
Old 11-08-2019 , 02:05   Re: [Request][Paid] Better Bots plugin
Reply With Quote #3

And this is assuming the BOT tag next to name on scoreboard remains? Since that's client-sided?
GurusGeo is offline
Bluscream
New Member
Join Date: Nov 2019
Old 11-08-2019 , 04:29   Re: [Request][Paid] Better Bots plugin
Reply With Quote #4

Quote:
Originally Posted by GurusGeo View Post
And this is assuming the BOT tag next to name on scoreboard remains? Since that's client-sided?
Yeah, it's okay to still have some indication that the bot isn't a real player. ^^
Bluscream is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:55.


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