yuhsing

Untitled

Sep 19th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. - script vip_healer -1,{
  2. if( @healdelay > gettimetick(1) ){
  3. dispbottom "Please wait "+.heal_delay+" seconds.";
  4. end;
  5.  
  6. }else if( !#VIP_duration ){
  7. mes "How can i help you ?";
  8. .@buff = select( "Normal Buff","VIP Buff" );
  9.  
  10. if( .@buff == 2 ){
  11. if( .zeny_cost ){
  12. mes "Required Zeny : "+.zeny_cost;
  13. if( Zeny < .zeny_cost ) close;
  14. }
  15. if( getitemname( .item_id ) != "null" && .item_qty ){
  16. mes "Required Item : "+.item_qty+" x "+getitemname( .item_id );
  17. if( countitem( .item_id ) < .item_qty ) close;
  18. }
  19. if( .zeny_cost ) Zeny -= .zeny_cost;
  20. if( getitemname( .item_id ) != "null" && .item_qty ) delitem .item_id,.item_qty;
  21. }
  22. .@buff_duration = .buff_time;
  23.  
  24. }else{
  25. .@buff_duration = .vip_buff_time;
  26. .@buff = 2;
  27. }
  28.  
  29. percentheal 100,100;
  30. if( .@buff & 2 ){
  31. // vip buff
  32. sc_start SC_BLESSING,.@buff_duration,10;
  33. sc_start SC_INCREASEAGI,.@buff_duration,10;
  34.  
  35. }else{
  36. // normal buff
  37. sc_start SC_BLESSING,.@buff_duration,10;
  38. sc_start SC_INCREASEAGI,.@buff_duration,10;
  39.  
  40. }
  41. @healdelay = gettimetick(1) + .heal_delay;
  42. specialeffect2 EF_PROVIDENCE;
  43. end;
  44.  
  45.  
  46.  
  47. OnInit:
  48. if( strnpcinfo(2) != "" ) end;
  49. // healer delay
  50. .heal_delay = 3;
  51. // healer buff duration
  52. .buff_time = 240000;
  53. // zeny cost to get VIP buff
  54. .zeny_cost = 30000;
  55. // item required to get VIP buff
  56. .item_id = 512;
  57. .item_qty = 2;
  58.  
  59. // vip buff duration
  60. .vip_buff_time = 600000;
  61. end;
  62.  
  63. }
  64.  
  65. prontera,155,181,4 duplicate(vip_healer) VIP Healer#1 757
  66. prontera,155,181,4 duplicate(vip_healer) VIP Healer#2 757
  67. prontera,155,181,4 duplicate(vip_healer) VIP Healer#3 757
  68. prontera,155,181,4 duplicate(vip_healer) VIP Healer#4 757
  69.  
  70.  
  71. prontera,155,171,5 script VIP Purchase 757,{
  72. .@gm_level = getgmlevel();
  73.  
  74. mes "Pick your option.";
  75. switch( select( ( !#VIP_duration )?"":"View Remaining VIP time.","Extend VIP time." )){
  76. default:
  77. Case 1:
  78. .@value = #VIP_duration - gettimetick(1);
  79. mes "Your VIP Duration:"+.@value;
  80. .@second = ( .@value % 60 );
  81. .@minute = ( .@value / 60 % 60 );
  82. .@hour = ( .@value / 3600 % 24 );
  83. .@day = ( .@value / 86400 );
  84. mes .@day+" day "+.@hour+" hour "+.@minute+" minute "+.@second+" second";
  85. break;
  86. Case 2:
  87. mes "How many month ?";
  88. set .@month,select( "1 month","2 month","3 month" );
  89. if( select( "Extend for "+.@month+" month.","Close" ) == 1 ){
  90. if( #CASHPOINTS < ( .@month * .monthly_rate ) ){
  91. mes "You need "+( .@month * .monthly_rate )+" cashpoint.";
  92. }else if( #VIP_duration > 2000000 ){
  93. mes "Temporary you cant extend since it will reach the limit.";
  94. }else{
  95. .@time = gettimetick(1);
  96. #CASHPOINTS = #CASHPOINTS - ( .@month * .monthly_rate );
  97. .@duration = ( .@month * ( 30 * 24 * 60 * 60 ) ) + (( #VIP_duration )? .@time:0 ) );
  98. #VIP_duration += .@duration;
  99. .@value = ( #VIP_duration - .@time ) % 2000000;
  100. deltimer .npc_name$+"::OnVIPTimeUp";
  101. addtimer ( .@value * 1000 ),.npc_name$+"::OnVIPTimeUp";
  102. mes "Extended VIP for "+.@month+" month.";
  103. atcommand "@adjgroup 1";
  104. }
  105. }
  106. break;
  107. }
  108. close;
  109.  
  110. OnPCLoginEvent:
  111. if( #VIP_duration ){
  112. .@time = gettimetick(1);
  113. .@value = ( #VIP_duration - .@time );
  114. .@second = ( .@value % 60 );
  115. .@minute = ( .@value / 60 % 60 );
  116. .@hour = ( .@value / 3600 % 24 );
  117. .@day = ( .@value / 86400 );
  118. dispbottom "VIP TIME LEFT : "+.@day+" day "+.@hour+" hour "+.@minute+" minute "+.@second+" second";
  119. .@value = .@value % 2000000;
  120. deltimer .npc_name$+"::OnVIPTimeUp";
  121. addtimer ( .@value * 1000 ),.npc_name$+"::OnVIPTimeUp";
  122. atcommand "@adjgroup 1";
  123. }
  124. end;
  125.  
  126. OnVIPTimeUp:
  127. deltimer .npc_name$+"::OnVIPTimeUp";
  128. mes "VIP Time's up. You're will be disconnected within 3 seconds. Please relog";
  129. #VIP_duration = 0;
  130. sleep2 3000;
  131. atcommand "@kick "+strcharinfo(0);
  132. end;
  133.  
  134. OnInit:
  135. .gm_level = 80;
  136. .vip_groupid = 1;
  137. // 1month equal to 30 days
  138. .monthly_rate = 200;
  139.  
  140. .npc_name$ = strnpcinfo(0);
  141. end;
  142. }
Advertisement
Add Comment
Please, Sign In to add comment