Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Player kills a MVP monster event
- - script BattleManagerNPCKill -1,{
- OnNPCKillEvent:
- // If player is killed by him self?!
- if (killedrid != killerrid) {
- // Check that monster has MVP exp available
- if (getmonsterinfo(killedrid,MOB_MVPEXP)) {
- // Loop party reward...
- if (getcharid(1)) {
- set .@mvpmap$, strcharinfo(3);
- getpartymember(getcharid(1),2);
- set .@partymembercount, $@partymembercount;
- copyarray .@partymemberaid[0], $@partymemberaid[0], .@partymembercount;
- for (set .@i, 0; .@i < .@partymembercount; set .@i, .@i + 1) {
- // Attach party member
- if (attachrid(.@partymemberaid[.@i])) {
- // AFK Check if player is logged in, is not vending, is not chatting or is in the same map
- if (isloggedin(getcharid(3),getcharid(0)) && !checkvending() && !checkchatting() && .@mvpmap$ == strcharinfo(3)) {
- // Reward each party member(active)
- set #CASHPOINTS, #CASHPOINTS + 5;
- message strcharinfo(0), "+5 Cash Point!";
- }
- }
- }
- } else {
- // Reward a single playersolo
- set #CASHPOINTS, #CASHPOINTS + 5;
- message strcharinfo(0), "+5 Cash Point!";
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement