Jump to content
  • 0

Question

8 answers to this question

Recommended Posts

  • 0
Posted (edited)
-	script	hourlypoints	-1,{
OnPCLoginEvent:
if (getgmlevel() > 0) end;
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
    
OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
    set @minute,0;
    set Hourly_Points, Hourly_Points + 10;
    dispbottom "You received 10 Hourly Points by staying ingame for 1 hour. You now have "+Hourly_Points+" Hourly Points.";
    set @consecutive_hour, @consecutive_hour + 1;
    }
//Check for 3 hours consecutive
    if(@consecutive_hour == 3) {
    set @consecutive_hour,0;
    set Hourly_Points, Hourly_Points + 30;
    dispbottom "You received 30 additional Hourly Points by staying ingame for 3 consecutive hours. You now have "+Hourly_Points+" Hourly Points.";
    }
stopnpctimer;
initnpctimer;
end;
}

EDIT:

Even vendors are going to gain hourly points.

Edited by Technoken
  • 0
Posted
2 minutes ago, Jonald said:

Hey @Technoken can you edit it 1 point only no more +30 points etc btw i dont have vendors at my server and thank for helping me out

-	script	hourlypoints	-1,{
OnPCLoginEvent:
if (getgmlevel() > 0) end;
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
    
OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
    set @minute,0;
    set Hourly_Points, Hourly_Points + 1;
    dispbottom "You received 1 Hourly Points by staying ingame for 1 hour. You now have "+Hourly_Points+" Hourly Points.";
}

stopnpctimer;
initnpctimer;
end;
}

 

  • Upvote 1
  • 0
Posted

@Technoken hey man can you edit this script i found cashpoints for every 15mins and this script have a @ht to know the time remaining

Spoiler

-    script    hourlypoints    -1,{
 
OnInit:
    announce "[Hourly Points System]: The system have been reloaded, please relog again to get more points.", bc_all;
 
    .point_name$ = "reward points";
    .point_amt = 3;    // Normal points gained.
    .dlimit = 60000000000;    // Stop points if afk greater then in seconds. 600s = 10 minutes
    .enable = 1;
    .level = 0;
    .online_time = 360; // One hour = 3600 seconds
 
    bindatcmd "ht", "hourlypoints::OnAtcommand", 0, 100;
    end;
 
OnPCLoginEvent:
    if (BaseLevel >= .level)
    {
        #idle = 0;
        @backup_time = 0;
 
        if (!#acctick || #acctick > .online_time)
            #acctick = gettimetick(2) + .online_time;
        else
            #acctick += gettimetick(2);
 
        while(.enable)
        {
            @idle_time = checkidle();
 
            if (checkvending() >= 1 || checkchatting() == 1 || @idle_time >= .dlimit)
            {
                #acctick += @idle_time; // Add idle time
                #idle = 1;
                dispbottom "The hourly points event haulted because you were vending, chatting, or idle.";
                dispbottom "Please relog again.";
            }
            else
            {
                sleep2 1000;
 
                @backup_time = .@time_left = #acctick - gettimetick(2);
 
                if (.@time_left <= 0)
                {
                    #RP += .point_amt;
                    #acctick = gettimetick(2) + .online_time;
                    dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points.";
                }
                else
                {
                    .@time_left = .online_time - .@time_left;
                    .@Time$ = "";
                    .@Minutes = .@time_left / 60;
                    .@time_left -= (.@Minutes * 60);
 
                    if (.@Minutes > 1)
                        .@Time$ += .@Minutes + " minutes, ";
                    else if (.@Minutes > 0)
                        .@Time$ += .@Minutes + " minute, ";
 
                    if (.@time_left > 1 || .@time_left == 0)
                        .@Time$ += .@time_left + " seconds";
                    else if (.@time_left == 1)
                        .@Time$ += .@time_left + " second";
 
                    if (.@Minutes == 15 && .@time_left == 0 || .@Minutes == 30 && .@time_left == 0 || .@Minutes == 45 && .@time_left == 0)
                        dispbottom "You spend a total of [" + .@Time$ + "] playing.";
                }
            }
 
            if (#idle)
                break;
        }
    }
    end;
 
OnPCLogoutEvent:
    // BackUP online time
    if (BaseLevel >= .level)
    {
        if (@backup_time)
            #acctick = @backup_time;
    }
    end;
 
OnAtcommand:
    if (BaseLevel >= .level)
    {
        if (#idle)
        {
            .@Time$ = "";
            .@Minutes = @idle_time / 60;
            .@time_left = @idle_time - (.@Minutes * 60);
 
            if (.@Minutes > 1)
                .@Time$ += .@Minutes + " minutes, ";
            else if (.@Minutes > 0)
                .@Time$ += .@Minutes + " minute, ";
 
            if (.@time_left > 1 || .@time_left == 0)
                .@Time$ += .@time_left + " seconds";
            else if (.@time_left == 1)
                .@Time$ += .@time_left + " second";
 
            dispbottom "You been idle for " + .@Time$ + ". Please relog again.";
        }
        else
        {
            .@time_left = @backup_time;
            .@Time$ = "";
            .@Minutes = .@time_left / 60;
            .@time_left -= (.@Minutes * 60);
 
            if (.@Minutes > 1)
                .@Time$ += .@Minutes + " minutes, ";
            else if (.@Minutes > 0)
                .@Time$ += .@Minutes + " minute, ";
 
            if (.@time_left > 1 || .@time_left == 0)
                .@Time$ += .@time_left + " seconds";
            else if (.@time_left == 1)
                .@Time$ += .@time_left + " second";
 
            dispbottom "You have [" + .@Time$ + "] left in able to gain a reward points.";
        }
    }
    end;
}

 

 

Hi can you help me with this cash point i dont have the global_reg_value and i using a script for players to have a cash point every 15mins but cash point not working

  • 0
Posted
2 hours ago, Jonald said:

@Technoken hey man can you edit this script i found cashpoints for every 15mins and this script have a @ht to know the time remaining

  Hide contents

-    script    hourlypoints    -1,{
 
OnInit:
    announce "[Hourly Points System]: The system have been reloaded, please relog again to get more points.", bc_all;
 
    .point_name$ = "reward points";
    .point_amt = 3;    // Normal points gained.
    .dlimit = 60000000000;    // Stop points if afk greater then in seconds. 600s = 10 minutes
    .enable = 1;
    .level = 0;
    .online_time = 360; // One hour = 3600 seconds
 
    bindatcmd "ht", "hourlypoints::OnAtcommand", 0, 100;
    end;
 
OnPCLoginEvent:
    if (BaseLevel >= .level)
    {
        #idle = 0;
        @backup_time = 0;
 
        if (!#acctick || #acctick > .online_time)
            #acctick = gettimetick(2) + .online_time;
        else
            #acctick += gettimetick(2);
 
        while(.enable)
        {
            @idle_time = checkidle();
 
            if (checkvending() >= 1 || checkchatting() == 1 || @idle_time >= .dlimit)
            {
                #acctick += @idle_time; // Add idle time
                #idle = 1;
                dispbottom "The hourly points event haulted because you were vending, chatting, or idle.";
                dispbottom "Please relog again.";
            }
            else
            {
                sleep2 1000;
 
                @backup_time = .@time_left = #acctick - gettimetick(2);
 
                if (.@time_left <= 0)
                {
                    #RP += .point_amt;
                    #acctick = gettimetick(2) + .online_time;
                    dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points.";
                }
                else
                {
                    .@time_left = .online_time - .@time_left;
                    .@Time$ = "";
                    .@Minutes = .@time_left / 60;
                    .@time_left -= (.@Minutes * 60);
 
                    if (.@Minutes > 1)
                        .@Time$ += .@Minutes + " minutes, ";
                    else if (.@Minutes > 0)
                        .@Time$ += .@Minutes + " minute, ";
 
                    if (.@time_left > 1 || .@time_left == 0)
                        .@Time$ += .@time_left + " seconds";
                    else if (.@time_left == 1)
                        .@Time$ += .@time_left + " second";
 
                    if (.@Minutes == 15 && .@time_left == 0 || .@Minutes == 30 && .@time_left == 0 || .@Minutes == 45 && .@time_left == 0)
                        dispbottom "You spend a total of [" + .@Time$ + "] playing.";
                }
            }
 
            if (#idle)
                break;
        }
    }
    end;
 
OnPCLogoutEvent:
    // BackUP online time
    if (BaseLevel >= .level)
    {
        if (@backup_time)
            #acctick = @backup_time;
    }
    end;
 
OnAtcommand:
    if (BaseLevel >= .level)
    {
        if (#idle)
        {
            .@Time$ = "";
            .@Minutes = @idle_time / 60;
            .@time_left = @idle_time - (.@Minutes * 60);
 
            if (.@Minutes > 1)
                .@Time$ += .@Minutes + " minutes, ";
            else if (.@Minutes > 0)
                .@Time$ += .@Minutes + " minute, ";
 
            if (.@time_left > 1 || .@time_left == 0)
                .@Time$ += .@time_left + " seconds";
            else if (.@time_left == 1)
                .@Time$ += .@time_left + " second";
 
            dispbottom "You been idle for " + .@Time$ + ". Please relog again.";
        }
        else
        {
            .@time_left = @backup_time;
            .@Time$ = "";
            .@Minutes = .@time_left / 60;
            .@time_left -= (.@Minutes * 60);
 
            if (.@Minutes > 1)
                .@Time$ += .@Minutes + " minutes, ";
            else if (.@Minutes > 0)
                .@Time$ += .@Minutes + " minute, ";
 
            if (.@time_left > 1 || .@time_left == 0)
                .@Time$ += .@time_left + " seconds";
            else if (.@time_left == 1)
                .@Time$ += .@time_left + " second";
 
            dispbottom "You have [" + .@Time$ + "] left in able to gain a reward points.";
        }
    }
    end;
}

 

Hello, please use BBCode next time and consider other people's time. Try hard on editing some scripts. Thanks.

  • 0
Posted
38 minutes ago, Jonald said:

Hi can you help me with this cash point i dont have the global_reg_value and i using a script for players to have a cash point every 15mins but cash point not working

You can find the CashPoint variable on acc_reg_num.


Post your script so people here in rA can check your script.

  • 0
Posted
36 minutes ago, Sryx said:

You can find the CashPoint variable on acc_reg_num.


Post your script so people here in rA can check your script.

Wait i post my script. my script is working but cash points not adding up

-	script	cashpoints	-1,{
 
OnInit:
    announce "The system have been reloaded, please relog again to get more points.", bc_all;
 
    .point_name$ = "cash points";
    .point_amt = 1;    // Normal points gained.
    .dlimit = 600;    // Stop points if afk greater then in seconds. 600s = 10 minutes
    .enable = 1;
    .level = 0;
    .online_time = 360; // One hour = 3600 seconds
 
    bindatcmd "ht", "cashpoints::OnAtcommand", 0, 100;
    end;
 
OnPCLoginEvent:
    if (BaseLevel >= .level)
    {
        #idle = 0;
        @backup_time = 0;
 
        if (!#acctick || #acctick > .online_time)
            #acctick = gettimetick(2) + .online_time;
        else
            #acctick += gettimetick(2);
 
        while(.enable)
        {
            @idle_time = checkidle();
 
            if (checkvending() >= 1 || checkchatting() == 1 || @idle_time >= .dlimit)
            {
                #acctick += @idle_time; // Add idle time
                #idle = 1;
                dispbottom "The hourly points event haulted because you were vending, chatting, or idle.";
                dispbottom "Please relog again.";
            }
            else
            {
                sleep2 1000;
 
                @backup_time = .@time_left = #acctick - gettimetick(2);
 
                if (.@time_left <= 0)
                {
                    #RP += .point_amt;
                    #acctick = gettimetick(2) + .online_time;
                    dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points.";
                }
                else
                {
                    .@time_left = .online_time - .@time_left;
                    .@Time$ = "";
                    .@Minutes = .@time_left / 60;
                    .@time_left -= (.@Minutes * 60);
 
                    if (.@Minutes > 1)
                        .@Time$ += .@Minutes + " minutes, ";
                    else if (.@Minutes > 0)
                        .@Time$ += .@Minutes + " minute, ";
 
                    if (.@time_left > 1 || .@time_left == 0)
                        .@Time$ += .@time_left + " seconds";
                    else if (.@time_left == 1)
                        .@Time$ += .@time_left + " second";
 
                    if (.@Minutes == 15 && .@time_left == 0 || .@Minutes == 30 && .@time_left == 0 || .@Minutes == 45 && .@time_left == 0)
                        dispbottom "You spend a total of [" + .@Time$ + "] playing.";
                }
            }
 
            if (#idle)
                break;
        }
    }
    end;
 
OnPCLogoutEvent:
    // BackUP online time
    if (BaseLevel >= .level)
    {
        if (@backup_time)
            #acctick = @backup_time;
    }
    end;
 
OnAtcommand:
    if (BaseLevel >= .level)
    {
        if (#idle)
        {
            .@Time$ = "";
            .@Minutes = @idle_time / 60;
            .@time_left = @idle_time - (.@Minutes * 60);
 
            if (.@Minutes > 1)
                .@Time$ += .@Minutes + " minutes, ";
            else if (.@Minutes > 0)
                .@Time$ += .@Minutes + " minute, ";
 
            if (.@time_left > 1 || .@time_left == 0)
                .@Time$ += .@time_left + " seconds";
            else if (.@time_left == 1)
                .@Time$ += .@time_left + " second";
 
            dispbottom "You been idle for " + .@Time$ + ". Please relog again.";
        }
        else
        {
            .@time_left = @backup_time;
            .@Time$ = "";
            .@Minutes = .@time_left / 60;
            .@time_left -= (.@Minutes * 60);
 
            if (.@Minutes > 1)
                .@Time$ += .@Minutes + " minutes, ";
            else if (.@Minutes > 0)
                .@Time$ += .@Minutes + " minute, ";
 
            if (.@time_left > 1 || .@time_left == 0)
                .@Time$ += .@time_left + " seconds";
            else if (.@time_left == 1)
                .@Time$ += .@time_left + " second";
 
            dispbottom "You have [" + .@Time$ + "] left in able to gain a reward points.";
        }
    }
    end;
}

 

 

28 minutes ago, Sryx said:

  #RP += .point_amt;
  #acctick = gettimetick(2) + .online_time;
  dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points.";

Find this line then change the #RP to #CASHPOINTS.

Okay i will try it now ill be back later thank you

 

@Sryx hey bro it worked thank you so much 

  • 0
Posted
  #RP += .point_amt;
  #acctick = gettimetick(2) + .online_time;
  dispbottom "Gained " + .point_amt + " " + .point_name$ + ". Total " + #RP + " points.";

Find this line then change the #RP to #CASHPOINTS.

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...