Emistry icon

[RO] PC Die - Drop Random Inventory Items

Emistry | PRO | 08/06/16 03:57:37 PM UTC | 0 ⭐ | 389 👁️ | Never ⏰ | []
text |

1.12 KB

|

None

|

0 👍

/

0 👎

-	script	penalty_drop	-1,{
 	OnPCDieEvent:
		if ( killerrid != getcharid(3) && KARMAPOINTS > 1000 ) {
 			if ( KARMAPOINTS >= 95000 ) {
				.@drop_count = 10;
				.@rate = 100;
			}
			else if ( KARMAPOINTS <= 20000 ) {
				.@drop_count = rand( 1,5 );
				.@rate = 20;
			}
 			if ( .@rate > 0 && .@drop_count > 0 ) {
				while( .@drop < .@drop_count ) {
					getinventorylist;
					if ( @inventorylist_count == 0 ) 
						end;
 					.@index = rand( @inventorylist_count );
					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];
					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];
					.@drop++;
				}
			}
		}
		end;
}

Comments