johnlol

MvP Drop Coin

Aug 9th, 2023
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VeriLog 1.29 KB | Gaming | 0 0
  1. //Created Date: 04/07/2022
  2. -   script  AEOUS_MVP_DROP  FAKE_NPC,{
  3.     end;
  4. OnNPCKillEvent:
  5.     .@rnd = rand(1,100);
  6.     if( getmonsterinfo( killedrid,MOB_MVPEXP ) ) {
  7.     for( .@i = 0; .@i < getarraysize(.item_arrays); .@i += 3 ) {
  8.         if( .@rnd < .item_arrays[.@i+2] ) {
  9.             getitem .item_arrays[.@i], .item_arrays[.@i+1];
  10.             announce "Congratulations! Player "+ strcharinfo(0) +" has obtained "+ getitemname( .item_arrays[.@i] ) +" ["+ .item_arrays[.@i+1] +"] from "+ getmonsterinfo(killedrid, 0) +" (chance: "+.item_arrays[.@i+2]+"%) MVP Drop(s).",bc_all,0x00FF00;
  11.         }
  12.     }
  13.     end;
  14. }
  15.  
  16. OnInit:
  17. //  (<structure,<item_id>,<chances>)
  18.     setarray .item_arrays[0],
  19.         7179,   1,  5,
  20.         7227,   1,  25,
  21.         7539,   1,  50;
  22.     end;
  23. }
  24.  
  25. /*
  26.  
  27. -   script  AEOUS_MVP_DROP  -1,{
  28.     end;
  29.     OnNPCKillEvent:
  30.         if ( getmonsterinfo( killedrid, 22 ) ) {
  31.             for ( .@i = 0; .@i < getarraysize( .items ); .@i += 3 ) {
  32.                 if ( rand( 100 ) < .items[ .@i +  2 ] ) {
  33.                     getitem .items[ .@i ], .items[ .@i + 1 ];
  34.                     announce "Wow! " +strcharinfo( 0 )+ " has obtained " +getitemname( .items[ .@i ] )+ " [" +.items[ .@i + 1 ]+ "] from " +getmonsterinfo(killedrid, 0)+ ".",0;
  35.                 }
  36.             }
  37.         }
  38.     end;
  39.    
  40.     OnInit:
  41.         // <item id>,<amount>,<chance>
  42.         setarray .items[0],14232, 2, 5,
  43.                    7615, 1, 3,
  44.                    7227, 1, 2,
  45.                    7179, 1, 1;
  46.         end;
  47. }
  48.  
  49. */
Add Comment
Please, Sign In to add comment