Jump to content

brunosc

Members
  • Content Count

    33
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by brunosc

  1. brunosc

    Iconcustom

    Solved
  2. brunosc

    Noview in Self

    Yeah! i think it too
  3. brunosc

    Noview in Self

    hello, im using @Dastgir plugin and im try to change the command to hide self equips. i dont have ideia how to do it.
  4. brunosc

    Auraset

    use dastgirp plugin the best https://github.com/dastgirp/HPM-Plugins/blob/master/src/plugins/auraset.c
  5. What plugin is it? where i found it?
  6. https://github.com/dastgirp/eBG/issues/29 to fix is olny change it - map->search_freecell(NULL, m, &x, &y, range, range, 1); for it + map->search_free_cell(NULL, m, &x, &y, range, range, 1);
  7. same problem here, but i fixed. change walktoxy_timer to walk_toxy_timer in all file .c
  8. im try to update it but not ok.
  9. Here got same warning when compile first time. if compile again without (make clean) dont show this warnings.
  10. yes the last version anda client 2019.
  11. im using AnnieRuru plugin . version 0.4 Link -> https://upaste.me/75d049918e2088402 //===== Hercules Plugin ====================================== //= @showbuff //===== By: ================================================== //= AnnieRuru //===== Current Version: ===================================== //= 0.4 //===== Compatible With: ===================================== //= Hercules 2018-06-05 //===== Description: ========================================= //= @showbuff on the party screen Alt + Z //===== Topic ================================================ //= http://herc.ws/board/topic/11349-partybuff-spb/ //===== Additional Comments: ================================= //= testing ... //= join party -> OK -> clif_party_member_info_overload //= somebody leave party -> OK -> clif_party_withdraw_overload //= disband party -> not yet ... I guess no need test this one //= party member log in -> OK //= party member log out -> OK //= expel party -> BUG -> no choice but have to prevent them from doing so //= you leave party -> party_leave_pre //============================================================ #include "common/hercules.h" #include "map/pc.h" #include "map/clif.h" #include "map/party.h" #include "common/nullpo.h" #include "common/socket.h" #include "common/memmgr.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "showbuff", SERVER_TYPE_MAP, "0.4", HPM_VERSION, }; struct player_data { int buff; bool showbuff; }; int status_change_start_post( int retVal, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { if ( bl->type == BL_PC && retVal > 0 ) { struct map_session_data *sd = BL_CAST( BL_PC, bl ); struct party_data *p; if ( p = party->search(sd->status.party_id )) { struct player_data *ssd = getFromMSD( sd, 0 ); int before_buff = ssd->buff; if ( type == SC_BLESSING ) ssd->buff |= 0x1; if ( type == SC_INC_AGI ) ssd->buff |= 0x2; if ( type == SC_PROTECTWEAPON || type == SC_PROTECTSHIELD || type == SC_PROTECTARMOR || type == SC_PROTECTHELM ) if ( sd->sc.data[SC_PROTECTWEAPON] && sd->sc.data[SC_PROTECTSHIELD] && sd->sc.data[SC_PROTECTARMOR] && sd->sc.data[SC_PROTECTHELM] ) ssd->buff |= 0x4; if ( type == SC_SOULLINK ) ssd->buff |= 0x8; if ( type == SC_DEVOTION ) ssd->buff |= 0x10; if ( before_buff != ssd->buff ) // only send the packet if update the status is newly apply, no need to resend if just renew the status clif->party_info( p, NULL ); } } return retVal; } int status_change_end_post( int retVal, struct block_list *bl, enum sc_type type, int tid, const char *file, int line ) { if ( bl->type == BL_PC && retVal > 0 ) { struct map_session_data *sd = BL_CAST( BL_PC, bl ); struct party_data *p; if ( sd->state.active == 1 ) { // fix map-server crash when player logout if (( p = party->search(sd->status.party_id ))) { struct player_data *ssd = getFromMSD( sd, 0 ); int before_buff = ssd->buff; if ( type == SC_BLESSING ) ssd->buff &= ~0x1; if ( type == SC_INC_AGI ) ssd->buff &= ~0x2; if ( type == SC_PROTECTWEAPON || type == SC_PROTECTSHIELD || type == SC_PROTECTARMOR || type == SC_PROTECTHELM ) if ( sd->sc.data[SC_PROTECTWEAPON] && sd->sc.data[SC_PROTECTSHIELD] && sd->sc.data[SC_PROTECTARMOR] && sd->sc.data[SC_PROTECTHELM] ) ssd->buff &= ~0x4; if ( type == SC_SOULLINK ) ssd->buff &= ~0x8; if ( type == SC_DEVOTION ) ssd->buff &= ~0x10; if ( before_buff != ssd->buff ) // only send the packet if update the status is newly apply, no need to resend if just renew the status clif->party_info( p, NULL ); } } } return retVal; } char *showing_buff( struct map_session_data *sd ) { struct player_data *ssd = getFromMSD( sd, 0 ); char *temp = "\0"; safesnprintf( temp, NAME_LENGTH, "[%s%s%s%s%s]%s", ( ssd->buff & 0x1 )? "B" : "_", ( ssd->buff & 0x2 )? "A" : "_", ( ssd->buff & 0x4 )? "F" : "_", ( ssd->buff & 0x8 )? "S" : "_", ( ssd->buff & 0x10 )? "+" : "_", sd->status.name ); return temp; } void clif_party_info_overload( struct party_data *p, struct map_session_data *sd ) { struct PACKET_ZC_GROUP_LIST *packet; int i, c; unsigned char buf[sizeof(*packet) + sizeof(struct PACKET_ZC_GROUP_LIST_SUB) * MAX_PARTY]; nullpo_retv(p); memset( buf, 0, sizeof(buf) ); packet = (struct PACKET_ZC_GROUP_LIST *)buf; packet->packetType = partyinfo; memcpy( packet->partyName, p->party.name, NAME_LENGTH ); for ( i = 0, c = 0; i < MAX_PARTY; ++i ) { struct party_member *m = &p->party.member[i]; if ( !m->account_id ) continue; packet->members[c].AID = m->account_id; #if PACKETVER >= 20171207 packet->members[c].GID = m->char_id; #endif memcpy( packet->members[c].playerName, m->name, NAME_LENGTH ); mapindex->getmapname_ext(mapindex_id2name(m->map), packet->members[c].mapName); packet->members[c].leader = (m->leader) ? 0 : 1; packet->members[c].offline = (m->online) ? 0 : 1; #if PACKETVER >= 20170502 packet->members[c].class = m->class; packet->members[c].baseLevel = m->lv; #endif ++c; } packet->packetLen = sizeof(*packet) + c * sizeof( struct PACKET_ZC_GROUP_LIST_SUB ); if ( sd ) { struct player_data *ssd = getFromMSD( sd, 0 ); if ( ssd && ssd->showbuff ) { for ( i = 0, c = 0; i < MAX_PARTY; ++i ) { struct party_member *m = &p->party.member[i]; if ( !m->account_id ) continue; if ( m->online && p->data[i].sd != NULL ) memcpy( packet->members[c].playerName, showing_buff( p->data[i].sd ), NAME_LENGTH ); ++c; } } clif->send( buf, packet->packetLen, &sd->bl, SELF ); } else { int j; for ( j = 0; j < MAX_PARTY; ++j ) { struct party_member *m1 = &p->party.member[j]; if ( !m1 || !m1->account_id ) continue; else { struct map_session_data *tsd = map->id2sd( m1->account_id ); struct player_data *ssd = NULL; if ( !tsd ) continue; ssd = getFromMSD( tsd, 0 ); if ( ssd && ssd->showbuff ) { for ( i = 0, c = 0; i < MAX_PARTY; ++i ) { struct party_member *m = &p->party.member[i]; if ( !m->account_id ) continue; if ( m->online && p->data[i].sd != NULL ) { memcpy( packet->members[c].playerName, showing_buff( p->data[i].sd ), NAME_LENGTH ); } ++c; } } else { for ( i = 0, c = 0; i < MAX_PARTY; ++i ) { struct party_member *m = &p->party.member[i]; if ( !m->account_id ) continue; memcpy( packet->members[c].playerName, m->name, NAME_LENGTH ); ++c; } } clif->send( buf, packet->packetLen, map->id2bl( m1->account_id ), SELF ); } } } } bool pc_authok_pre( struct map_session_data **sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus **st, bool *changing_mapservers ) { struct player_data *ssd; CREATE( ssd, struct player_data, true ); ssd->buff = 0; ssd->showbuff = 0; addToMSD( *sd, ssd, 0, true ); return 0; } void clif_party_member_info_overload( struct party_data *p, struct map_session_data *sd ) { return; } void clif_party_withdraw_overload( struct party_data *p, struct map_session_data *sd, int account_id, const char *name, int flag ) { unsigned char buf[64]; nullpo_retv(p); nullpo_retv(name); if ( !sd && !(flag & 0xf0) ) { int i; ARR_FIND( 0, MAX_PARTY, i, p->data[i].sd != NULL ); if ( i != MAX_PARTY ) sd = p->data[i].sd; } if ( !sd ) return; WBUFW(buf,0) = 0x105; WBUFL(buf,2) = account_id; memcpy( WBUFP(buf,6), name, NAME_LENGTH ); WBUFB(buf,30) = flag & 0x0f; if ( !(flag & 0xf0) ) { for ( int i = 0; i < MAX_PARTY; ++i ) { struct party_member *m = &p->party.member[i]; if ( !m || !m->account_id ) continue; else { struct map_session_data *tsd = map->id2sd( m->account_id ); struct player_data *ssd = NULL; if ( !tsd ) continue; ssd = getFromMSD( tsd, 0 ); if ( ssd && ssd->showbuff ) memcpy( WBUFP(buf,6), showing_buff( sd ), NAME_LENGTH ); else memcpy( WBUFP(buf,6), name, NAME_LENGTH ); clif->send( buf, 31, map->id2bl( m->account_id ), SELF ); } } } else clif->send( buf, 31, &sd->bl, SELF ); } int party_removemember_pre( struct map_session_data **sd, int *account_id, const char **name ) { struct player_data *ssd = getFromMSD( *sd, 0 ); if ( ssd->showbuff ) { clif->message( (*sd)->fd, "You cannot expel a party member while @showbuff is turn ON." ); hookStop(); } return 0; } int party_leave_pre( struct map_session_data **sd ) { struct party_data *p; int i; nullpo_ret(*sd); p = party->search( (*sd)->status.party_id ); if ( p == NULL ) return 0; ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == (*sd)->status.account_id && p->party.member[i].char_id == (*sd)->status.char_id ); if ( i == MAX_PARTY ) return 0; else { struct player_data *ssd = getFromMSD( *sd, 0 ); if ( ssd->showbuff ) ssd->showbuff = 0; } return 0; } ACMD(showbuff) { struct player_data *ssd = getFromMSD( sd, 0 ); struct party_data *p = party->search( sd->status.party_id ); if ( !p ) { clif->message( sd->fd, "You don't have a Party." ); return false; } else if ( ssd->showbuff ) { ssd->showbuff = 0; clif->message( sd->fd, "@showbuff is now turn OFF." ); } else { ssd->showbuff = 1; clif->message( sd->fd, "@showbuff is now turn ON." ); } clif->party_info( p, sd ); return true; } HPExport void plugin_init (void) { addHookPost( status, change_start, status_change_start_post ); addHookPost( status, change_end_, status_change_end_post ); clif->party_info = &clif_party_info_overload; addHookPre( pc, authok, pc_authok_pre ); clif->party_member_info = &clif_party_member_info_overload; clif->party_withdraw = &clif_party_withdraw_overload; addHookPre( party, removemember, party_removemember_pre ); addHookPre( party, leave, party_leave_pre ); addAtcommand( "showbuff", showbuff ); } and i fix some problem reading topic. in line 70 change it int status_change_end_post(int retVal, struct block_list* bl, enum sc_type type, int tid, const char* file, int line) { for int status_change_end_post(int retVal, struct block_list* bl, enum sc_type type, int tid)//, const char* file, int line) { { and in line 50 change it if ( p = party->search(sd->status.party_id )) { for it struct party_data* p = party->search(sd->status.party_id); if (p) { i dont have some errors when compile but got game crash. today im searching about it i found this : //===== Hercules Plugin ====================================== //= Show Party Buffs //===== By: ================================================== //= Samuel [Hercules] //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= Hercules/RagEmu //===== Description: ========================================= //= With this plugin, it will show certain buffs that are //= present with you and your party members in the party //= window. //= B - Blessing //= A - Agility Up //= F - Full Chemical Protection //= S - Soul Link //= + - Devotion //===== Credits: ============================================= //= AnnieRuru - originally made the plugin //= Functor - bug fix //============================================================ #include "common/hercules.h" #include "common/nullpo.h" #include "common/socket.h" #include "common/memmgr.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #include "map/pc.h" #include "map/clif.h" #include "map/party.h" #include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" // should always be the last file included! (if you don't make it last, it'll intentionally break compile time) HPExport struct hplugin_info pinfo = { "partybuff", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.0", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; struct player_data { int buff; }; int status_change_start_post( int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { if ( bl->type == BL_PC && retVal___ > 0 ) { TBL_PC *sd = BL_CAST(BL_PC, bl); struct party_data *p; if (( p = party->search(sd->status.party_id ))) { struct player_data *ssd = getFromMSD( sd, 0 ); int before_buff = ssd->buff; if ( type == SC_BLESSING ) ssd->buff |= 0x1; if ( type == SC_INC_AGI ) ssd->buff |= 0x2; if ( type == SC_PROTECTWEAPON || type == SC_PROTECTSHIELD || type == SC_PROTECTARMOR || type == SC_PROTECTHELM ) if ( sd->sc.data[SC_PROTECTWEAPON] && sd->sc.data[SC_PROTECTSHIELD] && sd->sc.data[SC_PROTECTARMOR] && sd->sc.data[SC_PROTECTHELM] ) ssd->buff |= 0x4; if ( type == SC_SOULLINK ) ssd->buff |= 0x8; if ( type == SC_DEVOTION ) ssd->buff |= 0x10; if ( before_buff != ssd->buff ) // only send the packet if update the status is newly apply, no need to resend if just renew the status clif->party_info( p, NULL ); } } return retVal___; } int status_change_end_post( int retVal___, struct block_list *bl, enum sc_type type, int tid, const char *file, int line ) { if ( bl->type == BL_PC && retVal___ > 0 ) { TBL_PC *sd = BL_CAST(BL_PC, bl); struct party_data *p; if ( sd->state.active == 1 ) { // fix map-server crash when player logout if (( p = party->search(sd->status.party_id ))) { struct player_data *ssd = getFromMSD( sd, 0 ); int before_buff = ssd->buff; if ( type == SC_BLESSING ) ssd->buff &= ~0x1; if ( type == SC_INC_AGI ) ssd->buff &= ~0x2; if ( type == SC_PROTECTWEAPON || type == SC_PROTECTSHIELD || type == SC_PROTECTARMOR || type == SC_PROTECTHELM ) if ( sd->sc.data[SC_PROTECTWEAPON] && sd->sc.data[SC_PROTECTSHIELD] && sd->sc.data[SC_PROTECTARMOR] && sd->sc.data[SC_PROTECTHELM] ) ssd->buff &= ~0x4; if ( type == SC_SOULLINK ) ssd->buff &= ~0x8; if ( type == SC_DEVOTION ) ssd->buff &= ~0x10; if ( before_buff != ssd->buff ) // only send the packet if update the status is newly apply, no need to resend if just renew the status clif->party_info( p, NULL ); } } } return retVal___; } void clif_party_info_overload( struct party_data* p, struct map_session_data *sd ) { unsigned char buf[2+2+NAME_LENGTH+(4+NAME_LENGTH+MAP_NAME_LENGTH_EXT+1+1)*MAX_PARTY]; struct map_session_data* party_sd = NULL; int i, c; nullpo_retv(p); WBUFW(buf,0) = 0xfb; memcpy( WBUFP(buf,4), p->party.name, NAME_LENGTH ); for ( i = 0, c = 0; i < MAX_PARTY; i++ ) { struct party_member* m = &p->party.member[i]; if(!m->account_id) continue; if(party_sd == NULL) party_sd = p->data[i].sd; WBUFL(buf,28+c*46) = m->account_id; if ( m->online && p->data[i].sd != NULL ) { struct player_data *ssd = getFromMSD( p->data[i].sd, 0 ); char temp[NAME_LENGTH]; safesnprintf( temp, NAME_LENGTH, "[%s%s%s%s%s]%s", ( ssd->buff & 0x1 )? "B" : "_", ( ssd->buff & 0x2 )? "A" : "_", ( ssd->buff & 0x4 )? "F" : "_", ( ssd->buff & 0x8 )? "S" : "_", ( ssd->buff & 0x10 )? "+" : "_", m->name ); memcpy(WBUFP(buf,28+c*46+4), temp, NAME_LENGTH); } else memcpy(WBUFP(buf,28+c*46+4), m->name, NAME_LENGTH); mapindex->getmapname_ext(mapindex_id2name(m->map), (char*)WBUFP(buf,28+c*46+28)); WBUFB(buf,28+c*46+44) = (m->leader) ? 0 : 1; WBUFB(buf,28+c*46+45) = (m->online) ? 0 : 1; c++; } WBUFW(buf,2) = 28+c*46; if (sd) clif->send(buf, WBUFW(buf,2), &sd->bl, SELF); else if (party_sd) clif->send(buf, WBUFW(buf,2), &party_sd->bl, PARTY); return; } bool pc_authok_pre( struct map_session_data **sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus **st, bool *changing_mapservers ) { struct player_data *ssd; CREATE( ssd, struct player_data, true ); ssd->buff = 0; addToMSD( *sd, ssd, 0, true ); return true; } int map_quit_post( int retVal___, struct map_session_data *sd ) { //struct player_data *ssd = getFromMSD( sd, 0 ); removeFromMSD( sd, 0 ); return retVal___; } void clif_party_member_info_overload(struct party_data* p, struct map_session_data* sd) { return; } HPExport void plugin_init (void) { clif->party_member_info = &clif_party_member_info_overload; addHookPre( pc, authok, pc_authok_pre ); addHookPost( map, quit, map_quit_post ); clif->party_info = &clif_party_info_overload; addHookPost( status, change_start, status_change_start_post ); addHookPost( status, change_end_, status_change_end_post ); } this work show BA..... in mae player on party window. but sometimes got gravit error and dont have @showbuff and simbol of my job is wrong.
  12. i know it, but i want to make like @newcommand and it call some event.
  13. do what noobzter003 talked. list and compile 2 archives ExtendedBG and ExtendedBG-char check it!!
  14. Im try to make onr plugin to call any event like Onpclogin , or other custom Event.
  15. i got it in latest. showbuff.c: In function ‘status_change_start_post’: showbuff.c:50:3: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (p = party->search(sd->status.party_id)) { ^ In file included from showbuff.c:31:0: showbuff.c: In function ‘plugin_init’: ../plugins/HPMHooking.h:63:54: warning: comparison of distinct pointer types lacks a cast [enabled by default] (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \ ^ showbuff.c:292:2: note: in expansion of macro ‘addHookPost’ addHookPost(status, change_end_, status_change_end_post); ^ PLUGIN showbuff make[1]: Leaving directory `/home/emulador/src/plugins' im Fixed, all problems, but now i got crash map-server, and my debug only show it. Program received signal SIGSEGV, Segmentation fault. 0x00007ffff61000f2 in vsnprintf () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install glibc-2.17-322.el7_9.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-50.el7.x86_64 libcom_err-1.42.9-19.el7.x86_64 libgcc-4.8.5-44.el7.x86_64 libselinux-2.5-15.el7.x86_64 libstdc++-4.8.5-44.el7.x86_64 mariadb-libs-5.5.68-1.el7.x86_64 openssl-libs-1.0.2k-21.el7_9.x86_64 pcre-8.32-17.el7.x86_64 zlib-1.2.7-19.el7_9.x86_64 (gdb) @AnnieRuru
  16. what uor version Herc? today im install latest version and work.
  17. Working, you are the best!
  18. go to src/map/script.c and check if you have get_unique_id.
  19. I need to set 9 slot when player create new account, because when player will be vip i need to change to 15 slots. maybe it is possible to set for group ID, group_id = 0 have 9 slots. group_id = 99 have 15 slots.
  20. a long time ago, we had this functionality. // Adjustment for the natural rate of resistance from status changes. // If 50, status defense is halved, and you need twice as much stats to block // them (eg: 200 vit to completely block stun) pc_status_def_rate: 100 mob_status_def_rate: 100 // Required luk to gain inmunity to status changes. // Luk increases resistance by closing the gap between natural resist and max // linearly. This setting indicates required luk to gain complete immunity. // Eg: 40 vit -> 40% resist. 150 luk -> +50% of the missing gap. // So 40% + (50% of 60%) = 70% pc_luk_status_def: 300 mob_luk_status_def: 300 is it possible to add this in new herc? if yes, how? pls someone can help, this newb friend?
  21. @Ridley and @Kenpachi brows, i was test it /// Characters with group level => 99 don't use gemstones. + if (sd->group->level >= 99) + sd->special_state.no_gemstone = 1; but not work the other method all skill no consume itens, i need put only gems, blue red yelow.. send one light! pls !
×
×
  • Create New...

Important Information

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