karazu 33 Posted January 1, 2014 - script MVPREWARD -1,{OnNPCKillEvent: if ( !getmonsterinfo( killedrid, MOB_MVPEXP ) ) end; if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/ .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } getitem 7615, 1, .@partymemberaid[ rand( .@c ) ]; announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } else { getitem 7615, 1; announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } end;} How to change this that it will only announce to the local map? I don't want to this to spam to all map. Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted January 2, 2014 (edited) *mapannounce "<map name>","<text>",<flag>{,<fontColor>{,<fontType>{,<fontSize>{,<fontAlign>{,<fontY>}}}}}};This command will work like 'announce' but will only broadcast to characters currently residing on the specified map. The flag and optional parameters parameters are the same as in 'announce', but target and source flags are ignored. example: mapannounce "bat_a01", "Group [1] has taken the work shop, and will now respawn there.",bc_map,"0xFFCE00"; @edit: Or use strcharinfo(3) 3 - The name of the map the character is in. mapannounce ""+strcharinfo(3)+"", "Group [1] has taken the work shop, and will now respawn there.",bc_map,"0xFFCE00"; Edited January 2, 2014 by kyeme Added strcharinfo(3) thanks Jabote Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted January 2, 2014 Related to previous kyeme response here's a tip: you can use strcharinfo(3) to get the map name the user is currently in. Will let you do that and test on your own. Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted January 2, 2014 announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0;the 0 at the back, is actually bc_allits defined in dbconst.txt you can actually just change it into bc_map announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ), bc_map; Quote Share this post Link to post Share on other sites
0 karazu 33 Posted January 2, 2014 announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0;the 0 at the back, is actually bc_allits defined in dbconst.txt you can actually just change it into bc_map announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ), bc_map; I will test this one, Thank you very much. Thank you also to jabote. Quote Share this post Link to post Share on other sites
How to change this that it will only announce to the local map? I don't want to this to spam to all map.
Share this post
Link to post
Share on other sites