Jump to content
  • 0

MvP Points


Kawacito

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.01
  • Content Count:  33
  • Reputation:   2
  • Joined:  04/16/21
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

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

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