SilverSRO Posted September 18, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 7 Reputation: 0 Joined: 06/03/17 Last Seen: October 14, 2017 Share Posted September 18, 2017 Hello I wanted to know if it was possible a script that would give the newbie gift but this to only 1 IP. I searched for it but could not find enough answer. Thank you. Quote Link to comment Share on other sites More sharing options...
0 crazyarashi Posted September 18, 2017 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 776 Reputation: 239 Joined: 02/11/17 Last Seen: 19 hours ago Share Posted September 18, 2017 (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 September 18, 2017 by crazyarashi Added end; 1 Quote Link to comment Share on other sites More sharing options...
0 SilverSRO Posted September 18, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 7 Reputation: 0 Joined: 06/03/17 Last Seen: October 14, 2017 Author Share Posted September 18, 2017 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; } Quote Link to comment Share on other sites More sharing options...
Question
SilverSRO
Hello
I wanted to know if it was possible a script that would give the newbie gift
but this to only 1 IP.
I searched for it but could not find enough answer.
Thank you.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.