Re: Bot Apology for TK
FYI, we run this plugin on our server and it appears to do the job quite well.
Programming wise, like I always say, there's many ways to skin a cat (I prefer pliers). So unless the code is in a critical routine (like a prethink), 'to each his own'. |
Re: Bot Apology for TK
Apparently you have not run my plugin with bots yet. :). I guaruntee it will work on DOD with Shrikebot. It's running on a public server right now.
Ham ::: I had a bit of trouble with Ham. I was required to check a alot more stuff (maybe not alot, but enough to be annoying). I was getting killerids like 59, 639, 520, . . . (59 is electric ally on dod_caen). If you are saying Ham is quicker to the draw, it doesn't matter, the response is delayed anyways. Also, if it can be done with only one include and I don't need to do anything like supercede this way is great afaik. is_user_bot(id) ::: Go back and read arkshine's comments. (minimize native calls) Random ::: No. For the phrases I want random (just plain random, well, pseudorandom :)). chance(prob) ::: chance(100) returns true 100% of the time. chance(50) returns true 50% of the time (statistically). chance(1) returns true 1% of the time (statistically). chance(0) returns true 0% of the time (i.e. always returns false.) engclient_cmd() ::: You can't send a client command to a bot (i.e. can't use client_cmd) afaik. engclient_cmd sends a command to the server as if it is coming from the client and it works great! Why would I use a case structure if I can just assign a variable and pass that variable to the command? Quote:
Quote:
|
Re: Bot Apology for TK
That would be my server. Working fine.
From HLSW Quote:
|
Re: Bot Apology for TK
1. Would be better to have a .ini file so they could put their own apology messages.
2. Code:
3. Code:
Also, random numbers should be 1-100 Code:
Approval pending upon changes. |
Re: Bot Apology for TK
I greatly appreciate your input.
ini file: Should I use dynamic arrays for retrieving the apology messages or should I hard code a cap (max) (with a #define probably)? Chance: If using '>=' you must use 1-100 but if using only the '>' 0-99 is correct. I'll get to work on this. |
Re: Bot Apology for TK
I would suggest dynamic arrays, but it's however you wish.
As for the chance calculation, you are correct. I just use 1-100 because it's more readable. |
Re: Bot Apology for TK
Updated. Let me know if I can improve it anymore. I will look into using dynamic arrays for phrases sometime in the near future.
I have a max of 10 phrases (this can be changed in the code: "SORRYS_MAX"). Thanks everybody. |
Re: Bot Apology for TK
Quote:
|
Re: Bot Apology for TK
GJ my man
|
Re: Bot Apology for TK
Wahooo! Thanks guys.
|
| All times are GMT -4. The time now is 17:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.