Jump to content
  • 0
Sign in to follow this  
fiction

[Help] Convert in to Hercules.

Question

i need help trying to convert this diff in to a hercules mode.

 

 

battle.c: In function ‘battle_calc_misc_attack’:battle.c:3681: error: ‘struct map_interface’ has no member named ‘flag’battle.c:3683: error: ‘wd’ undeclared (first use in this function)battle.c:3683: error: (Each undeclared identifier is reported only oncebattle.c:3683: error: for each function it appears in.)battle.c: In function ‘battle_check_target’:battle.c:6282: error: ‘struct map_interface’ has no member named ‘flag’make[1]: *** [obj_sql/battle.o] Error 1 

Thanks in advance.

 

resident_evil.diff

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

 

i need help trying to convert this diff in to a hercules mode.

 

 

 

battle.c: In function ‘battle_calc_misc_attack’:battle.c:3681: error: ‘struct map_interface’ has no member named ‘flag’battle.c:3683: error: ‘wd’ undeclared (first use in this function)battle.c:3683: error: (Each undeclared identifier is reported only oncebattle.c:3683: error: for each function it appears in.)battle.c: In function ‘battle_check_target’:battle.c:6282: error: ‘struct map_interface’ has no member named ‘flag’make[1]: *** [obj_sql/battle.o] Error 1 
Thanks in advance.

I did converting by hand w/o testing, good luck! ;)

Index: atcommand.c===================================================================--- atcommand.c	(revision 15066)+++ atcommand.c	(working copy)@@ -4432,6 +4432,8 @@ 		strcat(atcmd_output, "PartyLock | "); 	if (map->list[m_id].flag.guildlock) 		strcat(atcmd_output, "GuildLock | ");+	if (map->list[m_id].flag.resident)+		strcat(atcmd_output, "Resident | "); 	clif->message(fd, atcmd_output);  	switch (list) {Index: battle.c===================================================================--- battle.c	(revision 15066)+++ battle.c	(working copy)@@ -1013,6 +1013,11 @@ 	sd = BL_CAST(BL_PC, src); 	tsd = BL_CAST(BL_PC, target); +	if( sd && map->list[sd->bl.m].flag.resident && sd->state.resident && tsd && tsd->state.resident )+	{+		wd.damage = 1;+		return wd;+	} 	if(sd) 		wd.blewcount += battle->blewcount_bonus(sd, skill_num); @@ -3458,6 +3463,10 @@ 			struct map_session_data *sd = BL_CAST(BL_PC, s_bl); 			if( s_bl != t_bl ) 			{+				if(map->list[sd->bl.m].flag.resident &&+				((sd->state.resident == 1 ) || (sd->state.resident == 2 && ((TBL_PC*)t_bl)->state.resident == 2))+				|| (!sd->state.resident && ((TBL_PC*)t_bl)->state.resident) || (sd->state.resident && !((TBL_PC*)t_bl)->state.resident))+					return 0; 				if( sd->state.killer ) 				{ 					state |= BCT_ENEMY; // Can kill anything@@ -3483,6 +3492,8 @@ 			if( !((map->agit_flag || agit2_flag) && map->list[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id ) 				return 0; // Disable guardians/emperium owned by Guilds on non-woe times. +			if(((TBL_PC*)t_bl)->state.resident)+				return 0; 			if( !md->special_state.ai ) 			{ //Normal mobs. 				if( t_bl->type == BL_MOB && !((TBL_MOB*)t_bl)->special_state.ai )Index: clif.c===================================================================--- clif.c	(revision 15066)+++ clif.c	(working copy)@@ -9150,6 +9150,12 @@ #ifndef TXT_ONLY 	mail->clear(sd); #endif+	status_calc_pc(sd, true);+	if(!map->list[sd->bl.m].flag.resident && sd->state.resident)+	{+		sd->state.resident = 0;+		pc->disguise(sd,0);+	}  	if(map->list[sd->bl.m].flag.loadevent) // Lance 		npc->script_event(sd, NPCE_LOADMAP);Index: map.h===================================================================--- map.h	(revision 15066)+++ map.h	(working copy)@@ -492,6 +492,8 @@ 		unsigned guildlock :1; 		unsigned src4instance : 1; // To flag this map when it's used as a src map for instances 		unsigned reset :1; // [Daegaladh]+	+		unsigned resident :1; 	} flag; 	struct point save; 	struct npc_data *npc[MAX_NPC_PER_MAP];Index: npc.c===================================================================--- npc.c	(revision 15066)+++ npc.c	(working copy)@@ -3114,6 +3114,8 @@ 		map->list[m].flag.guildlock=state; 	else if (!strcmpi(w3,"reset")) 		map->list[m].flag.reset=state;+	else if(!strcmpi(w3,"resident"))+		map->list[m].flag.resident=state; 	else 		ShowError("npc->parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').n", w3, filepath, strlib->strline(buffer,start-buffer)); @@ -3300,6 +3302,7 @@ 		{"Die Event",script_config.die_event_name}, 		{"Kill PC Event",script_config.kill_pc_event_name}, 		{"Kill NPC Event",script_config.kill_mob_event_name},+		{"Damage Event",script->config.damage_event_name}, 	};  	for (i = 0; i < NPCE_MAX; i++)Index: npc.h===================================================================--- npc.h	(revision 15066)+++ npc.h	(working copy)@@ -97,6 +97,7 @@ 	NPCE_DIE, 	NPCE_KILLPC, 	NPCE_KILLNPC,+	NPCE_DAMAGE, 	NPCE_MAX }; struct view_data* npc->get_viewdata(int class_);Index: pc.c===================================================================--- pc.c	(revision 15066)+++ pc.c	(working copy)@@ -5661,7 +5661,9 @@ 		pc->setstand(sd); 		skill->sit(sd,0); 	}-+	if(map->list[sd->bl.m].flag.resident && sd->state.resident == 1)+	{+		npc->script_event(sd,NPCE_DAMAGE);+		pc_stop_attack((TBL_PC*)src);+	}+		 	if( sd->progressbar.npc_id ) 		clif->progressbar_abort(sd); @@ -7120,6 +7122,9 @@  	nullpo_ret(sd); +	if(map->list[sd->bl.m].flag.resident)+		return 0;+		 	if( n < 0 || n >= MAX_INVENTORY ) { 		clif->equipitemack(sd,0,0,0); 		return 0;Index: pc.h===================================================================--- pc.h	(revision 15066)+++ pc.h	(working copy)@@ -137,6 +137,7 @@ 		unsigned short autolootid; // [Zephyrus] 		unsigned short autobonus; //flag to indicate if an autobonus is activated. [Inkfish] 		struct guild *gmaster_flag;+		unsigned int resident :2; 	} state; 	struct { 		unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;Index: script.c===================================================================--- script.c	(revision 15066)+++ script.c	(working copy)@@ -232,6 +232,7 @@ 	"OnPCLoadMapEvent", //loadmap_event_name 	"OnPCBaseLvUpEvent", //baselvup_event_name 	"OnPCJobLvUpEvent", //joblvup_event_name+	"OnPCDamage", 	"OnTouch_",	//ontouch_name (runs on first visible char to enter area, picks another char if the first char leaves) 	"OnTouch",	//ontouch2_name (run whenever a char walks into the OnTouch area) };@@ -357,7 +358,8 @@ 	MF_MONSTER_NOTELEPORT, 	MF_PVP_NOCALCRANK,	//50 	MF_BATTLEGROUND,-	MF_RESET+	MF_RESET,+	MF_RESIDENT };  const char* script->op2name(int op)@@ -14963,7 +14965,25 @@ 	return 0; } +BUILDIN(resident)+{+	struct map_session_data* sd;+	int resident;+	const char * name;+	+	name = script_getstr(st,2);+	sd = map->nick2sd(name);+	+	if(sd)+	{+		resident = script_getnum(st,3);+		sd->state.resident = (resident > 2?0:resident);+		pc->disguise(sd,sd->state.resident == 2?1865:0);+	}+	return true;+} + // declarations that were supposed to be exported from npc_chat.c #ifdef PCRE_SUPPORT BUILDIN(defpattern);@@ -14976,6 +14996,8 @@ /// for an explanation on args, see add_BUILDIN struct script_function BUILDIN[] = { 	// NPC interaction+	BUILDIN_DEF(resident,"si"),+	 	BUILDIN_DEF(mes,"s"), 	BUILDIN_DEF(next,""), 	BUILDIN_DEF(close,""),Index: script.h===================================================================--- script.h	(revision 15066)+++ script.h	(working copy)@@ -26,6 +26,7 @@ 	const char *loadmap_event_name; 	const char *baselvup_event_name; 	const char *joblvup_event_name;+	const char *damage_event_name;  	const char* ontouch_name; 	const char* ontouch2_name;Index: status.c===================================================================--- status.c	(revision 15066)+++ status.c	(working copy)@@ -3905,6 +3905,9 @@ 			speed = speed * 100 / sc->data[SC_WALKSPEED]->val1; 	} +	if(sd && map->list[sd->bl.m].flag.resident)+			speed = 200;+			 	return (short)cap_value(speed,10,USHRT_MAX); } 

Share this post


Link to post
Share on other sites
  • 0

Hi thanks for the answer but i have a problem.

 

here, with this part :

 

Index: script.c===================================================================--- script.c	(revision 15066)+++ script.c	(working copy)@@ -232,6 +232,7 @@ 	"OnPCLoadMapEvent", //loadmap_event_name 	"OnPCBaseLvUpEvent", //baselvup_event_name 	"OnPCJobLvUpEvent", //joblvup_event_name+	"OnPCDamage", 	"OnTouch_",	//ontouch_name (runs on first visible char to enter area, picks another char if the first char leaves) 	"OnTouch",	//ontouch2_name (run whenever a char walks into the OnTouch area) };@@ -357,7 +358,8 @@ 	MF_MONSTER_NOTELEPORT, 	MF_PVP_NOCALCRANK,	//50 	MF_BATTLEGROUND,-	MF_RESET+	MF_RESET,+	MF_RESIDENT };

i don't know where to put this in script.c, because in hercules it's different :(

Share this post


Link to post
Share on other sites
  • 0

Hi thanks for the answer but i have a problem.

 

here, with this part :

 

Index: script.c===================================================================--- script.c	(revision 15066)+++ script.c	(working copy)@@ -232,6 +232,7 @@ 	"OnPCLoadMapEvent", //loadmap_event_name 	"OnPCBaseLvUpEvent", //baselvup_event_name 	"OnPCJobLvUpEvent", //joblvup_event_name+	"OnPCDamage", 	"OnTouch_",	//ontouch_name (runs on first visible char to enter area, picks another char if the first char leaves) 	"OnTouch",	//ontouch2_name (run whenever a char walks into the OnTouch area) };@@ -357,7 +358,8 @@ 	MF_MONSTER_NOTELEPORT, 	MF_PVP_NOCALCRANK,	//50 	MF_BATTLEGROUND,-	MF_RESET+	MF_RESET,+	MF_RESIDENT };

i don't know where to put this in script.c, because in hercules it's different :(

script.c  find	script->config.ontouch2_name = "OnTouch";  //ontouch2_name (run whenever a char walks into the OnTouch area)	script->config.onuntouch_name = "OnUnTouch";  //onuntouch_name (run whenever a char walks from the OnTouch area)++	script->config.damage_event_name = "OnPCDamage";script.h	MF_AUTOTRADE,	MF_ALLOWKS,	MF_MONSTER_NOTELEPORT,	MF_PVP_NOCALCRANK, //50	MF_BATTLEGROUND,	MF_RESET,	MF_NOTOMB,-	MF_NOCASHSHOP+	MF_NOCASHSHOP,+	MF_RESIDENT};

Share this post


Link to post
Share on other sites
  • 0

hi angelmelody again really thanks for your support.

 

This part 

@@ -357,7 +358,8 @@ 	MF_MONSTER_NOTELEPORT, 	MF_PVP_NOCALCRANK,	//50 	MF_BATTLEGROUND,-	MF_RESET+	MF_RESET,+	MF_RESIDENT

in hercules have many case about that and i don't know where to put it.

 

thanks again for your support.

Share this post


Link to post
Share on other sites
  • 0

hi angelmelody again really thanks for your support.

 

This part 

@@ -357,7 +358,8 @@ 	MF_MONSTER_NOTELEPORT, 	MF_PVP_NOCALCRANK,	//50 	MF_BATTLEGROUND,-	MF_RESET+	MF_RESET,+	MF_RESIDENT

in hercules have many case about that and i don't know where to put it.

 

thanks again for your support.

Here ! click me

Edited by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

@@Angelmelody @@AnnieRuru, I installed this, but I came across an error while compiling in battle.c

 


Says Damage cannot convert to damage_lv


I changed the statement to return true/ return 1; and it compiled, but not sure if that's the purpose of the check o.O

Any help here? ^^
 

Share this post


Link to post
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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.