Jump to content
  • 0

MVP announcer


Antares

Question


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  420
  • Reputation:   89
  • Joined:  01/30/12
  • Last Seen:  

Hello,

 

I have found some similar topics, and I managed to get this working:

-	script	MVPAnnouncer	-1,{
OnNPCKillEvent: 
	if ( getmonsterinfo(killedrid,MOB_MVPEXP) )
		announce strcharinfo(0)+" has defeated "+getmonsterinfo(killedrid,0)+" at "+strcharinfo(3),0,0xFF0101;
	end;
}

The problem with this script is that it announces @clones with "null" name, and another problem that it is not announcing NPC spawned mvps, like Lord of Death, Thanatos, Nydhogg's Shadow.

 

Additionally, I want to extend the script, to only display kills below gmlvl 99, but I think I got this part. So how do I modify the script to counter the above problems?

 

My script currently:

-	script	MVPAnnouncer	-1,{
OnNPCKillEvent: 
	if ( getmonsterinfo(killedrid,MOB_MVPEXP) && (getgmlevel() < 99) )
		announce strcharinfo(0)+" has defeated "+getmonsterinfo(killedrid,0)+" at "+strcharinfo(3),0,0xFF0101;
	end;
}

Another question: What are the default OnEvents? I was thinking about using OnMobKill, but I'm not sure if it's a default event... :( I'm also unsure if it's wise to run a ckeck on every mobkill... isn't there any other option to announce MVP kills (npc and player spawned ones as well)?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

default event label for mob ??

OnNPCKillEvent:

why it doesnt announce for Lord Of Death / Thanatos / Instances monster ??

Because these monster have their own npc with own npc label.

each monster can only have 1 event label.

 

any monster that doesnt have any event label will trigger the OnNPCKillEvent label.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  420
  • Reputation:   89
  • Joined:  01/30/12
  • Last Seen:  

So what is the solution? How to announce every mvp? The client always gets the info from the server who is the mvp. Does it have any event or can we use that somehow?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

add the announce part to every single script that related to mvp ...instances ... LOD...Bio lab MVP..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  420
  • Reputation:   89
  • Joined:  01/30/12
  • Last Seen:  

What if I collect all the labels of the script mvps? Are those labels global? Can I process them from my own script?

 

What I mean:

OnNPCKillEvent:
OnMyMobDead:
OnLoDDead:
On.....
.....
.....
.....
....
....
....
	<if MVP then announce the kill>
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

no .... you have to search for each npc label then add the announce part.

Link to comment
Share on other sites


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

Another way should be to call both label when you kill a mob

https://github.com/rathena/rathena/blob/master/src/map/mob.c#L2672

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