Advertisement
Emistry

[RO] Weekday Summon Mob Event

Aug 22nd, 2016
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1.  
  2. - script auto_mob_main -1,{
  3.  
  4. OnInit:
  5. OnHour00:
  6. .weekday = gettime(4);
  7. end;
  8.  
  9. // OnClock0200:
  10. // OnClock0800:
  11. // OnClock1400:
  12. // OnClock2000:
  13. OnSummon:
  14. if ( .current_map$ != "" )
  15. killmonster .current_map$,.npc_name$+"::OnKilled";
  16. switch( .weekday ) {
  17. case 1: callsub( OnSummonMob,"pay_fild02",1001 ); break;
  18. case 2: callsub( OnSummonMob,"pay_fild02",1001 ); break;
  19. case 3: callsub( OnSummonMob,"pay_fild03",1001 ); break;
  20. case 4: callsub( OnSummonMob,"pay_fild04",1001 ); break;
  21. case 5: callsub( OnSummonMob,"pay_fild05",1001 ); break;
  22. case 6: callsub( OnSummonMob,"pay_fild06",1001 ); break;
  23. default: callsub( OnSummonMob,"pay_fild07",1001 ); break;
  24. }
  25. end;
  26.  
  27. OnSummonMob:
  28. .@map$ = getarg( 0,"" );
  29. .@mob = getarg( 1,0 );
  30.  
  31. if ( getmapusers( .@map$ ) && .@mob ) {
  32. monster .@map$,0,0,"--ja--",.@mob,1,.npc_name$+"::OnKilled";
  33. announce getmonsterinfo( .@mob,MOB_NAME )+" summoned at "+.@map$+"...",bc_all;
  34. .current_map$ = .@map$;
  35. }
  36. else .current_map$ = "";
  37. end;
  38.  
  39. OnKilled:
  40. switch( .weekday ) {
  41. case 1: getitem 512,1; break;
  42. case 2: getitem 512,2; break;
  43. case 3: getitem 512,3; break;
  44. case 4: getitem 512,4; break;
  45. case 5: getitem 512,5; break;
  46. case 6: getitem 512,6; break;
  47. default: getitem 512,7; break;
  48. }
  49. end;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement