Brynner Posted March 22, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1972 Reputation: 207 Joined: 01/08/12 Last Seen: 4 hours ago Share Posted March 22, 2013 (edited) how can i disable gm accounts to drop item. but they can still trade on the player?only the dropping item will be disabled from them. Edited March 22, 2013 by Brynner Quote Link to comment Share on other sites More sharing options...
PewN Posted March 23, 2013 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Share Posted March 23, 2013 clif_displaymessage(sd->fd, "Your Message"); Quote Link to comment Share on other sites More sharing options...
PewN Posted March 22, 2013 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Share Posted March 22, 2013 (edited) try this goto src/map/pc.cfind this /*========================================== * Check if player can drop an item *------------------------------------------*/ int pc_candrop(struct map_session_data *sd, struct item *item) { ..... then replace with this source /*========================================== * Check if player can drop an item *------------------------------------------*/ int pc_candrop(struct map_session_data *sd, struct item *item) { if( item && item->expire_time ) return 0; if( !pc_can_give_items(sd) ) //check if this GM level can drop items return 0; if ( pc_get_group_level(sd) == 50 ) // your group you want to disable clif_displaymessage (sd->fd, msg_txt(426)); return 0; return (itemdb_isdropable(item, pc_get_group_level(sd))); } Edited March 22, 2013 by TrojanWorm Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 22, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1972 Reputation: 207 Joined: 01/08/12 Last Seen: 4 hours ago Author Share Posted March 22, 2013 (edited) thanks it works. but the normal player cannot drop item? and also the admin account. Edited March 22, 2013 by Brynner Quote Link to comment Share on other sites More sharing options...
PewN Posted March 23, 2013 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Share Posted March 23, 2013 ah only with group id 50 can't drop Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 23, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1972 Reputation: 207 Joined: 01/08/12 Last Seen: 4 hours ago Author Share Posted March 23, 2013 group_id must be 1-2 but when i put 1 or 2. all level are become affected Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 23, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 8 hours ago Share Posted March 23, 2013 /*========================================== * Check if player can drop an item *------------------------------------------*/ int pc_candrop(struct map_session_data *sd, struct item *item) { if( item && item->expire_time ) return 0; if( !pc_can_give_items(sd) ) //check if this GM level can drop items return 0; if ( pc_get_group_level(sd) == 50 ){ // your group you want to disable clif_displaymessage (sd->fd, msg_txt(426)); return 0; } return (itemdb_isdropable(item, pc_get_group_level(sd))); } you have to put the curley bracket if the contents inside the IF-ELSE statement has more than 1 lines 1 Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 23, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1972 Reputation: 207 Joined: 01/08/12 Last Seen: 4 hours ago Author Share Posted March 23, 2013 /*========================================== * Check if player can drop an item *------------------------------------------*/ int pc_candrop(struct map_session_data *sd, struct item *item) { if( item && item->expire_time ) return 0; if( !pc_can_give_items(sd) ) //check if this GM level can drop items return 0; if ( pc_get_group_level(sd) == 50 ){ // your group you want to disable clif_displaymessage (sd->fd, msg_txt(426)); return 0; } return (itemdb_isdropable(item, pc_get_group_level(sd))); } you have to put the curley bracket if the contents inside the IF-ELSE statement has more than 1 lines wow thanks. that's why all group level is become affected. Quote Link to comment Share on other sites More sharing options...
PewN Posted March 23, 2013 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Share Posted March 23, 2013 oh ahaha sorry ahah Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 23, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1972 Reputation: 207 Joined: 01/08/12 Last Seen: 4 hours ago Author Share Posted March 23, 2013 is this possible? /*==========================================* Check if player can drop an item*------------------------------------------*/int pc_candrop(struct map_session_data *sd, struct item *item){if( item && item->expire_time )return 0;if( !pc_can_give_items(sd) ) //check if this GM level can drop itemsreturn 0;if ( sd->group_id > 0 && sd->group_id < 99 ){ // your group you want to disableclif_displaymessage (sd->fd, msg_txt(426));return 0;}return (itemdb_isdropable(item, pc_get_group_level(sd)));} below group id 99 and higher than 0 level are allowed to drop? Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 23, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 8 hours ago Share Posted March 23, 2013 if ( pc_get_group_level(sd) >= 1 && pc_get_group_level(sd) < 99 ){ Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 23, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1972 Reputation: 207 Joined: 01/08/12 Last Seen: 4 hours ago Author Share Posted March 23, 2013 if ( pc_get_group_level(sd) >= 1 && pc_get_group_level(sd) < 99 ){ thanks Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 23, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1972 Reputation: 207 Joined: 01/08/12 Last Seen: 4 hours ago Author Share Posted March 23, 2013 how can i change the display message? i just want to make it GM accounts are not allowed to drop any kind of items. Quote Link to comment Share on other sites More sharing options...
Brynner Posted March 23, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 1972 Reputation: 207 Joined: 01/08/12 Last Seen: 4 hours ago Author Share Posted March 23, 2013 tha clif_displaymessage(sd->fd, "Your Message"); thanks Quote Link to comment Share on other sites More sharing options...
Question
Brynner
how can i disable gm accounts to drop item. but they can still trade on the player?only the dropping item will be disabled from them.
Edited by BrynnerLink to comment
Share on other sites
13 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.