Jump to content

joecalis

Members
  • Posts

    64
  • Joined

  • Last visited

  • Days Won

    7

joecalis last won the day on May 11 2023

joecalis had the most liked content!

2 Followers

Profile Information

  • Gender
    Male
  • Location
    Your Heart
  • Interests
    Games, Anime, K-Pop

Recent Profile Visitors

4778 profile views

joecalis's Achievements

Santa Poring

Santa Poring (3/15)

  • Reacting Well
  • First Post
  • Collaborator
  • Dedicated
  • Week One Done

Recent Badges

40

Reputation

7

Community Answers

  1. I don't know what you're trying to accomplish, I thought you wanted party member's hp to be seen even while in gvg map. If you want party member's hp to be seen while cloaked, that's different since it is not visible by party members by default. (Check edit at the bottom) Here is what my unedited server (default settings) look like when a party member is cloaked/hidden. vlc-record-2023-05-13-15h48m49s-2023-05-13 15-46-17.mp4-.mp4 Anyway these are the codes that work for me without the cloaking thing: void clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp) { struct map_session_data* sd = map_id2sd(id); struct map_session_data* tsd = (struct map_session_data*)session[fd]->session_data; bool sameparty = false; bool isBg = false; if (sd && tsd && (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m))) { if (sd->status.party_id && tsd->status.party_id && sd->status.party_id == tsd->status.party_id) sameparty = true; if (sd->bg_id && tsd->bg_id && sd->bg_id == tsd->bg_id) isBg = true; if (!sameparty && !isBg) return; } #if PACKETVER < 20100126 const int cmd = 0x106; #else const int cmd = 0x80e; #endif WFIFOHEAD(fd,packet_len(cmd)); WFIFOW(fd,0) = cmd; WFIFOL(fd,2) = id; #if PACKETVER < 20100126 if( maxhp > INT16_MAX ) {// To correctly display the %hp bar. [Skotlex] WFIFOW(fd,6) = hp/(maxhp/100); WFIFOW(fd,8) = 100; } else { WFIFOW(fd,6) = hp; WFIFOW(fd,8) = maxhp; } #else WFIFOL(fd,6) = hp; WFIFOL(fd,10) = maxhp; #endif WFIFOSET(fd, packet_len(cmd)); } static int clif_hpmeter_sub(struct block_list *bl, va_list ap) { struct map_session_data *sd, *tsd; #if PACKETVER < 20100126 const int cmd = 0x106; #else const int cmd = 0x80e; #endif sd = va_arg(ap, struct map_session_data *); tsd = (TBL_PC *)bl; nullpo_ret(sd); nullpo_ret(tsd); if( !tsd->fd || tsd == sd ) return 0; if (!pc_has_permission(tsd, PC_PERM_VIEW_HPMETER)) return 0; bool sameparty = false; bool isBg = false; if (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m)) { if (sd->status.party_id && tsd->status.party_id && sd->status.party_id == tsd->status.party_id) sameparty = true; if (sd->bg_id && tsd->bg_id && sd->bg_id == tsd->bg_id) isBg = true; if(!sameparty && !isBg) return 0; } WFIFOHEAD(tsd->fd,packet_len(cmd)); WFIFOW(tsd->fd,0) = cmd; WFIFOL(tsd->fd,2) = sd->status.account_id; #if PACKETVER < 20100126 if( sd->battle_status.max_hp > INT16_MAX ) { //To correctly display the %hp bar. [Skotlex] WFIFOW(tsd->fd,6) = sd->battle_status.hp/(sd->battle_status.max_hp/100); WFIFOW(tsd->fd,8) = 100; } else { WFIFOW(tsd->fd,6) = sd->battle_status.hp; WFIFOW(tsd->fd,8) = sd->battle_status.max_hp; } #else WFIFOL(tsd->fd,6) = sd->battle_status.hp; WFIFOL(tsd->fd,10) = sd->battle_status.max_hp; #endif WFIFOSET(tsd->fd,packet_len(cmd)); return 0; } For the cloaking/hiding I'll have to look at it some other time. Edit: NVM I found an easy fix to the cloaking/hiding thing Find: //Whenever we send "changeoption" to the client, the provoke icon is lost //There is probably an option for the provoke icon, but as we don't know it, we have to do this for now if (sc->data[SC_PROVOKE]) { const struct TimerData *td = get_timer(sc->data[SC_PROVOKE]->timer); clif_status_change(bl, StatusIconChangeTable[SC_PROVOKE], 1, (!td ? INFINITE_TICK : DIFF_TICK(td->tick, gettick())), 0, 0, 0); } Change To: //Whenever we send "changeoption" to the client, the provoke icon is lost //There is probably an option for the provoke icon, but as we don't know it, we have to do this for now if (sc->data[SC_PROVOKE]) { const struct TimerData *td = get_timer(sc->data[SC_PROVOKE]->timer); clif_status_change(bl, StatusIconChangeTable[SC_PROVOKE], 1, (!td ? INFINITE_TICK : DIFF_TICK(td->tick, gettick())), 0, 0, 0); } if (sd) clif_hpmeter(sd); It seems that the party member hp doesn't show when you cloak in front of other party members but if you walk away outside of their screen then walk back it'll show, so I just made it that if you cloak you'll send your hpmeter to everyone in screen range.
  2. Try to change this: if (unit->group->skill_id == PF_SPIDERWEB && unit->bl.id != srcunit->bl.id && unit->group->src_id == src->id) { //skill_delunitgroup(unit->group); // This one is instant Delete unit->limit = min(unit->limit,1000); // This one you can change "1000" to change the timing (lower number = faster deletion) unit->group->limit = unit->limit; return 1; } to this: if (unit->group->skill_id == PF_SPIDERWEB && unit->bl.id != srcunit->bl.id && unit->group->src_id == src->id && unit->group->val2) { //skill_delunitgroup(unit->group); // This one is instant Delete unit->limit = min(unit->limit,1000); // This one you can change "1000" to change the timing (lower number = faster deletion) unit->group->limit = unit->limit; return 1; }
  3. You tried OnPCCalcStatEvent which doesn't exists try: OnPCStatCalcEvent
  4. change this: if(sd && (sd->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m))) return; to this: struct map_session_data* tsd = (struct map_session_data*)session[fd]->session_data; if (sd && tsd && (sd->status.party_id && tsd->status.party_id && sd->status.party_id != tsd->status.party_id) && (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m))) return; change second code: if (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m)) return 0; to this: if ((sd->status.party_id && tsd->status.party_id && sd->status.party_id != tsd->status.party_id) && (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m))) return 0;
  5. In the last code I provided just change this: if(sd && (sd->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || sd->special_state.perfect_hiding)) return; to this: if(sd && (sd->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m))) return; then the second one: if (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding) return 0; to this: if (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding || map_flag_gvg(sd->bl.m)) return 0;
  6. Try this: /*========================================== * Sends HP bar to a single fd. [Skotlex] *------------------------------------------*/ void clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp) { struct map_session_data* sd = map_id2sd(id); if(sd && (sd->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) || sd->special_state.perfect_hiding)) return; #if PACKETVER < 20100126 const int cmd = 0x106; #else const int cmd = 0x80e; #endif WFIFOHEAD(fd,packet_len(cmd)); WFIFOW(fd,0) = cmd; WFIFOL(fd,2) = id; #if PACKETVER < 20100126 if( maxhp > INT16_MAX ) {// To correctly display the %hp bar. [Skotlex] WFIFOW(fd,6) = hp/(maxhp/100); WFIFOW(fd,8) = 100; } else { WFIFOW(fd,6) = hp; WFIFOW(fd,8) = maxhp; } #else WFIFOL(fd,6) = hp; WFIFOL(fd,10) = maxhp; #endif WFIFOSET(fd, packet_len(cmd)); } Then find this: if( !tsd->fd || tsd == sd ) return 0; if (!pc_has_permission(tsd, PC_PERM_VIEW_HPMETER)) return 0; WFIFOHEAD(tsd->fd,packet_len(cmd)); Change it to this: if( !tsd->fd || tsd == sd ) return 0; if (!pc_has_permission(tsd, PC_PERM_VIEW_HPMETER)) return 0; if (sd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || sd->special_state.perfect_hiding) return 0; WFIFOHEAD(tsd->fd,packet_len(cmd));
  7. in clif.cpp Find: void clif_hpmeter_single( map_session_data& sd, uint32 id, uint32 hp, uint32 maxhp ){ struct PACKET_ZC_NOTIFY_HP_TO_GROUPM p = {}; Change To: void clif_hpmeter_single( map_session_data& sd, uint32 id, uint32 hp, uint32 maxhp ){ struct PACKET_ZC_NOTIFY_HP_TO_GROUPM p = {}; map_session_data* dstsd = map_id2sd(id); if (dstsd && (dstsd->sc.option & (OPTION_HIDE | OPTION_CLOAK | OPTION_CHASEWALK) || dstsd->special_state.perfect_hiding)) return;
  8. Remove what ever code I sent before, and do this instead. in skill.cpp Find: int skill_greed(struct block_list *bl, va_list ap); static int skill_cell_overlap(struct block_list *bl, va_list ap); Change To: int skill_greed(struct block_list *bl, va_list ap); static int skill_web_remover(struct block_list *bl, va_list ap); static int skill_cell_overlap(struct block_list *bl, va_list ap); Find: // Execute on all targets standing on this cell if (range == 0 && active_flag) map_foreachincell(skill_unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),1); Change To: if (skill_id == PF_SPIDERWEB) map_foreachinarea(skill_web_remover, src->m, x - 1, y - 1, x + 1, y + 1, BL_SKILL, src, unit); // Execute on all targets standing on this cell if (range == 0 && active_flag) map_foreachincell(skill_unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),1); Find: /*========================================== * Check new skill unit cell when overlapping in other skill unit cell. * Catched skill in cell value pushed to *unit pointer. * Set (*alive) to 0 will ends 'new unit' check *------------------------------------------*/ static int skill_cell_overlap(struct block_list *bl, va_list ap) Change To: static int skill_web_remover(struct block_list* bl, va_list ap) { struct block_list* src; struct skill_unit* srcunit; struct skill_unit* unit; src = va_arg(ap, struct block_list*); srcunit = va_arg(ap, struct skill_unit*); unit = (struct skill_unit*)bl; if (unit == NULL || unit->group == NULL) return 0; if (unit->group->skill_id == PF_SPIDERWEB && unit->bl.id != srcunit->bl.id && unit->group->src_id == src->id) { //skill_delunitgroup(unit->group); // This one is instant Delete unit->limit = min(unit->limit,1000); // This one you can change "1000" to change the timing (lower number = faster deletion) unit->group->limit = unit->limit; return 1; } return 0; } /*========================================== * Check new skill unit cell when overlapping in other skill unit cell. * Catched skill in cell value pushed to *unit pointer. * Set (*alive) to 0 will ends 'new unit' check *------------------------------------------*/ static int skill_cell_overlap(struct block_list *bl, va_list ap) This line you can change depending on what you prefer. //skill_delunitgroup(unit->group); // This one is instant Delete unit->limit = min(unit->limit,1000); // This one you can change "1000" to change the timing (lower number = faster deletion) unit->group->limit = unit->limit; If you want to make web instantly vanish remove the "//" before the skill_delunitgroup then put "//" before unit->limit and unit->group->limit If you want to change the speed of when it disappears edit the "1000" to any number you want, it's in milliseconds. This however deletes nearby webs even if you don't have a target and will only delete your own web vlc-record-2023-05-10-17h19m40s-2023-05-10 17-17-32.mp4-.mp4
  9. no it's not. The bubblegum you are using adds 100% drop chance that's why it's the same. Try using bubblegum id: 12264 that one adds 200% drop chance
  10. in unit.cpp Find: // SC_MAGICPOWER needs to switch states at start of cast skill_toggle_magicpower(src, skill_id); Change To: // SC_MAGICPOWER needs to switch states at start of cast skill_toggle_magicpower(src, skill_id); if (sd && skill_id == PF_SPIDERWEB && !skill_pos_maxcount_check(src, skill_x, skill_y, skill_id, skill_lv, BL_PC, false)) { int oldweb = -1; int webid = 0; for (int i = 0; i < MAX_SKILLUNITGROUP && sd->ud.skillunit[i]; i++) { if (sd->ud.skillunit[i]->skill_id == skill_id) { if (webid == 0) { webid = sd->ud.skillunit[i]->group_id; oldweb = i; } else if (webid != 0 && sd->ud.skillunit[i]->group_id < webid) { webid = sd->ud.skillunit[i]->group_id; oldweb = i; } } } if (oldweb >= 0) { skill_delunitgroup(sd->ud.skillunit[oldweb]); } } This will delete the oldest active spider web when you try to cast it while it is at max count. You can change the maxcount in skill_db.txt to any number under 25 to raise the limit before web deletion. Edit: Sorry I placed the code before requirement checks, but its fixed now.
  11. in status.cpp Find: case SC_SIGNUMCRUCIS: // Only affects demons and undead element (but not players) if((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC) return 0; break; Change To: case SC_SIGNUMCRUCIS: // Now affects all monsters (but not players) if(bl->type == BL_PC) return 0; break;
  12. change to this: for (i = 0; i < MAX_MOB_DROP_TOTAL; i++) { if (mob->dropitem[i].nameid == 0 || mob->dropitem[i].rate < 1) continue; std::shared_ptr<item_data> id = item_db.find(mob->dropitem[i].nameid); if (id == nullptr) continue; int droprate = apply_rate(mob->dropitem[i].rate, drop_modifier); //mob_getdroprate( &sd->bl, mob, mob->dropitem[i].rate, drop_modifier ); // Cap it to 100% droprate = min(droprate, 10000); // If the monster's drop rate can become 0 if (battle_config.drop_rate0item) { droprate = max(droprate, 0); } else { // If not - cap to 0.01% drop rate - as on official servers droprate = max(droprate, 1); } int dropbonus = 0; if (pc_isvip(sd)) dropbonus += (battle_config.vip_drop_increase * droprate) / 100; dropbonus += (sd->sc.getSCE(SC_ITEMBOOST) ? ((droprate * sd->sc.getSCE(SC_ITEMBOOST)->val1) / 100) : 0); sprintf(atcmd_output2, (dropbonus > 0 ? " - %s %02.02f%% + (%02.02f%%)" : " - %s %02.02f%%"), item_db.create_item_link(id).c_str(), (float)droprate / 100, (float)dropbonus / 100); strcat(atcmd_output, atcmd_output2); clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1246)); // This monster has no drops. // mvp if( mob->get_bosstype() == BOSSTYPE_MVP ){ float mvppercent, mvpremain; sprintf(atcmd_output, msg_txt(sd,1247), mob->mexp); // MVP Bonus EXP:%llu clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, msg_txt(sd,1248)); // MVP Items: clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); mvpremain = 100.0; //Remaining drop chance for official mvp drop mode j = 0; for (i = 0; i < MAX_MVP_DROP_TOTAL; i++) { if (mob->mvpitem[i].nameid == 0) continue; std::shared_ptr<item_data> id = item_db.find(mob->mvpitem[i].nameid); if (id == nullptr) continue; //Because if there are 3 MVP drops at 50%, the first has a chance of 50%, the second 25% and the third 12.5% mvppercent = (float)mob->mvpitem[i].rate * mvpremain / 10000.0f; if(battle_config.item_drop_mvp_mode == 0) { mvpremain -= mvppercent; } if (mvppercent > 0) { j++; sprintf(atcmd_output2, " - %s %02.02f%%", item_db.create_item_link( id ).c_str(), mvppercent); strcat(atcmd_output, atcmd_output2); clif_displaymessage(fd, atcmd_output); strcpy(atcmd_output, " "); } } if (j == 0) clif_displaymessage(fd, msg_txt(sd,1249)); // This monster has no MVP prizes. } } return 0; }
  13. try this: struct item_data * item_data = item_array[i]; sprintf(atcmd_output, "Item: '%s'/'%s' (%hu) Type: %s", // msg_txt(sd, 1277) item_data->name,createItemLink(item_data->nameid, 0, NULL).c_str(),item_data->nameid, (item_data->type != IT_AMMO) ? itemdb_typename((enum item_types)item_data->type) : itemdb_typename_ammo((enum e_item_ammo)item_data->look));
  14. If you have itemlink commands by Cydh implemented you just have to edit in atcommand.cpp Find: struct item_data * item_data = item_array[i]; sprintf(atcmd_output, msg_txt(sd,1277), // Item: '%s'/'%s'[%d] (%hu) Type: %s | Extra Effect: %s item_data->name,item_data->jname,item_data->slot,item_data->nameid, (item_data->type != IT_AMMO) ? itemdb_typename((enum item_types)item_data->type) : itemdb_typename_ammo((enum e_item_ammo)item_data->look), (item_data->script==NULL)? msg_txt(sd,1278) : msg_txt(sd,1279) // None / With script ); Change To: struct item_data * item_data = item_array[i]; sprintf(atcmd_output, "Item: '%s'/'%s' (%hu)", // msg_txt(sd, 1277) item_data->name, createItemLink(item_data->nameid, 0, NULL).c_str(),item_data->nameid);
  15. in atcommand.cpp Find: for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++) { int dropchance = item_data->mob[j].chance; Change To: for (j=0; j < MAX_SEARCH && item_data->mob[j].chance > 0; j++) { int dropchance = item_data->mob[j].chance; int dropbonus = 0; Find: #endif if (pc_isvip(sd)) // Display item rate increase for VIP dropchance += (dropchance * battle_config.vip_drop_increase) / 100; sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.); Change To: #endif if(sd->sc.count && sd->sc.data[SC_ITEMBOOST]) // Display drop rate increase for SC_ITEMBOOST eg. Bubblegum dropbonus += (dropchance * sd->sc.data[SC_ITEMBOOST]->val1) / 100; if (pc_isvip(sd)) // Display item rate increase for VIP dropbonus += (dropchance * battle_config.vip_drop_increase) / 100; if(dropbonus) sprintf(atcmd_output, "- %s (%d): %02.02f%% + (%02.02f%%)", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100., dropbonus/100.); else sprintf(atcmd_output, "- %s (%d): %02.02f%%", mob_db(item_data->mob[j].id)->jname, item_data->mob[j].id, dropchance/100.);
×
×
  • Create New...