Jump to content
  • 0

Guild Storage via Rank


Question

Posted

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?

11 answers to this question

Recommended Posts

Posted

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;
}
Posted
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
Posted

 

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:

Posted

 

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?

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

 

*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? 

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