Jump to content
  • 0
Sign in to follow this  
MikZ

WOE supply on Registered Guild Only

Question

Good day!

May I request additional script here please.
Wanted to have Admin to register the GUILD first to get the reward not open to all Guild and will only provide the Supply every WOE TIME only.

prontera,155,180,5	script	Daily Supply	4_M_UNCLEKNIGHT,{

	setarray .@item_id, 671,1,672,2;	// <Item_ID>,<Item_Amount>,{...};
	.@n$ = "["+strnpcinfo(0)+"]";
	.@GID = getcharid(2);
	.@GM = (getguildmaster(.@GID) == strcharinfo(0))?1:0;
	mes .@n$;
	mes "Welcome!";
	mes (.@GM)?"Have you claimed your supplies today?":"You have no business with me.";
	next;
	if (select(((.@GM)?"Claim Supplies":"")+":Leave") == 2) close;
	query_sql("SELECT COUNT(*) FROM `guild_member` WHERE `guild_id`="+.@GID, .@count);
	if (.@count < 10) {
		mes .@n$;
		mes "You have not enough guild members to claim the supplies.";
		close;
	}
	.@d$ = gettimestr("%Y%m%d",9);
	.@p = .@GID / 128;
	.@g = .@GID % 128;	
	if (getd("$GS_"+.@p+"$["+.@g+"]") != .@d$) {
		mes .@n$;
		mes "Here you go!";
		close2;
		setd "$GS_"+.@p+"$["+.@g+"]", .@d$;
		for (.@i = 0; .@i < getarraysize(.@item_id); .@i += 2)
			getitem .@item_id[.@i],.@item_id[.@i+1];
		end;
	}
	mes .@n$;
	mes "You have taken your supplies today.";
	close;
}


 

Edited by MikZ

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.