Author |
Message |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Thu Jun 02, 2005 5:28 pm Post subject: |
 |
|
|
|
What method are you using?
queue_enable(id);
toggle_objects(); |
Works for me, make sure your max objects is high enough for it.
Or even this works.
objectInfo oi;
oi.id = objid;
oi.disabled = 0;
tell(makeToggleObjects(UNASSIGNED,(Uint16 *)&oi,1));
|
|
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Thu Jun 02, 2005 8:56 pm Post subject: |
 |
|
|
|
objoff(Maverick); |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Thu Jun 02, 2005 9:17 pm Post subject: |
 |
|
|
|
LvzObject SoloAce;
SoloAce.change_layer = 1;
Soloace.Layer = LAYER_BelowAll; |
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Thu Jun 02, 2005 9:20 pm Post subject: |
 |
|
|
|
Wow you really suck at this, where does the "Soloace" come from? |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Thu Jun 02, 2005 9:24 pm Post subject: |
 |
|
|
|
From my shift key sucking, I was going to edit it but you beat me |
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Thu Jun 02, 2005 9:24 pm Post subject: |
 |
|
|
|
I knew you were gonna try to, haha, easy.  |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Thu Jun 02, 2005 10:28 pm Post subject: |
 |
|
|
|
Comon guys, Solo, please stop spaming the forums with useless chit-chat that doesn't have anything to do w/ solving the issue presented. I have put up w/o saying anything over the past couple days but it's becoming very irritating and I'd appreciate it if you'd only post messages that would help aid in a solution. I mean I know this is all in the name of fun and whatnot but it's getting old. _________________ Performance is often the art of cheating carefully. - James Gosling |
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Fri Jun 03, 2005 2:41 am Post subject: |
 |
|
|
|
how odd.. Yes i'm using the correct methods "queue_enable()" and "toggle_objects()".
The queue_enable methods are used inside a for loop, the chat output tells me that that is working ok.
I will try this evening in a clean plugin again. Might it be caused by me using an older tutorial plugin? |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Fri Jun 03, 2005 2:44 am Post subject: |
 |
|
|
|
Care to post your code? |
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Fri Jun 03, 2005 2:55 am Post subject: |
 |
|
|
|
Sure, I will do this evening because I'm at work right now. |
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Fri Jun 03, 2005 4:26 am Post subject: |
 |
|
|
|
You could've said it earlier, Cypher.
I don't think you should let anything happening here get to you; But if it's really so irritating for you I'll just take it easy with the nonsense, and FOCUS ON THE REAL BUSINESS.
Couldn't you just do sendPublic("*objon ..."); ? Guess not. |
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Fri Jun 03, 2005 4:36 am Post subject: |
 |
|
|
|
Seems like you don't know the difference, Solo Ace. |
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Fri Jun 03, 2005 4:52 am Post subject: |
 |
|
|
|
I'm sure I knew it when I was trying to figure out how it worked, "Maverick".
I can think of a bunch of things it would do, but whatever, my question wasn't serious as you could see. |
|
Back to top |
|
 |
D1st0rt Miss Directed Wannabe

Age:37 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Fri Jun 03, 2005 1:05 pm Post subject: |
 |
|
|
|
I tried using the object packets a while ago in a plugin, and I used the proper syntax, but it didn't seem to work. I ended up just making a macro for objons and objoffs  _________________
 |
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Fri Jun 03, 2005 3:10 pm Post subject: |
 |
|
|
|
You should really be using the binary packet for this. Sending so much text is a waste of bandwidth. _________________ 4,691 irradiated haggis!
Last edited by Mr Ekted on Fri Jun 03, 2005 4:40 pm, edited 1 time in total |
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Fri Jun 03, 2005 3:51 pm Post subject: |
 |
|
|
|
Doesn't Mervbot do that with the toggle_objects(); methods? |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Fri Jun 03, 2005 4:52 pm Post subject: |
 |
|
|
|
Mav, make sure your MAX_OBJECTS in spawn.h is higher than 16, it was 1 on old plugin versions because Ctm .37 only allowed toggling 1 object at a time. You are trying to toggle up to 16 at once. |
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Fri Jun 03, 2005 5:12 pm Post subject: |
 |
|
|
|
Raised it to 255, still same problem.
Also, max lvz number doesn't explain how it disables object numbers 19917. Seems like a bug to me.
Does someone know where the code is located that actually does tell(makeToggleObjects()) ?
BTW. Have the same problem in another, similar plugin. |
|
Back to top |
|
 |
Purge Episode I > Eposide III Jar-Jar is kool

Age:35 Gender: Joined: Sep 08 2004 Posts: 2019 Offline
|
Posted: Fri Jun 03, 2005 5:38 pm Post subject: |
 |
|
|
|
Try and look in clientprot.h. |
|
Back to top |
|
 |
Muskrat Server Help Squatter

Age:38 Joined: Aug 24 2004 Posts: 829 Location: Swamp Offline
|
Posted: Fri Jun 03, 2005 5:49 pm Post subject: |
 |
|
|
|
clientMessage *generateObjectToggle (Uint16 player, objectInfo *objects, Uint16 num_objects)
{ clientMessage *ret = new clientMessage(4 + 2 * num_objects);
if (ret == NULL) return NULL;
char *msg = ret->msg;
/* Field Length Description
0 1 Type byte: 0x0a
1 2 Player ident (-1 = all players)
3 1 LVZ type byte: 0x35
The following are repeated until the end of the message
4 2 LVZ bitfield
*/
msg[0] = 0x0a;
*(Uint16*)&msg[1] = player;
msg[3] = 0x35;
memcpy(msg + 4, objects, 2 * num_objects);
return ret;
} |
also
void botInfo::toggle_objects()
{
Player *p = object_dest;
if (!p) tell(makeToggleObjects(UNASSIGNED, (Uint16 *)object_array, num_objects));
else tell(makeToggleObjects(p->ident, (Uint16 *)object_array, num_objects));
num_objects = 0;
}
void botInfo::queue_enable(int id)
{
if (num_objects == MAX_OBJECTS)
toggle_objects();
object_array[num_objects].id = id;
object_array[num_objects].disabled = false;
++num_objects;
} |
If its going to send the same amount of object queues each time, I'd suggest making MAX_OBJECTS that number, then you wont even need the toggle_objects() in yours. |
|
Back to top |
|
 |
Underlord Novice
Gender: Joined: Feb 17 2004 Posts: 55 Offline
|
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Sat Jun 04, 2005 10:49 am Post subject: |
 |
|
|
|
Woo Got the problem solved.
Seems like I was using older tutorial code as a base - especially spawn.h. I replaced all code with the newest from the tutorial bot from catid.ssihosting.com and it works now
Thanks alot for helping me, guys  |
|
Back to top |
|
 |
|