Control activities bot
9 replies



08.06.13 12:04:48 pm


And I have a few requests, i'm not good at that script:




Tập Đoàn Cao Thủ CF2D Vn-GameWin

Hiding in a wall and waiting the bot to finish all his ammo pack then knife him
.

We die once, do i have to hide to be visible ?
You can do this with coroutine and this: http://www.cs2d.com/help.php?luacat=ai
if you still not know anything, i need some data from you
KabirDuy has written:
A bot script only moves in the direction of the script (Go step by step, for example: go to the left -> go straight -> stop).
I need
1. ID of the bot
2. Start from where
3. Stop where
KabirDuy has written:
A script for bot attacks directed wall ... (No, wait a little, well true, the bot go to a place where the wall next to the bot, the bot will attack until the wall is collapsed).
1. Rotation of the boton the wall. Example:
from that, we can see wall is on 90degree
or just give me the tile x and y of the wall
2. how many times the bot will attack the wall
Afterwards i can do it without any problem
if you still not know anything, i need some data from you


I need
1. ID of the bot
2. Start from where
3. Stop where


1. Rotation of the boton the wall. Example:
from that, we can see wall is on 90degree
or just give me the tile x and y of the wall
2. how many times the bot will attack the wall
Afterwards i can do it without any problem






Tập Đoàn Cao Thủ CF2D Vn-GameWin

It's not IP, it's ID.
bdw just give me the tile of wall
bdw just give me the tile of wall


oh my mistakes, i mean the tile coordinate of the wall
EDIT:
Okay here the code you just need to edit line 14 if it's not shooting wall correctly
Required
Timer Extra function(timerEx) v4.0 (12)
It' untested but i think it should work
Note: it's impossible to increate the damage for 1 player, it would take more long lines to do that
EDIT:
Okay here the code you just need to edit line 14 if it's not shooting wall correctly
Required


Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
statusBot=0
controller=coroutine.create(function(bot)
parse("setpos "..bot.." 544 2240")
for i=1,180 do
ai_rotate(bot,i)
coroutine.yield()
end
statusBot=1
ai_goto(bot,17,79)
repeat
coroutine.yield()
until ai_goto(bot,17,79)==1
statusBot=2
ai_rotate(bot,180) -- Bot rotation for attacking the wall
coroutine.yield()
statusBot=3
for i=1,15 do
ai_iattack(bot)
coroutine.yield()
end
statusBot=4
end
addhook("always","botcontroller")
function botcontroller()
if statusBot==2 then
timerEx(5000,coroutine.resume,1,controller,2)
statusBot=2.5
elseif statusBot<1 and statusBot>=3 then
if coroutine.resume(controller,2)==false then
freehook("always","botcontroller")
end
end
end
timerEx(30000,parse,100,"setmaxhealth 2 "..(player(2,"maxhealth")+5).."; speedmod 2 "..(player(2,"speedmod")+1),0)
controller=coroutine.create(function(bot)
parse("setpos "..bot.." 544 2240")
for i=1,180 do
ai_rotate(bot,i)
coroutine.yield()
end
statusBot=1
ai_goto(bot,17,79)
repeat
coroutine.yield()
until ai_goto(bot,17,79)==1
statusBot=2
ai_rotate(bot,180) -- Bot rotation for attacking the wall
coroutine.yield()
statusBot=3
for i=1,15 do
ai_iattack(bot)
coroutine.yield()
end
statusBot=4
end
addhook("always","botcontroller")
function botcontroller()
if statusBot==2 then
timerEx(5000,coroutine.resume,1,controller,2)
statusBot=2.5
elseif statusBot<1 and statusBot>=3 then
if coroutine.resume(controller,2)==false then
freehook("always","botcontroller")
end
end
end
timerEx(30000,parse,100,"setmaxhealth 2 "..(player(2,"maxhealth")+5).."; speedmod 2 "..(player(2,"speedmod")+1),0)
It' untested but i think it should work
Note: it's impossible to increate the damage for 1 player, it would take more long lines to do that
edited 2×, last 09.06.13 12:02:12 pm





