Jump to content
  • 0
Sign in to follow this  
potpottin

Freebie npc with unique id

Question

3 answers to this question

Recommended Posts

  • 0

before I lock this topic, I'm curious to know what is unique id

 

also yeah, all freebies and attendance script etc uses *getitembound type IBT_CHARACTER to prevent transfer the item to other character

Share this post


Link to post
Share on other sites
  • 0
//===== rAthena Script =======================================
//= Freebies NPC with Gepard Function supported
//===== By: ==================================================
//= BeWan
//https://rathena.org/board/profile/62232-bewan/
//===== Current Version: =====================================
//= 1.0
//===== Description: =========================================
//= this freebies npc is supported gepard function " unique_id "
//= you can add multiple reward items
//============================================================

prontera,150,150,4	script	Freebies NPC	123,{

	.@unique_id$ = get_unique_id();

	if(getd("$ID_" + .@unique_id$) > 0 || #FreebiesReward > 0){
		mes "[Freebies NPC]";
		mes "You have already claimed your Freebies.";
		close;
	}
	
	mes "[Freebies NPC]";
	mes "Here's your Freebies. Have a nice day!";
	setd "$ID_" + .@unique_id$,1;
	#FreebiesReward = 1;
	$freebies_count -= 1;
	for (.@i = 0; .@i < getarraysize(.items); .@i += 2)
		getitem .items[.@i],.items[.@i+1];
	if ($freebies_count == 0)
		$reward_status = 1;
	end;
	
OnInit:
	setarray .items, 501,10,502,10;
	end;
}

 

I see this one on rathena, maybe he's referring to this one.

Share this post


Link to post
Share on other sites
  • 0

1.

.@unique_id$ = get_unique_id();

I thought gepard uses integer ??

 

2.

	if(getd("$ID_" + .@unique_id$) > 0 || #FreebiesReward > 0){
		mes "[Freebies NPC]";
		mes "You have already claimed your Freebies.";
		close;
	}
	mes "[Freebies NPC]";
	mes "Here's your Freebies. Have a nice day!";
	setd "$ID_" + .@unique_id$,1;
	#FreebiesReward = 1;

erm, I am holding my laughter right now, but isn't this only 1 player in the whole server can claim this reward ??

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

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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