Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script vip_healer -1,{
- if( @healdelay > gettimetick(1) ){
- dispbottom "Please wait "+.heal_delay+" seconds.";
- end;
- }else if( !#VIP_duration ){
- mes "How can i help you ?";
- .@buff = select( "Normal Buff","VIP Buff" );
- if( .@buff == 2 ){
- if( .zeny_cost ){
- mes "Required Zeny : "+.zeny_cost;
- if( Zeny < .zeny_cost ) close;
- }
- if( getitemname( .item_id ) != "null" && .item_qty ){
- mes "Required Item : "+.item_qty+" x "+getitemname( .item_id );
- if( countitem( .item_id ) < .item_qty ) close;
- }
- if( .zeny_cost ) Zeny -= .zeny_cost;
- if( getitemname( .item_id ) != "null" && .item_qty ) delitem .item_id,.item_qty;
- }
- .@buff_duration = .buff_time;
- }else{
- .@buff_duration = .vip_buff_time;
- .@buff = 2;
- }
- percentheal 100,100;
- if( .@buff & 2 ){
- // vip buff
- sc_start SC_BLESSING,.@buff_duration,10;
- sc_start SC_INCREASEAGI,.@buff_duration,10;
- }else{
- // normal buff
- sc_start SC_BLESSING,.@buff_duration,10;
- sc_start SC_INCREASEAGI,.@buff_duration,10;
- }
- @healdelay = gettimetick(1) + .heal_delay;
- specialeffect2 EF_PROVIDENCE;
- end;
- OnInit:
- if( strnpcinfo(2) != "" ) end;
- // healer delay
- .heal_delay = 3;
- // healer buff duration
- .buff_time = 240000;
- // zeny cost to get VIP buff
- .zeny_cost = 30000;
- // item required to get VIP buff
- .item_id = 512;
- .item_qty = 2;
- // vip buff duration
- .vip_buff_time = 600000;
- end;
- }
- prontera,155,181,4 duplicate(vip_healer) VIP Healer#1 757
- prontera,155,181,4 duplicate(vip_healer) VIP Healer#2 757
- prontera,155,181,4 duplicate(vip_healer) VIP Healer#3 757
- prontera,155,181,4 duplicate(vip_healer) VIP Healer#4 757
- prontera,155,171,5 script VIP Purchase 757,{
- .@gm_level = getgmlevel();
- mes "Pick your option.";
- switch( select( ( !#VIP_duration )?"":"View Remaining VIP time.","Extend VIP time." )){
- default:
- Case 1:
- .@value = #VIP_duration - gettimetick(1);
- mes "Your VIP Duration:"+.@value;
- .@second = ( .@value % 60 );
- .@minute = ( .@value / 60 % 60 );
- .@hour = ( .@value / 3600 % 24 );
- .@day = ( .@value / 86400 );
- mes .@day+" day "+.@hour+" hour "+.@minute+" minute "+.@second+" second";
- break;
- Case 2:
- mes "How many month ?";
- set .@month,select( "1 month","2 month","3 month" );
- if( select( "Extend for "+.@month+" month.","Close" ) == 1 ){
- if( #CASHPOINTS < ( .@month * .monthly_rate ) ){
- mes "You need "+( .@month * .monthly_rate )+" cashpoint.";
- }else if( #VIP_duration > 2000000 ){
- mes "Temporary you cant extend since it will reach the limit.";
- }else{
- .@time = gettimetick(1);
- #CASHPOINTS = #CASHPOINTS - ( .@month * .monthly_rate );
- .@duration = ( .@month * ( 30 * 24 * 60 * 60 ) ) + (( #VIP_duration )? .@time:0 ) );
- #VIP_duration += .@duration;
- .@value = ( #VIP_duration - .@time ) % 2000000;
- deltimer .npc_name$+"::OnVIPTimeUp";
- addtimer ( .@value * 1000 ),.npc_name$+"::OnVIPTimeUp";
- mes "Extended VIP for "+.@month+" month.";
- atcommand "@adjgroup 1";
- }
- }
- break;
- }
- close;
- OnPCLoginEvent:
- if( #VIP_duration ){
- .@time = gettimetick(1);
- .@value = ( #VIP_duration - .@time );
- .@second = ( .@value % 60 );
- .@minute = ( .@value / 60 % 60 );
- .@hour = ( .@value / 3600 % 24 );
- .@day = ( .@value / 86400 );
- dispbottom "VIP TIME LEFT : "+.@day+" day "+.@hour+" hour "+.@minute+" minute "+.@second+" second";
- .@value = .@value % 2000000;
- deltimer .npc_name$+"::OnVIPTimeUp";
- addtimer ( .@value * 1000 ),.npc_name$+"::OnVIPTimeUp";
- atcommand "@adjgroup 1";
- }
- end;
- OnVIPTimeUp:
- deltimer .npc_name$+"::OnVIPTimeUp";
- mes "VIP Time's up. You're will be disconnected within 3 seconds. Please relog";
- #VIP_duration = 0;
- sleep2 3000;
- atcommand "@kick "+strcharinfo(0);
- end;
- OnInit:
- .gm_level = 80;
- .vip_groupid = 1;
- // 1month equal to 30 days
- .monthly_rate = 200;
- .npc_name$ = strnpcinfo(0);
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment