Jump to content
  • 0

How to patch koe_1.2.diff to your server? Am I doing it right?


Hale

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  38
  • Reputation:   1
  • Joined:  02/23/20
  • Last Seen:  

rAthena
Pre-Renewal
2015 Client

Good day! I downloaded sa script for King of Hill at AnnieRuRu's content. The script works but the problem is, even tho I'm the owner of the Emperium, I can still hit the Emperium itself.

I saw one post recently that you need to patch your server using the koe_1.2.diff file/patch file for rAthena. But I can't seem to find tutorials online on how to do it ?

What I did earlier was to upload the diff file into the root folder of my server using WinSCP (shown in the first image below) and then I did the git apply using terminal in my server using VNCviewer and it has error (shown in the second image below). I really don't have the slightest idea on how to do this the correct way.

I hope you could help me asap. Thanks a lot!
 

Here's the patch content I got from AnnieRuRu's most update KOE Files and Patch

// ===== rAthena Patch ========================================
// = King of Emperium Hill
// ===== By: ==================================================
// = AnnieRuru
// ===== Current Version: =====================================
// = 1.2
// ===== Compatible With: ===================================== 
// = rAthena 2018-04-08
// ===== Description: =========================================
// = stop guild owner from hitting the emperium over and over
// ===== Topic ================================================
// = http://herc.ws/board/topic/4495-king-of-emperium-hill/
// ===== Additional Comments: =================================  
// = finally a patch for this popular script
// ============================================================

 db/castle_db.txt   | 2 ++
 src/map/battle.cpp | 7 +++++++
 src/map/battle.hpp | 1 +
 3 files changed, 10 insertions(+)

diff --git a/db/castle_db.txt b/db/castle_db.txt
index ceb74dd..0fc8231 100644
--- a/db/castle_db.txt
+++ b/db/castle_db.txt
@@ -60,3 +60,5 @@
 41,te_prtcas03,Gloria 3,Manager_TE#Wigner
 42,te_prtcas04,Gloria 4,Manager_TE#Heine
 43,te_prtcas05,Gloria 5,Manager_TE#Nerious
+
+100,guild_vs1,King of Emperium Hill,koe
\ No newline at end of file
diff --git a/src/map/battle.cpp b/src/map/battle.cpp
index e845c5e..4234ba7 100644
--- a/src/map/battle.cpp
+++ b/src/map/battle.cpp
@@ -7643,6 +7643,13 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
 	if( (s_bl = battle_get_master(src)) == NULL )
 		s_bl = src;
 
+	if ( s_bl->type == BL_PC && t_bl->type == BL_MOB ) {
+		struct map_session_data *sd = BL_CAST( BL_PC, s_bl );
+		if ( ( ( (TBL_MOB*)target )->mob_id == 1288 && !strcmp( mapindex_id2name(sd->mapindex), "guild_vs1" ) ) &&
+			( sd->status.guild_id == mapreg_readreg( add_str("$koegid") ) || battle_getcurrentskill(src) > 0 ) )
+		return 0;
+	}
+
 	if ( s_bl->type == BL_PC ) {
 		switch( t_bl->type ) {
 			case BL_MOB: // Source => PC, Target => MOB
diff --git a/src/map/battle.hpp b/src/map/battle.hpp
index b5fe7d4..f8e8908 100644
--- a/src/map/battle.hpp
+++ b/src/map/battle.hpp
@@ -10,6 +10,7 @@
 #include "../config/core.h"
 
 #include "map.hpp" //ELE_MAX
+#include "mapreg.hpp"
 
 //fwd declaration
 struct map_session_data;

 

1.PNG

2.PNG

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

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

Guest
Answer this question...

×   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...