Jump to content
  • 0

Question on Freebies npc


rayleigh

Question


  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  220
  • Reputation:   0
  • Joined:  09/05/13
  • Last Seen:  

Hi guys Im using this script (credit to the owner)


prontera,147,174,3	script	Freebies	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;

}

Yeah its working fine on my test server. But I think this is Ip address bound, because when I try to create another account. The npc will not give me anymore freebies. 

Because in some instances our players were playing on a computer shop in a same pc but different two people.

How can I make this account bound?

 

Thanks for those who will reply.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   24
  • Joined:  02/11/16
  • Last Seen:  

prontera,147,174,3	script	Freebies	90,{

set .@n$, "[Seyra]";

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

if ( #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;

}

Try this one...
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  220
  • Reputation:   0
  • Joined:  09/05/13
  • Last Seen:  

Thanks Neff...

 

It really did work.

How did you do that by the way?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  220
  • Reputation:   0
  • Joined:  09/05/13
  • Last Seen:  

I dont understand that. /heh

Thanks for guiding me through btw.

/no1

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