Log in

View Full Version : Illusion Packets


covou
05-16-2009, 02:14 PM
OK so i have been playing with quest::npcrace, quest::npcgender etc..

And at this point in time it seems that if the event or IF containing these changes is NOT triggered by a client, the illusion packet is not sent to any clients... Having #showstats show the correct race however the NPC Model appear to be the BaseRace...

As i am not too versed in C++ i cannot determine whether or not it is possible to have this packet sent to clients even if the event is not triggered by a client.

Due to the nature of an NPC spawning and sending a packet to clients about what race it is, i would guess that there should be someway...

If anyone can assist with this i would be greatful.

Congdar
05-16-2009, 03:35 PM
I recently ran into this too. If you are doing the npcrace, npcgender inside EVENT_SPAWN there's a queue delay in the actual popping of the npc into the zone and the execution of EVENT_SPAWN.

The source does send the spawn packets to the queue first and then run the EVENT_SPAWN but the queue must be running behind the execution of EVENT_SPAWN. This is a little ugly, but see if it works for you this way:

sub EVENT_SPAWN {
quest::settimer(1,0);
}

sub EVENT_TIMER {
if($timer == 1) {
quest::npcgender(1);
quest::npcrace(126);
quest::stoptimer(1);
}
}