Jump to content
  • 0

can I request security storage like this?


Famous

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

http://www.eathena.ws/board/index.php?showtopic=199843

=== npc/custom/storagepass.txt

==================================================================

--- npc/custom/storagepass.txt (revision 13266)

+++ npc/custom/storagepass.txt (local)

@@ -0,0 +1,11 @@

+- script StoragePassword -1,{

+

+ if( #kafra_code != 0 )

+ {

+ mes "[Storage password system]";

+ callfunc("F_CheckKafCode");

+ close2;

+ }

+

+ openstorage;

+}

Property changes on: npc/custom/storagepass.txt

___________________________________________________________________

Name: svn:eol-style

+native

=== src/map/atcommand.c

==================================================================

--- src/map/atcommand.c (revision 13266)

+++ src/map/atcommand.c (local)

@@ -1134,19 +1134,18 @@

*------------------------------------------*/

int atcommand_storage(const int fd, struct map_session_data* sd, const char* command, const char* message)

{

+ struct npc_data* nd;

nullpo_retr(-1, sd);

if (sd->npc_id || sd->vender_id || sd->state.trading || sd->state.storage_flag)

return -1;

- if (storage_storageopen(sd) == 1)

- { //Already open.

- clif_displaymessage(fd, msg_txt(250));

+ nd = npc_name2id("StoragePassword");

+ if( nd == NULL )

return -1;

- }

+

+ run_script(nd->u.scr.script, 0, sd->bl.id, fake_nd->bl.id);

- clif_displaymessage(fd, "Storage opened.");

-

return 0;

}

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Here is the diff, updated for the latest rAthena (r17160):

storagepass-r17160.diff

  • stop your login,char,map servers
  • apply the diff
  • recompile your map-server
  • start your servers
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:  

why don't u add that?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

thnx Brian gonna tried this



when I tried to use "@storage" nothing happen.. no password pump out..

but when I tried to talk to npc and open may storage from the kafra npc there is a password..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   14
  • Joined:  08/17/12
  • Last Seen:  

use this one , tested and working on rAthena 

Revision 17165

 

click me

Edited by Yahiko
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

when I tried to use "@storage" nothing happen.. no password pump out..

 

Did you stop, recompile, and restart your servers?

Did you disable the script trunk/npc/kafras/functions_kafras.txt on your server?

If you did, you'd have to put the "StoragePassword" NPC in a different file.

// Kafra Storage Password prompt when using @storage
-	script	StoragePassword	-1,{
	if (#kafra_code != 0) {
		mes "[Storage password system]";
		callfunc("F_CheckKafCode");
		close2;
	}
	openstorage;
	dispbottom "Storage opened.";
}
It works for me:

@storage

@set #kafra_code 12345

@storage

Ouk0O5F.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

Hello, how can an admin retrieve their pass if forgotten by players? thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  10/14/12
  • Last Seen:  

Nvm i saw it on global req, very nice code thanks!

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

can this be used in 17200 above ?

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...