Jump to content
  • 0

Freebie NPC using Account SQL


Question

Posted

Hi,

Requesting a freebie NPC that will check its account ID and if account ID is on range example Account 1 to 50. It will automatically send freebie for 1 time only.

 

Regards!

1 answer to this question

Recommended Posts

  • 0
Posted

Untested example:

prontera,100,100,5	script	Freebie	123,{

if(accfreebie > 0){ goto L_Already; }
.id = getcharid(3);

if(.id < 2000051){
	getitem .reward, .qty;
	accfreebie = 1;
	mes "Here, have a reward!";
	close;
}

L_Already:
	mes "You have already been given this reward.";
	close;
	
OnInit:
	.reward = 501; // Red Potion
	.qty = 1;
	end;
}

Alter to suit your needs. You can find basic functions for scripting in the script_commands.txt file

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