Hadeszeus
New member
Hi Guys,
I have this script that gives an item to the Killer of the MVPS. The rewards is separate from PARTY KILLER and A SOLO KILLER.
Im trying to add a condition that check if the party members are in the same map of the KILLER when the MVP was killed.
If not in the same map of KILLER. No reward will be given.
The problem is I can't make it work and I need your help.
I added this before it gives the item to the party.
I have this script that gives an item to the Killer of the MVPS. The rewards is separate from PARTY KILLER and A SOLO KILLER.
Im trying to add a condition that check if the party members are in the same map of the KILLER when the MVP was killed.
If not in the same map of KILLER. No reward will be given.
The problem is I can't make it work and I need your help.
I added this before it gives the item to the party.
Code:
if ( strcharinfo(3) != .@mapc$ ) end;
Code:
- script MVPREWARD -1,{OnNPCKillEvent: if ( !getmonsterinfo( killedrid, MOB_MVPEXP ) ) end; if ( getcharid(1) ) { .@mapc$ = strcharinfo(3); 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++; } } if ( strcharinfo(3) != .@mapc$ ) end; getitem 501, 5, .@partymemberaid[ rand( .@c ) ]; announce "Party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } else { getitem 501, 1; //Get Item if KILLER is not in a party. announce "Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3), 0; } end;}
Last edited by a moderator: