Jump to content

Question

Posted

this announce only work for the first announce but after close the message box, second announce not function.

prontera,0,0,0	script	annouc	-1,{

OnClock2202:

// First Annouc
	mapannounce "prontera", "Message 2!.",0;
	sleep 2000; // 20 Second.
	mapannounce "prontera", "Message 1!.",0;
	sleep 1000; // 10 Second.
	addrid(1);
		mes " SECOND RESULT ";
		close;
		
// Second Annouc
	mapannounce "prontera", "Message 2!.",0;
	sleep 2000; // 20 Second.
	mapannounce "prontera", "Message 1!.",0;
	sleep 1000; // 10 Second.
	addrid(1);
		mes " SECOND RESULT ";
		close;
	end;
}

11 answers to this question

Recommended Posts

  • 0
Posted

i already try with close2; but after another player close the message box announce will start back.

Try changing the messages, as I see your announces contains the same display information, so you will not know if the announce is the first or second one
  • 0
Posted
prontera,0,0,0	script	annouc	-1,{

OnClock1857:

// First Annouc
	mapannounce "prontera", "Message 2!.",0;
	sleep 2000; // 20 Second.
	mapannounce "prontera", "Message 1!.",0;
	sleep 1000; // 10 Second.
	addrid(1);
		mes " SECOND RESULT ";
		close2;
		
// Second Annouc
	mapannounce "prontera", "Number 1!.",0;
	sleep 2000; // 20 Second.
	mapannounce "prontera", "Number 2!.",0;
	sleep 1000; // 10 Second.
	addrid(1);
		mes " Third RESULT ";
		close2;
	end;
}

i change the messages.

 

screenmy_Heart_RO009.jpg

 

 

Message 2 from npc

Message 1 from npc

after player close the message box. it announce back.

Message 2 from Player 2

Message 1 from Player 2

 

if 10 player close the message box, npc will announce for the 10 times.

 

 

  • 0
Posted

Try this:

-	script	annouc	-1,{
OnClock1857:

// First Annouc
	mapannounce "prontera", "Message 2!",0;
	sleep 20000; // 20 Second.
	mapannounce "prontera", "Message 1!",0;
	sleep 10000; // 10 Second.
	addrid(1);
	message strcharinfo(0)," SECOND RESULT ";
	detachrid;
	
// Second Annouc
	mapannounce "prontera", "Number 4!",0;
	sleep 20000; // 20 Second.
	mapannounce "prontera", "Number 3!",0;
	sleep 10000; // 10 Second.
	addrid(1);
	message strcharinfo(0)," Third RESULT ";
	detachrid;
	end;
} 

It may be something with the mes, at least with message you will troubleshoot your problem. Please note I didn't test the script (for the detachrid; part), please inform any mapserv.bat error you getting.

  • 0
Posted

Try this:

-	script	annouc	-1,{
OnClock1857:

// First Annouc
	mapannounce "prontera", "Message 2!",0;
	sleep 20000; // 20 Second.
	mapannounce "prontera", "Message 1!",0;
	sleep 10000; // 10 Second.
	addrid(1);
	message strcharinfo(0)," SECOND RESULT ";
	detachrid;
	
// Second Annouc
	mapannounce "prontera", "Number 4!",0;
	sleep 20000; // 20 Second.
	mapannounce "prontera", "Number 3!",0;
	sleep 10000; // 10 Second.
	addrid(1);
	message strcharinfo(0)," Third RESULT ";
	detachrid;
	end;
} 

It may be something with the mes, at least with message you will troubleshoot your problem. Please note I didn't test the script (for the detachrid; part), please inform any mapserv.bat error you getting.

still same nothing change with no error. just loop announce . 

  • 0
Posted

I don't understand what you want to do, but note addrid will attach the script to all players in the NPC map. That means it will display n times your 'second part' (n the number of player in the map).

You may call the addrid part with a donpcevent to avoid this

  • 0
Posted

I don't understand what you want to do, but note addrid will attach the script to all players in the NPC map. That means it will display n times your 'second part' (n the number of player in the map).

You may call the addrid part with a donpcevent to avoid this

 

Thanks for the clues Capuche. But i have warning on mapserv.

if the player does not close the message box. it will come out error.

[Warning]: Unable to restore stack! Double continuation!
[Debug]: Previous script (lost):
[Debug]: Source (NPC): NPC2 at prontera (0,0)
[Debug]: Current script:
[Debug]: Source (NPC): NPC4 at prontera (0,0)
prontera,0,0,0	script	NPC	-1,{

OnClock1645:
	mapannounce "prontera", "5!.",0;
	sleep2 5000; // 5 Second.
	mapannounce "prontera", "4!.",0;
	sleep2 4000; // 4 Second.
	mapannounce "prontera", "3!.",0;
	sleep2 3000; // 3 Second.
	mapannounce "prontera", "2!.",0;
	sleep2 2000; // 2 Second.
	mapannounce "prontera", "1!.",0;
	sleep2 1000; // 1 Second.
    donpcevent "NPC2::OnEmote";
    end;
}

prontera,0,0,0	script	NPC2	-1,{

OnEmote:
	donpcevent "NPC3::OnEmote3";
	addrid(1);
	mes " FIRST RESULT ";
		close2;
	}


prontera,0,0,0	script	NPC3	-1,{

OnEmote3:
	mapannounce "prontera", "Message 2: 5!.",0;
	sleep2 5000; // 5 Second.
	mapannounce "prontera", "Message 2: 4!.",0;
	sleep2 4000; // 4 Second.
	mapannounce "prontera", "Message 2: 3!.",0;
	sleep2 3000; // 3 Second.
	mapannounce "prontera", "Message 2: 2!.",0;
	sleep2 2000; // 2 Second.
	mapannounce "prontera", "Message 2: 1!.",0;
	sleep2 1000; // 1 Second.
	donpcevent "NPC4::OnEmote4";
    end;
}

prontera,0,0,0	script	NPC4	-1,{

OnEmote4:
	addrid(1);
	mes " SECOND RESULT ";
		close2;
	}
  • 0
Posted

You got this warning because addrid and the dialog box. Not sure what you want to do, this ?

izlude,0,0,0	script	NPC	-1,{

// OnClock1645:
OnInit:
	for ( .@i = 5; .@i > 0; .@i-- ) {
		mapannounce "izlude", .@i +"!.",0;
		sleep 1000;
	}
    donpcevent strnpcinfo(0) +"::OnEvent";

	for ( .@i = 5; .@i > 0; .@i-- ) {
		mapannounce "izlude", "Message 2: "+ .@i +"!.",0;
		sleep 1000;
	}
    end;

OnEvent:
	addrid(1);
	mes " FIRST RESULT ";
	sleep2 5000;// wait until the end of message 2
	mes " SECOND RESULT ";
	close;
}

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