Jump to content
  • 0

Help with VIP system NPC


ReSp

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   0
  • Joined:  10/23/15
  • Last Seen:  

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;
	}
}

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  308
  • Reputation:   24
  • Joined:  11/26/12
  • Last Seen:  

You can add this codes ^_^

set .@accountId,getarg(1);
.@group = 1;
query_sql("UPDATE `login` SET `group_id` = '"+.@group+"' WHERE `account_id` = "+.@accountId+";");

 

Edited by chatterboy
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  12/07/15
  • Last Seen:  

On 2/26/2017 at 4:05 AM, chatterboy said:

You can add this codes ^_^


set .@accountId,getarg(1);
.@group = 1;
query_sql("UPDATE `login` SET `group_id` = '"+.@group+"' WHERE `account_id` = "+.@accountId+";");

 

where to put this code sir?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  308
  • Reputation:   24
  • Joined:  11/26/12
  • Last Seen:  

on redeem VIP

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   4
  • Joined:  01/09/12
  • Last Seen:  

This script is really old.. i'm talking about 3 years old (original owner of the script), since i actually got it made and posted it here. i will pm you with a new VIP script which is a lot better with more features, including the group_id setting

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

On 26/04/2017 at 8:31 AM, DarkWhoteva said:

This script is really old.. i'm talking about 3 years old (original owner of the script), since i actually got it made and posted it here. i will pm you with a new VIP script which is a lot better with more features, including the group_id setting

show how to do it please.

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