Haven't bothered testing it, but basically: Put main() after the function declarations.
--[[
ServerBot v.0.0.1 (xXBETAXx)
Features:
autoset desc, motd, mod, max clients, owner pass.
auto operators.
]]
--Normal Server Settings--
--[[
this are the Features that will work
when server is set in normal mod.
ndesc= description of server
nmotd= message of the day.
nmod= the mod.
nmaxc= max clients/users.
nownerpass= password for owner, so if ur accidentaly logged out
o
]]
ndesc= "Deskoft Studios Recruiting! Betting also!"
nmotd= "to bet type: /bet amount name - To join contact us"
nmod= "judo.tbm"
--nmaxc must be with .tbm
nmaxc= "30"
nownerpass= "canicas"
-------------------
--Auto-Op List--
--[[
I highly recommend
only clan members.
aol1, aol2, aol3... must be with tag.
example:
aol1= "[dss]6d23"
]]
aol1= ""
aol2= ""
aol3= ""
aol4= "[dss]6d23"
----------------
--Owner Info--
--[[
Owner info. put YOUR info.
ownerfullname= ur username WITH tags.
shortname= ur username WITHOUT tags.
clantag= clan tag.
clanfn= clan FULL name.
]]
ownerfullname= "[dss]6d23"
shortname= "6d23"
clantag= "[dss]"
clanfn= "Deskoft Studios Clan"
-------------
function main()
run_cmd("set desc " .. ndesc)
run_cmd("set motd " .. nmotd)
run_cmd("lm " .. nmod)
run_cmd("set maxclients " .. nmaxc)
run_cmd("setowner " .. nownerpass)
run_cmd("reset")
run_cmd("cp Deskoft Bot Started...")
checkadmins()
end
function checkadmins()
local bouts= get_bouts()
for i=0, table.getn(bouts) do
if bouts[i]== aol1 then
run_cmd("op " .. bouts[i])
elseif bouts[i]== aol2 then
run_cmd("op " .. bouts[i])
elseif bouts[i]== aol3 then
run_cmd("op " .. bouts[i])
elseif bouts[i]== aol4 then
run_cmd("op " .. bouts[i])
end
end
end
function newgame()
local a= get_player_info(0)
local b= get_player_info(1)
if a.name==ownerfullname then
run_cmd("cp [admin]" .. shortname .. " vs " .. b.name)
elseif b.name==ownerfullname then
run_cmd("cp [admin]" .. shortname .. " vs " .. b.name)
else
run_cmd("cp " .. a.name .. " vs " .. b.name)
end
end
function enterfreeze()
local a= get_player_info(0)
local b= get_player_info(1)
if a.score > b.score then
run_cmd("cp " .. a.name .. "is winning " .. b.name)
elseif a.score < b.score then
run_cmd("cp " .. b.name .. "is winning " .. a.name)
elseif a.score==b.score then
run_cmd("cp match is actually draw")
end
checkadmins()
end
main()
add_hook("new_mp_game", "ng", newgame)
add_hook("enter_freeze", "ng", enterfreeze)
To see what isn't working you need to go into stderr.txt (main toribash folder) and it should give you the lua error. There's some stuff
here on it.