Kawacito Posted February 28, 2023 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 33 Reputation: 2 Joined: 04/16/21 Last Seen: May 31, 2023 Share Posted February 28, 2023 The following script generates points when eliminating an MVP from the list it contains, but I would also like it to subtract points when being eliminated by an MVP... - script RankingMvP -1,{ OnInit: setarray $mobs[0],1096,1388,1648,1917,1832; end; OnNPCKillEvent: for ( set .@i, 0; .@i < getarraysize( $mobs ); set .@i, .@i + 1) { if( killedrid == $mobs[.@i] ) { dispbottom " Has obtenido 1 Punto de Clasificatoria"; end; } } } Quote Link to comment Share on other sites More sharing options...
0 pajodex Posted February 28, 2023 Group: Members Topic Count: 79 Topics Per Day: 0.03 Content Count: 439 Reputation: 173 Joined: 12/12/17 Last Seen: April 14 Share Posted February 28, 2023 - script RankingMvP -1,{ OnNPCKillEvent: // check if monster is MVP if ( getmonsterinfo(killedrid,MOB_MVPEXP) ) { #MVPPOINTS++; //----> Adds 1 mvp points..replace with whatever you are using dispbottom " Has obtenido 1 Punto de Clasificatoria"; } end; OnPCDieEvent: if (getunittype(killerrid)==BL_MOB) { // checks if monster is MVP and still have MVP Points, otherwise will result to negative value if ( getmonsterinfo(killedrid,MOB_MVPEXP) && #MVPPOINTS ) { #MVPPOINTS--; //----> Removes 1 mvp points..replace with whatever you are using dispbottom " Has reduced 1 Punto de Clasificatoria"; } } end; } Untested. Take notes on the comments. Quote Link to comment Share on other sites More sharing options...
Question
Kawacito
The following script generates points when eliminating an MVP from the list it contains, but I would also like it to subtract points when being eliminated by an MVP...
- script RankingMvP -1,{
OnInit:
setarray $mobs[0],1096,1388,1648,1917,1832;
end;
OnNPCKillEvent:
for ( set .@i, 0; .@i < getarraysize( $mobs ); set .@i, .@i + 1) {
if( killedrid == $mobs[.@i] ) {
dispbottom " Has obtenido 1 Punto de Clasificatoria";
end;
}
}
}
Link to comment
Share on other sites
1 answer 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.