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

    • he kept his promise! i think it's a good idea to unban his old account. he shares files with the community and could help both new and veteran l2off users! good job, Guytis!
    • the only thing you know how to do is to change drawings inside a lineage2 client and you decide to talk about the IQ of others? hahahaha
    • Web: https://cheatcenter.net/ Counter Strike 2 Nixware Hack With the Nixware cheat, you have powerful software in your hands for exciting battles in Counter-Strike 2! The perfect set of features for Rage and Semi-Rage games will provide you with confidence on the battlefield. Use antiaim to avoid being hit. Customize the world for yourself by adjusting the colors and the sky. Shoot through the walls and use other unique opportunities to defeat your rivals and become the leader of the team! Product Description LEGITBOT FOV Hitboxes Head Neck Chest Stomach Pelvis Smooth Shot delay Kill delay Lock target Lock mouse Draw FOV Disable when Smoke Flash Jump RAGEBOT Aimbot FOV changer Hitscan Head Neck Chest Stomach Pelvis HeadBody point scale Minimal damage Hitchance Force shoot PSilent Antiaim Autoscope Autostop (between shots) Bunnyhop Auto strafer with smooth adjustment Accurate walk ESP Box Glow Skeleton Footsteps Name Weapon name Health Health bar Ammo Chams Ragdoll chams Offscreen ESP Box Minimal and maximum radius customization Minimal and maximum size customization WORLD Bomb esp Timer Damage Name Weapons Icon Name Glow Grenades Color Trajectory Timer Grenade proximity warning SKINS Gloves Seed Paint kit Wear Knifes Seed Paint kit Wear Weapons Seed Paint kit Wear MISC View Model Editor View Model Chams Hand chams Glove chams Sleeve chams Weapon chams Auto Accept Show player money Spectator list World modulation (world, clouds, sky, sun) Spread circle TaserKnife range Hit markerHit effect Aspect ratio Third person REMOVALS Flash Smoke Visual recoil Scope borders Zoom Sniper crosshair check Team intro First person legs Model occlusion Shadows Fog Decals Particles Water effect Lightning  
    • Web: https://cheatcenter.net/ Counter Strike 2 Xone Hack Looking for a legit cheat for Counter-Strike 2? Xone is your perfect choice! Our product provides unsurpassed features that allow you to play legit and at the same time have an advantage over other players. Discover a new level of gaming efficiency with Xone! Product Description AIM Draw fov Draw target Only enemy Only visible Status Smooth Fov Hitbox Compensation Standalone Target switch Trigger Use aimbot Sticky mode Recoil compensation Delay Custom setting for all VISUAL Enable Box Skeleton Head Loot Health Weapon Name Defuser Bomb Visible check MISK Radar Only enemy Color Enemy/Team Scale Size Keybind Spectator list Bomb info  
  • Topics

×
×
  • Create New...