Jump to content
  • 0
Eross

Hourly Point System that checks Unique ID

Question

Hi ! Im using an old Hourly System, I just want to add a feature that will: 

1. Allow first player of first account to login and activate hourly system

2. the second and next dual character will automatically been hault its system and wont get any hourly points 

3. Regardless the map, even they have different maps it will check the gepard id 

 

Sorry for my bad english. I hope you can help me 

The Script im using :

-	script	hourlypoints	FAKE_NPC,{
 
OnInit:
    //announce "[30 Minutes Points System]: The system have been reloaded, please relog again to get more points.", bc_all;
    announce "[Hourly Reward System]: Hourly system has been reloaded, please relog again to get more points.", bc_all;
 
    .point_name$ = "Hourly Points";
    .point_amt = 5;    // Normal points gained.
    .dlimit = 900;    // Stop points if afk greater then in seconds. 600s = 10 minutes //43200
    .enable = 1;
    .level = 0;
    .online_time = 3600; // One hour = 3600 seconds
 
    bindatcmd "hourlyinfo", "hourlypoints::OnAtcommand", 0, 100;
	//bindatcmd "hourlypoints", "hourlypoints::OnCheckPoints", 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.";
            }
            else
            {
                sleep2 1000;
 
                @backup_time = [email protected]_left = #acctick - gettimetick(2);
 
                if ([email protected]_left <= 0) {
                
					if (vip_status(1)) {
						#HOURLYPOINTS += .point_amt + 1;
						#acctick = gettimetick(2) + .online_time;
					     dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + " +1 " + .point_name$ + " [Vip Bonus]. Stay online and gain more points.";

					}
					else {
                    #HOURLYPOINTS += .point_amt;
                    #acctick = gettimetick(2) + .online_time;
                    dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + ". Total " + #HOURLYPOINTS + " Hourly Points. Stay online to gain more points.";
					}
                }
                else
                {
                    [email protected]_left = .online_time - [email protected]_left;
                    [email protected]$ = "";
                    [email protected] = [email protected]_left / 60;
                    [email protected]_left -= ([email protected] * 60);
 
                    if ([email protected] > 1)
                        [email protected]$ += [email protected] + " minutes, ";
                    else if ([email protected] > 0)
                        [email protected]$ += [email protected] + " minute, ";
 
                    if ([email protected]_left > 1 || [email protected]_left == 0)
                        [email protected]$ += [email protected]_left + " seconds";
                    else if ([email protected]_left == 1)
                        [email protected]$ += [email protected]_left + " second";
 
                    if ([email protected] == 15 && [email protected]_left == 0 || [email protected] == 30 && [email protected]_left == 0 || [email protected] == 45 && [email protected]_left == 0)
                        dispbottom "[Hourly Reward System]: You spend a total of [" + [email protected]$ + "] playing.";
                }
            }
 
            if (#idle)
                break;
        }
    }
    end;
 
OnPCLogoutEvent:
    // BackUP online time
    if (BaseLevel >= .level)
    {
        if (@backup_time)
            #acctick = @backup_time;
    }
    end;
OnCheckPoints: 
	dispbottom "[Hourly Reward System]: You have a total of ["+ #HOURLYPOINTS +"] Hourly Points.",0xRRGGBB;
	end;
OnAtcommand:
    if (BaseLevel >= .level)
    {
        if (#idle)
        {
            [email protected]$ = "";
            [email protected] = @idle_time / 60;
            [email protected]_left = @idle_time - ([email protected] * 60);
 
            if ([email protected] > 1)
                [email protected]$ += [email protected] + " minutes, ";
            else if ([email protected] > 0)
                [email protected]$ += [email protected] + " minute, ";
 
            if ([email protected]_left > 1 || [email protected]_left == 0)
                [email protected]$ += [email protected]_left + " seconds";
            else if ([email protected]_left == 1)
                [email protected]$ += [email protected]_left + " second";
 
            dispbottom "[Hourly Reward System]: You been idle for " + [email protected]$ + ". Please relog again.",0xRRGGBB;
        }
        else
        {
            [email protected]_left = @backup_time;
            [email protected]$ = "";
            [email protected] = [email protected]_left / 60;
            [email protected]_left -= ([email protected] * 60);
 
            if ([email protected] > 1)
                [email protected]$ += [email protected] + " minutes, ";
            else if ([email protected] > 0)
                [email protected]$ += [email protected] + " minute, ";
 
            if ([email protected]_left > 1 || [email protected]_left == 0)
                [email protected]$ += [email protected]_left + " seconds";
            else if ([email protected]_left == 1)
                [email protected]$ += [email protected]_left + " second";
 
            dispbottom "[Hourly Reward System]: You have [" + [email protected]$ + "] left in able to gain a hourly points.",0xRRGGBB;
        }
    }
    end;
}



 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi ! Im using hourly point system from rathena .. I just want to add a feature that check if there are other logged in players with same Gepard ID. regardless the map or area ... For example I logged in my first account , The hourly system will start the countdown for rewards, But if I login my 2nd account there will be a message that "We have detected same Gepard ID logged in in game. We will hault your hourly points system."

Heres the script .. I hope someone can help me 😞

-	script	hourlypoints	FAKE_NPC,{
 
OnInit:
    //announce "[30 Minutes Points System]: The system have been reloaded, please relog again to get more points.", bc_all;
    announce "[Hourly Reward System]: Hourly system has been reloaded, please relog again to get more points.", bc_all;
 
    .point_name$ = "Hourly Points";
    .point_amt = 5;    // Normal points gained.
    .dlimit = 900;    // Stop points if afk greater then in seconds. 600s = 10 minutes //43200
    .enable = 1;
    .level = 0;
    .online_time = 3600; // One hour = 3600 seconds
 
    bindatcmd "hourlyinfo", "hourlypoints::OnAtcommand", 0, 100;
	//bindatcmd "hourlypoints", "hourlypoints::OnCheckPoints", 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.";
            }
            else
            {
                sleep2 1000;
 
                @backup_time = [email protected]_left = #acctick - gettimetick(2);
 
                if ([email protected]_left <= 0) {
                
					if (vip_status(1)) {
						#HOURLYPOINTS += .point_amt + 1;
						#acctick = gettimetick(2) + .online_time;
					     dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + " +1 " + .point_name$ + " [Vip Bonus]. Stay online and gain more points.";

					}
					else {
                    #HOURLYPOINTS += .point_amt;
                    #acctick = gettimetick(2) + .online_time;
                    dispbottom "[Hourly Reward System]: Gained " + .point_amt + " " + .point_name$ + ". Total " + #HOURLYPOINTS + " Hourly Points. Stay online to gain more points.";
					}
                }
                else
                {
                    [email protected]_left = .online_time - [email protected]_left;
                    [email protected]$ = "";
                    [email protected] = [email protected]_left / 60;
                    [email protected]_left -= ([email protected] * 60);
 
                    if ([email protected] > 1)
                        [email protected]$ += [email protected] + " minutes, ";
                    else if ([email protected] > 0)
                        [email protected]$ += [email protected] + " minute, ";
 
                    if ([email protected]_left > 1 || [email protected]_left == 0)
                        [email protected]$ += [email protected]_left + " seconds";
                    else if ([email protected]_left == 1)
                        [email protected]$ += [email protected]_left + " second";
 
                    if ([email protected] == 15 && [email protected]_left == 0 || [email protected] == 30 && [email protected]_left == 0 || [email protected] == 45 && [email protected]_left == 0)
                        dispbottom "[Hourly Reward System]: You spend a total of [" + [email protected]$ + "] playing.";
                }
            }
 
            if (#idle)
                break;
        }
    }
    end;
 
OnPCLogoutEvent:
    // BackUP online time
    if (BaseLevel >= .level)
    {
        if (@backup_time)
            #acctick = @backup_time;
    }
    end;
OnCheckPoints: 
	dispbottom "[Hourly Reward System]: You have a total of ["+ #HOURLYPOINTS +"] Hourly Points.",0xRRGGBB;
	end;
OnAtcommand:
    if (BaseLevel >= .level)
    {
        if (#idle)
        {
            [email protected]$ = "";
            [email protected] = @idle_time / 60;
            [email protected]_left = @idle_time - ([email protected] * 60);
 
            if ([email protected] > 1)
                [email protected]$ += [email protected] + " minutes, ";
            else if ([email protected] > 0)
                [email protected]$ += [email protected] + " minute, ";
 
            if ([email protected]_left > 1 || [email protected]_left == 0)
                [email protected]$ += [email protected]_left + " seconds";
            else if ([email protected]_left == 1)
                [email protected]$ += [email protected]_left + " second";
 
            dispbottom "[Hourly Reward System]: You been idle for " + [email protected]$ + ". Please relog again.",0xRRGGBB;
        }
        else
        {
            [email protected]_left = @backup_time;
            [email protected]$ = "";
            [email protected] = [email protected]_left / 60;
            [email protected]_left -= ([email protected] * 60);
 
            if ([email protected] > 1)
                [email protected]$ += [email protected] + " minutes, ";
            else if ([email protected] > 0)
                [email protected]$ += [email protected] + " minute, ";
 
            if ([email protected]_left > 1 || [email protected]_left == 0)
                [email protected]$ += [email protected]_left + " seconds";
            else if ([email protected]_left == 1)
                [email protected]$ += [email protected]_left + " second";
 
            dispbottom "[Hourly Reward System]: You have [" + [email protected]$ + "] left in able to gain a hourly points.",0xRRGGBB;
        }
    }
    end;
}



  

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.