create bots with this plugin

EnForcer

  • Newbie
  • Posts: 18
Re: create bots with this plugin
« Reply #45,  »
Great work keep it up
Using it we can make an army of players and let them fight with each other :D

Anish87

  • Newbie
  • Posts: 16

DizzasTeR

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,167
Re: create bots with this plugin
« Reply #47,  »
Since nobody has said it so far, I'll be the rude one

What you are doing is great sure, but its only great in the sense that VCMP does not have NPC support yet, what you are doing is something people have done before, specifically Shadow with his zombie server if anyone even remembers that.

My point: This plugin will die the moment vcmp gets a new update, sure its all fun and cool for now but unless VCMP stays dead from updates like it was for a decade like in 0.3zR2, all of you are just throwing yourselves in a pit of disappointment later on when this breaks.

It was fine till the just connect the bot part, but it seems like many of the people at this point just want to simulate NPC feature and I'd love seeing the tears later.

TL;DR
Don't work on this too much, this will break upon updates and future security enhancements updates and you are all getting yourself used to a "fake" NPC feature that won't last for too long.

Xmair

  • Wiki Contributor
  • Posts: 928
Re: create bots with this plugin
« Reply #48,  »
Quote from DizzasTeR on June 9th, 06:37 AM
...
To add to this, the reason this will most probably badly break upon updates is because the netcode is changed drastically (as per update logs). It'll be up to you to re-do all of the plugin.
VU Full Member | VCCNR Developer | KTB Developer | EAD Ex-Scripter

MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 787
Re: create bots with this plugin
« Reply #49,  »
Awsome work habi... & i hope u will be able to re-code this plugin after vcmp announces the new update

Athanatos

  • Hero Member
  • sin^2(x)+cos^2(x) = 1
  • Posts: 939
Infected City Survival Main Dev

habi

  • Sr. Member
  • Posts: 283
Re: create bots with this plugin
« Reply #51,  »Last edited
Quote from DizzasTeR on June 9th, 06:37 AM
Since nobody has said it so far, I'll be the rude one
No problem.
Quote from DizzasTeR on June 9th, 06:37 AM
What you are doing is great sure, but its only great in the sense that VCMP does not have NPC support yet, what you are doing is something people have done before, specifically Shadow with his zombie server if anyone even remembers that.
Shadow did not make a plugin i think. He made a server and client. I had read that topic before. due to some raknet issues or so, the project was abandoned.

We will see what we can do when updates come. Many cool features can be added.
Re: create bots with this plugin
« Reply #52,  »Last edited
New functions added-
1. kill_actor( int actorid, int reason, int killer_id, int body_part, bool showanim)

Examples
(click to show/hide)
kill_actor( actor id );
( equalent to /kill. actor will fell down. and server will show actor  felled to death )

kill_actor( actor id, reason ) ;
same, but you can give server a reason also. like explosion, suicide= reason 70, etc

kill_actor( actorid, reason, killer_id, body_part );
this will tell the server some player killed the actor. head =6, left arm =2, right arm= 3, left leg= 4,
right leg =5, torso= 1, body =0
//reason is a wep id. see weapon ids on vcmp wiki
eg. explosion = 41. reason.
kill_actor( actorid, reason, killer_id, body_part, false )
means no animations like headshot. actor will just fell down.


2. spawn_actor( actor id );
After an actor has been killed, use this command to spawn him. He will be spawned where he was last seen.

3. correct_actor_pos( actor id, float x, float y, float z );//use this before set_actor_health to show change in actor position.

4. set_actor_health( actorid, int new health );

if new health is greater than old health, before calling
this function, do player.Health=new health;

new function onActorDeath( actorid )
this gets called when an actor gets killed.
You can do something like this

Code: [Select]
function onActorDeath( actorid )
{
spawn_actor( actorid );
}

actor64.dll ( new )

You can use client side scripting, as i did in killing them.

Athanatos

  • Hero Member
  • sin^2(x)+cos^2(x) = 1
  • Posts: 939
Infected City Survival Main Dev

Alpays

  • Newbie
  • Posts: 27

habi

  • Sr. Member
  • Posts: 283
Re: create bots with this plugin
« Reply #55,  »Last edited
Hi Alpays, could you try this new dll file

actor64.dll

I have disabled certain functions, which interacts with server code.

List of available functions
Code: [Select]
create_actor( ... )
set_actor_angle( ... )
kill_actor(...)
spawn_actor(...)
set_port("..")
PlayFile("filename",actorid)
GetPlayerIDActor( actorid )
IsActor( int playerid )
GetActorID( int playerid )
correct_actor_pos
set_actor_health( int actorid, int newhealth )

Alpays

  • Newbie
  • Posts: 27
Re: create bots with this plugin
« Reply #56,  »
Quote from habi on June 22nd, 04:04 PM
Hi Alpays, could you try this new dll file

actor64.dll

I have disabled certain functions, which interacts with server code.

List of available functions
Code: [Select]
create_actor( ... )
set_actor_angle( ... )
kill_actor(...)
spawn_actor(...)
set_port("..")
PlayFile("filename",actorid)
GetPlayerIDActor( actorid )
IsActor( int playerid )
GetActorID( int playerid )
correct_actor_pos
set_actor_health( int actorid, int newhealth )
Thanks you very much working now

KadirYigit

  • Newbie
  • 19
  • Posts: 13
Re: create bots with this plugin
« Reply #57,  »




ScriptLoad
|
(click to show/hide)
create_actor( "Barmen", 65, 466.788, -54.2886, 11.4837, 2.3 );
create_actor( "Jale", 22, 475.09, -66.3728, 9.98375, 2.3 );
create_actor( "Asli", 24, 474.805, -64.6814, 9.98375, 3.1 );
create_actor( "Mehmet", 33, 480.05, -63.8481, 9.98375, 2.1 );
create_actor( "Taksici_1", 28, 480.05, -63.8481, 9.98375, 2.1 );
19

habi

  • Sr. Member
  • Posts: 283
Re: create bots with this plugin
« Reply #58,  »
we need to give some time after each create_actor function.

one second delay.

See how i fixed the problem

Code: [Select]
function onScriptLoad()
{
    // server info is printed in the console
    print( "------------------------------------" );
    print( "Server name: " + SRV_NAME );
    if( SRV_PASS != "" ) print( "Password: " + SRV_PASS );
    print( "------------------------------------" );
NewTimer("myfunction",1000,1, "Barmen", 65, 466.788, -54.2886, 11.4837, 2.3 );
NewTimer( "myfunction",2000,1,"Jale", 22, 475.09, -66.3728, 9.98375, 2.3 );
NewTimer( "myfunction",3000,1, "Asli", 24, 474.805, -64.6814, 9.98375, 3.1 );
NewTimer( "myfunction",4000,1, "Mehmet", 33, 480.05, -63.8481, 9.98375, 2.1 );
NewTimer( "myfunction",5000,1, "Taksici_1", 28, 480.05, -63.8481, 9.98375, 2.1 );
}
function myfunction(a,b,c,d,e,f)
{
create_actor(a,b,c,d,e,f);
}

and now..
i have

Athanatos

  • Hero Member
  • sin^2(x)+cos^2(x) = 1
  • Posts: 939
Re: create bots with this plugin
« Reply #59,  »
@habi Request permission to write a Squirreil `library` to allow object oriented programming with your library.
Infected City Survival Main Dev