• 0
Sign in to follow this  
GeorgeBrian

Free Potions Once a Day

Question

Hi, can anybody make it receivable once a day per user account (not per character)?

And also if he already has more than 250 in his inventory, the NPC will refuse the giveaway.

izlude,144,121,3    script    JohnDoe NPC::JohnDoe    1_M_MERCHANT,{
    mes "[JohnDoe]";
    mes "Do you need some Novice Potions?";
    menu "Yes, please.",receive,"I don't need them for now, thank you.",refuse;
    close;

receive:
    mes "Here, take these.";
    getitem 569,250;
    next;
    mes "Good luck!.";
    close;
    end;

refuse:
    mes "Okay, good luck!";
    close;
}

 

Thanks a bunch!

PS: Sorry for  keep asking noob/stupid stuff.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

create a variable called #VARIABLE
eg:
 

#accbound

 

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
37 minutes ago, HD Scripts said:

create a variable called #VARIABLE
eg:
 

#accbound

 

Hi, thank you for answering.

Yes, but I don't know where and how to put it correctly.

If you don't mind, can you edit my script above and make it complete with those variables?

Thanks a lot.

Share this post


Link to post
Share on other sites
  • 0
izlude,144,121,3	script	JohnDoe NPC::JohnDoe	1_M_MERCHANT,{
	mes "[JohnDoe]";
	mes "Do you need some Novice Potions?";
	switch(select("Yes, please.:I don't need them for now, thank you.")){
		clear;
		case 1:
			.@TIME$ = "" + gettime(DT_YYYYMMDD);
			if(#JOHNDOE_DAILY$ == .@TIME$){
				mes "you already got the Novice Potions for today";
				mes "try again in the next day";
				end;
			}
			mes "Here, take these.";
			getitem 569,250;
			#JOHNDOE_DAILY$ = [email protected]$;
			mes "Good luck!.";
			end;
		case 2:
			mes "Okay, good luck!";
			end;
	}
}

 

Edited by sader1992
miss <tabs>
  • Upvote 1
  • Love 1

Share this post


Link to post
Share on other sites
  • 0

Thanks a lot, sire!

By the way, how to make it account bound?

(Each account can only receive the potions once a day).

 

Share this post


Link to post
Share on other sites
  • 0
---------------------------------------

*getitembound <item id>,<amount>,<bound type>{,<account ID>};
*getitembound "<item name>",<amount>,<bound type>{,<account ID>};

This command behaves identically to 'getitem', but the items created will be
bound to the target character as specified by the bound type. All items created
in this manner cannot be dropped, sold, vended, auctioned, or mailed, and in
some cases cannot be traded or stored.

Valid bound types are:
 Bound_Account : Account Bound item
 Bound_Guild   : Guild Bound item
 Bound_Party   : Party Bound item
 Bound_Char    : Character Bound item

---------------------------------------

 

  • MVP 1

Share this post


Link to post
Share on other sites
  • 0

I will try to implement it.

Thank you so much for the assist, sire. You've helped me a lot!

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

Loading...
Sign in to follow this