Jump to content
  • 0

Reward on the Same map


ValkRO

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  11/06/16
  • Last Seen:  

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 by ValkRO
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

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 by Technoken
changed UNITYPE_PC to UNITTYPE_PC lol
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  11/06/16
  • Last Seen:  

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

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