Jump to content
  • 0

VIP register NPC


noobzter003

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  109
  • Reputation:   5
  • Joined:  03/17/16
  • Last Seen:  

how to make this script, if you register VIP for 30 days you can receive limited edition headgear example (Poring Hat).

there's 3 choices u can purchase 7 days , 15 days & 30 days but i want only in 30days you can receive the limited editon of headgear.

sorry for my bad English i hope you guys understand. 

thanks in advance

prontera,146,174,5	script	VIP Central	4_F_KAFRA1,{
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 "Visit our website 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,4000,7000,10000;						// Price in #CASHPOINTS;
	.map$ = "sec_in02";												// VIP Room Map;
	setarray .cord,130,161;											// X and Y Coordinate;
	end;
}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

#CASHPOINTS -= .vip_cashpoint[.@i];
vip_time (.vip_day[.@i] * 1440);
// 30 days VIP
if (.@i == 2) {
	getitem 501, 1;
	getitem 501, 2;
	getitem 501, 3;
}
mes .npc$;
mes "Congratulations you just got "+.vip_day[.@i]+" days VIP.";
close;

change to this.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  109
  • Reputation:   5
  • Joined:  03/17/16
  • Last Seen:  

1 hour ago, Emistry said:

#CASHPOINTS -= .vip_cashpoint[.@i];
vip_time (.vip_day[.@i] * 1440);
// 30 days VIP
if (.@i == 2) {
	getitem 501, 1;
	getitem 501, 2;
	getitem 501, 3;
}
mes .npc$;
mes "Congratulations you just got "+.vip_day[.@i]+" days VIP.";
close;

change to this.

Thank you ! i will test now.

THANK YOU VERY MUCH!!!!!!!

hi sir @Emistry is there any way to put time limit you can stay in vip central? example 1hour you can stay in that map after 1hour you will be kicked back to prontera automatic

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...