Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
MGB: LVZ object packets

 
Post new topic   Reply to topic Printable version
 View previous topic  Macros Post :: Post ipblock.txt doesn't work  View next topic  
Author Message
SOS
Server Help Squatter


Joined: Dec 02 2002
Posts: 329
Offline

PostPosted: Thu Jan 16, 2003 11:24 am    Post subject: MGB: LVZ object packets Reply to topic Reply with quote

What are the LVZ object C2S packets? (off/on, move, set, etc)
_________________
3y3 4m l33t h4x0r
j0! 3y3 4m t4lking to j00!
fux0red 5cr1pt k1dd13.
-"l33t h41ku"
Back to top
View users profile Send private message Add User to Ignore List Send email
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Thu Jan 16, 2003 3:18 pm    Post subject: Reply to topic Reply with quote

Below is what it SHOULD be, just note that the client doesn't support any of them except the single on/off packet, and the server doesn't even do the last one yet. Assumes that your function gets char *Packet and int PacketSize.

Toggle Object - 0x35
Loop through the packet and reading every 2 bytes as a 16bit value. If it is negitive (if you read it as signed, else you can do this check: Val & 0x8000), then the object is turned off. Else, its turned on.

Code: Show/Hide
int i;
short id;
for (i = 1; i + 2 < PacketSize; i += 2)
{
    id = *(short*)(Packet + i);
    if (id & 0x8000)
    {
        id ^= 0x8000; //Removes the first bit
        /* Whatever you do to handle that obj #id is now turned off */
    }
    else
    {
        /* Whatever you do to handle that obj #id is now turned on */
    }
}


Receive Object - 0x36
The Move/Edit objects isn't supported anywhere except in ASSS. If you understand how the .lvz file itself works, you should notice that this is very similar. Otherwise, learn how to read a .lvz. The first byte will be the 0x36, then you just keep looping through the packet like before, just with a different width that you read in.

Code: Show/Hide
struct PacketObjectInfo {
    unsigned short mapobject : 1; //If its a map object or not
    unsigned short id : 15; //Which object
    short x; //X location it will go to
    short y; //Y location it will go to
    char imagenumber; //Which image number will effect
    char layer; //Which layer it is on
    unsigned short displaytime : 12; //Time it will be displayed, in 1/10th seconds
    unsigned short timermode : 4; //Which timer it will be used
};
Back to top
View users profile Send private message Add User to Ignore List Send email
SOS
Server Help Squatter


Joined: Dec 02 2002
Posts: 329
Offline

PostPosted: Thu Jan 16, 2003 3:26 pm    Post subject: Reply to topic Reply with quote

I thought so about moving not being in the server... but PriitK said today it is possible... humm? Or maybe he was just saying it's possible to send the packets, but they don't do anything? lol
Back to top
View users profile Send private message Add User to Ignore List Send email
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Thu Jan 16, 2003 3:38 pm    Post subject: Reply to topic Reply with quote

A sysop can send an outgoing packet to the server like that one, and the server should send it back to the clients you requested it sent to, but it screens the packets up, so even if the client supported it (doesn't), it wouldn't work.
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> General Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 35 page(s) served in previous 5 minutes.

phpBB Created this page in 0.517141 seconds : 28 queries executed (95.3%): GZIP compression disabled