Emistry

[RO] PC Die - Drop Random Inventory Items

Aug 6th, 2016
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. - script penalty_drop -1,{
  2.  
  3. OnPCDieEvent:
  4. if ( killerrid != getcharid(3) && KARMAPOINTS > 1000 ) {
  5.  
  6. if ( KARMAPOINTS >= 95000 ) {
  7. .@drop_count = 10;
  8. .@rate = 100;
  9. }
  10. else if ( KARMAPOINTS <= 20000 ) {
  11. .@drop_count = rand( 1,5 );
  12. .@rate = 20;
  13. }
  14.  
  15. if ( .@rate > 0 && .@drop_count > 0 ) {
  16. while( .@drop < .@drop_count ) {
  17. getinventorylist;
  18. if ( @inventorylist_count == 0 )
  19. end;
  20.  
  21. .@index = rand( @inventorylist_count );
  22. delitem2 @inventorylist_id[.@index],@inventorylist_amount[.@index],@inventorylist_identify[.@index],@inventorylist_refine[.@index],@inventorylist_attribute[.@index],@inventorylist_card1[.@index],@inventorylist_card2[.@index],@inventorylist_card3[.@index],@inventorylist_card4[.@index];
  23. makeitem2 @inventorylist_id[.@index],@inventorylist_amount[.@index],.@map$,.@x,.@y,@inventorylist_identify[.@index],@inventorylist_refine[.@index],@inventorylist_attribute[.@index],@inventorylist_card1[.@index],@inventorylist_card2[.@index],@inventorylist_card3[.@index],@inventorylist_card4[.@index];
  24. .@drop++;
  25. }
  26. }
  27. }
  28. end;
  29. }
Add Comment
Please, Sign In to add comment