trizzy Posted June 24, 2015 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 92 Reputation: 2 Joined: 01/04/15 Last Seen: April 27, 2021 Share Posted June 24, 2015 (edited) As the title said, how to disable /stat+ example: /str+ 99 on player? and enable @stat example: @str 99 on player is there any solution on this? Thanks in advance! i don't know how to edit anyone please? even bind command would be help. ACMD_DEF2("str", param), ACMD_DEF2("agi", param), ACMD_DEF2("vit", param), ACMD_DEF2("int", param), ACMD_DEF2("dex", param), ACMD_DEF2("luk", param), /*========================================== * *------------------------------------------*/ ACMD_FUNC(param) { uint8 i; int value = 0; const char* param[] = { "str", "agi", "vit", "int", "dex", "luk" }; short new_value, *status[6], max_status[6]; //we don't use direct initialization because it isn't part of the c standard. nullpo_retr(-1, sd); memset(atcmd_output, '\0', sizeof(atcmd_output)); if (!message || !*message || sscanf(message, "%d", &value) < 1 || value == 0) { clif_displaymessage(fd, msg_txt(sd,1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>). return -1; } ARR_FIND( 0, ARRAYLENGTH(param), i, strcmpi(command+1, param[i]) == 0 ); if( i == ARRAYLENGTH(param) || i > MAX_STATUS_TYPE) { // normally impossible... clif_displaymessage(fd, msg_txt(sd,1013)); // Please enter a valid value (usage: @str/@agi/@vit/@int/@dex/@luk <+/-adjustment>). return -1; } status[0] = &sd->status.str; status[1] = &sd->status.agi; status[2] = &sd->status.vit; status[3] = &sd->status.int_; status[4] = &sd->status.dex; status[5] = &sd->status.luk; if( pc_has_permission(sd, PC_PERM_BYPASS_MAX_STAT) ) max_status[0] = max_status[1] = max_status[2] = max_status[3] = max_status[4] = max_status[5] = SHRT_MAX; else { max_status[0] = pc_maxparameter(sd,PARAM_STR); max_status[1] = pc_maxparameter(sd,PARAM_AGI); max_status[2] = pc_maxparameter(sd,PARAM_VIT); max_status[3] = pc_maxparameter(sd,PARAM_INT); max_status[4] = pc_maxparameter(sd,PARAM_DEX); max_status[5] = pc_maxparameter(sd,PARAM_LUK); } if(value > 0 && *status[i] + value >= max_status[i]) new_value = max_status[i]; else if(value < 0 && *status[i] <= -value) new_value = 1; else new_value = *status[i] + value; if (new_value != *status[i]) { *status[i] = new_value; clif_updatestatus(sd, SP_STR + i); clif_updatestatus(sd, SP_USTR + i); status_calc_pc(sd, SCO_FORCE); clif_displaymessage(fd, msg_txt(sd,42)); // Stat changed. } else { if (value < 0) clif_displaymessage(fd, msg_txt(sd,41)); // Unable to decrease the number/value. else clif_displaymessage(fd, msg_txt(sd,149)); // Unable to increase the number/value. return -1; } return 0; } Edited June 24, 2015 by trizzy Quote Link to comment Share on other sites More sharing options...
trizzy Posted June 25, 2015 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 92 Reputation: 2 Joined: 01/04/15 Last Seen: April 27, 2021 Author Share Posted June 25, 2015 anyone? Quote Link to comment Share on other sites More sharing options...
Chaos92 Posted July 8, 2015 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1827 Reputation: 288 Joined: 08/03/12 Last Seen: 40 minutes ago Share Posted July 8, 2015 to enable @str or such to players.. add those stats commands in groups.conf Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 10, 2015 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 10, 2015 To disable /str+ X you need to mod the src (I think it's clif_parse_StatusUp function) Quote Link to comment Share on other sites More sharing options...
trizzy Posted July 14, 2015 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 92 Reputation: 2 Joined: 01/04/15 Last Seen: April 27, 2021 Author Share Posted July 14, 2015 To disable /str+ X you need to mod the src (I think it's clif_parse_StatusUp function) where's the exact location of this clif_parse_StatusUp ? to enable @str or such to players.. add those stats commands in groups.conf i tried but is not working! have you try it? Quote Link to comment Share on other sites More sharing options...
Chaos92 Posted July 14, 2015 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1827 Reputation: 288 Joined: 08/03/12 Last Seen: 40 minutes ago Share Posted July 14, 2015 show us how do u add that Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 14, 2015 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 14, 2015 It's a clif function in clif.c Quote Link to comment Share on other sites More sharing options...
trizzy Posted July 14, 2015 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 92 Reputation: 2 Joined: 01/04/15 Last Seen: April 27, 2021 Author Share Posted July 14, 2015 (edited) show us how do u add that isn't str: true agi: true on groups.conf? To disable /str+ X you need to mod the src (I think it's clif_parse_StatusUp function) is this one? /// Request to increase status (CZ_STATUS_CHANGE). /// 00bb <status id>.W <amount>.B /// status id: /// SP_STR ~ SP_LUK /// amount: /// Old clients always send 1 for this, even when using /str+ and the like. /// Newer clients (2013-12-23 and newer) send the correct amount. void clif_parse_StatusUp(int fd,struct map_session_data *sd) { int increase_amount = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]); if( increase_amount < 0 ) { ShowDebug("clif_parse_StatusUp: Negative 'increase' value sent by client! (fd: %d, value: %d)\n", fd, increase_amount); } pc_statusup(sd,RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]),increase_amount); } Edited July 14, 2015 by trizzy Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 15, 2015 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 15, 2015 Yes I think it's here Quote Link to comment Share on other sites More sharing options...
Chaos92 Posted July 17, 2015 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1827 Reputation: 288 Joined: 08/03/12 Last Seen: 40 minutes ago Share Posted July 17, 2015 yes, add that to 0 groupid/level for normal player enable @str @agi / such to remove /str or such u need to change src folder. Quote Link to comment Share on other sites More sharing options...
Question
trizzy
As the title said, how to disable /stat+ example: /str+ 99 on player?
and enable @stat example: @str 99 on player is there any solution on this?
Thanks in advance!
i don't know how to edit
anyone please? even bind command would be help.
Edited by trizzyLink to comment
Share on other sites
9 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.