Jump to content
  • 0

Question

Posted

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.

6 answers to this question

Recommended Posts

  • 0
Posted
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";
			.@second = vip_status(VIP_STATUS_REMAINING);
			addtimer (.@second * 1000), strnpcinfo(3)+"::OnExpire";
			dispbottom "VIP Expire in "+F_InsertComma(.@second)+" second(s)";
		}
		end;
		
	OnExpire:
		atcommand "@adjgroupid 0";
		end;
}

 

  • Upvote 1
  • 0
Posted
  On 9/13/2020 at 11:12 AM, Emistry said:

...

Expand  

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

  • 0
Posted
  On 9/14/2020 at 4:24 AM, 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

Expand  

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

 

  Reveal hidden contents

 

  • 0
Posted (edited)
  On 9/14/2020 at 4:24 AM, 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

Expand  

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";
			.@second = #TEMP_GROUP_V - gettimetick(2);
			addtimer (.@second * 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
  • 0
Posted
  On 9/14/2020 at 6:54 AM, Poring King said:

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

 

  Reveal hidden contents

 

Expand  

 

  On 9/14/2020 at 7:02 AM, 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";
			.@second = #TEMP_GROUP_V - gettimetick(2);
			addtimer (.@second * 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;
}

 

Expand  

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?

  • 0
Posted
  On 9/14/2020 at 8:12 AM, 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?

Expand  

it's already in Emistry's reply

put 

doevent "vip_group_main::OnSetVIP";

into the item script, whatever the item id is

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...