Jump to content
  • 0
Frost Diver

Need help with Duel NPC

Question

Hello!

How can i add a timer like 10 seconds before the duel start in the arena? So that players can get ready before pvp turn on in arena. And also, once 2 players are inside the arena, there are limit for 5 minutes only. If exceed the time limit, both players will be kicked out of the arena. Here's the script:

duel.txt

Edited by Frost Diver
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
while (1) {
		if (getareausers("new_3-3",130,54,88,37) >= 2){
			disablenpc "Duel-Assistant";
			pvpon "new_3-3";
			}

to
 

while (1) {
		if (getareausers("new_3-3",130,54,88,37) >= 2){
			disablenpc "Duel-Assistant";
          		sleep 5000;
			pvpon "new_3-3";
			}

Have you tried this? I haven't worked with NPCs for a while.

If it does work you can edit the sleep 5000; to whatever number is desired.

Edited by TheKingDino
Link to comment
Share on other sites

  • 0
9 hours ago, TheKingDino said:
while (1) {
		if (getareausers("new_3-3",130,54,88,37) >= 2){
			disablenpc "Duel-Assistant";
			pvpon "new_3-3";
			}

to
 

while (1) {
		if (getareausers("new_3-3",130,54,88,37) >= 2){
			disablenpc "Duel-Assistant";
          		sleep 5000;
			pvpon "new_3-3";
			}

Have you tried this? I haven't worked with NPCs for a while.

If it does work you can edit the sleep 5000; to whatever number is desired.

Oh sorry. What i mean is a 10 secs countdown once there are 2 players in the arena. Countdown like localbroadcast in a map before pvp turn on. And also, there is a time limit once duel is started for 5 minutes only

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.