Jump to content
  • 0

Prevent Npc's Heading Being Adjusted To Player's Heading.


Question

Posted (edited)

I don't know but it might client side(but i think it can be changed from server side since client shows server's values, right? :P). I was wondering, is there any way to prevent NPCs change their heading according to player's? When a player speaks to an NPC, this NPC change its face to the player so player and NPC can have their "conversation. I know that this is taking place to some templates only, but i think it can be changed from server (enlighten me).

 

EDIT: L2jserver high five.

Edited by Solomun

Recommended Posts

  • 0
Posted (edited)

MoveToPawn is the key, it makes character go to npc and when it is close, run function that turns npc around. You cannot drop that packet, because it would be impossible to come near Npcs. To fix this problem you need to dig into Engine.dll and drop  ?AdjustPawnLocation@UGameEngine@@QAEXPAVAPawn@@ABVFVector@@@Z calls.

 

egjE0iD.png

Edited by vampir
  • 0
Posted

First of all, NPC heading never changes, its just an effect only the player who target can see.

 

Its a ServerPacket, I don't really remember its name but you will find it if you look at methods onAction L2NPC and friends

  • 0
Posted

First of all, NPC heading never changes, its just an effect only the player who target can see.

 

Its a ServerPacket, I don't really remember its name but you will find it if you look at methods onAction L2NPC and friends

I have searched already there. However, since NPC heading is never changed and this happens only to specific NPCs, it can be client side, right? 

  • 0
Posted

I tried this, but it ain't working..

 

MoveToPawn.java

 

 

.

.

.

@Override
protected final void writeImpl()
{
  if (target instanceof L2Npc)
  {
   L2Npc npc = (L2Npc) target;
   if (npc.getId() == 37004) //My custom NPC id
   {

    return;
   }
  }
  writeC(0x72);
 
  writeD(_charObjId);
  writeD(_targetId);
  writeD(_distance);

.

.

.

 

 

 

In case it plays any role (i doubt it), i forget to mention that i am working on L2jserver High Five.

  • 0
Posted

My answer is the only good answer. L2J didn't have that behavior for a very long time, from IL to latest, I'm the one who reported it.

 

http://www.l2jserver.com/forum/viewtopic.php?f=90&t=23583

 

And how exactly id differs from mine? You repeated the same thing only adding the severpacket's name

  • 0
Posted

And how exactly id differs from mine? You repeated the same thing only adding the severpacket's name

 

Mate, stop the ego bullshit, I could even say "I gave the answer back in 2011, you only repeat what I say in 2011" if we go on that way.

 

Grow up, one day. I hope.

 

By "my answer is the only good answer", I meant there is no other possibility. If you feel buttfuck, that's only your problem.

  • 0
Posted (edited)

Mate, stop the ego bullshit, I could even say "I gave the answer back in 2011, you only repeat what I say in 2011" if we go on that way.

 

Grow up, one day. I hope.

 

By "my answer is the only good answer", I meant there is no other possibility. If you feel buttfuck, that's only your problem.

Huh man, dont waste time on that retard, simply ignore him, dont read his trash ...

Edited by LightFusion
  • 0
Posted

Mate, stop the ego bullshit, I could even say "I gave the answer back in 2011, you only repeat what I say in 2011" if we go on that way.

 

Grow up, one day. I hope.

 

By "my answer is the only good answer", I meant there is no other possibility. If you feel buttfuck, that's only your problem.

 

whose buttfuck me or you? I didn't said it to offend you if thats what you believe. I just said that the solution was already given but you repeated it in a way that you proposed something different whereas you could simply agree and include the serverpacket name.

 

No hard feelings whatsoever, look at the post bellow you, you now have a new girlfriend pet.

  • 0
Posted (edited)

data\scripts\handlers\actionhandlers\L2NpcAction.java

 

I have done this, but NPC is turning even if the packet is not being sent.

 

 

 

// Turn NPC to the player.
     if (npc.getId() != 37004) //NPC id i want to prevent from turning
     {
      activeChar.sendPacket(new MoveToPawn(activeChar, npc, 100));
     }

 

 

 

In case u didnt mean this Tryskell, could you explain it better, of what should i do in order to fix it?

 

EDIT:

 

On the same file (l2npcaction) some lines below, i added this IF statement:

 

 

else
      {
       if (npc.getId() != 37004)
       {
        npc.showChatWindow(activeChar);
       }
      }

 

 

 

Now, as it is natural, when i talk to the NPC it doesnt open its HTML, but in addition, it doesnt turning either...which means, i ve no idea how to continue :( Of course i checked showChatWindow method, but nothing related to position or something...

Edited by Solomun
  • 0
Posted

Verify with L2PHX if you end getting the packet or no. The rotation effect is only due to this packet call (at least up to Hi5). Maybe L2J got it in 2 different places, so if you drop it somewhere it still calls it from another location.

  • 0
Posted

The only classes that call-use MoveToPawn packet is L2NpcAction in datapack (I have tried to prevent it) and 2 times in L2AbstractAI which is (with my poor knowledge) using it in order to make the L2PcInstance player move close to npc if he targets it from range. For example i am at giran maximillian and target the gatekeeper, my char walks to the GK and then L2NpcAction is taking effect...

 

P.S: I hope i was clear...posting from phone :)

  • 0
Posted

he gave you the "only correct answer"

 

still bumping? kappa

Since my problem ain't solved why shouldn't i bump? I tried what Tryskell said, or at least what i understood from what Tryskell said but it did not work, so...

Guest
This topic is now closed to further replies.


  • Posts

    • IMPORTANT INFO: In a few days, I will switch to completely new code, written from scratch with a new download system, patch building and management system. The Updater will become true 2026 code with "foolproof systems". I'm going to create a Discord server for customers to request new ideas and features. FIRST CUSTOMERS ARE ALREADY USING THE NEW UPDATER ON LIVE SERVERS! Watch this topic for upcoming info because the new updater is around the corner! Yes, you can still use self-update on the previous updater! No, the new updater won't be compatible with the old patch system! A new build is required, but players who already have game files won't have to download the entire patch again! New templates and updates to existing templates are coming soon! Sneak peek:  
    • i used guytis IL project and source. i found in his project there are 3 Client version source... 1,CliExt_H5   --->this one cant be compiled in VS2005,i did know why..is it for H5 client? 2,CliExtNew  --->this one is IL version ,but when i compiled it and use it.player cant login game,MD5Checksum wrong.i check the source code,but not found any hints. 3,L2Server    --->this one for HB client?im not sure...   so my question is what are the differences between these three versions of cliext.dll?how can i fix the issue of the MD5Checksum not matching problem?   01/29/2026 21:04:11.366, [CCliExt::HandleCheckSum] Invalid Checksum[1130415144] vs [-721420287] packet[dd] len[29] sum[2698] key[30] HWID[] Account[]! 01/29/2026 21:04:11.366, SocketLimiter::UserSocketBadunknownprotocol 11111111111 01/29/2026 21:04:11.366, [usersocket]unknown protocol from ip[113.137.149.115]!      
    • ## [1.4.1] - 2026-01-29   ### ✨ New Features - **Short Description**: Server owners can add a short tagline (up to 240 characters) on the server info page, under the "Online" status. It appears in the server list (By Votes) for VIP, Gold VIP, and Pinned servers so players see a brief summary at a glance.   ### 🔄 Improvements - **Server Info Page**: Description field is limited to 3000 characters with a character counter; the textarea is vertically resizable. A second **Save Changes** button was added at the bottom (after the description) for easier saving. - **Server Name**: In My Servers → Edit, the server name is read-only and can no longer be changed (avoids accidental changes and naming conflicts). - **Server Rows (By Votes)**: Short descriptions wrap correctly and no longer affect row height; long text is clipped to two lines so the list stays tidy and consistent.   ---
    • @Celestine  sorry for mu question , and post it's to old but i want to ask  ?   do you have uncrypted interface x dat of this interface? i want to add custom autofarm button but when i open it with xdat say file seems  to be  encrypted. thanks!
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..