Jump to content
  • 0

Countdown before event starts


Question

Posted

Hey, community! All right?
Can someone help me?

I want to add a mapannounce 3 seconds before starting the race.

A countdown. For example:

        mapannounce "turbo_n_1","3...",bc_yellow|bc_all;
        sleep 1000;
    
        mapannounce "turbo_n_1","2...",bc_yellow|bc_all;
        sleep 1000;
    
        mapannounce "turbo_n_1","1...",bc_yellow|bc_all;
        sleep 1000;

But when I add mapannounce before the

	OnClock1055:
		set $CMisopen, 0;
		announce "[Crazy Race]: The race has started!",bc_yellow|bc_all;
		end;

The event starts at mapannounce "3 ...".
And not after [Crazy Race]: The race has started!

I added like this:

Spoiler

prontera,159,151,3	script	Crazy Race	715,{

set @npc$,"[^008000Crazy Race^000000]";

	mes @npc$;
	mes "Hi "+strcharinfo(0)+"!";
	mes	"Welcome to the Crazy Race event portal.";
	mes "What do you want?";
	switch(select("- Join the event","- Info","Exit"))
{
		next;

		case 1:
			if (!$CMisopen) callsub mesclose, "Sorry, Crazy Race hasn't started yet!";
			else if (countitem(12016) > 0) callsub mesclose, "You cannot enter Wind Potion!";
			else if (countitem(662) > 0) callsub mesclose, "You cannot sign in with Official Badge!";
			else if (countitem(12028) > 0) callsub mesclose, "You cannot enter Thunderbox!";
			else if (checkriding()) callsub mesclose, "You cannot sign in with PecoPeco!";
			else if (CheckCart()) callsub mesclose, "You cannot sign in with Cart!";
			mes @npc$;
			mes "Good luck!";
			for(set @i,0; @i<=225; set @i,@i+1){sc_end @i;}
			set $Campeao,0;
			warp "turbo_n_1",54,364;
			close;

			case 2:
			mes @npc$;
			mes "The event will require you very quickly and boldly.";
			next;
			mes @npc$;
			mes "The Crazy Race occurs every day every 4 hours.";
			next;
			mes @npc$;
			mes "After the start you will need to go through various obstacles and traps on 9 race tracks.";
			next;
			mes @npc$;
			mes "If you can reach 1st, 2nd or 3rd place, you will receive exclusive prizes according to your position.";
			close;

			case 3:
			mes @npc$;
			mes "Ok, see you next time!";
			close;
	}
	
	mesclose:
		mes getarg(0);
		close;

	OnClock1050:
		set $CMisopen, 1;
		announce "[Crazy Race]: The race is about to start, you only have 5 minutes!",bc_yellow|bc_all;
		end;

	OnClock1055:
		mapannounce "turbo_n_1","3..",bc_yellow|bc_all;
		sleep 1000;
	
		mapannounce "turbo_n_1","2..",bc_yellow|bc_all;
		sleep 1000;
	
		mapannounce "turbo_n_1","1..",bc_yellow|bc_all;
		sleep 1000;
	
		set $CMisopen, 0;
		announce "[Crazy Race]: The race has started!",bc_yellow|bc_all;
		end;
}

turbo_n_1,63,350,5	script	Checagem	-1,1,30,{
	OnInit: atcommand "@skilloff"; end;

	OnClock1050: set $Check, 0; end;
	OnClock1055: set $Check, 1; end;

OnTouch:
if($Check == 0){
mes "[Crazy race]";
mes	"===================================";
mes "burned the start!";
mes	"===================================";
sleep2 1200; warp "turbo_n_1", 54, 364; end;
}

}

 

Where did I go wrong? And how can I fix this?
Thank you very much.

2 answers to this question

Recommended Posts

  • 0
Posted

try this one

prontera,159,151,3	script	Crazy Race	715,{

set @npc$,"[^008000Crazy Race^000000]";

	mes @npc$;
	mes "Hi "+strcharinfo(0)+"!";
	mes	"Welcome to the Crazy Race event portal.";
	mes "What do you want?";
	switch(select("- Join the event","- Info","Exit"))
{
		next;

		case 1:
			if (!$CMisopen) callsub mesclose, "Sorry, Crazy Race hasn't started yet!";
			else if (countitem(12016) > 0) callsub mesclose, "You cannot enter Wind Potion!";
			else if (countitem(662) > 0) callsub mesclose, "You cannot sign in with Official Badge!";
			else if (countitem(12028) > 0) callsub mesclose, "You cannot enter Thunderbox!";
			else if (checkriding()) callsub mesclose, "You cannot sign in with PecoPeco!";
			else if (CheckCart()) callsub mesclose, "You cannot sign in with Cart!";
			mes @npc$;
			mes "Good luck!";
			for(set @i,0; @i<=225; set @i,@i+1){sc_end @i;}
			set $Campeao,0;
			warp "turbo_n_1",54,364;
			close;

			case 2:
			mes @npc$;
			mes "The event will require you very quickly and boldly.";
			next;
			mes @npc$;
			mes "The Crazy Race occurs every day every 4 hours.";
			next;
			mes @npc$;
			mes "After the start you will need to go through various obstacles and traps on 9 race tracks.";
			next;
			mes @npc$;
			mes "If you can reach 1st, 2nd or 3rd place, you will receive exclusive prizes according to your position.";
			close;

			case 3:
			mes @npc$;
			mes "Ok, see you next time!";
			close;
	}
	
	mesclose:
		mes getarg(0);
		close;

        OnClock1050:
		set $CMisopen, 1;
		announce "[Crazy Race]: The race is about to start, you only have 5 minutes!",bc_yellow|bc_all;
        sleep 300000;

		mapannounce "turbo_n_1","3..",bc_yellow|bc_all;
		sleep 1000;
	
		mapannounce "turbo_n_1","2..",bc_yellow|bc_all;
		sleep 1000;
	
		mapannounce "turbo_n_1","1..",bc_yellow|bc_all;
		sleep 1000;
	
		set $CMisopen, 0;
		announce "[Crazy Race]: The race has started!",bc_yellow|bc_all;
		end;
}

turbo_n_1,63,350,5	script	Checagem	-1,1,30,{
	OnInit: atcommand "@skilloff"; end;

	OnClock1050: set $Check, 0; end;
	OnClock1055: set $Check, 1; end;

OnTouch:
if($Check == 0){
mes "[Crazy race]";
mes	"===================================";
mes "burned the start!";
mes	"===================================";
sleep2 1200; warp "turbo_n_1", 54, 364; end;
}

}

 

 

 

Sin título.png

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...