Jump to content
  • 0

Npc for newbie? (Freebies)


Question

Recommended Posts

Posted

Please take note that IP address can be easily changed.

Anyway, this is the script:

 


amatsu,116,146,3 script Seyra 90,{

set .@n$, "[Seyra]";
setarray .@rwd[0],2115,1,2357,1,2421,1,2524,1; // Rewards: <item id>,<item amount>

query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$);

if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0)
{
mes .@n$;
mes "I'm sorry, the rewards are exclusively for new players.";
close;
}

mes .@n$;
mes "Welcome! Here are some free gifts"; 
mes "for newcomers:";

for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
mes .@rwd[.@i+1] + " x " + getitemname(.@rwd[.@i]);

close2;
set #NewbieGift, 1;
setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;

for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
getitem .@rwd[.@i], .@rwd[.@i+1];

end;

OnInit:

waitingroom "Newbie Gift!",0;
end;

}

soo, if IP can easily changed is there any other way to prevent that? by using this script? please 

Posted (edited)

Hello, how about freebies with choices??

prontera,142,170,5	script	Freebies	936,{
	mes "[Hello]";
	mes "[I can give you a free gift based on your future job.]";
	mes "[Please choose the correct item for the future job]";

	if(!#Freebie) {
		mes "Select one:";
		next;
		switch(select("Swordsman:Magician - Ninja:Archer - Gunslinger:Acolyte:Merchant - Taekwon :Thief")) {
			case 1:
				getitem 12537,1;
				getitem 7256,1500;
				getitem 7726,1500;     //Item for Swordsman      
				break;

			case 2:
				getitem 12537,1;
				getitem 7256,1500;
				getitem 7726,1500;        //Item for Magician - Ninja
				break;

			case 3:
				getitem 12537,1;
				getitem 7256,1500;
				getitem 7726,1500;        //Item for Archer - Gunslinger
				break;
				
			case 4:
				getitem 12537,1;
				getitem 7256,1500;
				getitem 7726,1500;        //Item for Acolyte
				break;
			
			case 5:
				getitem 12537,1;
				getitem 7256,1500;
				getitem 7726,1500;        //Item for Merchant - Taekwon 
				break;
			
			case 6:
				getitem 12537,1;
				getitem 7256,1500;
				getitem 7726,1500;        //Item for Thief
				break;
				
			}
			set #Freebie, 1;
			close;
	}
	OnInit:
        delwaitingroom;
	waitingroom "Get your freebies here ! ",0;
	end;
}

Just edit the Items.

Edited by Ronald

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