Potti - a controllable fakeplayer
3 Attachment(s)
Description:
Allows admins to create a bot which can be fully controlled, e.g. move it and handle its menus, etc. Why? I didn't see many examples of making a bot in these forums, so i decided to make one. This plugin can also be used for testing purposes, I myself hate asking other people to join my server to test some little stuff, then when I find an error, they have to wait on the server for ages before I get it fixed :? Mostly its just for fun though :D Commands: amx_botadd <name> - create a new bot amx_botexec <cmd> - execute a command on your bot amx_botmove <0-2> - make your bot move: * 0: off * 1: copy your movements * 2: same as #1 + aim the same spot when shooting * 3: look the opposite way and do the opposite moves amx_botcmds <1/0> - when enabled, all owner commands are sent to his/her bot amx_botdel - kick your bot from the server Server cvars: potti_hudcolor <r g b> - changes the color of the hud message potti_hudpos <x y> - changes the position of the hud message Note: When executing commands, only engine cmds will work, so for example cvars cannot be changed. Also, I recommend you bind a button to "messagemode amx_botexec", it will be more comfortable to use than opening console every time. To Do: - nothing really (don't feel like messing with buyzone) Known bugs: - (cs) when owner is dead, pressing duck will open the specmenu which is really annoying :( - (cs) can't open buymenu via fullcontrol mode if not in buyzone (or dead) Changelog: 1.00 - Initial release 1.10 - Added full control mode (changing weapons through slot-keys is also possible now) - Shows money left on a bot when a buymenu is opened 1.20 - Modified so everyone (with access) can have their own bot - Cstrike-module is no more needed to display money - After dying, the owner will automatically move to spectating to his/her bot if botmove is on - Messages printed to a bot (to center and chat) are shown to its owner too - Fixed bot latency to show as "BOT" - More efficient msec calculations - Other little improvements 1.30 - Added support for The Specialists (press 6 to switch to kungfu when in fullcontrol mode) - Added botmove 3 to make the bot do the opposite of the owner - Added a hudtext to show player health, weapon, etc. - Access level changed from "m" to "p" ^_^ - Removed mod specific definitions 1.40 - Changed owner input hooking style, making it possible for bots to walk and use impulses (flashlight, spray, ..) - A little tweaking here and there Credits: Botman - the source of PODBots helped alot while doing this Lord of Destruction - aim_at_origin() -function base took from set_client_aiming() THE_STORM - more efficient msec calculations (from ePODbot) strelomet - display bot latency as "BOT" (from YaPB) Orangutanz - thanks for pointing out the few improvements :wink: Karko - thanks for helping with adding support for TS You need Fakemeta module to run this |
any help on solving the bugs will be greatly appreciated :)
btw, the plugin is only tested on cs, would be great if someone tested it over on some other mods |
I have a little better whole fix... somehow(not coding terms) make an iframe which just takes all commands and puts them to the bot...
I don't know AMXX Natives completly yet, it has to be possible. |
Instead of redefining the button constants you can include engine_const ;)
Nice job. |
updated to v1.10
- added full control mode, you can now change weapons via slot-keys too (this is done through a fakemenu which catches menuselect and so on.. i dont like it but didnt see any other option :?) - shows money left on a bot when a buymenu is opened - and changed the defines to engine_const.inc as suggested :) there's a new definition too: MOD_CSTRIKE im still hoping that somebody could test it on other mods, like dod.. u just need to undefine the above and change the weapon constants above plugin_init() |
Pretty good plugin ^^
Btw, if you can tell me where to get all the CSW Weapon constants for DOD, i could try it ^^ |
csw defines are just the weapon constants for cs,
for dod theyre DODW_* which can be found in dodconst.inc :) |
fun plugin, i cant wait till your final release :D
|
no crash bugs or anything?
Does the bot appear to be a player? Like ent 1-maxplayers and shows up on scoreboard (TAB)? |
New msec calculation
Code:
Credit: THE_STORM (ePODbot) Display BOT in scoreboard Code:
Also since I have a Bot API in development, that: engfunc(EngFunc_RunPlayerMove,bot,botangles,botmove[0],botmove[1],0.0,botbuttons,0,msec) I find the part highlighted in bold, does nothing :? Instead of this: Code:
Code:
|
All times are GMT -4. The time now is 18:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.