- script hourlypoints -1,{
//--Start of the Script
OnPCLoginEvent:
atcommand "@refresh "+strcharinfo(0);
addtimer .timer,"hourlypoints::OnPointGet";
set @hourly_points_timer, gettimetick(2) + ( .timer / 1000 );
dispbottom "Hourly Rewards have been started for this character.";
end;
OnPointGet:
set #hourlypoints, #hourlypoints + .point_amt;
dispbottom "You received "+.point_amt+" Reward Hourly Points by staying ingame for 1 hour";
dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
set @consecutive_hour, @consecutive_hour + 1;
//Check for 2 hours consecutive
if(@consecutive_hour == 2) {
set #HourlyPoints, #HourlyPoints + .2cpoint_amt;
dispbottom "You received "+.2cpoint_amt+" Reward Hourly Points due to playing for 2 consecutive hours";
dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 3 hours consecutive
else if(@consecutive_hour == 3) {
set #HourlyPoints, #HourlyPoints + .3cpoint_amt;
dispbottom "You received "+.3cpoint_amt+" Reward Hourly Points due to playing for 3 consecutive hours";
dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 4 hours consecutive
else if(@consecutive_hour == 4) {
set #HourlyPoints, #HourlyPoints + .4cpoint_amt;
dispbottom "You received "+.4cpoint_amt+" Reward Hourly Points due to playing for 4 consecutive hours";
dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 5 hours consecutive
else if(@consecutive_hour == 5) {
set #HourlyPoints, #HourlyPoints + .5cpoint_amt;
dispbottom "You received "+.5cpoint_amt+" Reward Hourly Points due to playing for 5 consecutive hours";
dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 6 hours consecutive
else if(@consecutive_hour == 6) {
set #HourlyPoints, #HourlyPoints + .6cpoint_amt;
dispbottom "You received "+.6cpoint_amt+" Reward Hourly Points due to playing for 6 consecutive hours";
dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 7 hours consecutive
else if(@consecutive_hour == 7) {
set #HourlyPoints, #HourlyPoints + .7cpoint_amt;
dispbottom "You received "+.7cpoint_amt+" Reward Hourly Points due to playing for 7 consecutive hours";
dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 8 hours consecutive
else if(@consecutive_hour == 8) {
set @consecutive_hour,0;
set #HourlyPoints, #HourlyPoints + .8cpoint_amt;
dispbottom "You received "+.8cpoint_amt+" Reward Hourly Points due to playing for 8 consecutive hours";
dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
}
addtimer .timer,"hourlypoints::OnPointGet";
end;
OnCmdHour:
mes "^0033ff[ War Server ]^000000";
mes "Total Hours Online " +@consecutive_hour+ "";
mes "Reward Hourly Points : ^FF0000[ "+#HourlyPoints+" ]^000000";
mes " ";
message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" Remaining.":"Something went wrong relog!";
end;
OnInit:
bindatcmd "reward","hourlypoints::OnCmdHour";
set .timer, 1000*60*60; //Timer in milliseconds.
set .2cpoint_amt, 20;
set .3cpoint_amt, 30;
set .4cpoint_amt, 40;
set .5cpoint_amt, 50;
set .6cpoint_amt, 60;
set .7cpoint_amt, 70;
set .8cpoint_amt, 80;
set .point_amt, 10; //Normal points gained.
}
there 's a problem or a bug on the timer of hourly time remaining. Once i got the one hour reward points and i use @reward the timer show blank message. please check screenshot attached
Question
Bringer
- script hourlypoints -1,{ //--Start of the Script OnPCLoginEvent: atcommand "@refresh "+strcharinfo(0); addtimer .timer,"hourlypoints::OnPointGet"; set @hourly_points_timer, gettimetick(2) + ( .timer / 1000 ); dispbottom "Hourly Rewards have been started for this character."; end; OnPointGet: set #hourlypoints, #hourlypoints + .point_amt; dispbottom "You received "+.point_amt+" Reward Hourly Points by staying ingame for 1 hour"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; set @consecutive_hour, @consecutive_hour + 1; //Check for 2 hours consecutive if(@consecutive_hour == 2) { set #HourlyPoints, #HourlyPoints + .2cpoint_amt; dispbottom "You received "+.2cpoint_amt+" Reward Hourly Points due to playing for 2 consecutive hours"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; set @consecutive_hour, @consecutive_hour + 1; } //Check for 3 hours consecutive else if(@consecutive_hour == 3) { set #HourlyPoints, #HourlyPoints + .3cpoint_amt; dispbottom "You received "+.3cpoint_amt+" Reward Hourly Points due to playing for 3 consecutive hours"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; set @consecutive_hour, @consecutive_hour + 1; } //Check for 4 hours consecutive else if(@consecutive_hour == 4) { set #HourlyPoints, #HourlyPoints + .4cpoint_amt; dispbottom "You received "+.4cpoint_amt+" Reward Hourly Points due to playing for 4 consecutive hours"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; set @consecutive_hour, @consecutive_hour + 1; } //Check for 5 hours consecutive else if(@consecutive_hour == 5) { set #HourlyPoints, #HourlyPoints + .5cpoint_amt; dispbottom "You received "+.5cpoint_amt+" Reward Hourly Points due to playing for 5 consecutive hours"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; set @consecutive_hour, @consecutive_hour + 1; } //Check for 6 hours consecutive else if(@consecutive_hour == 6) { set #HourlyPoints, #HourlyPoints + .6cpoint_amt; dispbottom "You received "+.6cpoint_amt+" Reward Hourly Points due to playing for 6 consecutive hours"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; set @consecutive_hour, @consecutive_hour + 1; } //Check for 7 hours consecutive else if(@consecutive_hour == 7) { set #HourlyPoints, #HourlyPoints + .7cpoint_amt; dispbottom "You received "+.7cpoint_amt+" Reward Hourly Points due to playing for 7 consecutive hours"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; set @consecutive_hour, @consecutive_hour + 1; } //Check for 8 hours consecutive else if(@consecutive_hour == 8) { set @consecutive_hour,0; set #HourlyPoints, #HourlyPoints + .8cpoint_amt; dispbottom "You received "+.8cpoint_amt+" Reward Hourly Points due to playing for 8 consecutive hours"; dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points"; } addtimer .timer,"hourlypoints::OnPointGet"; end; OnCmdHour: mes "^0033ff[ War Server ]^000000"; mes "Total Hours Online " +@consecutive_hour+ ""; mes "Reward Hourly Points : ^FF0000[ "+#HourlyPoints+" ]^000000"; mes " "; message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" Remaining.":"Something went wrong relog!"; end; OnInit: bindatcmd "reward","hourlypoints::OnCmdHour"; set .timer, 1000*60*60; //Timer in milliseconds. set .2cpoint_amt, 20; set .3cpoint_amt, 30; set .4cpoint_amt, 40; set .5cpoint_amt, 50; set .6cpoint_amt, 60; set .7cpoint_amt, 70; set .8cpoint_amt, 80; set .point_amt, 10; //Normal points gained. }
there 's a problem or a bug on the timer of hourly time remaining. Once i got the one hour reward points and i use @reward the timer show blank message. please check screenshot attached
Link to comment
Share on other sites
2 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.