Jump to content
  • 0
Sign in to follow this  
mybitch

N> NPC timer to itself - HOT Support (Smoking Hot)

Question

Related with this topic too: http://herc.ws/board/topic/1337-party-vs-party-again-lol-read-please/

 

How to activate 15 minutes cooldown for this NPC?

Example:

If there's a winner for the team war, the NPC will not accept registration for 15 minutes. After 15 minutes, it will only accept their registration.

The timer only applies when there's a winner of the match.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

here is a pseudo since I didn't master yet npc scripting,,,

 

onInit:noregister = 0;end;onRegister:if( noregister == 0)//start registerend;onTeamWin:noregister = 1;//starttimerend;onTimer15000:noregister = 0;end; 

 

 

:meow:

Share this post


Link to post
Share on other sites
  • 0

you must use . in prefix (npc variable) or mapserv will throw an error (npc script use <none prefix> for permanent variable attached to the character)

and there is already a timer in the script, it's better with a sleep here

    set @partymembercount,$@members;    announce "Thanks for playing",0;+	set .npc_delay, 1;+	sleep 900000;+	set .npc_delay, 0;    end;
    if ( $@start == 1 ) {        mes "The Sign Ups are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";        close;    }+	if ( .npc_delay ) {+		mes "you must wait";+		close;+	}    if ( @partymembercount == $@members ) {

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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