Radian Posted September 2, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted September 2, 2014 Hi i was wondering why some normal monsters when killed this script announce it. - script MVPAnnounce -1,{ OnNPCKillEvent: //if ( getmonsterinfo( killedrid,21 )&0x0020 && getgmlevel() > 0 ) if ( getmonsterinfo( killedrid,21 )&0x0020) announce "[ Player ] "+strcharinfo(0)+" has slain [ "+getmonsterinfo(killedrid,0)+" ] at the map of [ "+strcharinfo(3)+" ]",0, 0x9A2EFE; end; } I was hoping that it will only announce MVP monsters. mini boss/normal mobs are not included. Quote Link to comment Share on other sites More sharing options...
Euphy Posted September 2, 2014 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted September 2, 2014 Use MOB_MVPEXP instead. (Only MVPs give MVP experience, but non-MVPs also have MD_BOSS mode.) Quote Link to comment Share on other sites More sharing options...
Radian Posted September 3, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted September 3, 2014 (edited) like this right? if (getmonsterinfo(killedrid,MOB_MVPEXP)) thank Euphy, its working now.. Hi i was wondering why some normal monsters when killed this script announce it. - script MVPAnnounce -1,{ OnNPCKillEvent: //if ( getmonsterinfo( killedrid,21 )&0x0020 && getgmlevel() > 0 ) if ( getmonsterinfo( killedrid,21 )&0x0020) announce "[ Player ] "+strcharinfo(0)+" has slain [ "+getmonsterinfo(killedrid,0)+" ] at the map of [ "+strcharinfo(3)+" ]",0, 0x9A2EFE; end; } I was hoping that it will only announce MVP monsters. mini boss/normal mobs are not included. How can i modify this script and only announce specific maps of the MVP's? Edited September 2, 2014 by Ginji Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 3, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted September 3, 2014 if( strcharinfo(3) == "mapname" && getmonsterinfo( killedrid,MOB_MVPEXP ) ) edit the mapname Quote Link to comment Share on other sites More sharing options...
Euphy Posted September 3, 2014 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted September 3, 2014 If you're only announcing certain monsters, why don't you just attach a label to those monsters? That way you won't be unnecessarily running an event on every monster you kill. Quote Link to comment Share on other sites More sharing options...
Radian Posted September 3, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted September 3, 2014 (edited) If you're only announcing certain monsters, why don't you just attach a label to those monsters? That way you won't be unnecessarily running an event on every monster you kill. how can i do that? can you give me an example? is this a correct example of what you are saying? mes "I will spawn 5 Porings for you!"; close2; monster "this",0,0,"Poring 1",1002,1,strnpcinfo(0)+"::OnPoring1Dead"; monster "this",0,0,"Poring 2",1002,1,strnpcinfo(0)+"::OnPoring2Dead"; monster "this",0,0,"Poring 3",1002,1,strnpcinfo(0)+"::OnPoring3Dead"; monster "this",0,0,"Poring 4",1002,1,strnpcinfo(0)+"::OnPoring4Dead"; monster "this",0,0,"Poring 5",1002,1,strnpcinfo(0)+"::OnPoring5Dead"; end; OnPoring1Dead: mes "You killed Poring 1"; close; OnPoring2Dead: mes "You killed Poring 2"; close; OnPoring3Dead: mes "You killed Poring 3"; close; OnPoring4Dead: mes "You killed Poring 4"; close; OnPoring5Dead: mes "You killed Poring 5"; close; Edited September 3, 2014 by Ginji Quote Link to comment Share on other sites More sharing options...
Bin4ry Posted September 3, 2014 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Share Posted September 3, 2014 Yes I guess @Euphy mean so, by doing monster label your server will not trigger an OnNPCKillEvent check every time a player killed something which will reduce your server load. But don't forget to disable the default monster script unless you planning to modify the file itself. Quote Link to comment Share on other sites More sharing options...
Euphy Posted September 3, 2014 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted September 3, 2014 You can actually add an event in a normal monster spawn -- for some reason, a lot of people seem to be unaware of this, but it's clearly stated in the documentation: ** Create a permanent monster spawn: <map name>,<x>,<y>,<xs>,<ys>%TAB%monster%TAB%<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event>{,<mob size>,<mob ai>} ... Event is a script event to be executed when the mob is killed. The event must be in the form "NPCName::OnEventName" to execute, and the event name label should start with "On". As with all events, if the NPC is an on-touch NPC, the player who triggers the script must be within 'trigger' range for the event to work. Quote Link to comment Share on other sites More sharing options...
Radian Posted September 3, 2014 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Author Share Posted September 3, 2014 (edited) Yes I guess @Euphy mean so, by doing monster label your server will not trigger an OnNPCKillEvent check every time a player killed something which will reduce your server load. But don't forget to disable the default monster script unless you planning to modify the file itself. Alright, thanks for the information =) You can actually add an event in a normal monster spawn -- for some reason, a lot of people seem to be unaware of this, but it's clearly stated in the documentation: ** Create a permanent monster spawn: <map name>,<x>,<y>,<xs>,<ys>%TAB%monster%TAB%<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event>{,<mob size>,<mob ai>} ... Event is a script event to be executed when the mob is killed. The event must be in the form "NPCName::OnEventName" to execute, and the event name label should start with "On". As with all events, if the NPC is an on-touch NPC, the player who triggers the script must be within 'trigger' range for the event to work. Thank you, i will work on this. i was searching on the rAthena wiki and all i can find is that example. but anyway thank you again.. Edited September 3, 2014 by Ginji Quote Link to comment Share on other sites More sharing options...
Question
Radian
Hi i was wondering why some normal monsters when killed this script announce it.
I was hoping that it will only announce MVP monsters. mini boss/normal mobs are not included.
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.