Jump to content
  • 0

how can i disable gm accounts to drop item


Question

Posted (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 by Brynner

13 answers to this question

Recommended Posts

Posted (edited)

try this goto src/map/pc.c

find 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 by TrojanWorm
Posted
/*==========================================
 * 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

  • Upvote 1
Posted
/*==========================================
 * 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.

Posted

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 items
return 0;
if ( sd->group_id > 0 && sd->group_id < 99 ){ // your group you want to disable
clif_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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...