Jump to content
  • 0

Super Players (Group ID 1) able to use @storage


Currently

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

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 by Emistry
codebox
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Yes, players wont be able to use storage when 'can_trade' is set to false.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Any other way to edit this? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  86
  • Topics Per Day:  0.02
  • Content Count:  591
  • Reputation:   146
  • Joined:  06/19/12
  • Last Seen:  

can_trade: false to can_trade: true

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

Alright thank you.

Link to comment
Share on other sites

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.

×
×
  • Create New...