prontera,155,150,3 script Hourly Reward 4_M_KHMAN,{ if(!#HOURLYCLAIM) { .@HTimer = #Daily_Timer + .minutes_required * 60; // 1 hour message strcharinfo(0),"You still have "+callfunc("Time2Str",.@HTimer)+" left before you can receive a reward."; end; } #HOURLYCLAIM = 0; #Minute_Online = 0; dispbottom "----- [ UniteRO Hourly Rewards ] -----------------",0xFFFFFF; if(.EnableItemRewards) { set .@size, getarraysize(.rewards) - 1; set .@index, rand(0, .@size / 2) * 2; .@claimitem = .rewards[.@index]; .@claimamt = .rewards[.@index + 1]; .@charid = getcharid(0); .@sender$ = strnpcinfo(0); .@title$ = "** Hourly Reward **"; .@body$ = "You have received your hourly reward."; .@zeny = 0; if (!checkweight2(.@claimitem,.@claimamt)) { dispbottom "The rewards has been sent to your mail.",0x00FFFF; mail .@charid, .@sender$, .@title$, .@body$, .@zeny, .@claimitem, .@claimamt; }else{ getitem .@claimitem, .@claimamt; } } if(.EnableVarRewards) { #ACTIVITYPOINTS += 1; dispbottom "You've received 1 Activity Point and your hourly reward item.",0x00FFFF; dispbottom "Total Activity Points: "+#ACTIVITYPOINTS+"!",0x00FFFF; } end; OnCheck: #Minute_Online += 1; if (#Minute_Online >= .minutes_required) { #HOURLYCLAIM = 1; #Minute_Online = 0; #Daily_Timer = gettimetick(2) - (#Minute_Online*60); dispbottom "You have been online for an hour. Talk to the Hourly Reward NPC to get your rewards!",0x00FFFF; } addtimer 60000, strnpcinfo(3)+"::OnCheck"; end; OnPCLoginEvent: sleep2 1250; addtimer 60000,strnpcinfo(3)+"::OnCheck"; #Daily_Timer = gettimetick(2) - (#Minute_Online*60); end; OnCheckHourly: .@HTimer = #Daily_Timer + .minutes_required * 60; // 1 hour message strcharinfo(0),"You still have "+callfunc("Time2Str",.@HTimer)+" left before you can receive a reward."; end; OnInit: // Removed (Check the minutes/seconds left via NPC) //bindatcmd "hourly",strnpcinfo(3)+"::OnCheckHourly"; // Configuration .minutes_required = 60; // Minutes Required (60 = 60 minutes) // Toggle Rewards .EnableItemRewards = 1; // Enable item rewards? (0 = Disabled | 1 = Enabled). .EnableVarRewards = 1; // Enable item rewards? (0 = Disabled | 1 = Enabled). // Reward Sets (This only gives 1 Random ID with the Designated Amount) // setarray .rewards[0], 3550, 2, // 3551, 2, // 3552, 2, // 3553, 2, // 12083, 2, // Giant Burito 12093, 2, // Special Toast 12073, 2, // Bearfoot Special 12072, 3, // Whole Roast 12082, 3, // Sumptuous Feast 12094, 3, // Heavenly Fruit Juice 12088, 3, // Incredibly Spicy Curry 12078, 3, // 12092, 3, // 12089, 3, // 12077, 3, // 12087, 3, // 12098, 3, // 12082, 3, // 12079, 3; // end; }