Forum
CS2D Scripts Lua Scripts/Questions/Help BureX has written
Help please.
Is it possible for multiple "ai_goto" ?
Like every single bot goes to single "ai_goto".
P.S. Can somebody explain me how to use "ai_goto" ? (Not necessary)
Is it possible for multiple "ai_goto" ?
Like every single bot goes to single "ai_goto".
P.S. Can somebody explain me how to use "ai_goto" ? (Not necessary)
Please ?
BureX has written
Please ?
BureX has written
Help please.
Is it possible for multiple "ai_goto" ?
Like every single bot goes to single "ai_goto".
P.S. Can somebody explain me how to use "ai_goto" ? (Not necessary)
Is it possible for multiple "ai_goto" ?
Like every single bot goes to single "ai_goto".
P.S. Can somebody explain me how to use "ai_goto" ? (Not necessary)
Please ?
Read info.txt about bot functions. In case you didnt find it, here's a quote from the file:
info.txt has written
- ai_goto(id,x,y,[walk]) Bot goes to tile (x|y). Set walk to 1 to let it walk (silent)
Returns 0 when failed to find path, 1 when target is reached or
2 when bot is still on its way.
Returns 0 when failed to find path, 1 when target is reached or
2 when bot is still on its way.
First you have to check whether the player is bot or not, you can do it by player(id,"bot") command. Then if this person is a bot you can put ai_goto(id,x,y) where x and y - position of the tile to go to. Depending on id different bot can go to different position.
batlaizys has written
Look in cs2d file archive. If you did not find it then PM me.
I found it. I want to use it with another LUA script. Do I make a folder, put them both in, and type in the name in options?
1
dofile("sys/lua/NAME OF THE FILE.lua")
It can be done with a for expression, but only if you select few bots with ids like 1,2,3,4,5 in this very order:
1
2
3
2
3
for id=1,5 do 	ai_goto(id,lolwut,lolwut) end
It will be more complicated if the server has mixed bots and players.
I have a small reques.
When Ct Player dies, he goes to the TT and can't go back to the CT, And when the number of Ct will be 0, the game will be restart, and after restart everybody go to CT, but bots are in TT.
PAlllUCH has written
search in zombie plague Hi,
I have a small reques.
When Ct Player dies, he goes to the TT and can't go back to the CT, And when the number of Ct will be 0, the game will be restart, and after restart everybody go to CT, but bots are in TT.
I have a small reques.
When Ct Player dies, he goes to the TT and can't go back to the CT, And when the number of Ct will be 0, the game will be restart, and after restart everybody go to CT, but bots are in TT.
First: when you drop your weopon you can't be wounded (for chat etc.) If you take your weapon again you can attack again and after 15 sec you get your weapon so or per lua.
Second: If you press a key you see a list with all now playing players and their US nick, ther rank and maybe language or country where they play.
If someone made this he can public it here and i think many would be happy
PAlllUCH has written
Hi,
I have a small reques.
When Ct Player dies, he goes to the TT and can't go back to the CT, And when the number of Ct will be 0, the game will be restart, and after restart everybody go to CT, but bots are in TT.
I have a small reques.
When Ct Player dies, he goes to the TT and can't go back to the CT, And when the number of Ct will be 0, the game will be restart, and after restart everybody go to CT, but bots are in TT.
This is from a rough version. You gotta test it and write me a PM if there are any bugs (i'll fix them). I didnt test it with many players, but it should work(add this to "server.lua" file):
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
function main(id) msg2 (id,"©000255255you sniffed a nose of cocaine") timer(100,"flash",id,20) end function flash(id) parse ("flashplayer "..id.." 5") end
P.D: Script is not mine so dont copy/ or use this code!
edited 1×, last 13.12.10 11:55:43 pm
FN_Nemesis has written
Hi everyone i like to know if its necessary to add a hook to the scripts? because i have seen script without hooks here is an example :
P.D: Script is not mine so dont copy/ or use this code!
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
function main(id) msg2 (id,"©000255255you sniffed a nose of cocaine") timer(100,"flash",id,20) end function flash(id) parse ("flashplayer "..id.." 5") end
P.D: Script is not mine so dont copy/ or use this code!
When do you want these functions to be called? When player joins/every minute/when player says something. You need a hook(-s) anyway...
You dont need a hook when you want something to be done when server starts, for example parse("mp_friendlyfire 0") to disable friendly fire - for that you dont need a hook.
J.
1
2
2
LUA ERROR (ai_update_living): bots/includes/collect.lua:16: attempt to call global 'item' (a table value) Freezing bots to stop Lua error msg flood! Use 'bot_freeze 0' to unfreeze bots!
Jake-rus has written
1
Freezing bots to stop Lua error msg flood! Use 'bot_freeze 0' to unfreeze bots!
mhm... its so hard to write "bot_freeze 0" in console like it sayed
Jake-rus has written
why bots with my lua are freeze ??? this is OMG
1
2
2
LUA ERROR (ai_update_living): bots/includes/collect.lua:16: attempt to call global 'item' (a table value) Freezing bots to stop Lua error msg flood! Use 'bot_freeze 0' to unfreeze bots!