Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[CODE] Exp Reward Per Kill

Newbie Spellweaver
Joined
Feb 4, 2017
Messages
25
Reaction score
5
Hello there today i show you how to add exp reward per kill.
1. Step;
Add Contents.h (You can set the minimum and maximum exp amount here)
1.PNG - [CODE] Exp Reward Per Kill - RaGEZONE Forums
Code:
#define _EXP_REWARD_PER_KILL //Emirr exp per kill
#define EXP_REWARD_KILL_MIN_COUNT 7282066
#define EXP_REWARD_KILL_MAX_COUNT 7682066
2.Step;
Add FieldIOCPSocket2.cpp line 26289
2.PNG - [CODE] Exp Reward Per Kill - RaGEZONE Forums
Code:
#ifdef _EXP_REWARD_PER_KILL
   UINT rewardedEXP = this->AddCharacterEXPRewardByKill();
#endif //Kill başına EXP //Emirr

3.Step;
Add FieldIOCPSocket2.cpp line 37324
3.PNG - [CODE] Exp Reward Per Kill - RaGEZONE Forums
Code:
UINT CFieldIOCPSocket::AddCharacterEXPRewardByKill()
{
    //Min max exp rastgele
    UINT ExpsToAdd = ms_pFieldIOCP->GetRandInt32(EXP_REWARD_KILL_MIN_COUNT, EXP_REWARD_KILL_MAX_COUNT);
    //EXP ekleme   
 this->ChangeExperience(ExpsToAdd, FALSE, TRUE, WPUT_KILL);   
 return ExpsToAdd;
}

Enjoy!
 

Attachments

You must be registered for see attachments list
Initiate Mage
Joined
Oct 31, 2021
Messages
1
Reaction score
0
Thanks
Step 4 Missing

Step 4;
Add FieldIOCPSocket.h
Code:
UINT AddCharacterEXPRewardByKill();
Line 620

Step 5; StringDefineServer.h
Code:
#define STRMSG_KILL_0002					"\\cReward\\c: \\y%d SPI and \\y\\r%d WP \\y %d EXP\\r"

Step6: FieldIOCPSocket2.cpp
Code:
#ifdef _EXTENDED_KILL_MESSAGE	SendString128(STRING_128_USER_NOTICE, STRMSG_KILL_0001, i_pFISockDeaded->m_character.CharacterName, rewardedSPI, rewardedWP, rewardedEXP);	SendString128(STRING_128_USER_NOTICE, STRMSG_KILL_0002, rewardedSPI, rewardedWP, rewardedEXP); 
#endif // _EXTENDED_KILL_MESSAGE


 
Last edited:
Back
Top