Jump to content
  • 0
Sign in to follow this  
IsabelaFernandez

item to change the group

Question

hello community,
I have this example line in my
item_db: 7551, Ticket02, Ticket VIP 14 days, 0.50,, 70 ,,,,, 0xFFFFFFFF, 63.2 ,,,,,, {vip_time (60 * 24 * 14); }, {}, {}
but I would like that instead of switching to VIP switching to a specific group, for example group level 7 for a certain time.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
7551,Ticket02,Ticket VIP 14 days,0.50,,70,,,,,0xFFFFFFFF,63.2,,,,,,{ doevent "vip_group_main::OnSetVIP"; },{},{}
-	script	vip_group_main	-1,{
	OnSetVIP:
		vip_time(60 * 24 * 14);
	OnPCLoginEvent:
		if (vip_status(VIP_STATUS_ACTIVE)) {
			atcommand "@adjgroupid 7";
			[email protected] = vip_status(VIP_STATUS_REMAINING);
			addtimer ([email protected] * 1000), strnpcinfo(3)+"::OnExpire";
			dispbottom "VIP Expire in "+F_InsertComma([email protected])+" second(s)";
		}
		end;
		
	OnExpire:
		atcommand "@adjgroupid 0";
		end;
}

 

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0
23 hours ago, Emistry said:

...

Hi, @Emistry
this script I did not understand well ... it is to activate the vip or another type of VIP? in reality I would like to have for example 2 types of VIPS, a simple and a super one for example. But as I don't know if it's possible, I asked for this script to change the group without being a VIP up one level. The default for VIP is group 6, so I wanted a script to temporarily switch to group 7 that I would create

 

hello community,
I would like a script for some item to activate and change the current group, for example group account is 0 when activating the item to change to group 7 for a certain time. 7 days for example and item ID 6140

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, IsabelaFernandez said:

hello community,
I would like a script for some item to activate and change the current group, for example group account is 0 when activating the item to change to group 7 for a certain time. 7 days for example and item ID 6140

I think this section is already answer by emistry also the idea

 

Spoiler

 

 

 

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, IsabelaFernandez said:

hello community,
I would like a script for some item to activate and change the current group, for example group account is 0 when activating the item to change to group 7 for a certain time. 7 days for example and item ID 6140

same as Emistry's script , just add timer instead of the vip status

-	script	vip_group_main	-1,{
	OnSetVIP:
		#TEMP_GROUP_V  = gettimetick(2) + (7 * 24 * 60 * 60);//time in seconds
	OnPCLoginEvent:
		if (#TEMP_GROUP_V > gettimetick(2)) {
			atcommand "@adjgroupid 7";
			[email protected] = #TEMP_GROUP_V - gettimetick(2);
			addtimer ([email protected] * 1000), strnpcinfo(3)+"::OnExpire";
			dispbottom "Temp Group Expire in "+gettimestr("%Y-%m/%d %H:%M:%S",21,#TEMP_GROUP_V);
		}
		end;
		
	OnExpire:
		atcommand "@adjgroupid 0";
		end;
}

 

Edited by sader1992
  • Love 1

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, Poring King said:

I think this section is already answer by emistry also the idea

 

  Reveal hidden contents

 

 

 

 

1 hour ago, sader1992 said:

same as Emistry's script , just add timer instead of the vip status

-	script	vip_group_main	-1,{
	OnSetVIP:
		#TEMP_GROUP_V  = gettimetick(2) + (7 * 24 * 60 * 60);//time in seconds
	OnPCLoginEvent:
		if (#TEMP_GROUP_V > gettimetick(2)) {
			atcommand "@adjgroupid 7";
			[email protected] = #TEMP_GROUP_V - gettimetick(2);
			addtimer ([email protected] * 1000), strnpcinfo(3)+"::OnExpire";
			dispbottom "Temp Group Expire in "+gettimestr("%Y-%m/%d %H:%M:%S",21,#TEMP_GROUP_V);
		}
		end;
		
	OnExpire:
		atcommand "@adjgroupid 0";
		end;
}

 

but how do i activate this with a specific item? I want to activate this change with item ID 6140 for example

how I can put this script on a specific item in item_db?

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, IsabelaFernandez said:

 

but how do i activate this with a specific item? I want to activate this change with item ID 6140 for example

how I can put this script on a specific item in item_db?

it's already in Emistry's reply

put 

doevent "vip_group_main::OnSetVIP";

into the item script, whatever the item id is

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...

Important Information

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