English Control activities bot

9 replies
Goto Page
To the start Previous 1 Next To the start
08.06.13 12:04:48 pm
Up
KabirDuy
User
Offline Off
> First of all sorry for my bad english...
And I have a few requests, i'm not good at that script:

• A bot script only moves in the direction of the script (Go step by step, for example: go to the left -> go straight -> stop).

• 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).

• Every 30 seconds, bot: speed up +1, attack power +1 and HP +5.

∗ Thank you for reading and thank you even more if you help me.
Tập Đoàn Cao Thủ CF2D Vn-GameWin
08.06.13 12:32:57 pm
Up
Shawni
User
Offline Off
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 ?
08.06.13 12:37:50 pm
Up
MikuAuahDark
User
Offline Off
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

user 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

user 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:
Spoiler >

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
file cs2d LuaJIT for Dedicated Server (13) JIT POWER! | Know your Lua errors! | Part of LÖVE development team since 11.3
08.06.13 04:00:36 pm
Up
KabirDuy
User
Offline Off
IMG:http://upanh.in/cTd.png


√ Start: 17/70
√ Stop: 17/79
× What is Rotation of the boton the wall? I don't know...
Tập Đoàn Cao Thủ CF2D Vn-GameWin
08.06.13 05:51:54 pm
Up
KimKart
Idiot
Offline Off
That is the ID of the player. In this case, yes, the IP of a bot.
my meme big
08.06.13 06:36:59 pm
Up
Gomme
User
Offline Off
wo si control bot script
09.06.13 03:04:53 am
Up
MikuAuahDark
User
Offline Off
It's not IP, it's ID.
bdw just give me the tile of wall
file cs2d LuaJIT for Dedicated Server (13) JIT POWER! | Know your Lua errors! | Part of LÖVE development team since 11.3
09.06.13 06:31:11 am
Up
KabirDuy
User
Offline Off
IMG:http://upanh.in/tWd.png

× Is that title of wall?
Tập Đoàn Cao Thủ CF2D Vn-GameWin
09.06.13 11:07:55 am
Up
MikuAuahDark
User
Offline Off
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 file cs2d Timer Extra function(timerEx) v4.0 (12)
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
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)

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
file cs2d LuaJIT for Dedicated Server (13) JIT POWER! | Know your Lua errors! | Part of LÖVE development team since 11.3
09.06.13 12:34:36 pm
Up
RealDespress28
BANNED
Offline Off
user KabirDuy: user MikuAuahDark mean X and the Y.
To the start Previous 1 Next To the start