Server Help

Bot Questions - Woooo Doors.

ExplodyThingy - Mon Feb 17, 2003 7:03 pm
Post subject: Woooo Doors.
How can you use MERVBot to open the doors.
For example:
case EVENT_FlagDrop:
openDoor(5);
this way when a player drops a flag, the door number '5' is toggled. What server settings and bot code do i need to do this?
Dr Brain - Mon Feb 17, 2003 9:33 pm
Post subject:
parse out the number from ?get door:doormode then and then OR the number with 2^5 and ?set door:doormode newnumber
ExplodyThingy - Mon Feb 17, 2003 11:46 pm
Post subject:
eh? cant i just seee the source to raceref, wherever that may be hiding?
Dr Brain - Tue Feb 18, 2003 9:17 am
Post subject:
I will bet that is what it does.
Anonymous - Tue Feb 18, 2003 2:18 pm
Post subject:
there are eight dofferemt doors(one for each tile).
there are 256 possiblities for open / closed combinations.

if you type ?set door:doormode:0 it will open all the doors
0 as an ascii byte is 0000000 (all 0's = all open)

if you type ?set door:doormode:255 it will close all the doors
255 as an ascii byte is 11111111 (all 1's = all open)

now say you want just door 5 closed.
you want ascii byte 00001000 (all 0's execpt the fifth bit)

00001000 in decimal is 8.
so if you type ?set door:doormode:8 it will open all doors except door 5.

if you want only doors 1,2,5,8 open and the rest closed you are looking at ascii byte 10010011 = (decimal) 128 + 16 + 2 + 1 = (decimal) 147.
so you would type ?set door:doormode:147 to get this combination.
Dr Brain - Tue Feb 18, 2003 4:44 pm
Post subject:
These functions should return the new value to ?set when you input the proper door to open (doorNum) and the old door setting (oldDoor).

public int CalcOpenDoor(int doorNum, int oldDoor)
{
return oldDoor | (2 ^ (doorNum-1));
}

public int CalcCloseDoor(int doorNum, int oldDoor)
{
return oldDoor | (255 - (2 ^ (doorNum-1)));
}
ExplodyThingy - Tue Feb 18, 2003 11:04 pm
Post subject:
Vampz made that nice and clear, and uniquely enough, the in question i was trying to control was 5, so less math for me.
Dr Brain - Tue Feb 18, 2003 11:32 pm
Post subject:
Yes, but with my function the other doors are unaffected icon_smile.gif.
mister_manners - Wed Feb 19, 2003 12:57 pm
Post subject:
if u onlee want a cup of doors open, then make the bot say it, i can program a cuple like,
!closedoor1-10, if thats wat ur lookin 4.
Anonymous - Wed Feb 19, 2003 1:43 pm
Post subject:
but i kinda screwed up saying
00001000 was door number 5 when it's actually door number 4 :-O

for door number 5 you need 0010000 or ?set door:doormode:16
mister_manners - Wed Feb 19, 2003 4:06 pm
Post subject:
can u do ?set door mode watever , like a lot without crashing people??
ExplodyThingy - Wed Feb 19, 2003 5:12 pm
Post subject:
probably if you dont macro spam it.
Mine GO BOOM - Wed Feb 19, 2003 6:56 pm
Post subject:
Everytime you do a ?door, it sends the settings packet to everyone, which is about 1.5k if i remember correctly. Somewhere around that. So doing it every second easily sucks up a good bit of people's bandwidth on a 56k connection. Doing it every 10 secs should be ok unless your a super zone.
ExplodyThingy - Thu Feb 20, 2003 1:30 am
Post subject:
Posts: 321 gj.

Is it just me or does MGB always have an answer?
mister_manners - Thu Feb 20, 2003 11:23 am
Post subject:
i dont know, but his avatar SUCKS.change it back! grav_flamethrower.gif grav_furious.gif
Mine GO BOOM - Thu Feb 20, 2003 3:35 pm
Post subject:
ExplodyThingy wrote:
Is it just me or does MGB always have an answer?


Its maybe because i spent about five years working with the server. I figured out almost every packet sent to/from subspace alone (hey, was bored in my high school math class, i printed out packet logs). I talk with people who actually made a subspace clone. I know how computers work. I understand how weird bugs happen from code that wasn't designed for what it is used for. Simple, i've done this for too long.

EDIT: Don't forget the ~4,000 posts i made on my old board.
Anonymous - Thu Feb 20, 2003 11:56 pm
Post subject:
so what's the answer to that soccerball friction thing again mine?
Mine GO BOOM - Fri Feb 21, 2003 8:18 am
Post subject:
Mine GO BOOM wrote:
almost


Don't know everything :)
mister_manners - Fri Feb 21, 2003 10:26 am
Post subject:
i am trying to learn everything in the client alone, then the server :/ its taken me abou... 3 1\2 years.i would say i know about 95% of the stuff. prette much nothing of the server. (bots dont count : ))
Dr Brain - Fri Feb 21, 2003 12:38 pm
Post subject:
So, what do you know about the client?
Mine GO BOOM - Fri Feb 21, 2003 2:31 pm
Post subject:
If you know about 95% of the client information, such as things like speed is in pixels per 10 seconds, post it. I'll pop it into an FAQ for people to marvel at the physic formulas.
Anonymous - Fri Feb 21, 2003 10:50 pm
Post subject:
so far in my research on the friction topic I have found:

on friction setting 1:

when the ball is going less than speed 1000, the acceleration on the ball is -10p/s^2

when the ball is going between 1000 and 2000 the acceleration on the ball is -20p/s^2

then the ball is going between 2000 and 3000 the accleration on the ball is AROUND -35p/s^2

how the hell did prittk emulate this subspace behavior with continuum?
tec27 - Sat Feb 22, 2003 12:32 am
Post subject:
I was trying to use the ?set door:doormode: thing in order to incorporate it into a mervbot plugin, however, I couldn't get it to work. When I set the doormode to the number whic should have closed the door, it didn't work. I'm not sure if there are any other settings which could effect it, but I would really like to figure out what is wrong.
reel bad - Sat Feb 22, 2003 12:33 am
Post subject:
VampZ wrote:
how the hell did prittk emulate this subspace behavior with continuum?


icon_lol.gif
Nikon F5 - Sat Feb 22, 2003 8:15 am
Post subject:
try ?set door:doormode=XXX new_kodomagnam.gif
tec27 - Sat Feb 22, 2003 4:26 pm
Post subject:
I haven't tried it yet, but it should work exactly the same as ?set door:doormode:XXX.But the problem also may be that I'm setting the wrong door to close.It is the first vertical door in my tileset(going from left to right) which I thought would be door number 1.However when I set the doormode to 128, it doesn't close.
ExplodyThingy - Sat Feb 22, 2003 7:03 pm
Post subject:
Lemme ask the standard: Is the bot high enough in staf to do that, or is the command disabled in yer zone?
tec27 - Sat Feb 22, 2003 7:17 pm
Post subject:
my bot has sysop, and I haven't disabled any commands that I know of. I was playing around with it more, but still no luck. Are there any settings which would keep it from working corectly?
Anonymous - Mon Feb 24, 2003 11:59 am
Post subject:
Also, is it possible to completely control one door, as in, hold it shut, without ?door flooding everyone, and without locking the others?

Is saw brain's or whoever posted after my first, but will that be able to lock the door and hold it shut untill i touch it again?
Dr Brain - Mon Feb 24, 2003 12:25 pm
Post subject:
Yes, it will only open/shut the one you ask it to, the others will remain untouched (as you last left them).

About flooding, sorry, no such luck.
Anonymous - Mon Feb 24, 2003 2:42 pm
Post subject:
the lag from opening and closing doors really is minute. i have a hockey bot that does face offs and uses doors a lot and i haven't, nor has anyone else who has tested it, mentioned any lag.
ExplodyThingy - Tue Feb 25, 2003 4:28 pm
Post subject:
Lemme ask clearer:
I want door 8 to be shut, and stay shut, unless my bot tells it to open. And when its open, it stays open, unless my bot says close.
And throgh that door 8 crap i want doors 1-7 to maintain randomly opening and closing. door 8 will not open or close due to this randomness.
Mine GO BOOM - Tue Feb 25, 2003 5:13 pm
Post subject:
Then you will need to have the bot to store if it should have door 8 open or not, and then randomly create a doormode between 0 and 255, set door 8 as always open/close in the randomly created door mode, and send it as a ?set door:doormode:#. You cannot have a certain door be open/closed constantly while others being random.

I do not recommend the above way, since it does resend the 1.5k settings packet everytime you do it, to every person in the arena.
reel bad - Tue Feb 25, 2003 5:49 pm
Post subject:
hopefully there will be a better doormode in future servers icon_biggrin.gif
ExplodyThingy - Tue Feb 25, 2003 9:43 pm
Post subject:
Youre bumming me out, MGB. but anywho, gracias.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group