Emistry icon

[RO] Extra Monster Drops 1.1

Emistry | PRO | 08/06/16 03:20:55 PM UTC | 0 ⭐ | 877 👁️ | Never ⏰ | []
text |

1.14 KB

|

None

|

0 👍

/

0 👎

// https://rathena.org/board/topic/106864-request-extra-monster-drop/
 -	script	Sample	-1,{
 	OnNPCKillEvent:
		.@killedrid = killedrid;
		while ( .@i < .monster_drop_size ) {
			if ( compare( "#"+.monster_drop$[.@i],"#"+.@killedrid+"," ) ) {
				.@size = explode( .@reward$,.monster_drop$[.@i],"," );
				if ( .@size > 1 ) {
 					// Zeny + Cash rewards
					Zeny += atoi( .@reward$[1] );
					#CASHPOINTS += atoi( .@reward$[2] );
 					// item rewards
					if ( rand( 100 ) < 10 ) {
						for ( .@x = 0; .@x < .@size; .@x += 2 ) {
							getitem atoi( .@reward$[.@x] ),atoi( .@reward$[.@x+1] );
						}
					}
				}
				end;
			}
			.@i++;
		}
		end;
 	OnInit:
		setarray .monster_drop$,
			"1112,5000,2,504,10",				//	Drake: 5000 Zeny + 2 Cash Points +10 White Potion
			"1115,3000,1,504,10,506,10",		//	Eddga: 3000 Zeny + 1 Cash Points +10 White Potion + 10 Green Potion
			"2098,4000,0,504,10,506,10,505,10",	//	Doppelganger: 4000 Zeny + 1 Cash Points +10 White Potion + 10 Green Potion + 10 Blue Potion
			"1120,1000";						// 	Ghostring:	1000 Zeny
 		.monster_drop_size = getarraysize( .monster_drop$ );
		end;
 }

Comments