Famous Posted February 25, 2013 Group: Members Topic Count: 145 Topics Per Day: 0.03 Content Count: 455 Reputation: 3 Joined: 06/19/12 Last Seen: February 26, 2018 Share Posted February 25, 2013 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; } Quote Link to comment Share on other sites More sharing options...
Brian Posted February 25, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted February 25, 2013 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 Quote Link to comment Share on other sites More sharing options...
Cydh Posted February 25, 2013 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted February 25, 2013 why don't u add that? Quote Link to comment Share on other sites More sharing options...
Famous Posted February 26, 2013 Group: Members Topic Count: 145 Topics Per Day: 0.03 Content Count: 455 Reputation: 3 Joined: 06/19/12 Last Seen: February 26, 2018 Author Share Posted February 26, 2013 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.. Quote Link to comment Share on other sites More sharing options...
Yahiko Posted February 28, 2013 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 81 Reputation: 14 Joined: 08/17/12 Last Seen: April 19, 2013 Share Posted February 28, 2013 (edited) use this one , tested and working on rAthena Revision 17165 click me Edited February 28, 2013 by Yahiko Quote Link to comment Share on other sites More sharing options...
Brian Posted February 28, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted February 28, 2013 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 Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted March 18, 2013 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted March 18, 2013 Hello, how can an admin retrieve their pass if forgotten by players? thanks! Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted March 18, 2013 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted March 18, 2013 Nvm i saw it on global req, very nice code thanks! 1 Quote Link to comment Share on other sites More sharing options...
mrlongshen Posted March 21, 2013 Group: Members Topic Count: 98 Topics Per Day: 0.02 Content Count: 1302 Reputation: 79 Joined: 12/04/12 Last Seen: September 26, 2019 Share Posted March 21, 2013 can this be used in 17200 above ? Quote Link to comment Share on other sites More sharing options...
Question
Famous
http://www.eathena.ws/board/index.php?showtopic=199843
==================================================================
--- 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.