Jump to content

jurelmetal

Members
  • Posts

    7
  • Joined

  • Last visited

Community Answers

  1. jurelmetal's post in Monster Drops script getitem random not working was marked as the answer   
    Fixed script:
    - script Monster_Drop -1,{ OnNPCKillEvent: //if(getgmlevel()>50) end; // MVP DROP if ( getmonsterinfo( killedrid, 22 ) ) { set #daily_mvp,#daily_mvp + 1; for ( .@i = 0; .@i < getarraysize( .items ); .@i += 4 ) { if ( rand( 100 ) < .items[ .@i + 3 ] ) { .@quantity = rand(.items[.@i + 1], .items[.@i + 2]); // Use the numbers as arguments to the call to rand(a, b) getitem .items[.@i], .@quantity; //announce strcharinfo(0)+" got "+getitemname( .items[ .@i ] )+" x"+.@quantity+" from "+getmonsterinfo(killedrid, 0)+"!!",bc_all,0xFFFFFF; } } } // NORMAL MOB DROPS else { for ( .@i = 0; .@i < getarraysize( .mobitem ); .@i += 4 ) { if ( rand( 100 ) < .mobitem[ .@i + 3 ] ) { .@quantity = rand(.mobitem[.@i + 1], .mobitem[.@i + 2]); // Use the numbers as arguments to the call to rand(a, b) getitem .mobitem[.@i], .@quantity; } } } end; OnInit: // Random amount 6240,rand(1,3),1, // MVP ITEMS <item id>,<min_amount>,<max_amount>,<chance> //setarray .items[0],673,5,10,675,1,1,7859,20,5; setarray .items[0], 673,5,5,10, 675,1,1,1, 7859,10,20,10; // MOB ITEMS <item id>,<min_amount>,<max_amount>,<chance> //setarray .mobitem[0],7859,rand(1,10),5; setarray .mobitem[0], 7859,1,5,5; end; } // END OF SCRIPT This way you should be able to add items to the arrays at the end without trouble. I don't have a setup to test right away but will post update if I find any issue.
×
×
  • Create New...