Jump to content
  • 0

Guild Storage via Rank


Vincent

Question


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Hi,

i am looking for a NPC that open the Guildstorage. But only the Members who had a Special Guildgand can use this. Position 2-3 at the Guild Rank.

Is this Possible?

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

Try? didn't test though http://pastebin.com/tfeA0g4X

Edited by Patskie
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

I try it. So the NPC ask if i want to open the gstorage but after press Yes, The message window closed nothing happens.

Edited by King555
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

Only position 2 and 3 can use it in that example.  Try this.  It lets the guild master open it as well.

 

prontera,150,150,0	script	Sample	100,{
	set .@npc$,strnpcinfo(1);
	mes .@npc$;
	mes "Only members with high position can access the guild storage from me";
	next;
	if (getcharid(2) == 0) close;
	mes .@npc$;
	mes "Do you want me to open the guild stash for you?";
	next;
	if (select("Yes:No") - 1) close;
	mes .@npc$;
	mes "Let me check your position";
	query_sql("SELECT `position` FROM `guild_member` WHERE `account_id` = '"+getcharid(3)+"'", .@position);
	if (.@position > 3) close;
	mes .@npc$;
	mes "Done!";
	guildopenstorage();
	close;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

If i open the gstorage with the leader it works. But if i try to open the gstorage with a member at the right rank dont work.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

try this
prontera,150,175,0    script    Storage Master    100,{
    set .@npc$,strnpcinfo(1);
    mes .@npc$;
    mes "Only members with high position can access the guild storage from me";
    next;
    if (getcharid(2) == 0) close;
    mes .@npc$;
    mes "Do you want me to open the guild stash for you?";
    next;
    if (select("Yes:No") - 1) close;
    mes .@npc$;
    mes "Let me check your position";
    query_sql("SELECT `position` FROM `guild_member` WHERE `char_id` = '"+getcharid(0)+"' LIMIT 1", .@position);
    if (.@position > 3) close;
    mes .@npc$;
    mes "Done!";
    guildopenstorage();
    close;
}
 
you should use char_id ..and not account_id since 1 guild can have more than 1 characters from same accounts.
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

 

try this
prontera,150,175,0    script    Storage Master    100,{
    set .@npc$,strnpcinfo(1);
    mes .@npc$;
    mes "Only members with high position can access the guild storage from me";
    next;
    if (getcharid(2) == 0) close;
    mes .@npc$;
    mes "Do you want me to open the guild stash for you?";
    next;
    if (select("Yes:No") - 1) close;
    mes .@npc$;
    mes "Let me check your position";
    query_sql("SELECT `position` FROM `guild_member` WHERE `char_id` = '"+getcharid(0)+"' LIMIT 1", .@position);
    if (.@position > 3) close;
    mes .@npc$;
    mes "Done!";
    guildopenstorage();
    close;
}
 
you should use char_id ..and not account_id since 1 guild can have more than 1 characters from same accounts.
 

I see! Thanks :meow:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

 

try this
prontera,150,175,0    script    Storage Master    100,{
    set .@npc$,strnpcinfo(1);
    mes .@npc$;
    mes "Only members with high position can access the guild storage from me";
    next;
    if (getcharid(2) == 0) close;
    mes .@npc$;
    mes "Do you want me to open the guild stash for you?";
    next;
    if (select("Yes:No") - 1) close;
    mes .@npc$;
    mes "Let me check your position";
    query_sql("SELECT `position` FROM `guild_member` WHERE `char_id` = '"+getcharid(0)+"' LIMIT 1", .@position);
    if (.@position > 3) close;
    mes .@npc$;
    mes "Done!";
    guildopenstorage();
    close;
}
 
you should use char_id ..and not account_id since 1 guild can have more than 1 characters from same accounts.
 

 

Hi, there is a problem with the scirpt. After some time the gstorage dont open. There is no error at the sever and the NPC say's "Done." that mean the gstorage have to be open but dont work. Was can be the problem?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

*guildopenstorage()
 
This function works the same as 'openstorage' but will open a guild storage 
window instead for the guild storage of the guild the invoking character belongs 
to. This is a function because it returns a value - 0 if the guild storage was 
opened successfully and 1 if it wasn't. (Notice, it's a ZERO upon success.) 
Since guild storage is only accessible to one character at one time, it may fail 
if another character is accessing the guild storage at the same time.
 
This will also fail and return 2 if the character does not belong to any guild.
 
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

 

*guildopenstorage()
 
This function works the same as 'openstorage' but will open a guild storage 
window instead for the guild storage of the guild the invoking character belongs 
to. This is a function because it returns a value - 0 if the guild storage was 
opened successfully and 1 if it wasn't. (Notice, it's a ZERO upon success.) 
Since guild storage is only accessible to one character at one time, it may fail 
if another character is accessing the guild storage at the same time.
 
This will also fail and return 2 if the character does not belong to any guild.
 

Yea but it works for 2 weeks and after that is never works, and there is no other at the gstorage. And only a server restart can fix it. Then it works again for some time's till something happen? 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1282
  • Reputation:   393
  • Joined:  02/03/12
  • Last Seen:  

Yea but it works for 2 weeks and after that is never works, and there is no other at the gstorage. And only a server restart can fix it. Then it works again for some time's till something happen? 

 

http://rathena.org/board/topic/82997-guild-warehouse-w-passwordposition-based-restrictions/

 

Something like that?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Thanks i will test it :)

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