Advertisement
Emistry

[RO] Extra Monster Drops 1.1

Aug 6th, 2016
560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. // https://rathena.org/board/topic/106864-request-extra-monster-drop/
  2.  
  3. - script Sample -1,{
  4.  
  5. OnNPCKillEvent:
  6. .@killedrid = killedrid;
  7. while ( .@i < .monster_drop_size ) {
  8. if ( compare( "#"+.monster_drop$[.@i],"#"+.@killedrid+"," ) ) {
  9. .@size = explode( .@reward$,.monster_drop$[.@i],"," );
  10. if ( .@size > 1 ) {
  11.  
  12. // Zeny + Cash rewards
  13. Zeny += atoi( .@reward$[1] );
  14. #CASHPOINTS += atoi( .@reward$[2] );
  15.  
  16. // item rewards
  17. if ( rand( 100 ) < 10 ) {
  18. for ( .@x = 0; .@x < .@size; .@x += 2 ) {
  19. getitem atoi( .@reward$[.@x] ),atoi( .@reward$[.@x+1] );
  20. }
  21. }
  22. }
  23. end;
  24. }
  25. .@i++;
  26. }
  27. end;
  28.  
  29. OnInit:
  30. setarray .monster_drop$,
  31. "1112,5000,2,504,10", // Drake: 5000 Zeny + 2 Cash Points +10 White Potion
  32. "1115,3000,1,504,10,506,10", // Eddga: 3000 Zeny + 1 Cash Points +10 White Potion + 10 Green Potion
  33. "2098,4000,0,504,10,506,10,505,10", // Doppelganger: 4000 Zeny + 1 Cash Points +10 White Potion + 10 Green Potion + 10 Blue Potion
  34. "1120,1000"; // Ghostring: 1000 Zeny
  35.  
  36. .monster_drop_size = getarraysize( .monster_drop$ );
  37. end;
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement