Akbare Posted December 14, 2021 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 491 Reputation: 19 Joined: 11/19/11 Last Seen: June 5, 2023 Share Posted December 14, 2021 (edited) i want to ask how to change this VIP message msgstringtable.txt line 3033 %.1f%% (VIP %.1f%% + Server %.1f%%)# i found this code but i'dont know how to change /** * Transmit personal information to player. (rates) * 0x08cb <packet len>.W <exp>.W <death>.W <drop>.W <DETAIL_EXP_INFO>7B (ZC_PERSONAL_INFOMATION) * <InfoType>.B <Exp>.W <Death>.W <Drop>.W (DETAIL_EXP_INFO 0x08cb) * 0x097b <packet len>.W <exp>.L <death>.L <drop>.L <DETAIL_EXP_INFO>13B (ZC_PERSONAL_INFOMATION2) * 0x0981 <packet len>.W <exp>.W <death>.W <drop>.W <activity rate>.W <DETAIL_EXP_INFO>13B (ZC_PERSONAL_INFOMATION_CHN) * <InfoType>.B <Exp>.L <Death>.L <Drop>.L (DETAIL_EXP_INFO 0x97b|0981) * FIXME! * - Find/decide for details of EXP, Drop, and Death penalty rates * - For now, we're assuming values for DETAIL_EXP_INFO are: * 0 - map adjustment (bexp mapflag), 1 - Premium/VIP adjustment, 2 - Server rate adjustment, 3 - None */ #ifdef VIP_ENABLE void clif_display_pinfo(struct map_session_data *sd, int cmdtype) { if (sd) { struct s_packet_db* info; int16 len, szdetails = 13, maxinfotype = PINFO_MAX; int cmd = 0, fd, i = 0; int tot_baseexp = 100, tot_penalty = 100, tot_drop = 100, factor = 1000; int details_bexp[PINFO_MAX]; int details_drop[PINFO_MAX]; int details_penalty[PINFO_MAX]; /** * Set for EXP */ //0:PCRoom details_bexp[0] = map_getmapflag(sd->bl.m, MF_BEXP); if (details_bexp[0] == 100 || !details_bexp[0]) details_bexp[0] = 0; else { if (details_bexp[0] < 100) { details_bexp[0] = 100 - details_bexp[0]; details_bexp[0] = 0 - details_bexp[0]; } else details_bexp[0] = details_bexp[0] - 100; } //1:Premium if (pc_isvip(sd)) { details_bexp[1] = battle_config.vip_base_exp_increase * 10; if (details_bexp[1] < 0) details_bexp[1] = 0 - details_bexp[1]; } else details_bexp[1] = 0; //2:Server details_bexp[2] = battle_config.base_exp_rate; if (details_bexp[2] == 100) details_bexp[2] = 0; else { if (details_bexp[2] < 100) { details_bexp[2] = 100 - details_bexp[2]; details_bexp[2] = 0 - details_bexp[2]; } else details_bexp[2] = details_bexp[2] - 100; } //3:TPLUS details_bexp[3] = 0; /* End - EXP set*/ /** * Set for Drop rate */ //0:PCRoom details_drop[0] = 0; //1:Premium details_drop[1] = (battle_config.vip_drop_increase * battle_config.item_rate_common) / 100; if (pc_isvip(sd)) { if (details_drop[1] < 0) details_drop[1] = 0 - details_drop[1]; } else details_drop[1] = 0; //2:Server details_drop[2] = battle_config.item_rate_common; if (details_drop[2] == 100) details_drop[2] = 0; else { if (details_drop[2] < 100) { details_drop[2] = 100 - details_drop[2]; details_drop[2] = 0 - details_drop[2]; } else details_drop[2] = details_drop[2] - 100; } //3:TPLUS details_drop[3] = 0; /* End - Drop set*/ /** * Set for Penalty rate */ //! FIXME: Current penalty system makes this announcement unable to give info on + or - rate //0:PCRoom details_penalty[0] = 0; //1:Premium if (pc_isvip(sd)) { details_penalty[1] = battle_config.vip_exp_penalty_base; if (details_penalty[1] == 100) details_penalty[1] = 0; else { if (details_penalty[1] < 100) { details_penalty[1] = 100 - details_penalty[1]; details_penalty[1] = 0 - details_penalty[1]; } else details_penalty[1] = details_penalty[1] - 100; } } else details_penalty[1] = 0; //2:Server details_penalty[2] = battle_config.death_penalty_base; if (details_penalty[2] == 100) details_penalty[2] = 0; else { if (details_penalty[2] < 100) { details_penalty[2] = 100 - details_penalty[2]; details_penalty[2] = 0 - details_penalty[2]; } else details_penalty[2] = details_penalty[2] - 100; } //3:TPLUS details_penalty[3] = 0; /* End - Penalty set*/ cmd = packet_db_ack[cmdtype]; info = &packet_db[cmd]; len = info->len; //this is the base len without details if(!len) return; //version as packet disable if (cmdtype == ZC_PERSONAL_INFOMATION && cmd == 0x08cb) { //0x08cb version szdetails = 7; factor = 1; } else if (cmd == 0x097b) { tot_baseexp *= factor; tot_drop *= factor; tot_penalty *= factor; } fd = sd->fd; WFIFOHEAD(fd,len+maxinfotype*szdetails); WFIFOW(fd,0) = cmd; for (i = 0; i < maxinfotype; i++) { WFIFOB(fd,info->pos[4]+(i*szdetails)) = i; //infotype //0 PCRoom, 1 Premium, 2 Server, 3 TPlus WFIFOL(fd,info->pos[5]+(i*szdetails)) = details_bexp[i]*factor; WFIFOL(fd,info->pos[6]+(i*szdetails)) = details_penalty[i]*factor; WFIFOL(fd,info->pos[7]+(i*szdetails)) = details_drop[i]*factor; tot_baseexp += details_bexp[i]*factor; tot_drop += details_penalty[i]*factor; tot_penalty += details_drop[i]*factor; len += szdetails; } WFIFOW(fd,info->pos[0]) = len; //packetlen if (cmd == 0x08cb) { //0x08cb version WFIFOW(fd,info->pos[1]) = tot_baseexp; WFIFOW(fd,info->pos[2]) = tot_drop; WFIFOW(fd,info->pos[3]) = tot_penalty; } else { //2013-08-07aRagexe uses 0x097b WFIFOL(fd,info->pos[1]) = tot_baseexp; WFIFOL(fd,info->pos[2]) = tot_drop; WFIFOL(fd,info->pos[3]) = tot_penalty; } if (cmdtype == ZC_PERSONAL_INFOMATION_CHN) WFIFOW(fd,info->pos[8]) = 0; //activity rate case of event ?? WFIFOSET(fd,len); } } #endif i thought it was arround this part for (i = 0; i < maxinfotype; i++) { WFIFOB(fd,info->pos[4]+(i*szdetails)) = i; //infotype //0 PCRoom, 1 Premium, 2 Server, 3 TPlus WFIFOL(fd,info->pos[5]+(i*szdetails)) = details_bexp[i]*factor; WFIFOL(fd,info->pos[6]+(i*szdetails)) = details_penalty[i]*factor; WFIFOL(fd,info->pos[7]+(i*szdetails)) = details_drop[i]*factor; tot_baseexp += details_bexp[i]*factor; tot_drop += details_penalty[i]*factor; tot_penalty += details_drop[i]*factor; len += szdetails; } i want to change like this one with VIP premium before VIP active When VIP thx for advance Edited December 14, 2021 by Akbare Quote Link to comment Share on other sites More sharing options...
Question
Akbare
i want to ask how to change this VIP message
msgstringtable.txt
line 3033
%.1f%% (VIP %.1f%% + Server %.1f%%)#
i found this code but i'dont know how to change
i thought it was arround this part
for (i = 0; i < maxinfotype; i++) { WFIFOB(fd,info->pos[4]+(i*szdetails)) = i; //infotype //0 PCRoom, 1 Premium, 2 Server, 3 TPlus WFIFOL(fd,info->pos[5]+(i*szdetails)) = details_bexp[i]*factor; WFIFOL(fd,info->pos[6]+(i*szdetails)) = details_penalty[i]*factor; WFIFOL(fd,info->pos[7]+(i*szdetails)) = details_drop[i]*factor; tot_baseexp += details_bexp[i]*factor; tot_drop += details_penalty[i]*factor; tot_penalty += details_drop[i]*factor; len += szdetails; }
i want to change like this one with VIP premium
before VIP active
When VIP
thx for advance
Edited by AkbareLink to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.