prontera,142,173,5 script Recompensas Diarias 911,{
.@cd = 60 * 60 * 24; // 24 hrs
.@time = gettimetick(2);
if ( #DAILYRENTREWARD + .@cd > .@time ) {
mes "Volte novamente em " + Time2Str(#DAILYRENTREWARD + .@cd) + " para pegar sua recompensa!";
close;
}
mes "Aqui está sua recompensa, aproveite-a!";
close2;
// Pick one item index randomly as reference.
.@reward_item_index = rand(getarraysize(.reward_items));
// Use the reference to get the item id and duration of the referenced item.
rentitem(.reward_items[.@reward_item_index], .reward_item_durations[.@reward_item_index]);
#DAILYRENTREWARD = .@time;
end;
OnInit:
// Set the list of possible items and how long they should be rentable.
setarray(.reward_items, 4302, 720);
setarray(.reward_item_durations, 7200, 7200);
}