ValkRO Posted February 6, 2017 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 11/06/16 Last Seen: January 29, 2024 Share Posted February 6, 2017 (edited) Greetings rAthena Can i request this script that if only you can recieve the reward if you're on the same map as the MVP is killed Spoiler - script mvpdrop -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { 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 =/ continue; getitem 6941, 2, $@partymemberaid[.@i]; getitem 30027, 2, $@partymemberaid[.@i]; } announce "Wow! A party named [ "+ strcharinfo(1) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3) +"! Awesome work guys!",bc_all,0x6666CC; } else { getitem 30027,2; getitem 6941,2; announce "Amazing! A lone wolf named [ "+ strcharinfo(0) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" himself at "+ strcharinfo(3) +"! Reckless, but still, good work!",bc_all,0x6666CC; } } end; } I thank you in advance More power to rAthena Edited February 6, 2017 by ValkRO Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted February 7, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: Tuesday at 02:26 AM Share Posted February 7, 2017 Try - script mvpdrop -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; getmapxy(.@mapname$,.@mapx,.@mapy,UNITTYPE_PC); for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( !isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) || // what happens if someone in the party member is offline =/ strcharinfo(3,$@partymembercid[.@i]) != .@mapname$ || // If the party member is not on the same map of the killer checkidle(rid2name($@partymemberaid[.@i])) > 30 ) // If player is idle for 30 seconds continue; getitem 6941, 2, $@partymemberaid[.@i]; getitem 30027, 2, $@partymemberaid[.@i]; } announce "Wow! A party named [ "+ strcharinfo(1) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3) +"! Awesome work guys!",bc_all,0x6666CC; } else { getitem 30027,2; getitem 6941,2; announce "Amazing! A lone wolf named [ "+ strcharinfo(0) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" himself at "+ strcharinfo(3) +"! Reckless, but still, good work!",bc_all,0x6666CC; } } end; } Just change the 30 on how many seconds before you can consider the character as AFK Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted February 6, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: Tuesday at 02:26 AM Share Posted February 6, 2017 (edited) Try - script mvpdrop -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; getmapxy(.@mapname$,.@mapx,.@mapy,UNITTYPE_PC); for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( !isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) || // what happens if someone in the party member is offline =/ strcharinfo(3,$@partymembercid[.@i]) != .@mapname$ ) // If the party member is not on the same map of the killer continue; getitem 6941, 2, $@partymemberaid[.@i]; getitem 30027, 2, $@partymemberaid[.@i]; } announce "Wow! A party named [ "+ strcharinfo(1) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3) +"! Awesome work guys!",bc_all,0x6666CC; } else { getitem 30027,2; getitem 6941,2; announce "Amazing! A lone wolf named [ "+ strcharinfo(0) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" himself at "+ strcharinfo(3) +"! Reckless, but still, good work!",bc_all,0x6666CC; } } end; } Edited February 6, 2017 by Technoken changed UNITYPE_PC to UNITTYPE_PC lol 1 Quote Link to comment Share on other sites More sharing options...
0 ValkRO Posted February 7, 2017 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 11/06/16 Last Seen: January 29, 2024 Author Share Posted February 7, 2017 On 2/6/2017 at 1:50 PM, Technoken said: Try - script mvpdrop -1,{ OnNPCKillEvent: if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) { if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; getmapxy(.@mapname$,.@mapx,.@mapy,UNITTYPE_PC); for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( !isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) || // what happens if someone in the party member is offline =/ strcharinfo(3,$@partymembercid[.@i]) != .@mapname$ ) // If the party member is not on the same map of the killer continue; getitem 6941, 2, $@partymemberaid[.@i]; getitem 30027, 2, $@partymemberaid[.@i]; } announce "Wow! A party named [ "+ strcharinfo(1) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3) +"! Awesome work guys!",bc_all,0x6666CC; } else { getitem 30027,2; getitem 6941,2; announce "Amazing! A lone wolf named [ "+ strcharinfo(0) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" himself at "+ strcharinfo(3) +"! Reckless, but still, good work!",bc_all,0x6666CC; } } end; } Thank you Technoken! Just one more request, please. the last thing it needs is an AFK checker. People in my server still found ways to abuse this system. Thank you so much in advance Quote Link to comment Share on other sites More sharing options...
Question
ValkRO
Greetings rAthena
Can i request this script that if only you can recieve the reward if you're on the same map as the MVP is killed
- script mvpdrop -1,{
OnNPCKillEvent:
if ( getmonsterinfo( killedrid, MOB_MVPEXP ) ) {
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 =/
continue;
getitem 6941, 2, $@partymemberaid[.@i];
getitem 30027, 2, $@partymemberaid[.@i];
}
announce "Wow! A party named [ "+ strcharinfo(1) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3) +"! Awesome work guys!",bc_all,0x6666CC;
}
else {
getitem 30027,2;
getitem 6941,2;
announce "Amazing! A lone wolf named [ "+ strcharinfo(0) +" ] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" himself at "+ strcharinfo(3) +"! Reckless, but still, good work!",bc_all,0x6666CC;
}
}
end;
}
I thank you in advance
More power to rAthena
Edited by ValkROLink to comment
Share on other sites
3 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.