Server Help

Bot Questions - Anyone have to source for basewars?

Anonymous - Mon Apr 18, 2005 6:52 pm
Post subject: Anyone have to source for basewars?
anyone have it?
Anonymous - Mon Apr 18, 2005 7:21 pm
Post subject:
or if no one has this, a MERVbot plugin similar to basewars except the timer starts when a team has the majority of the flags instead of all the flags
SamHughes - Mon Apr 18, 2005 8:47 pm
Post subject:
I needed the same thing, so I wrote my own version.

Here is the source code. Consider the parts that were written by me to be public domain.

I don't remember how well I commented things, so sorry in advance.

As it currently exists, bot is hard-coded to require all the flags to be held for three minutes and to play victory music for the last 30 seconds.

Can't add this as an attachment, so here we go:

http://www.rpi.edu/~hughes/ximages/jackpot.zip
50% Packetloss - Mon Apr 18, 2005 9:50 pm
Post subject:
Is samhughes an alias for another player or someone new to this forum? Sorry, I can't keep up with who everyone is with them changing names every 6 months.
Phyran - Mon Apr 18, 2005 10:05 pm
Post subject:
i think CF has a modded one, don't remember
SamHughes - Mon Apr 18, 2005 10:12 pm
Post subject:
SamHughes is not an alias. It is the name I've used since I started playing and is very similar to the name I've been using since I was born. And it's the only name I've used on this forum.

Someplaces in SS I played as Spock. but not in SSC zones.
Cyan~Fire - Mon Apr 18, 2005 11:26 pm
Post subject:
I do. I'm sure it's somewhere on this forum, do a search.
Anonymous - Tue Apr 19, 2005 4:03 pm
Post subject:
ok, i searched but i couldn't find anywhere that you attached it, just where you talked about it. Could you post it on here please?
Cyan~Fire - Tue Apr 19, 2005 4:24 pm
Post subject:
OK I put it up on my website: http://www.digitization.org/download/basewars2-src.zip
Purge - Fri Apr 22, 2005 9:47 pm
Post subject:
SamHughes wrote:

Can't add this as an attachment, so here we go:

http://www.rpi.edu/~hughes/ximages/jackpot.zip


When I tried to compile as I normally do, it gave me these errors:

Code: Show/Hide
--------------------Configuration: jackpot - Win32 Debug--------------------
Compiling...
spawn.cpp
c:\program files\microsoft visual studio\vc98\include\xtree(120) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,
data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std::basic_string<char,std::
char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' : identifier was truncated to '255' characters in the debug information
        c:\program files\microsoft visual studio\vc98\include\map(46) : see reference to class template instantiation 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<
char>,std::allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,st
d::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
        c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(76) : see reference to class template instantiation 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_strin
g<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xtree(120) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,
data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std::basic_string<char,std::
char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::const_iterator' : identifier was truncated to '255' characters in the debug information
        c:\program files\microsoft visual studio\vc98\include\map(46) : see reference to class template instantiation 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<
char>,std::allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,st
d::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
        c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(76) : see reference to class template instantiation 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_strin
g<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xtree(120) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,
data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std::basic_string<char,std::
char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::iterator' : identifier was truncated to '255' characters in the debug information
        c:\program files\microsoft visual studio\vc98\include\map(46) : see reference to class template instantiation 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<
char>,std::allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,st
d::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
        c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(76) : see reference to class template instantiation 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_strin
g<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xtree(120) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,
data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std::basic_string<char,std::
char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Node' : identifier was truncated to '255' characters in the debug information
        c:\program files\microsoft visual studio\vc98\include\map(46) : see reference to class template instantiation 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<
char>,std::allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,st
d::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
        c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(76) : see reference to class template instantiation 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_strin
g<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
c:\program files\microsoft visual studio\vc98\include\xtree(120) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,
data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std::basic_string<char,std::
char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::const_iterator' : identifier was truncated to '255' characters in the debug information
        c:\program files\microsoft visual studio\vc98\include\map(46) : see reference to class template instantiation 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<
char>,std::allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,st
d::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
        c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(76) : see reference to class template instantiation 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_strin
g<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >' being compiled
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(220) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,st
d::char_traits<char>,std::allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_
row> >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::iterator,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,data_row>,std::pair<std::basic_s
tring<char,std::char_traits<char>,std::allocator<char> > const ,data_row> &,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,data_row> *,int>' : identifier was truncated to '255' characters in the debug informati
on
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(220) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,st
d::char_traits<char>,std::allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_
row> >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::const_iterator,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,data_row>,std::pair<std::b
asic_string<char,std::char_traits<char>,std::allocator<char> > const ,data_row> const &,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,data_row> const *,int>' : identifier was truncated to '255' characters in t
he debug information
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(220) : warning C4786: 'std::pair<std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::
allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::iterator,bool>' : identifier was truncated to '255' characters in the debug information
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(220) : warning C4786: 'std::pair<std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::
allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::iterator,std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::all
ocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std::b
asic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::iterator>' : identifier was truncated to '255' characters in the debug information
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(220) : warning C4786: 'std::pair<std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::
allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std
::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::const_iterator,std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,st
d::allocator<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<
std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::const_iterator>' : identifier was truncated to '255' characters in the debug information
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(220) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<unsigned short,std::pair<unsigned short const ,data_row>,std::map<unsigned short,data_row,std::less<unsi
gned short>,std::allocator<data_row> >::_Kfn,std::less<unsigned short>,std::allocator<data_row> >::iterator,std::pair<unsigned short const ,data_row>,std::pair<unsigned short const ,data_row> &,std::pair<unsigned short const ,data_row> *,int>' : ide
ntifier was truncated to '255' characters in the debug information
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(220) : warning C4786: 'std::reverse_bidirectional_iterator<std::_Tree<unsigned short,std::pair<unsigned short const ,data_row>,std::map<unsigned short,data_row,std::less<unsi
gned short>,std::allocator<data_row> >::_Kfn,std::less<unsigned short>,std::allocator<data_row> >::const_iterator,std::pair<unsigned short const ,data_row>,std::pair<unsigned short const ,data_row> const &,std::pair<unsigned short const ,data_row> c
onst *,int>' : identifier was truncated to '255' characters in the debug information
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(220) : warning C4786: 'std::pair<std::_Tree<unsigned short,std::pair<unsigned short const ,data_row>,std::map<unsigned short,data_row,std::less<unsigned short>,std::allocator
<data_row> >::_Kfn,std::less<unsigned short>,std::allocator<data_row> >::iterator,std::_Tree<unsigned short,std::pair<unsigned short const ,data_row>,std::map<unsigned short,data_row,std::less<unsigned short>,std::allocator<data_row> >::_Kfn,std::le
ss<unsigned short>,std::allocator<data_row> >::iterator>' : identifier was truncated to '255' characters in the debug information
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.h(220) : warning C4786: 'std::pair<std::_Tree<unsigned short,std::pair<unsigned short const ,data_row>,std::map<unsigned short,data_row,std::less<unsigned short>,std::allocator
<data_row> >::_Kfn,std::less<unsigned short>,std::allocator<data_row> >::const_iterator,std::_Tree<unsigned short,std::pair<unsigned short const ,data_row>,std::map<unsigned short,data_row,std::less<unsigned short>,std::allocator<data_row> >::_Kfn,s
td::less<unsigned short>,std::allocator<data_row> >::const_iterator>' : identifier was truncated to '255' characters in the debug information
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.cpp(11) : warning C4005: 'UNASSIGNED' : macro redefinition
        c:\documents and settings\inverno\desktop\merv plugins\src\host.h(26) : see previous definition of 'UNASSIGNED'
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.cpp(256) : error C2065: 'EVENT_BannerChanged' : undeclared identifier
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.cpp(256) : error C2051: case expression not constant
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.cpp(1029) : warning C4786: 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocat
or<char> > const ,data_row>,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,data_row,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::_Kfn,std::less<std::basic
_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<data_row> >::iterator' : identifier was truncated to '255' characters in the debug information
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.cpp(1315) : error C2374: 'i' : redefinition; multiple initialization
        c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.cpp(1254) : see declaration of 'i'
Error executing cl.exe.

jackpot.dll - 3 error(s), 16 warning(s)


I was using MSVC++ and I tried it with Dev-C++. I used the source included in that link you stated above to compile.
SamHughes - Fri Apr 22, 2005 11:02 pm
Post subject:
You only had three errors, and all were fixable.

Code: Show/Hide
c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.cpp(256) : error C2065: 'EVENT_BannerChanged' : undeclared identifier


I used build 45. Maybe build 46 removed this event type. Or maybe you're using an earlier build of the core. You could just delete that case and the associated section anyway. For it doesn't do anything; I kept it and others in the source in case I wanted to modify later.

Code: Show/Hide

c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.cpp(256) : error C2051: case expression not constant


This is the same error.

Code: Show/Hide
plugins\src\jackpot\spawn.cpp(1315) : error C2374: 'i' : redefinition; multiple initialization
        c:\documents and settings\inverno\desktop\merv plugins\src\jackpot\spawn.cpp(1254) : see declaration of 'i'


Your compiler is broken.
Cyan~Fire - Sat Apr 23, 2005 10:07 am
Post subject:
No, EVENT_BannerChanged is new. You're using an old tutorial.zip.

Also, your compiler isn't broken, it's old. You're probably using MSVC++6, which doesn't conform to the C++ standard about variables declared in loops. Just make one declaration of int i at the top of the function and remove all the declarations (not the definitions!) in the for loops.

Also, all those long debug string names. Yeah, that's one of the reasons I hate STL. You need like 10 template classes to do anything any more complex than std::string.
Purge - Sat Apr 23, 2005 10:28 am
Post subject:
As for the old tutorial.zip, I downloaded that the same day as I compiled, yesterday. Yes, I'm using MSVC++ and I'll try declaring int i...which only goes on line 1254 in spawn.cpp as it says, correct? Also, I'll try and remove EVENT_BannerChanged and the other error to see if it'll work.

Thanks.
Purge - Sun Apr 24, 2005 11:33 am
Post subject:
Works now. All it needed was the src of the new core, 46.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group