Jump to content
  • 0

adding map to this announce


gnashxalex

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   1
  • Joined:  08/19/18
  • Last Seen:  

it is possible to only announce this on mvp official spawn? not all mvps killed and the map the monster was killed
-	script	MVP_Announce#Balfear	-1,{
OnNPCKillEvent:
	if (getmonsterinfo(killedrid,MOB_MVPEXP) != 0)
		if (getcharid(1))
			announce "MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") killed by '"+ strcharinfo(0) +"' from party '"+ strcharinfo(1) +"'.",bc_yellow|bc_all;
		else
			announce "MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") killed by '"+ strcharinfo(0) +"'.",bc_yellow|bc_all;
	end;
}
Edited by Mael
better a code box
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   18
  • Joined:  09/08/17
  • Last Seen:  

			announce "MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") killed by '"+ strcharinfo(0) +"' from party '"+ strcharinfo(1) +"' in '"+strcharinfo(3)+"'.",bc_yellow|bc_all;

			announce "MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") killed by '"+ strcharinfo(0) +"' in '"+strcharinfo(3)+"'.",bc_yellow|bc_all;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   1
  • Joined:  08/19/18
  • Last Seen:  

1 minute ago, Moooooon-Aisha said:

			announce "MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") killed by '"+ strcharinfo(0) +"' from party '"+ strcharinfo(1) +"' in '"+strcharinfo(3)+"'.",bc_yellow|bc_all;

			announce "MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") killed by '"+ strcharinfo(0) +"' in '"+strcharinfo(3)+"'.",bc_yellow|bc_all;

 

Thanks, would it be possible to do that only announce when the mvp dies in his official spawn?

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  832
  • Reputation:   317
  • Joined:  02/11/19
  • Last Seen:  

Use this script and specify which mvp and its respawn zone.

On 11/30/2019 at 5:05 AM, gnashxalex said:

it is possible to only announce this on mvp official spawn? not all mvps killed and the map the monster was killed

-	script	MVP_Announce#Balfear	-1,{
OnNPCKillEvent:
	if (getmonsterinfo(killedrid,MOB_MVPEXP) != 0)
		if (getcharid(1))
			announce "MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") killed by '"+ strcharinfo(0) +"' from party '"+ strcharinfo(1) +"'.",bc_yellow|bc_all;
		else
			announce "MVP ("+ getmonsterinfo(killedrid,MOB_NAME)+") killed by '"+ strcharinfo(0) +"'.",bc_yellow|bc_all;
	end;
}

By the way I just noticed that you are duplicating topics, please avoid doing it. You already got the answer in the previous one.

https://rathena.org/board/topic/121680-help-with-script/

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   1
  • Joined:  08/19/18
  • Last Seen:  

10 minutes ago, Mael said:

Use this script and specify which mvp and its respawn zone.

the announce is char name has killed mob name at map name
but i want to announce like this [char name] has killed 'mob name' at 'map name'

but each time i try to put [char name] it gives me an error in the mapserver

Edited by gnashxalex
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  740
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

8 hours ago, gnashxalex said:

the announce is char name has killed mob name at map name
but i want to announce like this [char name] has killed 'mob name' at 'map name'

but each time i try to put [char name] it gives me an error in the mapserver

announce "MVP : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" and received an item.", bc_all;


More info about strcharinfo

 

Spoiler

* strcharinfo <type>;
 
This function will return either the name, party name or guild name for the
invoking character. Whatever it returns is determined by type.

0 - Character's name.
1 - The name of the party they're in if any.
2 - The name of the guild they're in if any.

If a character is not a member of any party or guild, an empty string will be
returned when requesting that information.

 

 

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