Kawacito Posted February 28, 2023 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
0 pajodex Posted February 28, 2023 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
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;
}
}
}
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.