Currently Posted July 1, 2014 Posted July 1, 2014 (edited) id: 1 name: "Super Player" inherit: ( "Player" ) /* can do everything Players can and more */ level: 0 commands: { /* informational commands */ commands: true charcommands: true help: true rates: true uptime: true showdelay: true exp: true mobinfo: true iteminfo: true whodrops: true time: true jailtime: true hominfo: true homstats: true showexp: true showzeny: true whereis: true /* feature commands */ refresh: true noask: true noks: true autoloot: true alootid: true autoloottype: true autotrade: true request: true go: true breakguild: true channel: true langtype: true } permissions: { can_trade: false command_enable: true } How can I let the Group ID 1 / Super Players use @storage? Normal players got @storage. Is can_trade: false will account to preventing usable storage for Super Players? Edited July 2, 2014 by Emistry codebox Quote
sandbox Posted July 1, 2014 Posted July 1, 2014 Yes, players wont be able to use storage when 'can_trade' is set to false. Quote
Cydh Posted July 1, 2014 Posted July 1, 2014 can open storage/guild storgae but can add or get item src/map/storage.c | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/src/map/storage.c b/src/map/storage.c index 24f0834..f694d66 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -116,12 +116,6 @@ int storage_storageopen(struct map_session_data *sd) if(sd->state.storage_flag) return 1; //Already open? - if( !pc_can_give_items(sd) ) - { //check is this GM level is allowed to put items to storage - clif_displaymessage(sd->fd, msg_txt(sd,246)); - return 1; - } - sd->state.storage_flag = 1; storage_sortitem(sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items)); clif_storagelist(sd, sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items)); @@ -164,6 +158,11 @@ static int storage_additem(struct map_session_data* sd, struct item* item_data, struct item_data *data; int i; + if( !pc_can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus] + clif_displaymessage(sd->fd, msg_txt(sd,246)); + return 1; + } + if( item_data->nameid == 0 || amount <= 0 ) return 1; @@ -280,6 +279,11 @@ void storage_storageget(struct map_session_data* sd, int index, int amount) { unsigned char flag = 0; + if( !pc_can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus] + clif_displaymessage(sd->fd, msg_txt(sd,246)); + return; + } + if( index < 0 || index >= sd->storage_size ) return; @@ -340,6 +344,11 @@ void storage_storagegettocart(struct map_session_data* sd, int index, int amount unsigned char flag; nullpo_retv(sd); + if( !pc_can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus] + clif_displaymessage(sd->fd, msg_txt(sd,246)); + return; + } + if( index < 0 || index >= sd->storage_size ) return; @@ -461,11 +470,6 @@ int storage_guild_storageopen(struct map_session_data* sd) if(sd->state.storage_flag) return 1; //Can't open both storages at a time. - if( !pc_can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus] - clif_displaymessage(sd->fd, msg_txt(sd,246)); - return 1; - } - if((gstor = guild2storage2(sd->status.guild_id)) == NULL) { intif_request_guild_storage(sd->status.account_id,sd->status.guild_id); return 0; @@ -501,6 +505,11 @@ char guild_storage_additem(struct map_session_data* sd, struct guild_storage* st nullpo_retr(1, stor); nullpo_retr(1, item_data); + if( !pc_can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus] + clif_displaymessage(sd->fd, msg_txt(sd,246)); + return 1; + } + if(item_data->nameid == 0 || amount <= 0) return 1; @@ -632,6 +641,11 @@ void storage_guild_storageget(struct map_session_data* sd, int index, int amount if(!stor->storage_status) return; + if( !pc_can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus] + clif_displaymessage(sd->fd, msg_txt(sd,246)); + return; + } + if(index < 0 || index >= MAX_GUILD_STORAGE) return; @@ -703,6 +717,11 @@ void storage_guild_storagegettocart(struct map_session_data* sd, int index, int nullpo_retv(sd); nullpo_retv(stor=guild2storage2(sd->status.guild_id)); + if( !pc_can_give_items(sd) ) { //check is this GM level can open guild storage and store items [Lupus] + clif_displaymessage(sd->fd, msg_txt(sd,246)); + return; + } + if(!stor->storage_status) return; of course, not tested Quote
Question
Currently
How can I let the Group ID 1 / Super Players use @storage?
Normal players got @storage. Is can_trade: false will account to preventing usable storage for Super Players?
Edited by Emistrycodebox
5 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.