Jump to content

Question

Posted

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

8 answers to this question

Recommended Posts

  • 0
Posted (edited)
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
  • 1
Posted
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

  • 0
Posted
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

  • 0
Posted
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
  • 0
Posted
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

  • 0
Posted
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)

  • 0
Posted
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'

  • 0
Posted
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

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