Jump to content
  • 0

announce with message


MukkiesftKies

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

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;
}
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  547
  • Reputation:   270
  • Joined:  11/08/11
  • Last Seen:  

Use close2; instead if you want the npc to continue

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  155
  • Reputation:   6
  • Joined:  03/30/13
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

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.

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  155
  • Reputation:   6
  • Joined:  03/30/13
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

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 . 

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

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;
	}
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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;
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   7
  • Joined:  03/13/12
  • Last Seen:  

 

 

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

 

i want to make npc like pvp round.

 

Round 1 end with result.

Round 2 end with result.

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