Jump to content
  • 0

[NPC Costume Giver]-[0/20] Max Free Costume


Question

Posted

Hello Good Day! Is there anyone with this kind of script? For example.

Today is my fresh opening server then..

1.) A NPC will give free costume to the first twenty(20) players. (IP-Based/HID Based/Etc.) //I don't know which is much better.

2.) Then after the first twenty players [20/20] claimed the costumes,

3. The NPC will automatically be disabled, hide, or tell that all costumes are claimed.

Thank you guys!

1 answer to this question

Recommended Posts

  • 0
Posted

try this

prontera,0,0,0	script	tttest	444,{
	if(getarraysize($FIRSTREWARDNPC_IPs$) < 20){
		if(inarray($FIRSTREWARDNPC_IPs$,getcharip()) !=-1 && !#FIRSTREWARDNPC){
			$FIRSTREWARDNPC_IPs$[getarraysize($FIRSTREWARDNPC_IPs$)] = getcharip();
			#FIRSTREWARDNPC = true;
			getitem 502,1;
			mes "you got a reward!";
			close2;
			callsub OnInit;
			end;
		}else{
			mes "you already got the reward";
			close;
		}
	}
end;
OnInit:
	if(getarraysize($FIRSTREWARDNPC_IPs$) => 20){
		hideonnpc strnpcinfo(3);
	}
end;
}

 

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