Jump to content
  • 0

npc give gift everyday


Question

Posted (edited)

npc give gift everyday

I i need a Script NCP to Give gift to player each 30 minutes (5 times/day)

Player online 30'. goto ncp, and get a gifi.

Edited by choidk

1 answer to this question

Recommended Posts

Posted (edited)

prontera,150,150,5	script	ijko	666,{
//- Delay (seconds)
.@DL = 1800:
//- ID item(s)
setarray .@It[0], 601;
//- How much each
setarray .@Cn[0], 1;

if( getarraysize( .@It ) != getarraysize( .@Cn ) ) {
	mes "An error has occured.";
	close; }

// dispbottom #Giftchoidk_$;
mes "Gift";
mes "Blablabla.... blablabla. Blo !";
next;

explode(.@UI_$, #Giftchoidk_$, "|");
if( gettime(8) != atoi(.@UI_$[0]) ) {
	.@UI_$[0] = gettime(8);
	.@UI_$[2] = 1;
} else {
	if( atoi(.@UI_$[2]) > 4 ) {
		mes "Gift";
		mes "Enough for today.";
		close; }
	if( ( .@T = atoi(.@UI_$[1]) - gettimetick(2) ) > 0  ) {
		mes "Gift";
		mes "Not yet. You must wait "+ (.@T/60) +" minute(s).";
		close; }
	.@UI_$[2] = atoi(.@UI_$[2]) + 1;
}
.@UI_$[1] = gettimetick(2) + .@DL;
set #Giftchoidk_$, implode(.@UI_$,"|");

mes "For you " +(Sex ? "sexy boy":"babe")+ ".";

for( .@i = 0; .@i < getarraysize( .@It ); .@i++ )
	getitem .@It[.@i], .@Cn[.@i];
close;

}

5 Gifts for 1 account, every 30 minutes everyday. Players must click on the npc.

Edit: optimized.

Edited by Capuche
  • Upvote 1

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