Advertisement
Emistry

[RO] World Boss Summon Event

Sep 10th, 2018
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. // https://rathena.org/board/topic/114468-world-boss-script-modification/
  2.  
  3. - script world_boss_main -1,{
  4.  
  5. OnInit:
  6. .duration_minute = 60;
  7.  
  8. // random map list
  9. setarray .map$, "prt_fild01", "prt_fild02";
  10. .map_size = getarraysize(.map$);
  11.  
  12. // random reward list
  13. setarray .item_id, 501, 502, 503;
  14. setarray .amount, 1, 2, 3;
  15. .item_id_size = getarraysize(.item_id);
  16.  
  17. .npc_name$ = strnpcinfo(3);
  18. end;
  19.  
  20. OnMon2021: // monday 8:21PM
  21. OnThu2021: // thursday 8:21PM
  22. .@map$ = .map$[rand(.map_size)];
  23.  
  24. for (.@i = 3; .@i > 0; .@i-- {
  25. announce "[World Boss] A World Boss will appear in " + .@i + " minutes", bc_all, 0xFF0000;
  26. sleep 60000;
  27. }
  28. monster .@map$, 0, 0, "WORLD BOSS 1", 1001, 1, .npc_name$+"::OnKill";
  29. monster .@map$, 0, 0, "WORLD BOSS 2", 1001, 1, .npc_name$+"::OnKill";
  30. monster .@map$, 0, 0, "WORLD BOSS 3", -3, 1, .npc_name$+"::OnKill"; // Random
  31. announce "[World Boss] World Bosses has appeared in " + .@map$ + " to wreck havoc!!", bc_all, 0xFF0000;
  32.  
  33. sleep (.duration_minute * 60000);
  34. killmonster .@map$, .npc_name$+"::OnKill";
  35. end;
  36.  
  37. OnKill:
  38. announce "[World Boss] " + strcharinfo(0) + " killed one of the World Boss! Congratulations!", bc_all, 0xFF0000;
  39.  
  40. // Rewards:
  41. getitem 512, 100;
  42. getitem 512, 200;
  43. getitem 512, 300;
  44.  
  45. // treasure box
  46. getmapxy(.@map$, .@x, .@y, 0);
  47. monster .@map$, .@x + rand(-2,2), .@y + rand(-2,2), "--ja--", 1001, 1, .npc_name$+"::OnTreasureBox";
  48. end;
  49.  
  50. OnTreasureBox:
  51. addrid(1);
  52. .@i = rand(.item_id_size);
  53. getitem .item_id[.@i], .amount[.@i];
  54. end;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement