Jump to content

Recommended Posts

Posted

item drop penalty po ito based on karma
kapag + karma ka may chance mahulugan ka ng item
ang problema gusto ko po kasi sana for player vs player lang sya hindi sana kasama pag monster vs player

-	script	penalty_drop	-1,{
   
    OnPCDieEvent:

         if ( killedrid != getcharid(3) && KARMAPOINTS > -800 ) {
            
            if ( KARMAPOINTS <= 1000 ) {
                .@drop_count = rand( 1,2 );
                .@rate = 20;
            }
			else if ( KARMAPOINTS >= 1001 && KARMAPOINTS <= 20000 ) {
                .@drop_count = rand( 1,3 );
                .@rate = 100;
            }
			else if ( KARMAPOINTS >= 20001 && KARMAPOINTS <= 30000 ) {
                .@drop_count = rand( 2,4 );
                .@rate = 100;
            }
			else if ( KARMAPOINTS >= 30001 && KARMAPOINTS <= 40000 ) {
                .@drop_count = rand( 2,5 );
                .@rate = 100;
            }
			else if ( KARMAPOINTS >= 40001 && KARMAPOINTS <= 50000  ) {
                .@drop_count = rand( 3,5 );
                .@rate = 100;
            }
			else if ( KARMAPOINTS >= 50001 && KARMAPOINTS <= 60000  ) {
                .@drop_count = rand( 4,6 );
                .@rate = 100;
            }
			else if ( KARMAPOINTS >= 60001 && KARMAPOINTS <= 70000  ) {
                .@drop_count = rand( 5,7 );
                .@rate = 100;
            }
			else if ( KARMAPOINTS >= 70001 ) {
                .@drop_count = rand( 5,7 );
                .@rate = 100;
            }
			
           if ( .@rate > 0 && .@drop_count > 0 ) {
                while( .@drop < .@drop_count ) {
                    getinventorylist;
                    if ( @inventorylist_count == 0 )
                    end;
                    .@index = rand( @inventorylist_count );
					getmapxy( .@map$,.@x,.@y,0 );
if ( countitem2(@inventorylist_id[.@index],@inventorylist_identify[.@index],@inventorylist_refine[.@index],@inventorylist_attribute[.@index],@inventorylist_card1[.@index],@inventorylist_card2[.@index],@inventorylist_card3[.@index],@inventorylist_card4[.@index]) ) {
	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;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...