Modified IP Freebies

MikZ

New member
Messages
461
Points
0
Hello!
Can someone help me to modify this script?

I want to change it to "getitem2" so that i can give them +7 items

 

Code:
poring_w02,92,197,3	script	Nadine#1	650,{set .@n$, "[Nadine]";setarray .@rwd[0],25500,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.";mes "If your Playing in a Cafe Please do post your IGN in Shop Players section with your Group.";mes "Thank you!";close;}mes .@n$;	mes "Nice to meet you "+ strcharinfo (0) +", my name is Nadine";	mes "Welcome to ^E066FFFate RO!^000000";	mes "I see that you're new here so to help you out I'd like to give you these";	mes "items as a gift to show how much we appreciate you here!";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];	announce "Let's welcome " + strcharinfo(0) + " for joining our server ! ",0;end;OnInit:waitingroom "Solo Pack Gift!",0;end;}
 
try this

Code:
poring_w02,92,197,3	script	Nadine#1	650,{	set .@n$, "[Nadine]";		setarray .@rwd[0], 25500, 1, 7; // Rewards: <item id>, <item amount>, <refine count>	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.";		mes "If your Playing in a Cafe Please do post your IGN in Shop Players section with your Group.";		mes "Thank you!";		close;	}	mes .@n$;	mes "Nice to meet you "+ strcharinfo (0) +", my name is Nadine";	mes "Welcome to ^E066FFFate RO!^000000";	mes "I see that you're new here so to help you out I'd like to give you these";	mes "items as a gift to show how much we appreciate you here!";	for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 )		mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]"" + getitemname(.@rwd[.@i]);	close2;	set #NewbieGift, 1;	setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;	// getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>};	for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )		getitem2 .@rwd[.@i], .@rwd[.@i+1], 1, .@rwd[.@i+2], 0, 0, 0, 0, 0;	announce "Let's welcome " + strcharinfo(0) + " for joining our server ! ",0;	end;OnInit:	waitingroom "Solo Pack Gift!",0;	end;}
 
try this

poring_w02,92,197,3 script Nadine#1 650,{ set .@n$, "[Nadine]"; setarray .@rwd[0], 25500, 1, 7; // Rewards: <item id>, <item amount>, <refine count> 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."; mes "If your Playing in a Cafe Please do post your IGN in Shop Players section with your Group."; mes "Thank you!"; close; } mes .@n$; mes "Nice to meet you "+ strcharinfo (0) +", my name is Nadine"; mes "Welcome to ^E066FFFate RO!^000000"; mes "I see that you're new here so to help you out I'd like to give you these"; mes "items as a gift to show how much we appreciate you here!"; for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 ) mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]"" + getitemname(.@rwd[.@i]); close2; set #NewbieGift, 1; setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1; // getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 ) getitem2 .@rwd[.@i], .@rwd[.@i+1], 1, .@rwd[.@i+2], 0, 0, 0, 0, 0; announce "Let's welcome " + strcharinfo(0) + " for joining our server ! ",0; end;OnInit: waitingroom "Solo Pack Gift!",0; end;}

@@Litro is't okay to do this? 

Code:
	set .@n$, "[Nadine]";		setarray .@rwd[0], 25500, 1, 7, 25501, 1, 7, 25502, 1, 7; // Rewards: <item id>, <item amount>, <refine count>
 
Last edited by a moderator:
yes, you should try it offline before put it in your online server

 
okie2. thanks! i'll try it later then!

yes, you should try it offline before put it in your online server
 @@Litro I did test it,and I got this error

and when i did  place "//" mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]" + getitemname(.@rwd[.@i]);

nothing happen after talking to npc, no items given

Code:
[Error]: script error in file 'npc/custom/fatero/npc/ipfreebies.txt' line 23 column 0    Unexpected newline at string.    20:    21:         for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 )    22:                 mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]" + getitemname(.@rwd[.@i]);*   23:         close2;        ^    24:         set #NewbieGift, 1;    25:         setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;    26:
 
Last edited by a moderator:
okie2. thanks! i'll try it later then!

yes, you should try it offline before put it in your online server
 @@Litro I did test it,and I got this error

and when i did  place "//" mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]" + getitemname(.@rwd[.@i]);

nothing happen after talking to npc, no items given

[Error]: script error in file 'npc/custom/fatero/npc/ipfreebies.txt' line 23 column 0 Unexpected newline at string. 20: 21: for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 ) 22: mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]" + getitemname(.@rwd[.@i]);* 23: close2; ^ 24: set #NewbieGift, 1; 25: setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1; 26:
Code:
mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]" + getitemname(.@rwd[.@i]);
to

mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]+" "+ getitemname(.@rwd[.@i]);
you forgot the + sign near "

 
okie2. thanks! i'll try it later then!

yes, you should try it offline before put it in your online server
 @@Litro I did test it,and I got this error

and when i did  place "//" mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]" + getitemname(.@rwd[.@i]);

nothing happen after talking to npc, no items given

[Error]: script error in file 'npc/custom/fatero/npc/ipfreebies.txt' line 23 column 0 Unexpected newline at string. 20: 21: for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 ) 22: mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]" + getitemname(.@rwd[.@i]);* 23: close2; ^ 24: set #NewbieGift, 1; 25: setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1; 26:
Code:
mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]" + getitemname(.@rwd[.@i]);
to

mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]+" "+ getitemname(.@rwd[.@i]);
you forgot the + sign near "

thanks!!

 
Back
Top