Jump to content
  • 0

newbie gift for 1 IP.


SilverSRO

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  06/03/17
  • Last Seen:  

Hello 

I wanted to know if it was possible a script that would give the newbie gift
but this to only 1 IP.

I searched for it but could not find enough answer.

Thank you.

  

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

prontera,255,55,5	script	Freebies NPC	655,{
	query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$);
	mes "[Freebies NPC]";
	mes "Welcome to Server Name!!";
	next;
	if ( getd("$" + .@lip$ + "_NA") > 0 || #NewbieGift > 0)
	{
	mes "[Freebies NPC]";
	mes "Your IP have already recieved a freebies.";
	close;
	}
		mes "Here are your freebies!:";
		getitem 501,1000; //item id and amount
		getitem 502,1000;
		set #NewbieGift, 1;
		setd "$" + .@lip$ + "_NA", getd("$" + .@lip$ + "_NA") + 1;
		end;
		}

 

Edited by crazyarashi
Added end;
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  06/03/17
  • Last Seen:  

Thank you @crazyarashi

 

Please you can check this code if its OK or not?

prontera,255,55,5	script	Freebies NPC	655,{
	query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$);
	
	mes "^FF3355[Freebies NPC]^000000";
	mes "Welcome to Server Name!!";
	mes "......";
	next;
	.@weight = 100 * Weight / MaxWeight;
    if (50 <= .@weight)
	{
	 mes "^FF3355[Freebies NPC]^000000";
     mes "^FF3355You are currently overweight.^000000";
	 mes "Current weight:"+.@weight;
	 mes "Please store some of your items in your storage.";
     close;
    }
	if ( getd("$" + .@lip$ + "_NA") > 0 || #NewbieGift > 0)
	{
	mes "^FF3355[Freebies NPC]^000000";
	mes "Your IP have already recieved a freebies.";
	close;
	}

			mes "^FF3355[Freebies NPC]^000000";
			mes "^FF3355 ========== [warning]!! ========== ^000000";
			mes "When you get the gift in this character, you will never be able to get it in any other account or character!";
			mes "^FF3355 ========== [warning]!! ========== ^000000";
			next;
			mes "^FF3355[Freebies NPC]^000000";
			mes "Here are your freebies!: ";
			rentitem 501,604800;
			rentitem 501,604800;
			rentitem 501,604800;
			
			getitem 501,100;
			getitem 501,100;
			getitem 501,100;
			getitem 501,100;

			set #NewbieGift, 1;
			setd "$" + .@lip$ + "_NA", getd("$" + .@lip$ + "_NA") + 1;
			end;
			close;	
OnInit:
	delwaitingroom;
	waitingroom "Freebies NPC",0;
	end;
}

 

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