Jump to content
  • 0

Question

//new_1-4,145,179,4	script	Freebies Reward	691,{
	[email protected]_id$ = get_unique_id();

	if(getd("$ID_" + [email protected]_id$) > 0 || #N > 0){
		mes "[ Reward NPC ]";
		mes "You have already claimed your reward.";
		close;
	}
	mes "[ Reward NPC ]";
	mes "Here's your reward. Have a nice day!";
	setd "$ID_" + [email protected]_id$,1;
	#N = 1;
	$reward_count -= 1;
	for([email protected] = 0; [email protected] < getarraysize(.rewards); [email protected] += 2)
		getitem .rewards[[email protected]],.rewards[[email protected]+1];
	if($reward_count == 0)
		$reward_status = 1;
	end;
	
OnInit:
	setarray .rewards,50000,1,12535,20,12534,20,13550,20,3100,100,13758,1;
	while (1) {
	showscript "Freebies Rental NPC!";
	sleep 1000;
	}
	end;
}

is there a way to reset unique ID's? because old players can't get freebies.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
//new_1-4,145,179,4	script	Freebies Reward	691,{
	[email protected]_unique_id$ = get_unique_id();

	if(getd("$ID_" + [email protected]_unique_id$) > 0 || #N > 0){
		mes "[ Reward NPC ]";
		mes "You have already claimed your reward.";
		close;
	}
	mes "[ Reward NPC ]";
	mes "Here's your reward. Have a nice day!";
	setd "$ID_" + [email protected]_unique_id$,1;
	#N = 1;
	$reward_count -= 1;
	for([email protected] = 0; [email protected] < getarraysize(.rewards); [email protected] += 2)
		getitem .rewards[[email protected]],.rewards[[email protected]+1];
	if($reward_count == 0)
		$reward_status = 1;
	end;
	
OnInit:
	setarray .rewards,50000,1,12535,20,12534,20,13550,20,3100,100,13758,1;
	while (1) {
	showscript "Freebies Rental NPC!";
	sleep 1000;
	}
	end;
}

I think changing the unique_id variable can solve your problem, try it.

Edited by cook1e
Link to comment
Share on other sites

  • 0

aight thanks i'll try it out

 

On 6/25/2021 at 11:15 AM, cook1e said:
//new_1-4,145,179,4	script	Freebies Reward	691,{
	[email protected]_unique_id$ = get_unique_id();

	if(getd("$ID_" + [email protected]_unique_id$) > 0 || #N > 0){
		mes "[ Reward NPC ]";
		mes "You have already claimed your reward.";
		close;
	}
	mes "[ Reward NPC ]";
	mes "Here's your reward. Have a nice day!";
	setd "$ID_" + [email protected]_unique_id$,1;
	#N = 1;
	$reward_count -= 1;
	for([email protected] = 0; [email protected] < getarraysize(.rewards); [email protected] += 2)
		getitem .rewards[[email protected]],.rewards[[email protected]+1];
	if($reward_count == 0)
		$reward_status = 1;
	end;
	
OnInit:
	setarray .rewards,50000,1,12535,20,12534,20,13550,20,3100,100,13758,1;
	while (1) {
	showscript "Freebies Rental NPC!";
	sleep 1000;
	}
	end;
}

I think changing the unique_id variable can solve your problem, try it.

@cook1e how to change the variable of unique ID? @shatowolf its still the same i cant reclaim them

Link to comment
Share on other sites

  • 0

.unique_id$ = get_unique_id();

to

[email protected]_unique_id$ = get_unique_id();

 

On 6/24/2021 at 11:15 PM, cook1e said:
//new_1-4,145,179,4	script	Freebies Reward	691,{
	[email protected]_unique_id$ = get_unique_id();

	if(getd("$ID_" + [email protected]_unique_id$) > 0 || #N > 0){
		mes "[ Reward NPC ]";
		mes "You have already claimed your reward.";
		close;
	}
	mes "[ Reward NPC ]";
	mes "Here's your reward. Have a nice day!";
	setd "$ID_" + [email protected]_unique_id$,1;
	#N = 1;
	$reward_count -= 1;
	for([email protected] = 0; [email protected] < getarraysize(.rewards); [email protected] += 2)
		getitem .rewards[[email protected]],.rewards[[email protected]+1];
	if($reward_count == 0)
		$reward_status = 1;
	end;
	
OnInit:
	setarray .rewards,50000,1,12535,20,12534,20,13550,20,3100,100,13758,1;
	while (1) {
	showscript "Freebies Rental NPC!";
	sleep 1000;
	}
	end;
}

I think changing the unique_id variable can solve your problem, try it.

 

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

Important Information

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