Jump to content
  • 0

item to change the group


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

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

 

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

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";
			.@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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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";
			.@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;
}

 

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?

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

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

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