Jump to content
  • 0

Using OnClock in my custom event


cder

Question


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.02
  • Content Count:  96
  • Reputation:   0
  • Joined:  08/06/18
  • Last Seen:  

Well, I'm scheduling an event, and I want to use this command correctly ... the result I'm looking for is that the command executes the "annouce" command every time it arrives at Midnight (00:00 AM)

 

Edited by cder
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  233
  • Reputation:   50
  • Joined:  12/20/18
  • Last Seen:  

OnClock0000:
	announce "your message", bc_all;
end;

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.02
  • Content Count:  96
  • Reputation:   0
  • Joined:  08/06/18
  • Last Seen:  

On 2/15/2020 at 8:13 AM, dev LOOLP said:

OnClock0000:
	announce "your message", bc_all;
end;

 

Thanks again, although I can't understand the use of "bc_all", but I will check and anything is already "MVP" and close the topic ...

I waited until 00:00 and it didn't work, can you take a look at my script? Well, the event is something that I'm creating so that the players on my server are only allowed to play 5 hours a day on my server. .

 

Script:

-	script	penalidadeconometrada	-1,{

//86400000 // 1 dia
//18000000  // 5 horas
//3600000 // 1 hora
//60000 // 1 minuto
//1000 // 1 segundo

// ADD TIMER

OnClock0000:

set CHARHMC, CHARHMC = 4;
set CHARMMC, CHARMMC = 59;
set CHARSMC, CHARSMC = 59;
set VerifiqueEventMC, VerifiqueEventMC = 0;
set CallCidadeEventMC, CallCidadeEventMC = 0;
announce "A Maldição do Conometro Foi Removida...", bc_all;
end;

OnPCLoginEvent:

if(PenalidadeConometrada < 1){
PenalidadeConometrada++;
set CHARHMC, CHARHMC = 4;
set CHARMMC, CHARMMC = 59;
set CHARSMC, CHARSMC = 59;
addtimer 3600000, strnpcinfo(3) + "::OnHoras";
addtimer 60000, strnpcinfo(3) + "::OnMinutos";
addtimer 1000, strnpcinfo(3) + "::OnSegundos";
addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
end;
}
else
addtimer 3600000, strnpcinfo(3) + "::OnHoras";
addtimer 60000, strnpcinfo(3) + "::OnMinutos";
addtimer 1000, strnpcinfo(3) + "::OnSegundos";
addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
end;

// Labels ADDTIMER

OnHoras: // Hours
if (CHARHMC > 0){
CHARHMC--;
deltimer strnpcinfo(3) + "::OnHoras";
addtimer 3600000, strnpcinfo(3) + "::OnHoras";
end;
	}
	else
	deltimer strnpcinfo(3) + "::OnHoras";
	addtimer 3600000, strnpcinfo(3) + "::OnHoras";
	end;

OnMinutos: // Minutes

if (CHARHMC == 0 && CHARMMC == 0 && CHARSMC == 0){
deltimer strnpcinfo(3) + "::OnMinutos";
addtimer 60000, strnpcinfo(3) + "::OnMinutos";	
}
else
	if (CHARMMC < 0){
	set CHARMMC, CHARMMC = 59;
	deltimer strnpcinfo(3) + "::OnMinutos";
	addtimer 60000, strnpcinfo(3) + "::OnMinutos";
	end;
		}
		else
		CHARMMC--;
		deltimer strnpcinfo(3) + "::OnMinutos";
		addtimer 60000, strnpcinfo(3) + "::OnMinutos";
		end;
		
OnSegundos: // Seconds

if (CHARHMC == 0 && CHARMMC == 0 && CHARSMC == 0){
set VerifiqueEventMC, VerifiqueEventMC = 1;
deltimer strnpcinfo(3) + "::OnSegundos";
addtimer 1000, strnpcinfo(3) + "::OnSegundos";	
}
else
	if (CHARSMC < 0){
	set CHARSMC, CHARSMC = 59;
	deltimer strnpcinfo(3) + "::OnSegundos";
	addtimer 1000, strnpcinfo(3) + "::OnSegundos";
	end;
		}
		else
		CHARSMC--;
		deltimer strnpcinfo(3) + "::OnSegundos";
		addtimer 1000, strnpcinfo(3) + "::OnSegundos";
		end;
	
OnVerifiqueEvent: // A cada 1 segundo online verifica se está com CallCidadeEventMC e OnVerifiqueEventMC Ligado == 1
if (CallCidadeEventMC == 1){
	deltimer strnpcinfo(3) + "::OnVerifiqueEvent";
	addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
	end;
	}
	else
		if (VerifiqueEventMC == 1){
		CallCidadeEventMC++;
		warp "genese",214,168;
		deltimer strnpcinfo(3) + "::OnVerifiqueEvent";
		addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
		end;
		}
		else
		deltimer strnpcinfo(3) + "::OnVerifiqueEvent";
		addtimer 1000, strnpcinfo(3) + "::OnVerifiqueEvent";
		end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   58
  • Joined:  07/11/14
  • Last Seen:  

There are a lot of errors regarding the use of the variables of how you are using it!

I recommend that you make a request for someone to make in script request.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.02
  • Content Count:  96
  • Reputation:   0
  • Joined:  08/06/18
  • Last Seen:  

12 hours ago, Hyroshima said:

There are a lot of errors regarding the use of the variables of how you are using it!

I recommend that you make a request for someone to make in script request.

I created recently, but there are no "Various Errors", of course I'm not saying that there is no error, but "Various" also does not ? I will ask for support there ...

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