Archive
› Old Forum Threads › DoD Plugins › Developers Plugins › Player/Server Management Plugins › DoD Reduced Bot Damage
6 posts,
3 people · 5,171 views
Thread Rating: ★★★★★
| closedDoD Reduced Bot Damage |
| Started by Dr.G on 01-23-2009, 11:47 PM |
started this thread
Posts: 776Threads: 75
Joined: Nov 2007
01-23-2009, 11:47 PM
#1
//////////////////////////////////////////////////////////////////////////////////rn//rn// Information:rn//rn// This plugin will allow you to adjust how much damage bots will do..rn// Note that damage are set for ALL weapons used by bots! Your bots will stillrn// be damn stupid and weird, but they wont do as much damage to you..rn//rn// Thanks to diamond-optic(www.avamods.com) for DoD stronger rifles!rn// Everything in this code is from the stronger rifles plugin... I didnt evenrn// bother to change any pointer lol no need to...rn//rn//rn/////////////////////////////////////////////////////////////////////////////////rn//rn// CVARs: rn//rn// dod_bot_dmg "1" //turn ON(1)/OFF(0)rn//rn// dod_bot_dmg_head "30" //Damage % for head shotsrn// dod_bot_dmg_chest "30" //Damage % for chest shotsrn// dod_bot_dmg_stomach "30" //Damage % for stomach shotsrn// dod_bot_dmg_arms "30" //Damage % for arm shots rn// dod_bot_dmg_legs "30" //Damage % for leg shotsrn//rn//////////////////////////////////////////////////////////////////////////////////rn//rn// Changelog:rn//rn// 01-28-2009 rn// stopped trace if !is_user_bot rn// moved unneeded branch and return in func_TakeDamage :Srn//rn//////////////////////////////////////////////////////////////////////////////////rnrnThis will work with shrikebots and sturmbots, or any other bot... if there are any :)rnrnNOTE the damage is set in % !!! Default all values is set to 30 %rnrnrnPublic Stats
posted here
Posts: 337Threads: 23
Joined: Aug 2007
01-24-2009, 02:15 AM
#2
Awesome idea gman!! I'm trying it out tomorrow!!
posted here
Posts: 2,068Threads: 103
Joined: May 2005
01-24-2009, 09:26 PM
#3
works nice :)nn..also, you can remove the dodx include since your plugin doesnt need it
posted here
Posts: 2,068Threads: 103
Joined: May 2005
01-24-2009, 09:41 PM
#4
heh a few more little things that are up to you to do...nnin the func_TraceAttack function you could do this instead to not even bother getting the trace result if it wasnt a botn
if(!get_pcvar_num(p_strong) || !is_user_bot(idattacker))n return HAM_IGNOREDnnthen you could make the func_TakeDamage function a bit smaller toonpublic func_TakeDamage(id,inflictor,attacker,Float:damage,damagebits)n{ n if(!get_pcvar_num(p_strong) || !is_user_bot(attacker))n return HAM_IGNOREDn n switch(hitbox[id])n {n case HIT_HEAD: damage=float(floatround(get_pcvar_float(p_head) / 100 * damage))n case HIT_CHEST: damage=float(floatround(get_pcvar_float(p_chest) / 100 * damage))n case HIT_STOMACH: damage=float(floatround(get_pcvar_float(p_stomach) / 100 * damage))n case HIT_LEFTARM,HIT_RIGHTARM: damage=float(floatround(get_pcvar_float(p_arms) / 100 * damage))n case HIT_LEFTLEG,HIT_RIGHTLEG: damage=float(floatround(get_pcvar_float(p_legs) / 100 * damage))n }n n SetHamParamFloat(4,damage)n n return HAM_HANDLEDn}nand if you wanted, you could make it so bots still do normal damage to other bots by changing that takedamage if statement to something like:nif(!get_pcvar_num(p_strong) || !is_user_bot(attacker) || is_user_bot(id))n return HAM_IGNOREDstarted this thread
Posts: 776Threads: 75
Joined: Nov 2007
01-25-2009, 12:19 PM
#5
Yeah it works very well.. And yea d-o of cource no need to run thru all that shit unless its a bot... ill update it later today...
started this thread
Posts: 776Threads: 75
Joined: Nov 2007
01-28-2009, 09:54 AM
#6
* UPDATED TO v1.1 *rnrnThe first version i posted looked like a beta beta version, i messed something cuz some !is_user_bot thing was already done in the dmg part :S sry bout that... maybe i should stop drinking lol.. However this version should be ok! Thanks D-O!rnrnCheers!
Archive
› Old Forum Threads › DoD Plugins › Developers Plugins › Player/Server Management Plugins › DoD Reduced Bot Damage

