Jump to content
  • 0

H> Modify VIP Central


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

hello i would like to ask how to modify this VIP Central script i want to change the cash point into an item requirements  or rental item 

 

Quote

prontera,155,180,4    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

1 answer to this question

Recommended Posts

  • 0

  • Group:  Donators
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   2
  • Joined:  10/31/12
  • Last Seen:  

prontera,150,173,4	script	VIP Central	E_PORING,{

	mes .npc_name$;
	if(vip_status(1)){
		mes "^008affYour VIP access will expire on " + callfunc("Time2Str",vip_status(2)) + ".^000000";
	}
	mes "Welcome "+strcharinfo(0)+",";
	mes "How can i help you?";
	next;
	switch(select("Warp Central VIP:"+(vip_status(1)?"Extend VIP Status":":VIP 1:VIP 2:VIP 3"))){
		case 1:
			mes .npc_name$;
			if(!vip_status(1)){
				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_name$;
			mes "You want to extend your vip status";
			break;
		case 3:
			mes .npc_name$;
			mes "You selected VIP 1 (7 Days)";
			explode(.item_info$,.item_ids$[0],":");
			mes "The Item requirements is : "+getitemname(atoi(.item_info$[0]))+" - ("+atoi(.item_info$[1])+")";
			next;
			switch(select("Purchase:Cancel")){
				case 1:
					mes .npc_name$;
					if(countitem(atoi(.item_info$[0])) < atoi(.item_info$[1])){
						mes "You do not have enough items to buy this Subscription";
						close;
						end;
					}

					delitem atoi(.item_info$[0]),atoi(.item_info$[1]);
					vip_time(.vip_day[0] * 1440);
					mes "Congrats you are now a vip";
					close;
					end;
				default:
					close;
					end;
			}
			break;
		case 4:
			mes .npc_name$;
			mes "You selected VIP 2 (14 Days)";
			explode(.item_info$,.item_ids$[1],":");
			mes "The Item requirements is : "+getitemname(atoi(.item_info$[0]))+" - ("+atoi(.item_info$[1])+")";
			next;
			switch(select("Purchase:Cancel")){
				case 1:
					mes .npc_name$;
					if(countitem(atoi(.item_info$[0])) < atoi(.item_info$[1])){
						mes "You do not have enough items to buy this Subscription";
						close;
						end;
					}

					delitem atoi(.item_info$[0]),atoi(.item_info$[1]);
					vip_time(.vip_day[1] * 1440);
					mes "Congrats you are now a vip";
					close;
					end;
				default:
					close;
					end;
			}
			break;
		case 5:
			mes .npc_name$;
			mes "You selected VIP 3 (30 Days)";
			explode(.item_info$,.item_ids$[2],":");
			mes "The Item requirements is : "+getitemname(atoi(.item_info$[0]))+" - ("+atoi(.item_info$[1])+")";
			next;
			switch(select("Purchase:Cancel")){
				case 1:
					mes .npc_name$;
					if(countitem(atoi(.item_info$[0])) < atoi(.item_info$[1])){
						mes "You do not have enough items to buy this Subscription";
						close;
						end;
					}

					delitem atoi(.item_info$[0]),atoi(.item_info$[1]);
					vip_time(.vip_day[2] * 1440);
					mes "Congrats you are now a vip";
					close;
					end;
				default:
					close;
					end;
			}
			break;
	}
	close;

OnInit:
	setarray .item_ids$[0],"501:2","502:3","503:3";
	set .npc_name$,"[^FF7F00 VIP Central ^000000]";
	set .map$,"sec_in02";
	setarray .cord,130,161;
	setarray .vip_day,7,14,30;
	if(!.waitingroom){
		waitingroom "VIP Central",0;
		.waitingroom = 1;
	}
	end;
}

Try this ? 

Edited by masterband01
Change != to < (less than)
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...