Jump to content

to disable the auto attack in a duel?


Go to solution Solved by VegaS™,

Recommended Posts

  • Premium

My ideea is lazy and ugly, but its fast to do and has no performance impact.. i'm a very lazy person..

 

1. Server-side when the duel starts the server will send a command to the client that will set a variable to 1, and when it ends to 0.

2. Use the python root variable to set a binary global variable.

3. Use the global variable to return if 1 directly where the auto attack function is, so the auto attack wont work until the duel is finished.

4. Set the variable to 0 at every teleport.

  • Love 3
Link to comment
Share on other sites

On 6/24/2020 at 9:21 PM, Speachless said:

My ideea is lazy and ugly, but its fast to do and has no performance impact.. i'm a very lazy person..

 

1. Server-side when the duel starts the server will send a command to the client that will set a variable to 1, and when it ends to 0.

2. Use the python root variable to set a binary global variable.

3. Use the global variable to return if 1 directly where the auto attack function is, so the auto attack wont work until the duel is finished.

4. Set the variable to 0 at every teleport.

Hello, thank you for the clarification on the steps to be taken but more than a theoretical guide, a detailed guide would be more useful.
I await further answers.

Link to comment
Share on other sites

  • 1 month later...
  • Forum Moderator
  • Solution

I sent him the code to PM some months ago for test, he said would be nice if I post here too, so here's:

GameLib/PythonPlayerInput.cpp

Search for:

void CPythonPlayer::__SetAutoAttackTargetActorID(DWORD dwVID)
{
 	m_dwAutoAttackTargetVID = dwVID;
}

Replace it with:

This is the hidden content, please

UserInterface/InstanceBase.h

Make the function public from protected.

		static bool __FindPVPKey(DWORD dwSrcVID, DWORD dwDstVID);

UserInterface/Locale_Inc.h

#define ENABLE_BLOCK_AUTO_ATTACK_DUEL

 

 

Edited by VegaS™
  • Metin2 Dev 17
  • Think 1
  • Confused 1
  • Good 4
  • Love 6
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 60

      Inbuild GR2 Animation

    2. 2

      wait() function bug

    3. 0

      Remove Party Role Bonuses

    4. 1

      Fix CBar3D

    5. 2

      set_quest_state not working

    6. 1

      Fix CBar3D

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.