Server Help

Bot Questions - Complete- A Damn Sexy Lvz Bot

50% Packetloss - Tue Oct 14, 2003 4:33 pm
Post subject: Complete- A Damn Sexy Lvz Bot
From the LVZ/LVL forum, http://forums.minegoboom.com/viewtopic.php?t=1707
WarFan wrote:

Fri Oct 10, 2003 1:49 pm
Couple questions here.
Is it possible to make an lvz image disappear when a ship moves over it and then reappear after it has moved off the image. This would be like for roof tops on building..you would see the roof if you were not in the building, then if you entered it, the roof would disappear. Thanks

Fri Oct 10, 2003 2:06 pm
1) So manually, I would get in a building or watch people get in a building and turn the roof image off?

2) Do you know of a bot that does this or something similar?

Thanks


Akai recommened using TM Baw and redesigning it to do lvz file. I did exactly that, most of SOS's code is gone except file input. From my testing I cant find anything wrong, seems to work perfect. Recoded it with a new idea than i had on the forum, woke up one morning and pimp slapped myself for coding like a pussy. I commented almost everyline that i used and made the code simple for anyone who did merv to read, hopefully. I have attached the compiled bot and the source with it.

The Idea- Once someone moves into a specified coord area, the bot sends *objon or *objoff, depending on what you specified in the file for its starting state. After everyone is out of the area, the object goes back to its original state. Spectating and leaving work fine, and if the server crashes and the bot reconnects, that will work fine too.
Code: Show/Hide

[Obj1]
#   ^------- Up to 255 Objects, edit the bot source and you can increase to whatever you need
#Obj starts at 1 and counts up to 255

FromX1=459
FromY1=472
#^^^^^^^^---- Topleft corner of Object Area

FromX2=481
FromY2=488
#^^^^^^^^---- Bottomright corner of Object Area
ObjStart=0
#        ^---- Object starts turned on or off, 1=ON AND 0=OFF

ObjNum=1
#^^^^^^^^^---- Object Number
#This is the number of the obj found in the lvz file(.ini)


[Obj2]
FromX1=459
FromY1=544
#-----------
FromX2=481
FromY2=561
#-----------
ObjStart=1
ObjNum=240



See any problems please contact me
FiftyPacketloss@socal.rr.com

Edit:New version at bottom of page
SuSE - Tue Oct 14, 2003 4:56 pm
Post subject:
will test it out after my stupid history class
50% Packetloss - Wed Oct 15, 2003 1:43 am
Post subject:
ew, just read through the merv tutorial, guess i could have used playertags instead of having a new variable in the player stuct. o well, works the same
k0zy - Wed Oct 15, 2003 9:20 am
Post subject:
Does it use *objset ?
50% Packetloss - Wed Oct 15, 2003 10:06 am
Post subject:
nope, *objon and *objoff, havent heard of *objset, explain...?
SuSE - Wed Oct 15, 2003 2:11 pm
Post subject:
"?objset +1,+2,+3,-78,+24,-33,-12,"

that would turn on the images with object ids 1, 2, 3, and 24 - and it would turn OFF numbers 78, 33 and 12

one command line instead of typing seven different commands

it doesn't really matter, especially in this case since there isn't really a need to turn images both on AND off simultaneously
50% Packetloss - Wed Oct 15, 2003 2:46 pm
Post subject:
ew, bot doesnt support overlapping object areas, ill get on fixing that
k0zy - Wed Oct 15, 2003 3:47 pm
Post subject:
Akai wrote:
it doesn't really matter, especially in this case since there isn't really a need to turn images both on AND off simultaneously


but it might matter if 2 or more objects get switched on OR off
SuSE - Wed Oct 15, 2003 6:45 pm
Post subject:
I suppose you could use it in that instance - but would it be worth the extra coding?

eh, whatever icon_smile.gif
ExplodyThingy - Wed Oct 15, 2003 7:12 pm
Post subject:
Not really. In fact it may even be less coding. Store all the obj numbers to a string, including the +- as needed. Then simply send the string with a *objest stuck in front. This way it does not need to pick between a *objob or *objoff, especially if there is ever a need to send more than one of those, such as a switch between them. Its how i simpliefied the scoreboard for MG.
50% Packetloss - Wed Oct 15, 2003 9:08 pm
Post subject:
Akai wrote:
there isn't really a need to turn images both on AND off simultaneously

Yep, objects only turn on if your the 1st person inside the specified coords, and only turn off if your the last person out of the specified coords. Bot wont be shooting out huge lists of objon or objoff unless there are 30 obj areas and 30 players move into each of the object areas at the same time, then you would get 30 objon/objoff. If you leave a area and there are still players inside that area, no command will be sent.

Edit: linkedlist in the player struct doesnt work, have no clue why but if i try to get any info out of the linkedlist, ex- p->linkedlist.total , the data is completely wrong.
Dustpuppy - Thu Oct 16, 2003 8:27 am
Post subject:
I think your bot differs from the original request (perhaps by design)

To me it sounds like the request was that you would only see inside the building if you were inside, otherwise you would see the roof. Whereas it seems you've made it so everyone can see inside if there is someone in there.
50% Packetloss - Thu Oct 16, 2003 3:50 pm
Post subject:
dont think you can turn a object off for one person and leave it on for another. Objects are either ON or OFF, for everyone in the arena. Or i havent seen otherwise
50% Packetloss - Thu Oct 16, 2003 4:34 pm
Post subject:
almost done with one that will allow overlaping object areas. just going to test everything and make sure it is stable
should fix questions like this guy has,
http://forums.minegoboom.com/viewtopic.php?t=1730
Teckniks wrote:
ok ive worked out the lvz and the server problem in my last post, but now theres a new one....
here goes

basically i want to make ships be able to fly under tree's and behind houses etc. i have grass as my background but i have isometric tree's (IE a 3d look), but i want the ships to be able to fly behind the tree's if that made any sense. all i need is to know how (if you can) to make see thru tiles? ive tried using pure black as a back ground but it doesnt seem to work, any ideas?

ok, um lol? i fixed this too!! - bfore i had time to post this question!! - i have included a *VERY* early screenshot of my zone to demonstrate what i was trying to do for anyone whos interested - See the red thing behind the tree? thats me

EDIT: Corrupt attachments files removed, wasting space -MGB

he could switch between 2 images, one of the tree, and once behind it, a tree that was faded and transparent
Smong - Thu Oct 16, 2003 4:35 pm
Post subject:
You need to send *objset privately to do it individually. If someone helps me out with my ASSS module it will have this functionality (see my plea in Custom Code).
50% Packetloss - Thu Oct 16, 2003 4:46 pm
Post subject:
ok, sounds fair, ill see what i can do. let me make sure i get this right, i can just PM a player with
ex- /*objset +5, or /*objset -5,

and a comma has to be placed at the end? would /*objon 5 or /*objoff 5, work also with Priv messages?
Smong - Thu Oct 16, 2003 5:03 pm
Post subject:
most likely, yes
50% Packetloss - Thu Oct 16, 2003 6:22 pm
Post subject:
thx for the help smong, added that to the bot so that you can specify if you want an object to be sent privatly or not.
50% Packetloss - Thu Oct 16, 2003 9:34 pm
Post subject: New Version Complete
Bot now supports overlaping coords, so that a player could be in multiple areas at once. You can use this for switching between 2 objects, like above, a player moves behind a tree, the tree becomes transparent. Also included the stallion smong's comment, you can set a object to be turned on privatly to a player, /*objon 1, so that the example at the top can be done now.

Code: Show/Hide
#objects.ini examples
[Obj1]
#   ^------- Up to 255 Objects, can be increased by editing bot source

FromX1=459
FromY1=472
#^^^^^^^^---- Topleft corner, for object to be switched on/off

FromX2=481
FromY2=488
#^^^^^^^^---- Bottomright corner, for object to be switched on/off

ObjStart=1
#        ^---- Object starts turned on or off, 1=ON AND 0=OFF
SentPrivate=0
#           ^----- Object is sent privatly to a player if set to 1, 1=ON AND 0=OFF
ObjNum=1
#^^^^^^^^^---- Object Number (found in the lvz's .ini file)

[Obj2]
FromX1=459
FromY1=472
#-----------
FromX2=481
FromY2=488
#-----------
ObjStart=0
SentPrivate=0
ObjNum=2

[Obj3]
FromX1=459
FromY1=544
#-----------
FromX2=481
FromY2=561
#-----------
ObjStart=0
SentPrivate=1
ObjNum=3




Have included compiled dll and the source code in the zip file. I appreciate everyone's comments, they really do help a great deal.
SuSE - Thu Oct 16, 2003 10:12 pm
Post subject:
cool icon_smile.gif I really will try to test it sometime
WarFan - Sat Oct 18, 2003 9:40 pm
Post subject:
Hey 50,

Just got back from a trip and see you have the bot finished..sweet! My first run, I had troubles getting it to work but Ill keep trying.Does it matter if the lvz image is in a certain layer to work ( aftertiles..ect ). Heres my objects.ini -

16x16 image in the IMAGE1 slot of the lvz, it shows on the map when you enter but doesnt seem to want to switch off when I move over it. The dll is in mervbot spawns.txt as tile ( renamed it to tile instead ofTM Baw- LVZ ). The plugin shows up as installed when I do a /!plugins to my bot.

Code: Show/Hide


[Obj1]
#   ^------- Up to 255 Objects

FromX1=8192
FromY1=8192
#^^^^^^^^---- Topleft corner, for object to be switched on/off

FromX2=8192
FromY2=8192
#^^^^^^^^---- Bottomright corner, for object to be switched on/off

ObjStart=1
#        ^---- Object starts turned on or off, 1=ON AND 0=OFF
SentPrivate=0
#           ^----- Object is sent privatly to a player if set to 1, 1=ON AND 0=OFF
ObjNum=1
#^^^^^^^^^---- Object Number (found in the lvz's .ini file)



Im sure its a simple problem on my end. Thanks for the bot, great stuff!
50% Packetloss - Sat Oct 18, 2003 10:21 pm
Post subject:
you have lvz coords in there icon_sad.gif, divide those by 16 to get the correct ones
or open SSME and get the coords that way

it uses map coords instead of lvz coords
50% Packetloss - Sat Oct 18, 2003 10:29 pm
Post subject:
Code: Show/Hide


[Obj1]
#   ^------- Up to 255 Objects

FromX1=512
FromY1=512
#this is where the image starts

FromX2=528
FromY2=528
#then add 16 to it for the bottom corner of the image

ObjStart=1
#        ^---- Object starts turned on or off, 1=ON AND 0=OFF
SentPrivate=0
#           ^----- Object is sent privatly to a player if set to 1, 1=ON AND 0=OFF
ObjNum=1
#^^^^^^^^^---- Object Number (found in the lvz's .ini file)



so here is another example
Code: Show/Hide

(0, 0)
+--------+
|        |
|        |
|        |
+--------+ (10, 10)


Then we just put in the ini:

FromX1=0
FromY1=0
#^^^^^^^^---- Topleft corner of obj area, on the map

FromX2=10
FromY2=10
#^^^^^^^^---- Bottomright corner of obj area, on the map

WarFan - Sun Oct 19, 2003 3:03 pm
Post subject:
ok, Ill give that a try icon_smile.gif
Dustpuppy - Mon Oct 20, 2003 7:15 am
Post subject:
That example looks strangely familiar...
50% Packetloss - Mon Oct 20, 2003 10:08 am
Post subject:
lol, jacked
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group