Jump to content
  • 0

Freebie NPC using Account SQL


Foob

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.02
  • Content Count:  267
  • Reputation:   40
  • Joined:  01/19/17
  • Last Seen:  

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!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3128
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

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

Link to comment
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.

×
×
  • Create New...