caspe 16 Posted January 27, 2018 Hello, i like to have script which gives G Pack based on IP, not account based. it should store the last IP of players who already claim the G Pack. I'm currently using this script Spoiler turbo_room,99,115,4 script Gpack 4W_KID,{ if( !#Gpack ){ set #Gpack,1; mes "Welcome...this is your G pack..."; getitem2 2424,1,1,7,0,0,0,0,0; getitem2 2528,1,1,7,0,0,0,0,0; getitem 2115,1; getitem 7720,30; getitem 7539,10; }else{ mes "You have already claim the G pack."; } close; } Quote Share this post Link to post Share on other sites
0 caspe 16 Posted January 27, 2018 Spoiler 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; } this script which was posted by @Anakid working fine, but how can i use getitem2 in it? because i wan't also give +7 equips. Quote Share this post Link to post Share on other sites
0 Murilo BiO' 26 Posted January 27, 2018 1 hour ago, caspe said: Hide contents 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; } this script which was posted by @Anakid working fine, but how can i use getitem2 in it? because i wan't also give +7 equips. The simpler way is just adding getitem2 under the getitem on the script, with static values like on the first one. But remember, someone with dynamic IP can receive multiple G Packs. 1 caspe reacted to this Quote Share this post Link to post Share on other sites
0 caspe 16 Posted January 28, 2018 thanks i removed .@rwd array and added reward, using getitem2 and getitem. Quote Share this post Link to post Share on other sites
Hello,
i like to have script which gives G Pack based on IP, not account based.
it should store the last IP of players who already claim the G Pack.
I'm currently using this script
turbo_room,99,115,4 script Gpack 4W_KID,{
if( !#Gpack ){
set #Gpack,1;
mes "Welcome...this is your G pack...";
getitem2 2424,1,1,7,0,0,0,0,0;
getitem2 2528,1,1,7,0,0,0,0,0;
getitem 2115,1;
getitem 7720,30;
getitem 7539,10;
}else{
mes "You have already claim the G pack.";
}
close;
}
Share this post
Link to post
Share on other sites