Jump to content
  • 0

How to create npc script can use only 1 player at the same time?


Unique Scripter

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.01
  • Content Count:  7
  • Reputation:   0
  • Joined:  09/07/23
  • Last Seen:  

I want to make npc script only 1 player can interact with it at the same time.

It possible?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

yes it is possible.
 

prontera,150,180,0	script	One Player Only	100,{
	if ( .npc_access ) {
		mes "Some one is accessing.";
		close;
	}
	.npc_access = true;
	mes "You are the one only being able to access until you press 'close'";
	close2;
	.npc_access = false;
	end;
}

 

This will come with several loop holes and you need to figure it out yourself on how to prevent it and also properly reset the variable used.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.01
  • Content Count:  7
  • Reputation:   0
  • Joined:  09/07/23
  • Last Seen:  

On 12/28/2023 at 11:53 PM, pajodex said:

yes it is possible.
 

prontera,150,180,0	script	One Player Only	100,{
	if ( .npc_access ) {
		mes "Some one is accessing.";
		close;
	}
	.npc_access = true;
	mes "You are the one only being able to access until you press 'close'";
	close2;
	.npc_access = false;
	end;
}

 

This will come with several loop holes and you need to figure it out yourself on how to prevent it and also properly reset the variable used.

If some user talk with npc and alt+f4 next player can talk with it?

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  896
  • Reputation:   117
  • Joined:  05/23/12
  • Last Seen:  

U need to modify it a bit.

only one player access.txt

 

Rynbef~

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