NPC Stealth

Discussions on various DOL development features

Moderator: Support Team

NPC Stealth

Postby Dinberg » Fri Sep 18, 2009 10:56 am

It seems that NPC stealth packet does not produce the dark-grey transparent stealth form on npcs. I'm on either 1.95 or 1.98, but the mob doesn't appear shadowy.

Has anyone else used this flag before? I'm guessing somewhere it might not be correctly sent. Anyone know of a cure?
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: NPC Stealth

Postby Graveen » Fri Sep 18, 2009 11:10 am

/summon Dunn !!
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: NPC Stealth

Postby Roozzz » Fri Sep 18, 2009 11:26 am

Not working and never seen it working.

And we need a packet guy indeed ;)
Quidquid latine dictum sit, altum videtur
Roozzz
Database Team
 
Posts: 1943
Joined: Wed Dec 06, 2006 11:00 am

Re: NPC Stealth

Postby Graveen » Fri Sep 18, 2009 11:28 am

Dunnerholl is our packet guy ! YAY !
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: NPC Stealth

Postby Dunnerholl » Fri Sep 18, 2009 4:24 pm

i think there was some flagchange. can u post the packet that should have the flag set?
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: NPC Stealth

Postby Kakuri » Fri Sep 18, 2009 4:29 pm

This hasn't worked in DOL for a long time - I first tried almost a year ago and have never got it to work, so I don't believe it's related to recent clients.
User avatar
Kakuri
Developer
 
Posts: 803
Joined: Tue Oct 28, 2008 10:40 pm
Website: http://enlight.hostrator.com/

Re: NPC Stealth

Postby Dinberg » Sat Sep 19, 2009 4:12 pm

Hmm it be sent incorrectly somewhere. What mobs do you know of that stealth?
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: NPC Stealth

Postby Tolakram » Sat Sep 19, 2009 6:06 pm

Urchin ambusher (I think that's the name) in Alb SI.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: NPC Stealth

Postby Kakuri » Sat Sep 19, 2009 6:46 pm

Trall the Trickster in Laby looks stealthed.
User avatar
Kakuri
Developer
 
Posts: 803
Joined: Tue Oct 28, 2008 10:40 pm
Website: http://enlight.hostrator.com/

Re: NPC Stealth

Postby Dunnerholl » Sat Sep 19, 2009 8:44 pm

will u post how u try it finally?

i think u need to send a 0x4c visual update with mob stealth flag or the 0xda with stealthflag. did u try any of those?
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: NPC Stealth

Postby Dinberg » Sun Sep 20, 2009 11:38 am

I havn't had time to return to it as of yet. I will update you if I can
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: NPC Stealth

Postby Kakuri » Sun Sep 20, 2009 4:20 pm

PacketLib171.cs, starting at line 160:
Code: Select all
byte flags = (byte)(GameServer.ServerRules.GetLivingRealm(m_gameClient.Player, npc) << 6);
if ((npc.Flags & (uint)GameNPC.eFlags.TRANSPARENT) != 0) flags |= 0x01;
if (npc.Inventory != null) flags |= 0x02; //If mob has equipment, then only show it after the client gets the 0xBD packet
if ((npc.Flags & (uint)GameNPC.eFlags.PEACE) != 0) flags |= 0x10;
if ((npc.Flags & (uint)GameNPC.eFlags.FLYING) != 0) flags |= 0x20;


pak.WriteByte(flags);
pak.WriteByte(0x20); //TODO this is the default maxstick distance

string add = "";
byte flags2 = 0x00;
IControlledBrain brain = npc.Brain as IControlledBrain;
if (m_gameClient.Version >= GameClient.eClientVersion.Version187)
{
if (brain != null)
{
flags2 |= 0x80; // have Owner
}
}
if ((npc.Flags & (uint)GameNPC.eFlags.CANTTARGET) != 0)
if (m_gameClient.Account.PrivLevel > 1) add += "-DOR"; // indicates DOR flag for GMs
else flags2 |= 0x01;
if ((npc.Flags & (uint)GameNPC.eFlags.DONTSHOWNAME) != 0)
if (m_gameClient.Account.PrivLevel > 1) add += "-NON"; // indicates NON flag for GMs
else flags2 |= 0x02;
if ((npc.Flags & (uint)GameNPC.eFlags.TRANSPARENT) != 0) flags2 |= 0x04;
if( npc.ShowQuestIndicator( m_gameClient.Player ) ) flags2 |= 0x08;
I tried "flags |= 0x4c" and "flags |= 0xda" and it did nothing. "flags2 |= 0xda" removes the NPC's name and adds a quest indicator icon over its head.

"flags2 |= 0x4c" makes the NPC stealthed! Yay! But it also adds a quest indicator, and the name remains. (Interestingly, the quest indicator is stealthed, so it's a spinning blue icon.)

So how do I make it so the NPC is just stealthed, no quest indicator?
User avatar
Kakuri
Developer
 
Posts: 803
Joined: Tue Oct 28, 2008 10:40 pm
Website: http://enlight.hostrator.com/

Re: NPC Stealth

Postby Kakuri » Sun Sep 20, 2009 4:29 pm

Well, 0x4c minus 0x08 (quest indicator) = 0x44, which works great!

Now it would be wicked to add player-like stealth for mobs so they could be completely invisible at a distance, and only become visible at very close range, also dropping stealth once they enter combat.
User avatar
Kakuri
Developer
 
Posts: 803
Joined: Tue Oct 28, 2008 10:40 pm
Website: http://enlight.hostrator.com/

Re: NPC Stealth

Postby Graveen » Sun Sep 20, 2009 4:53 pm

yay !
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: NPC Stealth

Postby Dinberg » Sun Sep 20, 2009 5:33 pm

Now it would be wicked to add player-like stealth for mobs so they could be completely invisible at a distance, and only become visible at very close range, also dropping stealth once they enter combat.
Oh no kakuri, you've got me :D

Awesome work!

Have you updated the svn to use these changes? ^^
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest