Coder Social home page Coder Social logo

sagunkho / herculesbg Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 13.0 902 KB

This is eAmod's Battleground plugin for HerculesWS/Hercules

Home Page: http://herc.ws/board/topic/14083-hercules-battlegrounds/

License: GNU General Public License v3.0

C 100.00%
herculesws hercules battlegrounds eamod

herculesbg's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

herculesbg's Issues

Compiling Plugin error

New herc and hBG.c compiling error:

1>------ Build started: Project: hBG, Configuration: Release Win32 ------
1>Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
1> hBG.c
1>..\src\plugins\hBG.c(1071): warning C4018: '<' : signed/unsigned mismatch
1>..\src\plugins\hBG.c(2049): warning C4018: '<' : signed/unsigned mismatch
1>..\src\plugins\hBG.c(2050): warning C4018: '<' : signed/unsigned mismatch
1>..\src\plugins\hBG.c(2523): warning C4018: '>=' : signed/unsigned mismatch
1>..\src\plugins\hBG.c(2581): warning C4018: '<' : signed/unsigned mismatch
1>..\src\plugins\hBG.c(2587): warning C4018: '<' : signed/unsigned mismatch
1>..\src\plugins\hBG.c(2593): error C2143: syntax error : missing ';' before 'type'
1>..\src\plugins\hBG.c(2594): error C2065: 'i' : undeclared identifier
1>..\src\plugins\hBG.c(2595): error C2065: 'i' : undeclared identifier
1>..\src\plugins\hBG.c(2614): error C2143: syntax error : missing ';' before 'type'
1>..\src\plugins\hBG.c(2615): error C2143: syntax error : missing ';' before 'type'
1>..\src\plugins\hBG.c(2617): error C2065: 'i' : undeclared identifier
1>..\src\plugins\hBG.c(2618): error C2065: 'i' : undeclared identifier
1>..\src\plugins\hBG.c(2621): error C2065: 'pos' : undeclared identifier
1>..\src\plugins\hBG.c(2621): error C2065: 'i' : undeclared identifier
1>..\src\plugins\hBG.c(2623): error C2065: 'qm' : undeclared identifier
1>..\src\plugins\hBG.c(2623): error C2065: 'pos' : undeclared identifier
1>..\src\plugins\hBG.c(2623): warning C4047: '=' : 'int' differs in levels of indirection from 'hBG_queue_member *'
1>..\src\plugins\hBG.c(2623): warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
1>..\src\plugins\hBG.c(2623): error C2223: left of '->sd' must point to struct/union
1>..\src\plugins\hBG.c(2717): warning C4018: '<' : signed/unsigned mismatch
1>..\src\plugins\hBG.c(3722): warning C4018: '<' : signed/unsigned mismatch
1>..\src\plugins\hBG.c(3724): warning C4018: '<' : signed/unsigned mismatch
1>..\src\plugins\hBG.c(3862): warning C4018: '<' : signed/unsigned mismatch
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Map server errors and hBG conflict with Official BG.

(All prints and details here and here)

  • Map server crashing after a player hit any emperium (rush or conqust). No message, just window's crash window.

  • @stopbg somethings, probably after a match has started. Even crashing map-server sometimes.

  • hBG conflicting with Official BG scripts. Not able to run both (herc commands for bg) at the same time.

  • FFA not working at all.

Suggestion: Maybe enable FFA to the @joinbg queue.

build warnings

@Smokexyz
Some gcc build warnings

	CC	hBG.c
hBG.c: In function ‘buildin_hBG_queue2teams’:
hBG.c:2386:43: warning: variable ‘min’ set but not used [-Wunused-but-set-variable]
  int t, bg_id = 0, total_teams = 0, q_id, min, max, type, limit = 0;
                                           ^
hBG.c: In function ‘status_get_guild_id_pre’:
hBG.c:3320:31: warning: cast discards ‘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:3341:31: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
   && (bg_id = bg->team_get_id((struct block_list *)(*bl))) > 0
                               ^
hBG.c: In function ‘clif_parse_UseSkillToId_post’:
hBG.c:3428:19: warning: variable ‘skill_lv’ set but not used [-Wunused-but-set-variable]
  uint16 skill_id, skill_lv;
                   ^
hBG.c: In function ‘hBG_build_guild_data’:
hBG.c:1779:4: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
    fread(&bg_guild[j].emblem_data, 1, bg_guild[j].emblem_len, fp);
    ^
	PLUGIN	hBG

Some fixes for compilation errors

I will list some stuff which gives compilation errors.

  1. status_get_guild_id_pre
    Change this line
    && (bg_id = bg->team_get_id((struct block_list *)*bl)) > 0
    to
    && (bg_id = bg->team_get_id((struct block_list *)bl)) > 0

  2. status_get_emblem_id_pre
    Change this line
    && (bg_id = bg->team_get_id((struct block_list *)(*bl))) > 0
    to
    && (bg_id = bg->team_get_id((struct block_list *)bl)) > 0

  3. In ACMD(reportafk) and ACMD(leader) there are unused definitions:
    struct hBG_map_session_data *hBGsd = NULL;

Emblems Not Displaying Correctly

*Using 2015-10-29a client.

Hello,

I've noticed emblems are not displaying correctly. Your BG Guild emblem will display correct locally, but trying to view others' will show their normal guild emblem. Here are some examples.

In the following imgur album: https://imgur.com/a/dMXOx

  1. Trying to view another player's emblem. That player IS in a guild. Normal guild's emblem shown.
  2. Viewing my own emblem. It shows the correct BG Guild emblem. This character is NOT in a guild.
  3. Trying to view other player's emblem. That player is NOT in a guild. No emblem shown.
  4. Viewing my own emblem. It shows the correct BG Guild emblem. This character IS in a guild.

Thanks!

Auto Kick AFK Players

When you enable the Auto AFK Kick players after X Seconds the client of all team members will completly freeze when somone gets removed from the BG duo AFK Kick

Problem AFK continues.

I performed new tests and the AFK problem described in the other issue persists.

When the player joins the battlefield, if he is stopped / seated at the time of registration and the game starts, he is expelled from the battle. That is, the inactive time (AFK) is being counted off the BG map.

When thrown out of the battlefield due to not moving (AFK), sometimes the kicked player gets stuck at his return point, and still remains in the guild, as if he were inside the BG map.

Spoiler Show
https://postimg.org/image/tnozymb0d

NEW

  • I also remembered that a warning message is being sent to the player that he will be teleported for being AFK, giving him an opportunity to move, and if he does not move, kicke the player.

  • I think you have forgotten 2 files in the db folder, as can be seen in the official eAmod repository.
    Item_db and mob_db
    https://github.com/zephyrus-cr/eamod/tree/master/Diffs/battleground/db

error when compile

when i add plugin and compile server.

MAKE plugins make[1]: Entering directory '/home/joker/Documentos/Hercules-stable/src/plugins' PLUGIN sample PLUGIN db2sql PLUGIN HPMHooking_char PLUGIN HPMHooking_login PLUGIN HPMHooking_map CC hBG.c hBG.c: In function ‘hBG_send_hp_area’: hBG.c:426:24: error: ‘const struct s_packet_db’ has no member named ‘len’ clif->send(buf, packet->len, &sd->bl, BG_AREA_WOS); ^~ In file included from hBG.c:31: hBG.c: In function ‘hBG_send_hp_single’: hBG.c:446:22: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOHEAD(fd, packet->len); ^~ ../common/socket.h:44:50: note: in definition of macro ‘WFIFOHEAD’ #define WFIFOHEAD(fd, size) sockt->wfifohead(fd, size) ^~~~ In file included from hBG.c:31: hBG.c:458:21: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOSET(fd, packet->len); ^~ ../common/socket.h:72:49: note: in definition of macro ‘WFIFOSET’ #define WFIFOSET(fd, len) (sockt->wfifoset(fd, len, true)) ^~~ In file included from hBG.c:31: hBG.c: In function ‘hBG_send_guild_info’: hBG.c:480:22: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOHEAD(fd, packet->len); ^~ ../common/socket.h:44:50: note: in definition of macro ‘WFIFOHEAD’ #define WFIFOHEAD(fd, size) sockt->wfifohead(fd, size) ^~~~ In file included from hBG.c:31: hBG.c:489:22: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOSET(fd, packet->len); ^~ ../common/socket.h:72:49: note: in definition of macro ‘WFIFOSET’ #define WFIFOSET(fd, len) (sockt->wfifoset(fd, len, true)) ^~~ In file included from hBG.c:31: hBG.c: In function ‘hBG_guild_window_info’: hBG.c:554:22: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOHEAD(fd, packet->len); // Hardcoded Length ^~ ../common/socket.h:44:50: note: in definition of macro ‘WFIFOHEAD’ #define WFIFOHEAD(fd, size) sockt->wfifohead(fd, size) ^~~~ In file included from hBG.c:31: hBG.c:573:21: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOSET(fd, packet->len); ^~ ../common/socket.h:72:49: note: in definition of macro ‘WFIFOSET’ #define WFIFOSET(fd, len) (sockt->wfifoset(fd, len, true)) ^~~ hBG.c: In function ‘hBG_send_leave_single’: hBG.c:678:24: error: ‘const struct s_packet_db’ has no member named ‘len’ clif->send(buf, packet->len, &sd->bl, SELF); ^~ In file included from hBG.c:31: hBG.c: In function ‘hBG_send_expulsion’: hBG.c:740:22: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOHEAD(fd, packet->len); ^~ ../common/socket.h:44:50: note: in definition of macro ‘WFIFOHEAD’ #define WFIFOHEAD(fd, size) sockt->wfifohead(fd, size) ^~~~ In file included from hBG.c:31: hBG.c:745:21: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOSET(fd, packet->len); ^~ ../common/socket.h:72:49: note: in definition of macro ‘WFIFOSET’ #define WFIFOSET(fd, len) (sockt->wfifoset(fd, len, true)) ^~~ In file included from hBG.c:31: hBG.c: In function ‘hBG_update_score_single’: hBG.c:770:22: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOHEAD(fd, packet->len); ^~ ../common/socket.h:44:50: note: in definition of macro ‘WFIFOHEAD’ #define WFIFOHEAD(fd, size) sockt->wfifohead(fd, size) ^~~~ In file included from hBG.c:31: hBG.c:782:21: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOSET(fd, packet->len); ^~ ../common/socket.h:72:49: note: in definition of macro ‘WFIFOSET’ #define WFIFOSET(fd, len) (sockt->wfifoset(fd, len, true)) ^~~ hBG.c: In function ‘hBG_update_score_team’: hBG.c:816:25: error: ‘const struct s_packet_db’ has no member named ‘len’ clif->send(buf, packet->len, &sd->bl, SELF); ^~ hBG.c: In function ‘hBG_addflooritem_area’: hBG.c:1950:13: error: too few arguments to function ‘map->addflooritem’ count += (map->addflooritem(bl, &item_tmp, 1, m, mx, my, 0, 0, 0, 4) != 0) ? 1 : 0; ^~~ hBG.c: In function ‘atcommand_reportafk’: hBG.c:2148:20: error: too few arguments to function ‘map->nick2sd’ else if ((pl_sd = map->nick2sd(message)) == NULL) ^~~ hBG.c:2138:31: warning: unused variable ‘hBGsd’ [-Wunused-variable] struct hBG_map_session_data *hBGsd = NULL; ^~~~~ hBG.c: In function ‘atcommand_leader’: hBG.c:2196:20: error: too few arguments to function ‘map->nick2sd’ else if ((pl_sd = map->nick2sd(message)) == NULL) ^~~ hBG.c:2182:31: warning: unused variable ‘hBGsd’ [-Wunused-variable] struct hBG_map_session_data *hBGsd = NULL; ^~~~~ hBG.c: In function ‘buildin_hBG_monster_set_team’: hBG.c:3146:8: error: ‘struct clif_interface’ has no member named ‘charnameack’; did you mean ‘chatname_ack’? clif->charnameack(0, &md->bl); ^~~~~~~~~~~ chatname_ack hBG.c: In function ‘skillnotok_pre’: hBG.c:3753:4: error: too few arguments to function ‘clif->skill_fail’ clif->skill_fail((*sd), *skill_id, USESKILL_FAIL_SKILLINTERVAL, 0); ^~~~ hBG.c: In function ‘status_get_guild_id_pre’: hBG.c:3874:31: warning: cast discards ‘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:3895:31: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] && (bg_id = bg->team_get_id((struct block_list *)(*bl))) > 0 ^ hBG.c: At top level: hBG.c:3942:43: error: unknown type name ‘clr_type’; did you mean ‘sc_type’? int unit_free_pre(struct block_list **bl, clr_type *clrtype) ^~~~~~~~ sc_type hBG.c: In function ‘clif_sendbgemblem_area_overloading’: hBG.c:4206:24: error: ‘const struct s_packet_db’ has no member named ‘len’ clif->send(buf, packet->len, &sd->bl, AREA); ^~ In file included from hBG.c:31: hBG.c: In function ‘clif_sendbgemblem_single_overloading’: hBG.c:4221:21: error: ‘const struct s_packet_db’ has no member named ‘len’ WFIFOSET(fd, packet->len); ^~ ../common/socket.h:72:49: note: in definition of macro ‘WFIFOSET’ #define WFIFOSET(fd, len) (sockt->wfifoset(fd, len, true)) ^~~ hBG.c: In function ‘char_bgstats_tosql’: hBG.c:4255:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘unsigned int’ [-Wformat=] "REPLACE INTO char_bg_stats(" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hBG.c:4288:4: pstats.best_damage, pstats.total_damage_done, pstats.total_damage_received, ~~~~~~~~~~~~~~~~~~ hBG.c:4273:7: note: format string is defined here "'%d','%u','%u'," ~^ %d In file included from hBG.c:61: hBG.c: In function ‘plugin_init’: hBG.c:4587:26: error: ‘unit_free_pre’ undeclared (first use in this function) addHookPre(unit, free, unit_free_pre); ^~~~~~~~~~~~~ ../plugins/HPMHooking.h:53:57: note: in definition of macro ‘addHookPre’ (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \ ^~~~ hBG.c:4587:26: note: each undeclared identifier is reported only once for each function it appears in addHookPre(unit, free, unit_free_pre); ^~~~~~~~~~~~~ ../plugins/HPMHooking.h:53:57: note: in definition of macro ‘addHookPre’ (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \ ^~~~ ../plugins/HPMHooking.h:53:63: warning: left-hand operand of comma expression has no effect [-Wunused-value] (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \ ^ hBG.c:4587:3: note: in expansion of macro ‘addHookPre’ addHookPre(unit, free, unit_free_pre); ^~~~~~~~~~ make[1]: *** [Makefile:106: ../../plugins/hBG.so] Error 1

IP Check dont works Correct

When you eanble the IP check in hbg.conf

hBG_ip_check: 1

and then login 2 Accounts , and then use with 1 account @joinbg you cant enter the queue because you got 2 Accounts.

i think the check is wrong and should check for IPs in the queue not as total online count

Emergency Call Guild Skill

Im not sure if this skill should be enabled in the BG System

since if you use EC you can even recall the flag Carrier from the CTF , also he recall all ONLINE guild members into the BG.

also sometimes EC generates a Map Server crash ( got no dump atm)

Errors

I started testing the script now and found some errors. Are they:

  • When the player joins the battlefield, if he is stopped / seated at the time of registration and the game starts, he is expelled from the battle. That is, the inactive time (AFK) is being counted off the BG map.

  • When thrown out of the battlefield due to not moving (AFK), sometimes the kicked player gets stuck at his return point, and still remains in the guild, as if he were inside the BG map.

Spoiler Show
https://postimg.org/image/tnozymb0d

  • You are not allowed to use guild skill within battle, they do not appear. Guild Level is 1, and should be 50.

Spoiler Show
https://postimg.org/image/b9egumypp
https://postimg.org/image/nlhd84mkd

@edit

  • When the admin / Game Master uses @reloadscript and has a battle in progress, the battle in question ends, without expelling the players from within the map, and begins to announce the new battle.

  • When using "Team Building Mode" as 2 - Balanced, the game hangs at the time the game starts, without players, because it does not teleport the players to the battle map.
    // Team Building Mode: 0 = Linear, 1 = Random, 2 = Balanced
    Set .TeamBuildingMode, 1;

  • By clicking on the kafra in the bat_room room, nothing happens.

OBS: I will continue the tests and if I find new errors, I will report.I started testing the script now and found some errors. Are they:

Posted in topic: http://herc.ws/board/topic/14083-hercules-battlegrounds/#entry79726

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.