Jump to content
  • 0

Hourly Points


Dev Blaze

Question


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  212
  • Reputation:   5
  • Joined:  01/24/12
  • Last Seen:  

Any idea?

Every Hour you get reward points
After 8 consecutive hours, rewarding will start all over again
Rewards without Voting Events Triggered
First Hour: 10 Rewards Points
Second Hour: 20 Reward Points
Third Hour: 30 Reward Points
Fourth Hour: 40 Reward Points
Fifth Hour: 50 Reward Points
Sixth Hour: 60 Reward Points
7th Hour: 70 Reward Points
8th Hour: 80 Reward Points

I thought this is script not working any posible script please help me.. thanks B)B)

//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= GorthexTiger modified by Nibi
//===== Current Version: =============================================
//= 1.0
//===== Compatible With: =============================================
//= Any eAthena Version
//===== Description: =================================================
//= Get Points every successful hours of gameplay, you cannot get
//= the points even if you miss a second or a minute. A player will
//= get a very big bonus if they played 3 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//===== Additional Comments: =========================================
//= You can modify the script to your liking.
//= The default points is Kafrapoints change it anyway if you like.
//= 1.1 = Check Chatting too
//= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
//= 1.3 = Corrected the current balance line on 12 Hours Consecutive
//====================================================================
-    script    hourlypoints    -1,{
//--Start of the Script
OnPCLoginEvent:
    addtimer .timer,"hourlypoints::OnPointGet";
    end;
    
OnPointGet:
    //while(checkvending() >= 1 || checkchatting() == 1 || checkidle()>=.dlimit) {
        //sleep2 .delay;
        //if(.@mes$=="")
            //dispbottom set(.@mes$,"The hourly points event haulted because you were vending, chatting, or idle.");
    //}
    set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt;
    dispbottom "You received "+.point_amt+" Reward Cash Points by staying ingame for 1 hour";
    dispbottom "Current Balance = "+#KAFRAPOINTS+" Reward Cash Points";
    set @consecutive_hour, @consecutive_hour + 1;

    //Check for 2 hours consecutive
    if(@consecutive_hour == 2) {
        set @consecutive_hour,0;
        set #KAFRAPOINTS, #KAFRAPOINTS + .2cpoint_amt;
        dispbottom "You received "+.2cpoint_amt+" Reward Cash Points due to playing for 2 consecutive hours";
        dispbottom "Current Balance = "+#KAFRAPOINTS+" Reward Cash Points";
    }
    addtimer .timer,"hourlypoints::OnPointGet";
    end;
    
    //Check for 3 hours consecutive
    if(@consecutive_hour == 3) {
        set @consecutive_hour,0;
        set #KAFRAPOINTS, #KAFRAPOINTS + .3cpoint_amt;
        dispbottom "You received "+.3cpoint_amt+" Reward Cash Points due to playing for 3 consecutive hours";
        dispbottom "Current Balance = "+#KAFRAPOINTS+" Reward Cash Points";
    }
    addtimer .timer,"hourlypoints::OnPointGet";
    end;
    
     //Check for 4 hours consecutive
    if(@consecutive_hour == 4) {
        set @consecutive_hour,0;
        set #KAFRAPOINTS, #KAFRAPOINTS + .4cpoint_amt;
        dispbottom "You received "+.4cpoint_amt+" Reward Cash Points due to playing for 4 consecutive hours";
        dispbottom "Current Balance = "+#KAFRAPOINTS+" Reward Cash Points";
    }
    addtimer .timer,"hourlypoints::OnPointGet";
    end;
    
    //Check for 5 hours consecutive
    if(@consecutive_hour == 5) {
        set @consecutive_hour,0;
        set #KAFRAPOINTS, #KAFRAPOINTS + .5cpoint_amt;
        dispbottom "You received "+.5cpoint_amt+" Reward Cash Points due to playing for 5 consecutive hours";
        dispbottom "Current Balance = "+#KAFRAPOINTS+" Reward Cash Points";
    }
    addtimer .timer,"hourlypoints::OnPointGet";
    end;
    
    //Check for 6 hours consecutive
    if(@consecutive_hour == 6) {
        set @consecutive_hour,0;
        set #KAFRAPOINTS, #KAFRAPOINTS + .6cpoint_amt;
        dispbottom "You received "+.6cpoint_amt+" Reward Cash Points due to playing for 6 consecutive hours";
        dispbottom "Current Balance = "+#KAFRAPOINTS+" Reward Cash Points";
    }
    addtimer .timer,"hourlypoints::OnPointGet";
    end;
    
    //Check for 7 hours consecutive
    if(@consecutive_hour == 7) {
        set @consecutive_hour,0;
        set #KAFRAPOINTS, #KAFRAPOINTS + .7cpoint_amt;
        dispbottom "You received "+.7cpoint_amt+" Reward Cash Points due to playing for 7 consecutive hours";
        dispbottom "Current Balance = "+#KAFRAPOINTS+" Reward Cash Points";
    }
    addtimer .timer,"hourlypoints::OnPointGet";
    end;
    
    //Check for 8 hours consecutive
    if(@consecutive_hour == 8) {
        set @consecutive_hour,0;
        set #KAFRAPOINTS, #KAFRAPOINTS + .8cpoint_amt;
        dispbottom "You received "+.8cpoint_amt+" Reward Cash Points due to playing for 8 consecutive hours";
        dispbottom "Current Balance = "+#KAFRAPOINTS+" Reward Cash Points";
    }
    addtimer .timer,"hourlypoints::OnPointGet";
    end;

OnInit:
    set .timer, 1000*60*60; //Timer in milliseconds.
    set .2cpoint_amt, 20; //Points gained for consecutive time online.
    set .3cpoint_amt, 30; //Points gained for consecutive time online.
    set .4cpoint_amt, 40; //Points gained for consecutive time online.
    set .5cpoint_amt, 50; //Points gained for consecutive time online.
    set .6cpoint_amt, 60; //Points gained for consecutive time online.
    set .7cpoint_amt, 70; //Points gained for consecutive time online.
    set .8cpoint_amt, 80; //Points gained for consecutive time online.    
    set .point_amt, 10; //Normal points gained.
    //set .delay, 1000; //Delay for idle re-check check.
    //set .dlimit, 60*5; //Stop points if afk greater then in seconds.
}

 

Edited by Akkarin
Put code into codebox instead of quotes.
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

On 4/21/2017 at 1:38 AM, Sour- said:

How/where to insert checkvending?

that script do not check vending, try this 

-	script	hourlypoints	-1,{
 
//--Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
   
OnTimer30000:
//Check if Vending (normal or @at)
if(checkvending() >= 1) {
    dispbottom "The hourly badge rewards has stopped because you were vending . Please relog if you wish to start again.";
    stopnpctimer;
    end;
}
 
OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
    set @minute,0;
    getitem 7859,1;
    dispbottom "You received 1 "+getitemname( 7859 )+" by staying ingame for 1 hour.";
    set @consecutive_hour, @consecutive_hour + 1;
    }
//Check for 12 hours consecutive
    if(@consecutive_hour == 5) {
    set @consecutive_hour,0;
    getitem 7859,5;
    dispbottom "You received 5 "+getitemname( 7859 )+" by staying ingame for consecutive of 5 hours.";
    }
stopnpctimer;
initnpctimer;
end;
 
}

 

On 4/23/2017 at 10:03 AM, pinyinhuo said:

Is it possible, you get an item instead points like tcgs or coins?

the script i have posted get you item only

change 7589 to whatever itemid you want to place 

  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  04/12/18
  • Last Seen:  

can i have like... set if stay at one place more than 1minute or afk cant get reward?

Edited by hanxian123
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   1
  • Joined:  10/09/18
  • Last Seen:  

// https://rathena.org/board/topic/108276-hourly-points/

-	script	hourly_point_main	-1,{
	
	OnInit:
		.npc_name$ = strnpcinfo(3);
		bindatcmd "check",.npc_name$+"::OnAtcommand";
		end;
		
	OnAtcommand:
		dispbottom "Accumulated "+#daily_minute_count;
		end;
		
	OnUpdate:
	if(checkvending() >= 1) {
	dispbottom "Vending is not allowed.";
	deltimer .npc_name$+"::OnUpdate";
	end;
}
		#daily_minute_count++;
		deltimer .npc_name$+"::OnUpdate";
		dispbottom "Accumulated "+#daily_minute_count+" minute(s)";
		switch ( #daily_minute_count ) {
			default:
				break;
			case 60: // 60 minutes
				#CASHPOINT += 10;
				getitem 7227,1;
				break;
			case 120: // 120 minutes
				#CASHPOINT += 20;
				getitem 7227,2;
				break;
			case 180: // 180 minutes
				#CASHPOINT += 30;
				getitem 7227,3;
				break;
			case 240: // 240 minutes
				#CASHPOINT += 40;
				getitem 7227,4;
				break;
			case 300: // 300 minutes
				#CASHPOINT += 50;
				getitem 7227,6;
				break;
			case 360: // 360 minutes
				#CASHPOINT += 60;
				getitem 7227,7;
				break;
			case 420: // 420 minutes
				#CASHPOINT += 70;
				getitem 7227,8;
				break;
			case 480: // 480 minutes
				#CASHPOINT += 80;
				getitem 7227,9;
				#daily_minute_count = 0; // reset.
				break;
		}
		
	OnPCLoginEvent:
		addtimer ( 60 * 1000 ), .npc_name$+"::OnUpdate";
		end;
}

Hi everyone ..

may i know why this script only rewarding the item " 7227 " but the #CASHPOINT reward is not working .. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   1
  • Joined:  08/03/13
  • Last Seen:  

Hi Guys,

 

Can anyone help me how to pause the timer when vending? Thanks!

// https://rathena.org/board/topic/108276-hourly-points/

-	script	hourly_point_main	-1,{
	
	OnInit:
		.npc_name$ = strnpcinfo(3);
		bindatcmd "check",.npc_name$+"::OnAtcommand";
		end;
		
	OnAtcommand:
		dispbottom "Accumulated "+#daily_minute_count;
		end;
		
	OnUpdate:
		#daily_minute_count++;
		deltimer .npc_name$+"::OnUpdate";
		//dispbottom "Accumulated "+#daily_minute_count+" minute(s)";
		switch ( #daily_minute_count ) {
			default:
				break;
			case 15: // 15 minutes
				#CASHPOINTS += 1;
				dispbottom "You received 1 CashPoint by staying ingame for 15 minutes.";
				dispbottom "Current Balance = "+#CASHPOINTS+" Cash Points";
				//getitem 512,2;
				break;
			case 30: // 30 minutes
				#CASHPOINTS += 1;
				dispbottom "You received 1 CashPoint by staying ingame for 30 minutes.";
				dispbottom "Current Balance = "+#CASHPOINTS+" Cash Points";
				//getitem 512,3;
				break;
			case 45: // 45 minutes
				#CASHPOINTS += 1;
				dispbottom "You received 1 CashPoint by staying ingame for 45 minutes.";
				dispbottom "Current Balance = "+#CASHPOINTS+" Cash Points";
				//getitem 512,4;
				break;
			case 60: // 60 minutes
				#CASHPOINTS += 2;
				dispbottom "You received 2 CashPoint by staying ingame for 60 minutes.";
				dispbottom "Current Balance = "+#CASHPOINTS+" Cash Points";
				//getitem 512,6;
				break;

}
		
	OnPCLoginEvent:
		addtimer ( 60 * 1000 ), .npc_name$+"::OnUpdate";
		end;
}

 

Edited by NumLock
Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  212
  • Reputation:   5
  • Joined:  01/24/12
  • Last Seen:  

Closed this thanks Fixed

Edited by Dev Blaze
  • Upvote 1
Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  42
  • Reputation:   2
  • Joined:  05/25/16
  • Last Seen:  

On 12/3/2016 at 6:13 PM, Emistry said:
 

How/where to insert checkvending?

Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  12/26/12
  • Last Seen:  

Is it possible, you get an item instead points like tcgs or coins?

Youre my savior @Cyro!

thanks!

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...