Server Help

LVZ/LVL Questions - objon limits

RAYfighter - Sat Apr 23, 2005 11:33 am
Post subject: objon limits
Hi there,

(I tried to search down the forum for this question, but didnt find an answer)
Can I objon more than 1 objects in 1 command, aka *objon 1200,1201,1202 etc? And if so, what's the syntax and limits?

I want to use it for typing on the player's screen using letters images. The text should be 1liner, 50 chars long, updated regularly 1-2 times per hour. (on map object) How this could be done most effectively in the code?

thanks in advance
CypherJF - Sat Apr 23, 2005 1:07 pm
Post subject:
I'd imagine whatever the max length of a normal packet is; something around 512 bytes? Minus a header, so you should be safe with like a length of 480 bytes.. 'cept ya. That's my guess. :/
Maverick - Sat Apr 23, 2005 1:52 pm
Post subject:
http://wiki.minegoboom.com/index.php/Subgame wrote:
New command: *objset +/-<object id>,+/-<object id>,... - sets state of listed
map/screen objects. +<object id> shows object and -<object id> hides it. For
example "*objset +1,-20,+13" shows objects 1 and 13 and hides object 20.
Command is meant to replace *objon and *objoff commands and it can be sent
to player privately or to whole arena. Command is meant for humans to use, for
bots there is special packet for toggling objects states which is much more
efficient. See BuildLevel documentation for more info about the objects.
[Continuum 0.38+]

Muskrat - Sat Apr 23, 2005 2:03 pm
Post subject:
You should make a stock ticker while you're at it. tongue.gif Try to find out about moving the lvz with a bot, I can't seem to find too good of an explanation of it.
Maverick - Sat Apr 23, 2005 2:10 pm
Post subject:
Mervbot already has that:

void clear_objects(); ==> Clears all objects set
void object_target(Player *p); ==> Set target of toggle_objects()
void toggle_objects(); ==> Toggle all objects set with queue_enable and queue_disable. This works with packets, not with *objset.
void queue_enable(int id); ==> Set a certain object into queue to be toggled on
void queue_disable(int id); ==> Set a certain object into queue to be toggled off
Cyan~Fire - Sat Apr 23, 2005 2:12 pm
Post subject:
Did he say MERVBot?
Maverick - Sat Apr 23, 2005 2:13 pm
Post subject:
Cyan~Fire wrote:
Did he say MERVBot?
Did he say he didn't?
Muskrat - Sat Apr 23, 2005 2:26 pm
Post subject:
Yes, Mervbot.
And when I said moving objects I meant just that.
from clientprot.h
Code: Show/Hide

// Continuum object modification
// c2s (Object modify) 0a <pid(2)> <subtype=36(1)> <array of modifiers>

enum _ObjectLayers
{
   LAYER_BelowAll,
   LAYER_AfterBackground,
   LAYER_AfterTiles,
   LAYER_AfterWeapons,
   LAYER_AfterShips,
   LAYER_AfterGauges,
   LAYER_AfterChat,
   LAYER_TopMost,
};

enum _ObjectModes
{
   MODE_ShowAlways,
   MODE_EnterZone,
   MODE_EnterArena,
   MODE_Kill,
   MODE_Death,
   MODE_ServerControlled,
};

typedef struct   /* 11 by */
{
   BYTE  change_xy    :  1;  // what properties to change for this object
   BYTE  change_image :  1;
   BYTE  change_layer :  1;
   BYTE  change_time  :  1;
   BYTE  change_mode  :  1;
   BYTE  reserved     :  3;

   WORD  mapobj       :  1;
   WORD  id           : 15;
   WORD  x, y;  // for screen objects, upper 12 bits are value, lower 4 are relative to what corner
   BYTE  image;
   BYTE  layer;
   WORD  time         : 12;  // 1/10th seconds
   WORD  mode         :  4;  // 0=AlwaysOn 5=ServerControlled
} lvzObject;

D1st0rt - Sat Apr 23, 2005 7:03 pm
Post subject:
ASSS has a command, ?moveobject that can move lvzs around biggrin.gif
Muskrat - Sat Apr 23, 2005 10:53 pm
Post subject:
Duh. I wanna know how to do it with Mervbot.
Maverick - Sun Apr 24, 2005 8:05 am
Post subject:
Muskrat wrote:
Duh. I wanna know how to do it with Mervbot.

But that means the bot (mervbot in this case) should
1) download the lvz from the server
2) open the lvz
3) change values (moving the lvz)
4) saving lvz
5) uploading lvz
6) optional: recycling arena for all players to take effect
?

Or am I missing something here icon_confused.gif
Smong - Sun Apr 24, 2005 8:55 am
Post subject:
I think the max length for a chat message is approximately 240 characters.
Mr Ekted - Sun Apr 24, 2005 10:03 am
Post subject:
PowerBot handles the above mentioned object interface, but I only allow changing of x/y (not any of the other properties). The interface is too stupid to burden the bot coder with. I figure in extreme cases where you want to change the layer/mode/time of an object, you can just have multiple objects and turn them on/off normally. I suggest the PowerBot kind of interface for MERV:

Code: Show/Hide
typedef struct Obj_
   {
   BYTE  map_obj;                      // non-zero if object is a map object (not screen object)
   WORD  id;                           // object's id from LVZ file (object must exist)
   BYTE  xrel;                         // what is Obj.x relative to (screen objects only)
   BYTE  yrel;                         // what is Obj.y relative to (screen objects only)
   short x;                            // object's new x position
   short y;                            // object's new y position
   } Obj;

void (*MoveObjects) (Player *pp, Obj *obj, int obj_count);

Cerium - Sun Apr 24, 2005 2:54 pm
Post subject:
Whats the object count for?

And out of curiosity, why dont you specify that the map_obj value only be the high bit in the id?
Mr Ekted - Sun Apr 24, 2005 4:09 pm
Post subject:
Quote:
Whats the object count for?


So you can pass an Obj array.

Quote:
And out of curiosity, why dont you specify that the map_obj value only be the high bit in the id?


Because I don't like to expose bit-stuff to the bot coder. They should not have to care how the packet is organized. It's much easier from the code point of view--in most cases--to have them be separate values.
Anonymous - Sun Apr 24, 2005 4:57 pm
Post subject:
I think this topic should get split. The original poster most likely intended to use a macro. Why did some people turn it into a moving lvz and bot thread?
D1st0rt - Sun Apr 24, 2005 5:05 pm
Post subject:
Because it's far more interesting biggrin.gif
Muskrat - Sun Apr 24, 2005 5:20 pm
Post subject:
And I suggested that he use that method for his plugin, if he can find out about it.
Smong - Mon Apr 25, 2005 6:12 pm
Post subject:
-whack- this is lvz forum, he never mentioned a bot or a plugin.
Muskrat - Mon Apr 25, 2005 11:50 pm
Post subject:
Well I dont think hes going to be writing text on screen with lvz using *objset. :\ To write text he's going to need some sort of bot or module. Otherwise he'd just make 1 lvz of all the text.
Muskrat - Fri May 13, 2005 10:05 pm
Post subject:
I've tried to emulate most of the AS3 object modifying commands, haven't added changing to screenobjects yet.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group