Jump to content
  • 0

NPC for specific guild name


dalubhasa333

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  04/19/21
  • Last Seen:  

Hi, 

I would like to ask if this is possible, normal NPC ex click message welcome player, if the player have a guild it will give an access "storage, item seller, cash shop etc, if no guild it will only welcome the player message, sorry my english is not good

 

Thanks

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

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

On 5/22/2021 at 8:32 AM, dalubhasa333 said:

i forgot to ask if we can make it for only accessible for 1 specific guild only ex. My_guild = only guild can access the storage:Tool Dealer:Cashshop" 

prontera,155,3	script	Sample	757,{
	.@guild_id = getcharid(2);
	if (.@guild_id) {
		if (getguildname(.@guild_id) == "My_guild") {
			switch (select("Storage:Tool Dealer:Cashshop")) {
				case 1:
					openstorage;
					break;
				case 2:
					callshop "yourshop",1;
					break;
				case 3:
					callshop "yourshop",1;
					break;
			}
		}
	}
	end;
}

 

Edited by Emistry
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1589
  • Reputation:   246
  • Joined:  08/03/12
  • Last Seen:  

prontera,150,160,3	script	Example	99,{
	if(!getcharid(2)) {
    	mes "Welcome";
     	close;
    }
  	switch(select("Storage:Tool Dealer:Cashshop")){
      case 1:
        	openstorage;
        	end;
      case 2:
        	callshop "yourshop",1;
        	end;
      case 3:
        	callshop "yourshop",1;
        	end;
    }
  
{

Above script will only open Storage, Tool Dealer, Cashshop IF characters have GUILD.

prontera,150,160,3	script	Example	99,{
	if(!getcharid(2)) {
    	mes "Welcome";
     	close;
    }
	if (getcharid(2) == 3){
  	switch(select("Storage:Tool Dealer:Cashshop")){
      case 1:
        	openstorage;
        	end;
      case 2:
        	callshop "yourshop",1;
        	end;
      case 3:
        	callshop "yourshop",1;
        	end;
    	}
	}
{

Something like this. You might want to add close; also for guildID that isnt == 3

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  04/19/21
  • Last Seen:  

On 5/22/2021 at 8:31 AM, dalubhasa333 said:

Hi, 

I would like to ask if this is possible, normal NPC ex click message welcome player, if the player have a guild it will give an access "storage, item seller, cash shop etc, if no guild it will only welcome the player message, sorry my english is not good

 

Thanks

sorry about that my engilish is bad

 

Hi,

Thank you for the script it works youre amazing

i forgot to ask if we can make it for only accessible for 1 specific guild only ex. My_guild = only guild can access the storage:Tool Dealer:Cashshop" 

 

Thank you

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

prontera,150,160,3	script	Example	99,{
	if(!getcharid(2)) {
    	mes "Welcome";
     	close;
    }
  	switch(select("Storage:Tool Dealer:Cashshop")){
      case 1:
        	openstorage;
        	end;
      case 2:
        	callshop "yourshop",1;
        	end;
      case 3:
        	callshop "yourshop",1;
        	end;
    }
  
{

Ur welcome. please marks as answer if my reply help you

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1589
  • Reputation:   246
  • Joined:  08/03/12
  • Last Seen:  

23 minutes ago, dalubhasa333 said:

Hi, 

 

i forgot to ask if we can make it for only accessible for 1 specific guild only ex. My_guild = only guild can access the storage:Tool Dealer:Cashshop" 

 

Thank you

if (getcharid(2) == ??

?? = GuildID

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  04/19/21
  • Last Seen:  

22 hours ago, Chaos92 said:

if (getcharid(2) == ??

?? = GuildID

Hi, 

I didnt catch this, if (getcharid(2) == ?? ?? = GuildID, im sorry

 

22 hours ago, Chaos92 said:

if (getcharid(2) == ??

?? = GuildID

im getting error if( getcharid(2) == "Explicit" )

 

[Status]: Event 'OnInit' executed with '1481' NPCs.
[Status]: Event 'OnInterIfInit' executed with '0' NPCs.
[Error]: script:op_2: invalid data for operator C_EQ
[Debug]: Data: number value=3
[Debug]: Data: string value="Explicit"
[Debug]: Source (NPC): Example at prontera (150,49)
[Error]: script:op_2: invalid data for operator C_EQ
[Debug]: Data: number value=3
[Debug]: Data: string value="Explicit"
[Debug]: Source (NPC): Example at prontera (150,49)
[Error]: script:op_2: invalid data for operator C_EQ
[Debug]: Data: number value=3
[Debug]: Data: string value="Explicit"
[Debug]: Source (NPC): Example at prontera (150,49)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1589
  • Reputation:   246
  • Joined:  08/03/12
  • Last Seen:  

50 minutes ago, dalubhasa333 said:

Hi, 

 

I didnt catch this, if (getcharid(2) == ?? ?? = GuildID, im sorry

 

GuildID. means the ID, not name.

it should be in numbers. Check it in your database table 'guild'

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   1
  • Joined:  04/19/21
  • Last Seen:  

On 5/22/2021 at 2:23 PM, Chaos92 said:

GuildID. means the ID, not name.

it should be in numbers. Check it in your database table 'guild'

Hi, 

 

sorry about that, i check on database table 

image.png.8845e574244f8a43c75a862ad429ef68.png

however it do the otherway im not able to access the storage and shop but other guilds are able 

sorry my english is not goo

prontera,150,160,3    script    Example    99,{
    if(getcharid(2) == 3) {
        mes "Welcome";
         close;
    }
      switch(select("Storage:Tool Dealer:Cashshop")){
      case 1:
            openstorage;
            end;
      case 2:
            callshop "yourshop",1;
            end;
      case 3:
            callshop "yourshop",1;
            end;
    }
  
}

 

On 5/22/2021 at 5:19 PM, Chaos92 said:

Above script will only open Storage, Tool Dealer, Cashshop IF characters have GUILD.

Something like this. You might want to add close; also for guildID that isnt == 3

Hi, 

Thank you sir.  you guys are amazing

 

On 5/23/2021 at 9:40 AM, Emistry said:

...

Hi,

Thank you guys LearningROChaos92Emistry. script are working fine you are awesome

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