Jump to content

Question

Posted
//new_1-4,145,179,4	script	Freebies Reward	691,{
	.@unique_id$ = get_unique_id();

	if(getd("$ID_" + .@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_" + .@unique_id$,1;
	#N = 1;
	$reward_count -= 1;
	for(.@i = 0; .@i < getarraysize(.rewards); .@i += 2)
		getitem .rewards[.@i],.rewards[.@i+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.

4 answers to this question

Recommended Posts

  • 0
Posted (edited)
//new_1-4,145,179,4	script	Freebies Reward	691,{
	.@freebies_unique_id$ = get_unique_id();

	if(getd("$ID_" + .@freebies_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_" + .@freebies_unique_id$,1;
	#N = 1;
	$reward_count -= 1;
	for(.@i = 0; .@i < getarraysize(.rewards); .@i += 2)
		getitem .rewards[.@i],.rewards[.@i+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
  • 0
Posted

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,{
	.@freebies_unique_id$ = get_unique_id();

	if(getd("$ID_" + .@freebies_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_" + .@freebies_unique_id$,1;
	#N = 1;
	$reward_count -= 1;
	for(.@i = 0; .@i < getarraysize(.rewards); .@i += 2)
		getitem .rewards[.@i],.rewards[.@i+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

  • 0
Posted

.unique_id$ = get_unique_id();

to

.@freebies_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,{
	.@freebies_unique_id$ = get_unique_id();

	if(getd("$ID_" + .@freebies_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_" + .@freebies_unique_id$,1;
	#N = 1;
	$reward_count -= 1;
	for(.@i = 0; .@i < getarraysize(.rewards); .@i += 2)
		getitem .rewards[.@i],.rewards[.@i+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.

 

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