Advertisement
Emistry

[RO] Thana Event - 3 Hours

Mar 11th, 2017
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. // https://www.messenger.com/t/WDS.Denz
  2.  
  3. prontera,155,181,5 script Thana Event 4_F_KAFRA1,{
  4. doevent "thana_main::OnTalk";
  5. }
  6.  
  7.  
  8. boss,51,43,5 script Thana Summoner 4_F_KAFRA1,{
  9. doevent "thana_main::OnSummon";
  10. }
  11.  
  12. - script thana_main -1,{
  13.  
  14. OnInit:
  15. .minute = 60;
  16. .map$ = "boss";
  17.  
  18. setarray .required_nameid,501,502,503,504;
  19. setarray .required_amount,1,2,3,4;
  20. .required_nameid_size = getarraysize( .required_nameid );
  21.  
  22. .npc_name$ = strnpcinfo(3);
  23. end;
  24.  
  25. OnMinute00:
  26. if ( gettime(3) % 3 == 0 ) {
  27. .status = 1;
  28. announce "<Thana Event> available now.",bc_all;
  29.  
  30. sleep ( .minute * 60000 );
  31.  
  32. mapwarp .map$,"prontera",155,181;
  33. .party_id = 0;
  34. .status = 0;
  35. .password$ = "";
  36. sleep 3000;
  37. announce "<Thana Event> closed now.",bc_all;
  38. }
  39. end;
  40.  
  41. OnTalk:
  42. .@party_id = getcharid(1);
  43. .@cid = getcharid(0);
  44.  
  45. if ( !.@party_id ) {
  46. mes "You dont have party.";
  47. }
  48. else if ( .@cid != getpartyleader( .@party_id,2 ) ) {
  49. mes "You're not party leader.";
  50. }
  51. else if ( .password$ != "" && .party_id == .@party_id ) {
  52. input .@password$;
  53. if ( .@password$ == .password$ ) {
  54. warp .map$,0,0;
  55. }
  56. else {
  57. mes "Invalid password.";
  58. }
  59. }
  60. else if ( getmapusers( .map$ ) > 0 ) {
  61. mes "Another party already entered.";
  62. }
  63. else {
  64. .party_id = .@party_id;
  65. .can_summon = 1;
  66. mes "Enter Password for the room.";
  67. input .password$;
  68. warp .map$,0,0;
  69. }
  70. close;
  71.  
  72. OnSummon:
  73. .@party_id = getcharid(1);
  74. .@cid = getcharid(0);
  75.  
  76. if ( !.@party_id ) {
  77. mes "You dont have party.";
  78. }
  79. else if ( .@cid != getpartyleader( .@party_id,2 ) ) {
  80. mes "You're not party leader.";
  81. }
  82. else if ( !.can_summon ) {
  83. mes "You cant summon more than once.";
  84. }
  85. else {
  86. mes "Required item:";
  87. for ( .@i = 0; .@i < .required_nameid_size; .@i++ ) {
  88. mes "> "+.required_amount[.@i]+"x "+getitemname( .required_nameid[.@i] );
  89. if ( countitem( .required_nameid[.@i] ) < .required_amount[.@i] )
  90. .@fail++;
  91. }
  92. if ( !.@fail )
  93. if ( select( "Summon","Cancel" ) == 1 ) {
  94. for ( .@i = 0; .@i < .required_nameid_size; .@i++ )
  95. delitem .required_nameid[.@i], .required_amount[.@i];
  96. monster .map$,0,0,"--ja--",1708,1,.npc_name$+"::OnKill";
  97. .can_summon = 0;
  98. }
  99. }
  100. close;
  101.  
  102. OnKill:
  103. awake .npc_name$;
  104. end;
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement