Jump to content
  • 0
MikZ

Modified IP Freebies

Question

Hello!
Can someone help me to modify this script?

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

 

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

 

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

 

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? 

	set .@n$, "[Nadine]";		setarray .@rwd[0], 25500, 1, 7, 25501, 1, 7, 25502, 1, 7; // Rewards: <item id>, <item amount>, <refine count>
Edited by MikZ

Share this post


Link to post
Share on other sites
  • 0

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:
Edited by MikZ

Share this post


Link to post
Share on other sites
  • 0

 

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:

 

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 "

 

 

Share this post


Link to post
Share on other sites
  • 0

 

 

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:

 

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

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.