Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

Today, I’m excited to introduce the Anti-Experience Ring, a feature developed in C++. Below is a comprehensive guide to implementing this functionality in your game. This system utilizes a new function called block_exp, which can be toggled through the ring or a button (for those who have created one).

Step-by-Step Implementation

1. Modifying Character Code

First, navigate to the following file in your source directory:
/usr/src/sursa_ta/Srcs/Server/game/src/Char.cpp

Open this file and look for the following code snippet:

 
This is the hidden content, please

After this line, insert the following code to implement the experience blocking feature:

 
This is the hidden content, please

Save the changes and exit the Char.cpp file.

2. Updating the Character Header

Next, open Char.h and locate the following line:

 
This is the hidden content, please

Add the following declaration right after it:

 
This is the hidden content, please

Save and exit Char.h.

3. Editing QuestLua_PC

Now, navigate to Questlua_pc.cpp and find this line:

 
This is the hidden content, please

Insert the following lines after it:

 
This is the hidden content, please

Next, search for the RegisterPCFunctionTable() function:

 
void RegisterPCFunctionTable()
    

Above this function, add the following block of code to handle experience blocking logic:

 
This is the hidden content, please

4. Modifying Input Login

Now, open input_login.cpp and search for:

 
This is the hidden content, please

Add the following code immediately after it:

 
This is the hidden content, please

Save your changes, compile the code, and replace the game files as necessary.

5. Server-Side Adjustments

Now, let’s move to the server side. Navigate to quest_function and add the following lines at the end:

 
This is the hidden content, please

Next, create a new file named inel_antiexp.quest (or a name of your choice) and insert the following quest script:

 
This is the hidden content, please

6. Implementing a Button Option

For those who prefer utilizing a button, use the following quest script:

 
This is the hidden content, please

Conclusion

By following these steps, you can successfully implement an Anti-Experience Ring in your game, adding an exciting new feature for players. Enjoy coding!

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...