Jump to content
  • 0

Limit click on the NPCs


JohnnyPlayy

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  41
  • Reputation:   13
  • Joined:  03/20/16
  • Last Seen:  

Is there any way to limit clicks on the NPC?

example: I speak with npc 1 2 and 3 times in 4 times can not talk to npc.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 2

  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  333
  • Reputation:   67
  • Joined:  09/05/12
  • Last Seen:  

prontera,155,175,5	script	Click Limit NPC 123,{
	if(ClickLimit == 3) end;
	mes "[ Limit Click ]";
	set ClickLimit,ClickLimit+1;
		mes "You have clicked me "+ClickLimit+"x.";
		close;
}

Try this.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  86
  • Reputation:   21
  • Joined:  10/02/13
  • Last Seen:  

It depends on whom you want this limit to be bound to. Each character will be able to interact with the NPC 4 times? Or each account (acc1:Char1 clicks 1 time, then acc1:Char2 will only be able to click 3)?

Edited by Tyrfing
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  41
  • Reputation:   13
  • Joined:  03/20/16
  • Last Seen:  

It works fine, you can add a time
when the player clicks 3 times has to wait 60 seconds to talk to the npc again

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

You can play around the script that you want . Like adding delay not a click its up to you . 

 

4 hours ago, GodKnows Jhomz said:

prontera,155,175,5	script	Click Limit NPC 123,{
	if(ClickLimit == 3) end;
	mes "[ Limit Click ]";
	set ClickLimit,ClickLimit+1;
		mes "You have clicked me "+ClickLimit+"x.";
		close;
}

Try this.

i think it should be like this

prontera,155,175,5 script Click Limit NPC 123,{


set ClickLimit,0;
if(ClickLimit == 3) end;
mes "[ Limit Click ]";
set ClickLimit,ClickLimit+1;
mes "You have clicked me "+ClickLimit+"x."; close;
}

Edited by Poring King
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

@Poring King I'm a sensitive person and your edition just hurts me. Don't do this again. You have initialized the variable everytime the player interacts with the npc, breaking the interaction limit

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

27 minutes ago, Capuche said:

@Poring King I'm a sensitive person and your edition just hurts me. Don't do this again. You have initialized the variable everytime the player interacts with the npc, breaking the interaction limit

oh my bad i just tested out and you are right O_O

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

On 5/30/2018 at 2:10 PM, Capuche said:

@Poring King I'm a sensitive person and your edition just hurts me. Don't do this again. You have initialized the variable everytime the player interacts with the npc, breaking the interaction limit

@Capuche this comment made my day ty.

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