Jump to content
  • 0

newbie gift for 1 IP.


Question

2 answers to this question

Recommended Posts

  • 0
Posted (edited)
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
  • 0
Posted

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;
}

 

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