Jump to content
  • 0
AinsLord

Is it possible for this VIP NPC script to have custom rent item based on duration of VIP bought

Question

anyone can edit or help me add like

if they bought 7days VIP it will include an custom rented item also the same days VIP bought

like 7days/14/30 depending on the VIP duration bought

here is the script

PS: Script not mine credit to the owner of the script

prontera,147,163,5	script	VIP Manager	4_M_PRESIDENT,{
OnTalk:
	mes .npc$;
	mes (gettime(3)>= 6&&gettime(3)<= 12?"Good Morning":(gettime(3)>=13&&gettime(3)<=18?"Good Afternoon":"Good Evening"))+", ^008aff"+strcharinfo(0)+"^000000 !";
	mes "Welcome to VIP Central.";
	if (vip_status(1)) {
		mes "^008affYour VIP access will expire on " + callfunc("Time2Str",vip_status(2)) + ".^000000";
		mes " ";		
	}
	mes "How can I help?";
	next;
	switch (select(.bcor$+"I want to go to Central VIP.",""+((vip_status(1))?""+.bcor$+"I want to extend my time ^008affVIP^000000.":""+.bcor$+"I wish to become a ^008affVIP^000000 player."),""+.rcor$+"I do not want anything.")){
		case 1:
			if (!vip_status(1) ) {
				mes .npc$;
				mes "Excuse me! Access to VIP Central is only allowed to ^008affVIP^000000 players.";
				mes "-----------------------------------";
				mes "Ask Admin Team and learn how to become a ^008affVIP^000000 player.";
				mes "-----------------------------------";
				close;
			}
			warp .map$,.cord[0],.cord[1];
			end;
		case 2:
			mes .npc$;
			mes "How many days of access ^008affVIP^000000 do you want to acquire?";
			next;
			.@i = select(
				.bcor$+""+.vip_day[0] + " Days."
				,.bcor$+""+.vip_day[1] + " Days."
				,.bcor$+""+.vip_day[2] + " Days."
				) - 1;
				
			mes .npc$;
			mes "You chose the plan of:";
			mes "^4527A0VIP:^000000 "+.vip_day[.@i]+" VIP days.";
			mes "^4527A0Price:^000000 "+F_InsertComma(.vip_cashpoint[.@i])+" #CASHPOINTS.";
			sleep2 1000;
			mes " ";
			mes " ";
			mes "What do you want to do?";
			next;
			switch(select(.bcor$+"Purchase:"+.rcor$+"Cancel")){
				case 1:
					if ( #CASHPOINTS < .vip_cashpoint[.@i] ) {
					mes .npc$;
					mes "You do not have the quantity of ^008aff"+F_InsertComma(.vip_cashpoint[.@i])+" #CASHPOINTS^000000.";
					close;
				}
				else {
					#CASHPOINTS -= .vip_cashpoint[.@i];
					vip_time (.vip_day[.@i] * 1440);
					mes .npc$;
					mes "Congratulations you just got "+.vip_day[.@i]+" days VIP.";
					close;
				}
				end;
				case 2:
					mes .npc$;
					mes "All right, come back whenever you want.";
					close;
			}

		case 3:
			close;
	}

OnInit:
	.npc$ = "^FF7F00[ VIP Central ]^000000";						// Name of NPC;
	.bcor$ = "^008aff[»]^000000 ";									// Option Button Symbol;
	.rcor$ = "^ff0000[»]^000000 ";									// Cancel button symbol;
	setarray .vip_day,7,14,30;										// Number of days that can be purchased;
	setarray .vip_cashpoint,5000,7000,10000;						// Price in #CASHPOINTS;
	.map$ = "sec_in02";												// VIP Room Map;
	setarray .cord,130,161;											// X and Y Coordinate;
	end;
}

Thanks in advance i would really appreciate it 🙂❤️

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
prontera,147,163,5	script	VIP Manager	4_M_PRESIDENT,{
OnTalk:
	mes .npc$;
	mes (gettime(3)>= 6&&gettime(3)<= 12?"Good Morning":(gettime(3)>=13&&gettime(3)<=18?"Good Afternoon":"Good Evening"))+", ^008aff"+strcharinfo(0)+"^000000 !";
	mes "Welcome to VIP Central.";
	if (vip_status(1)) {
		mes "^008affYour VIP access will expire on " + callfunc("Time2Str",vip_status(2)) + ".^000000";
		mes " ";		
	}
	mes "How can I help?";
	next;
	switch (select(.bcor$+"I want to go to Central VIP.",""+((vip_status(1))?""+.bcor$+"I want to extend my time ^008affVIP^000000.":""+.bcor$+"I wish to become a ^008affVIP^000000 player."),""+.rcor$+"I do not want anything.")){
		case 1:
			if (!vip_status(1) ) {
				mes .npc$;
				mes "Excuse me! Access to VIP Central is only allowed to ^008affVIP^000000 players.";
				mes "-----------------------------------";
				mes "Ask Admin Team and learn how to become a ^008affVIP^000000 player.";
				mes "-----------------------------------";
				close;
			}
			warp .map$,.cord[0],.cord[1];
			end;
		case 2:
			mes .npc$;
			mes "How many days of access ^008affVIP^000000 do you want to acquire?";
			next;
			[email protected] = select(
				.bcor$+""+.vip_day[0] + " Days."
				,.bcor$+""+.vip_day[1] + " Days."
				,.bcor$+""+.vip_day[2] + " Days."
				) - 1;
				
			mes .npc$;
			mes "You chose the plan of:";
			mes "^4527A0VIP:^000000 "+.vip_day[[email protected]]+" VIP days.";
			mes "^4527A0Price:^000000 "+F_InsertComma(.vip_cashpoint[[email protected]])+" #CASHPOINTS.";
			sleep2 1000;
			mes " ";
			mes " ";
			mes "What do you want to do?";
			next;
			switch(select(.bcor$+"Purchase:"+.rcor$+"Cancel")){
				case 1:
					if ( #CASHPOINTS < .vip_cashpoint[[email protected]] ) {
					mes .npc$;
					mes "You do not have the quantity of ^008aff"+F_InsertComma(.vip_cashpoint[[email protected]])+" #CASHPOINTS^000000.";
					close;
				}
				else {
					#CASHPOINTS -= .vip_cashpoint[[email protected]];
					vip_time (.vip_day[[email protected]] * 1440);
					mes .npc$;
					mes "Congratulations you just got "+.vip_day[[email protected]]+" days VIP.";
					rentitem 5001, .vip_day[[email protected]] * 86400;
					close;
				}
				end;
				case 2:
					mes .npc$;
					mes "All right, come back whenever you want.";
					close;
			}

		case 3:
			close;
	}

OnInit:
	.npc$ = "^FF7F00[ VIP Central ]^000000";						// Name of NPC;
	.bcor$ = "^008aff[»]^000000 ";									// Option Button Symbol;
	.rcor$ = "^ff0000[»]^000000 ";									// Cancel button symbol;
	setarray .vip_day,7,14,30;										// Number of days that can be purchased;
	setarray .vip_cashpoint,5000,7000,10000;						// Price in #CASHPOINTS;
	.map$ = "sec_in02";												// VIP Room Map;
	setarray .cord,130,161;											// X and Y Coordinate;
	end;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0
2 hours ago, Patskie said:
prontera,147,163,5	script	VIP Manager	4_M_PRESIDENT,{
OnTalk:
	mes .npc$;
	mes (gettime(3)>= 6&&gettime(3)<= 12?"Good Morning":(gettime(3)>=13&&gettime(3)<=18?"Good Afternoon":"Good Evening"))+", ^008aff"+strcharinfo(0)+"^000000 !";
	mes "Welcome to VIP Central.";
	if (vip_status(1)) {
		mes "^008affYour VIP access will expire on " + callfunc("Time2Str",vip_status(2)) + ".^000000";
		mes " ";		
	}
	mes "How can I help?";
	next;
	switch (select(.bcor$+"I want to go to Central VIP.",""+((vip_status(1))?""+.bcor$+"I want to extend my time ^008affVIP^000000.":""+.bcor$+"I wish to become a ^008affVIP^000000 player."),""+.rcor$+"I do not want anything.")){
		case 1:
			if (!vip_status(1) ) {
				mes .npc$;
				mes "Excuse me! Access to VIP Central is only allowed to ^008affVIP^000000 players.";
				mes "-----------------------------------";
				mes "Ask Admin Team and learn how to become a ^008affVIP^000000 player.";
				mes "-----------------------------------";
				close;
			}
			warp .map$,.cord[0],.cord[1];
			end;
		case 2:
			mes .npc$;
			mes "How many days of access ^008affVIP^000000 do you want to acquire?";
			next;
			[email protected] = select(
				.bcor$+""+.vip_day[0] + " Days."
				,.bcor$+""+.vip_day[1] + " Days."
				,.bcor$+""+.vip_day[2] + " Days."
				) - 1;
				
			mes .npc$;
			mes "You chose the plan of:";
			mes "^4527A0VIP:^000000 "+.vip_day[[email protected]]+" VIP days.";
			mes "^4527A0Price:^000000 "+F_InsertComma(.vip_cashpoint[[email protected]])+" #CASHPOINTS.";
			sleep2 1000;
			mes " ";
			mes " ";
			mes "What do you want to do?";
			next;
			switch(select(.bcor$+"Purchase:"+.rcor$+"Cancel")){
				case 1:
					if ( #CASHPOINTS < .vip_cashpoint[[email protected]] ) {
					mes .npc$;
					mes "You do not have the quantity of ^008aff"+F_InsertComma(.vip_cashpoint[[email protected]])+" #CASHPOINTS^000000.";
					close;
				}
				else {
					#CASHPOINTS -= .vip_cashpoint[[email protected]];
					vip_time (.vip_day[[email protected]] * 1440);
					mes .npc$;
					mes "Congratulations you just got "+.vip_day[[email protected]]+" days VIP.";
					rentitem 5001, .vip_day[[email protected]] * 86400;
					close;
				}
				end;
				case 2:
					mes .npc$;
					mes "All right, come back whenever you want.";
					close;
			}

		case 3:
			close;
	}

OnInit:
	.npc$ = "^FF7F00[ VIP Central ]^000000";						// Name of NPC;
	.bcor$ = "^008aff[»]^000000 ";									// Option Button Symbol;
	.rcor$ = "^ff0000[»]^000000 ";									// Cancel button symbol;
	setarray .vip_day,7,14,30;										// Number of days that can be purchased;
	setarray .vip_cashpoint,5000,7000,10000;						// Price in #CASHPOINTS;
	.map$ = "sec_in02";												// VIP Room Map;
	setarray .cord,130,161;											// X and Y Coordinate;
	end;
}

 

thanks sir @Patskie really appreciate it 🙂

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.