Jump to content
  • 0

can I request security storage like this?


Question

Posted

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;

}

8 answers to this question

Recommended Posts

Posted

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

Posted

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

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