Jump to content
  • 0
Sign in to follow this  
rainer89

VIP System NPC

Question

Help me please with NPC which can for zeny change group_id of player who use it.

It is for buying premium account.

I can find only such, but it is gives premium and not changes group_id:

-	script	VIPServiceLogin	-1,{
OnPCLoginEvent:
	if(#VIPSERVICE == 1 && VIP_Lasttime + $VIP_Cooldown > gettimetick(2) && VIP_Lasttime < gettimetick(2)) {
	dispbottom "Your VIP service is active!";
	sc_start SC_EXPBOOST,86400,50;
	sc_start SC_ITEMBOOST,86400,200;
	end;
	}
}


prontera,108,112,4	script	VIP Service	54,{

	// Configs
	//
	//
	set .itemID, 7539; // Set this number to the VIP ticket
	//
	set $VIP_Cooldown,86400;
	//
	//
	// 2592000 is the amount of milliseconds in 30 days.
	// So the VIP ticket will last exactly 30 days.
	//
	// When a player logs in on any char on the account, they will get an item / exp drop rate buff.
	// The buff lasts 24 hours, but it is given every single time they login, so it will never run out until the 30 days are up.
	//
	// After giving in a VIP ticket, the player can talk to the NPC to see how much longer they have till the 30 days are over.
	//
	//
	
		if(#VIPSERVICE == 1 && VIP_Lasttime + $VIP_Cooldown > gettimetick(2) && VIP_Lasttime < gettimetick(2)) {
		set .@last,VIP_Lasttime + $VIP_Cooldown - gettimetick(2);
		set .@days,.@last / 60 / 60 / 24;
		set .@hours,.@last / 60 / 60 % 60;
		set .@minutes,.@last / 60 % 60;
		set .@seconds,.@last % 60;
		mes "You have: ";
		mes ""+.@days+" days "+.@hours+" hours "+.@minutes+" minutes "+.@seconds+" seconds";
		mes "in your VIP service remaining.";
		close;
		}
	mes "Hello!";
	mes "Would you like to redeem your VIP Service ticket?";
	switch(select("Yes!:No.")) {
	case 1:
		if (countitem(.itemID) > 0) {
		delitem .itemID,1;
		set #VIPSERVICE,1;
		mes "Congrats, you now have VIP service!";
		mes "You must relog for it to take effect.";
		set VIP_Lasttime,gettimetick(2);
		close;
		}
		else {
		mes "You do not have a VIP ticket!";
		mes "Come back when you get one.";
		close;
		}
	case 2:
		mes "Very well, I shall be here if you change your mind.";
		close;
	}
}

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

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

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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