Hercules Battlegrounds

Someone please help.

How to solve these warnings.

hBG.c: In function ‘atcommand_reportafk’:
hBG.c:2040:31: warning: unused variable ‘hBGsd’ [-Wunused-variable]
struct hBG_map_session_data *hBGsd = NULL;
^
hBG.c: In function ‘atcommand_leader’:
hBG.c:2084:31: warning: unused variable ‘hBGsd’ [-Wunused-variable]
struct hBG_map_session_data *hBGsd = NULL;
^
hBG.c: In function ‘status_get_guild_id_pre’:
hBG.c:3776:31: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
&& (bg_id = bg->team_get_id((struct block_list *)*bl)) > 0
^
hBG.c: In function ‘status_get_emblem_id_pre’:
hBG.c:3797:31: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
&& (bg_id = bg->team_get_id((struct block_list *)(*bl))) > 0
^
PLUGIN hBG

activate your plugins in plugins.conf

should be like this


plugins_list: [


 


"example",


 


"other",


 


]


 


-----------------------------------------


 


Please note that your scripts need to be saved


 


in the .c (source code) extension and placed in the /src/plugin/ folder.


 


-----------------------------------------


 


*/


 


plugins_list: [


 


/* Enable HPMHooking when plugins in use rely on Hooking */


 


"HPMHooking",


 


"hBG",


 


 


 


]

 
Someone please help.

How to solve these warnings.

hBG.c: In function ‘atcommand_reportafk’:
hBG.c:2040:31: warning: unused variable ‘hBGsd’ [-Wunused-variable]
struct hBG_map_session_data *hBGsd = NULL;
^
hBG.c: In function ‘atcommand_leader’:
hBG.c:2084:31: warning: unused variable ‘hBGsd’ [-Wunused-variable]
struct hBG_map_session_data *hBGsd = NULL;
^
hBG.c: In function ‘status_get_guild_id_pre’:
hBG.c:3776:31: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
&& (bg_id = bg->team_get_id((struct block_list *)*bl)) > 0
^
hBG.c: In function ‘status_get_emblem_id_pre’:
hBG.c:3797:31: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
&& (bg_id = bg->team_get_id((struct block_list *)(*bl))) > 0
^
PLUGIN hBG

Update ur hBG.c use this https://github.com/lucasljsb/HerculesBG/blob/50a1a3963fe2590a787aab27b27fa2faf9e1f277/src/plugins/hBG.c

 
sometimes when the Emergency Call is used the server throw a map crash signal without any details, there is any wrong in this code?

Code:
case GD_EMERGENCYCALL:
		{
			int dx[9]={-1, 1, 0, 0,-1, 1,-1, 1, 0};
			int dy[9]={ 0, 0, 1,-1, 1,-1,-1, 1, 0};
			int i = 0, j = 0;
			struct guild *g;
			
			// i don't know if it actually summons in a circle, but oh well. ;P
			if (sd && (g = hBG_get_guild(sd->bg_id)) != NULL) {
				clif->skill_nodamage(*src, *bl, *skill_id, *skill_lv, 1);
				
				for (i = 0; i < g->max_member; i++, j++) {
					if (j>8) j=0;
					if ((dstsd = g->member[i].sd) != NULL && sd != dstsd && !dstsd->state.autotrade && !pc_isdead(dstsd)) {
						if (map->getcell((*src)->m, *src, (*src)->x + dx[j], (*src)->y + dy[j], CELL_CHKNOREACH))
							dx[j] = dy[j] = 0;
						pc->setpos(dstsd, map_id2index((*src)->m), (*src)->x+dx[j], (*src)->y+dy[j], CLR_RESPAWN);
					}
				}
				guild->block_skill(sd, skill->get_time2(*skill_id, *skill_lv));
			}
		}
 
No offence to the creator Smoke, as he did a great effort putting this all together, but there are outstanding issues which make it not possible to use in a production server.

Being curious, just did some more testing with it, and the guild system (I believe that's what causes it) actually creates this issue where sometimes the sword cursor doesn't appear (need to refresh to get it to show, seems random chance it actually appears), meaning your players would need to have /ns activated all the time to play. 

So please, any future posters - unless you know how to edit the plugin (and therefore source code) itself, don't download it.

And nobody request support as nobody is going to help you.

 
Last edited by a moderator:
Very sad because this will be a great way to get more people into Herc.. rAthena has a stable version of rAmod (Herc don't) and this is not necessary in there and check it now the rA forum, very active with a great comunity.

 
Guess this project is now dead.  :pat:

If anybody is updating this please do share thank you!

 
Hello @Smoke, congratulations on the work! 

Since the emulator has had a package update, some errors are affecting the build. If it's not uncomfortable, could you help us?

My emulator is from 11/16/2018, but I've updated it to the current date.

 
Hello @Smoke, congratulations on the work! 

Since the emulator has had a package update, some errors are affecting the build. If it's not uncomfortable, could you help us?

My emulator is from 11/16/2018, but I've updated it to the current date.
Hercules changed how Packets work on cliff.c

You should change hBG.c like this :
1) Import packets.h
 

#include "common/packets.h"


in places using "packet->len", change to "packets->db[cmd]"

clif->send(buf, packet->len, &sd->bl, BG_AREA_WOS);

change to:

clif->send(buf, packets->db[cmd], &sd->bl, BG_AREA_WOS);




They changed the "addflooritem" function, now you need to add 1 more parameter (bool) if you want to show drop effect:

count += (map->addflooritem(bl, &item_tmp, 1, m, mx, my, 0, 0, 0, 4,true) != 0) ? 1 : 0;
--------------------------------------------------------------------/\ this



They also changed skill_fail, just add a 0 on end.

 

clif->skill_fail((*sd), *skill_id, USESKILL_FAIL_SKILLINTERVAL, 0, 0);
------------------------------------------------------------------/\this




This may fix your problems. 




*Edit 1:
Herc also changed how Mapcache works, so you'll have to rebuild your mapcache to include the maps "bat_a03, bat_a04..." that also doesn't exist on the mapcache.dat (used by rAthena too). I found the solution by adding the maps which herc BG copy to make their own battleground maps into data folder by extracting them from the data.grf file. Then, after rebuilding the mapcache using the new system, Herc BG is working pretty well.

 
Last edited by a moderator:
@iTRz

Thank you for replying, my friend. Do you have any type of problem with /noshift?

 
Last edited by a moderator:
BUG report

I'm finding some errors when leaving the arenas with alt + f4 and some warnings.

Screenshot_1.png

Unable to attack without using / noshift

Screenshot_2.png

 
Last edited by a moderator:
@M4karov I already addressed. This plugin is no longer supported.

No offence to the creator Smoke, as he did a great effort putting this all together, but there are outstanding issues which make it not possible to use in a production server.

Being curious, just did some more testing with it, and the guild system (I believe that's what causes it) actually creates this issue where sometimes the sword cursor doesn't appear (need to refresh to get it to show, seems random chance it actually appears), meaning your players would need to have /ns activated all the time to play. 

So please, any future posters - unless you know how to edit the plugin (and therefore source code) itself, don't download it.

And nobody request support as nobody is going to help you.

 
Sorry guys, I have no time to continue the development of the project.

The reason I made it open source was to gain developer involvement in the project so it moves forward, but for some reason barely anyone contributes.

It is not a large-scale project as are others that I'm working on currently and I can only focus on one.

Also why was this moved from Plugin releases to the Script release section? This is primarily a plugin release.

Best regards~

 
Last edited by a moderator:
Anyone can help with this errors?

Code:
hBG.c: In function ‘atcommand_leader’:
hBG.c:2196:12: error: ‘hBGpl_sd’ undeclared (first use in this function)
  else if ((hBGpl_sd = getFromMSD(pl_sd, 0)) == NULL)
            ^
hBG.c:2196:12: note: each undeclared identifier is reported only once for each function it appears in
hBG.c:2181:31: warning: unused variable ‘hBGsd’ [-Wunused-variable]
  struct hBG_map_session_data *hBGsd = NULL;
                               ^
hBG.c: At top level:
hBG.c:3940:43: error: unknown type name ‘clr_type’
 int unit_free_pre(struct block_list **bl, clr_type *clrtype)
                                           ^
hBG.c: In function ‘clif_sendbgemblem_area_overloading’:
hBG.c:4195:28: warning: unused variable ‘packet’ [-Wunused-variable]
  const struct s_packet_db *packet = clif->packet(cmd);
                            ^
hBG.c: In function ‘clif_sendbgemblem_single_overloading’:
hBG.c:4210:28: warning: unused variable ‘packet’ [-Wunused-variable]
  const struct s_packet_db *packet = clif->packet(cmd);
                            ^
In file included from hBG.c:61:0:
hBG.c: In function ‘plugin_init’:
hBG.c:4585:26: error: ‘unit_free_pre’ undeclared (first use in this function)
   addHookPre(unit, free, unit_free_pre);
                          ^
../plugins/HPMHooking.h:49:57: note: in definition of macro ‘addHookPre’
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                         ^
../plugins/HPMHooking.h:49:63: warning: left-hand operand of comma expression has no effect [-Wunused-value]
   (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \
                                                               ^
hBG.c:4585:3: note: in expansion of macro ‘addHookPre’
   addHookPre(unit, free, unit_free_pre);
   ^
Makefile:105: recipe for target '../../plugins/hBG.so' failed
 
Anyone can help with this errors?

Xss6VQO.png


 
thanks all for pointing some fixes here and on github issues, i was able to make it work, finally.

however some packets are really dependent on client version, i made it work on a very specific version that suits pre-re but cant update without causing weird stuff.

i think a better (clean) solution is to code a clean script based on current battlegrounds implementation (of the official npcs), but using the Rush maps and rotation game mode from hBG plugin. I wish to release a plugin for the old 99/70 woe focused servers, we need more old school servers, i cant take this renewal daily instance sh1t anymore. its sad because hercules feels better than rAthena for 99/70 but lacks this basic @bg feature. people are profiting ridiculous amounts of money with these kinds of servers and yet not an open solution appears.

 
Last edited by a moderator:
Back
Top