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

[L4D/L4D2] Grenade Throwing Bots


Post New Thread Reply   
 
Thread Tools Display Modes
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-06-2020 , 23:29   Re: [L4D/L4D2] Grenade Throwing Bots
Reply With Quote #141

Quote:
Originally Posted by deedeedee View Post
Indeed it was. It's quite sad how cravenge hasn't thought of trying to get the L4D2 code's one into L4D1. It does feel like it works much better.
Well, here you go. I haven't tested it yet, but I basically copied the entire code for the L4D2 version and just removed any references to the bile bomb.
Attached Files
File Type: sp Get Plugin or Get Source (grenade_throwing_bots-l4d.sp - 122 views - 15.0 KB)
File Type: sp Get Plugin or Get Source (grenade_throwing_bots-l4d2.sp - 163 views - 15.6 KB)
__________________

Last edited by Psyk0tik; 10-07-2020 at 20:42.
Psyk0tik is offline
deedeedee
Junior Member
Join Date: Oct 2020
Old 10-07-2020 , 07:19   Re: [L4D/L4D2] Grenade Throwing Bots
Reply With Quote #142

Quote:
Originally Posted by Crasher_3637 View Post
Well, here you go. I haven't tested it yet, but I basically copied the entire code for the L4D2 version and just removed any references to the bile bomb.
I'm unable to install the smx, says it fails to compile?
deedeedee is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-07-2020 , 11:02   Re: [L4D/L4D2] Grenade Throwing Bots
Reply With Quote #143

Quote:
Originally Posted by deedeedee View Post
I'm unable to install the smx, says it fails to compile?
Both of them use Left 4 DHooks so you'll need to compile it locally.
__________________
Psyk0tik is offline
Secepeul
Junior Member
Join Date: Apr 2019
Old 10-08-2020 , 02:25   Re: [L4D/L4D2] Grenade Throwing Bots
Reply With Quote #144

If you don't know how to do that, download the source file, go into addons-sourcemods-scripting and drag it into spcomp.exe
Secepeul is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 10-10-2020 , 10:31   Re: [L4D/L4D2] Grenade Throwing Bots
Reply With Quote #145

Quote:
Originally Posted by Crasher_3637 View Post
Well, here you go. I haven't tested it yet, but I basically copied the entire code for the L4D2 version and just removed any references to the bile bomb.


L 10/09/2020 - 23:48:42: SourceMod error session started
L 10/09/2020 - 23:48:42: Info (map "c8m1_apartment")
L 10/09/2020 - 23:48:42: [SM] Exception reported: Client 5 is not in game
L 10/09/2020 - 23:48:42: [SM] Blaming: grenade_throwing_bots-l4d2.smx
L 10/09/2020 - 23:48:42: [SM] Call stack trace:
L 10/09/2020 - 23:48:42: [SM] [0] GetClientEyePosition
L 10/09/2020 - 23:48:42: [SM] [1] Line 280, /home/forums/content/files/1/8/1/1/6/6/184193.attach::CommonDelayThrow
L 10/09/2020 - 23:52:21: Error log file session closed.
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-10-2020 , 10:36   Re: [L4D/L4D2] Grenade Throwing Bots
Reply With Quote #146

Quote:
Originally Posted by Mi.Cura View Post
L 10/09/2020 - 23:48:42: SourceMod error session started
L 10/09/2020 - 23:48:42: Info (map "c8m1_apartment")
L 10/09/2020 - 23:48:42: [SM] Exception reported: Client 5 is not in game
L 10/09/2020 - 23:48:42: [SM] Blaming: grenade_throwing_bots-l4d2.smx
L 10/09/2020 - 23:48:42: [SM] Call stack trace:
L 10/09/2020 - 23:48:42: [SM] [0] GetClientEyePosition
L 10/09/2020 - 23:48:42: [SM] [1] Line 280, /home/forums/content/files/1/8/1/1/6/6/184193.attach::CommonDelayThrow
L 10/09/2020 - 23:52:21: Error log file session closed.
Not sure how you're getting that error. Line 280 is just a closing bracket ("}") and it already checks if the player is in-game before it gets to that line.

PHP Code:
public Action CommonDelayThrow(Handle timerint userid)
{
    
int client GetClientOfUserId(userid);
    if (!
IsSurvivor(client) || !bShootOrder[client])
    {
        
// stop timer if player is not in-game anymore...
        
return Plugin_Stop;
    } 
// line 280
    
    
float fEyePos[3], fTargetTrajectory[3], fEyeAngles[3];
                    
    
GetClientEyePosition(clientfEyePos);
    
MakeVectorFromPoints(fEyePosfMobPosfTargetTrajectory);
    
GetVectorAngles(fTargetTrajectoryfEyeAngles);
                    
    
fEyeAngles[2] += 5.0;
    
TeleportEntity(clientNULL_VECTORfEyeAnglesNULL_VECTOR);
    return 
Plugin_Stop;

__________________
Psyk0tik is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 10-10-2020 , 13:23   Re: [L4D/L4D2] Grenade Throwing Bots
Reply With Quote #147

Just to report:


L 10/10/2020 - 02:24:05: SourceMod error session started
L 10/10/2020 - 02:24:05: Info (map "c6m3_port") (file "d:\tcafiles\users\sergiok\34149\left4dead2\a ddons\sourcemod\logs\errors_20201010.log")
L 10/10/2020 - 02:24:05: [SM] Exception reported: Property "m_vecOrigin" not found (entity 164/instanced_scripted_scene)
L 10/10/2020 - 02:24:05: [SM] Blaming: grenade_throwing_bots-l4d2.smx
L 10/10/2020 - 02:24:05: [SM] Call stack trace:
L 10/10/2020 - 02:24:05: [SM] [0] GetEntPropVector
L 10/10/2020 - 02:24:05: [SM] [1] Line 348, /home/forums/content/files/1/8/1/1/6/6/184193.attach::L4D2_OnFindScavengeItem
L 10/10/2020 - 02:24:05: [SM] [3] Call_Finish
L 10/10/2020 - 02:24:05: [SM] [4] Line 6648, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\left4dhooks.sp::OnFindScavengeItem
L 10/10/2020 - 02:24:06: [SM] Exception reported: Property "m_vecOrigin" not found (entity 164/instanced_scripted_scene)
L 10/10/2020 - 02:24:06: [SM] Blaming: grenade_throwing_bots-l4d2.smx
L 10/10/2020 - 02:24:06: [SM] Call stack trace:
L 10/10/2020 - 02:24:06: [SM] [0] GetEntPropVector
L 10/10/2020 - 02:24:06: [SM] [1] Line 348, /home/forums/content/files/1/8/1/1/6/6/184193.attach::L4D2_OnFindScavengeItem
L 10/10/2020 - 02:24:06: [SM] [3] Call_Finish
L 10/10/2020 - 02:24:06: [SM] [4] Line 6648, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\left4dhooks.sp::OnFindScavengeItem
L 10/10/2020 - 024:42: Error log file session closed.
L 10/10/2020 - 024:52: SourceMod error session started
L 10/10/2020 - 024:52: Info (map "c9m1_alleys") (file "d:\tcafiles\users\sergiok\34149\left4dead2\a ddons\sourcemod\logs\errors_20201010.log")
L 10/10/2020 - 024:52: [SM] Exception reported: Client 5 is not in game
L 10/10/2020 - 024:52: [SM] Blaming: grenade_throwing_bots-l4d2.smx
L 10/10/2020 - 024:52: [SM] Call stack trace:
L 10/10/2020 - 024:52: [SM] [0] GetClientEyePosition
L 10/10/2020 - 024:52: [SM] [1] Line 298, /home/forums/content/files/1/8/1/1/6/6/184193.attach::TankDelayThrow
L 10/10/2020 - 02:42:20: Error log file session closed.
L 10/10/2020 - 13:07:40: SourceMod error session started
L 10/10/2020 - 13:07:40: Info (map "c10m1_caves") (file "d:\tcafiles\users\sergiok\34149\left4dead2\a ddons\sourcemod\logs\errors_20201010.log")
L 10/10/2020 - 13:07:40: [SM] Exception reported: Client 2 is not in game
L 10/10/2020 - 13:07:40: [SM] Blaming: grenade_throwing_bots-l4d2.smx
L 10/10/2020 - 13:07:40: [SM] Call stack trace:
L 10/10/2020 - 13:07:40: [SM] [0] GetClientEyePosition
L 10/10/2020 - 13:07:40: [SM] [1] Line 280, /home/forums/content/files/1/8/1/1/6/6/184193.attach::CommonDelayThrow
L 10/10/2020 - 13:07:40: [SM] Exception reported: Client 2 is not in game
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie

Last edited by Mi.Cura; 10-10-2020 at 13:46.
Mi.Cura is offline
deedeedee
Junior Member
Join Date: Oct 2020
Old 10-13-2020 , 13:19  
Reply With Quote #148

For some reason, the plugin now refuses to work at all. The bots don't even throw any of the grenades. Any ideas? I have L4D1 Hooks installed along with Gear Transfer as well.
deedeedee is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 10-14-2020 , 10:16   Re: [L4D/L4D2] Grenade Throwing Bots
Reply With Quote #149

Quote:
Originally Posted by Crasher_3637 View Post
Not sure how you're getting that error. Line 280 is just a closing bracket ("}") and it already checks if the player is in-game before it gets to that line.

PHP Code:
public Action CommonDelayThrow(Handle timerint userid)
{
    
int client GetClientOfUserId(userid);
    if (!
IsSurvivor(client) || !bShootOrder[client])
    {
        
// stop timer if player is not in-game anymore...
        
return Plugin_Stop;
    } 
// line 280
    
    
float fEyePos[3], fTargetTrajectory[3], fEyeAngles[3];
                    
    
GetClientEyePosition(clientfEyePos);
    
MakeVectorFromPoints(fEyePosfMobPosfTargetTrajectory);
    
GetVectorAngles(fTargetTrajectoryfEyeAngles);
                    
    
fEyeAngles[2] += 5.0;
    
TeleportEntity(clientNULL_VECTORfEyeAnglesNULL_VECTOR);
    return 
Plugin_Stop;


It's strange, I keep getting this error message in the LOG:

L 10/13/2020 - 19:46:14: SourceMod error session started
L 10/13/2020 - 19:46:14: Info (map "c10m5_houseboat") (file "d:\tcafiles\users\sergiok\21700\left4dead2\a ddons\sourcemod\logs\errors_20201013.log")
L 10/13/2020 - 19:46:14: [SM] Exception reported: Client 9 is not in game
L 10/13/2020 - 19:46:14: [SM] Blaming: grenade_throwing_bots-l4d2.smx
L 10/13/2020 - 19:46:14: [SM] Call stack trace:
L 10/13/2020 - 19:46:14: [SM] [0] GetClientEyePosition
L 10/13/2020 - 19:46:14: [SM] [1] Line 280, /home/forums/content/files/1/8/1/1/6/6/184193.attach::CommonDelayThrow
L 10/13/2020 - 19:48:27: Error log file session closed.
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
deedeedee
Junior Member
Join Date: Oct 2020
Old 10-17-2020 , 20:41   Re: [L4D/L4D2] Grenade Throwing Bots
Reply With Quote #150

Quote:
Originally Posted by Crasher_3637 View Post
Changes

1. Bots can now throw pipe bombs and bile bombs during horde/panic events (not sure why this was disabled in the first place).
2. Bots can now throw molotovs when a mob spawns (slightly different from horde/panic events).
3. The L4D2 version is a fork of Silvers' version (fixes invalid handle errors): https://forums.alliedmods.net/showpo...&postcount=123

Both work just fine with Gear Transfer and Left 4 DHooks. I'm running both versions on my servers (1 for L4D1 and 1 for L4D2) and bots are throwing grenades when common infected show up.
I've tried reverting back to this version, but now when I compile it does nothing whatsoever. Can I get any help? Same goes with the other versions you've linked.
deedeedee 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 17:12.


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