prontera,156,156,3 script Sayer 90,{
// Reward Array <Item Id>, <Qty>, <Refine>
// Set refine option to 0 if non-refinable.
setarray .@rwd[0],2357,1,7,2524,1,7,2421,1,7,2115,1,7,13607,3,0,14208,3,0,12103,10,0,674,10,0,4140,4,0;
query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$);
if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0)
{
mes "[sayer]";
mes "I'm sorry, the rewards are exclusively for new players.";
close;
}
mes "[sayer]";
mes "Welcome! Here are some free gifts";
mes "for newcomers:";
// List all the items.
for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 )
// Check if refined option is not 0.
if(.@rwd[.@i+2] != 0) {
mes .@rwd[.@i+1] + " x +" + .@rwd[.@i+2] + " " + getitemname(.@rwd[.@i]);
}else{
mes .@rwd[.@i+1] + " x " + getitemname(.@rwd[.@i]);
}
close2;
// Get Items
for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 )
// Check if refined option is not 0.
if(.@rwd[.@i+2] != 0) {
// getitem2 <id>, <qty>, <identify>, <refine>, <attribute>, <card1>, <card2>, <card3>, <card4>
getitem2 .@rwd[.@i], .@rwd[.@i+1], 1, .@rwd[.@i+2], 0, 0, 0, 0, 0;
}else{
getitem .@rwd[.@i], .@rwd[.@i+1];
}
// Set variable to make sure player can't get items again.
set #NewbieGift, 1;
setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;
end;
OnInit:
waitingroom "Newbie Package!",0;
end;
}
Question
patr3k
Getting error with this script.
Link to comment
Share on other sites
4 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.