Tulong nmn sa daily reward npc,
tinry ko gwing per account e pero hindi clickable ung npc
prontera,142,165,6 script Daily Rewards 678,{
.@unique_id$ = get_unique_id();
if(getd("$ID_" + .@unique_id$) > 0 || #DSUPPLY > 0){
mes "[ Daily Rewards ]";
mes "You have already claimed your Daily Rewards.";
close;
}
mes "[ Daily Rewards ]";
if(#DSUPPLY==gettime(DT_YYYYMMDD)){
mes "You already received your rewards today.";
end;
}
mes "Here's your daily rewards!";
explode(.@items$,.items$[gettime(DT_DAYOFWEEK)],"|");
for(.@i=0;.@i<getarraysize(.@items$);.@i+=2)
getitem atoi(.@items$[.@i]),atoi(.@items$[.@i+1]);
explode(.@bitems$,.bounditems$[gettime(DT_DAYOFWEEK)],"|");
for(.@i=0;.@i<getarraysize(.@bitems$);.@i+=2);
getitemboundatoi(.@bitems$[.@i]),atoi(.@bitems$[.@i+1]),Bound_Account;
setd "$ID_" + .@unique_id$,0;
set #DSUPPLY,gettime(DT_YYYYMMDD);
end;
OnHour00:
delwaitingroom strnpcinfo(0);
waitingroom callsub(OnCheckDay)+" Rewards",0;
end;
OnCheckDay:
switch(gettime(DT_DAYOFWEEK)){
case 0: return "Sunday";
case 1: return "Monday";
case 2: return "Tuesday";
case 3: return "Wednesday";
case 4: return "Thursday";
case 5: return "Friday";
case 6: return "Saturday";
default: return "Error!";
break;
}
return;
OnInit:
waitingroom callsub(OnCheckDay)+" Rewards",0;
//You can use Copy | (Vertical Bar) to separateitems
// Item ID, Amount{,Item ID,Amount}...
//setarray .items$[0],
// "501|5|502|10|503|15|504|20", //Sunday
// "601|5|602|3", //Monday
// "501|1", //Tuesday
// "502|1", //Wednesday
// "503|1", //Thursday
// "504|1", //Friday
// "505|1"; //Saturday
setarray .bounditems$,
"14003|5|12209|5|7621|5|12210|2", //Sunday
"14003|5|12209|5|7621|5|12210|2",//Monday
"14003|5|12209|5|7621|5|12210|2", //Tuesday
"14003|5|12209|5|7621|5|12210|2", //Wednesday
"14003|5|12209|5|7621|5|12210|2", //Thursday
"14003|5|12209|5|7621|5|12210|2", //Friday
"14003|5|12209|5|7621|5|12210|2"; //Saturday
end;
}