Jump to content

pa help po


Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/15/16
  • Last Seen:  

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;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  57
  • Reputation:   16
  • Joined:  09/26/16
  • Last Seen:  

This stop the script if kill by a monster:

OnPCDieEvent:
    if ( killerrid > 3000000 ) end;

 

https://rathena.org/board/topic/82709-script-like-this/?p=199657

Edited by Athan17
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/15/16
  • Last Seen:  

how about killed by @die and NPC?

Link to comment
Share on other sites

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.

×
×
  • Create New...