Jump to content
  • 0

this hourly reward is not working ):


Kido

Question


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

here is the picture if the error ):

bwkJE2X.png

//=================================
?//= Created by -SkittleNugget-
//= Email : [email protected]
//=================================
//= Hourly Points Script.
//=================================
//= Version 1.2
//=================================
//= Notes:
//= 1.0 - Initial Working Script.
//- 1.1 - Removed messages.
//- 1.2 - Added Easy Changeable Options as Requested by "Lil Troll~" (rAthena)
//=================================
-	script	Hour_Reward_Points	-1,{

OnInit:
	set .TimeInMinutes,5; //Check at 5 Minutes
	set .WhatRewardHour,1; //Reward at 1 Hour
	set .ItemIDReward,12103; //Reward ID, 5012
	set .ItemRewardAmount,1; //Reward Amount
end;
	

OnPCLoginEvent: 
	dispbottom "Premio por Hora Online inicia, no te pognas AFK.";
	
while(1) //Must Leave it run constantly.
	{
		sleep2 60000*.TimeInMinutes; //5 Minutes == Will Check Players activity after this time in milliseconds.
		if ( checkidle() > 300) //Check if player has been active or not.
		{
			if ( checkvending() == 2 ) end; //Check if Auto Vending.
			while ( checkidle() > 1 ) //Pause count while player is inactive, also checks for activity.
				sleep2 1000;
		}
			else 
		{
			set .@ActiveTime, .@ActiveTime + .TimeInMinutes; //Count Total Time Active Within the hour.
			if ( .@ActiveTime == .WhatRewardHour ) //Player has been active for .WhatRewardHour throughout the login time.
			{
				mes "Por jugar mas de una hora continua has ganado un premio!.";
				close2;
				getitem .ItemIDReward,.ItemRewardAmount; //When Player has been active for One Hour
				set .@ActiveTime,0; //Reset Time Active.
			}
		}
	}
OnPCLogoutEvent:	
	end;
}

any idea D:?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   131
  • Joined:  11/10/12
  • Last Seen:  

check you script. there is a "?" in line 2.

here. I removed it

//=================================
//= Created by -SkittleNugget-
//= Email : [email protected]
//=================================
//= Hourly Points Script.
//=================================
//= Version 1.2
//=================================
//= Notes:
//= 1.0 - Initial Working Script.
//- 1.1 - Removed messages.
//- 1.2 - Added Easy Changeable Options as Requested by "Lil Troll~" (rAthena)
//=================================
-	script	Hour_Reward_Points	-1,{

OnInit:
	set .TimeInMinutes,5; //Check at 5 Minutes
	set .WhatRewardHour,1; //Reward at 1 Hour
	set .ItemIDReward,12103; //Reward ID, 5012
	set .ItemRewardAmount,1; //Reward Amount
end;
	

OnPCLoginEvent: 
	dispbottom "Premio por Hora Online inicia, no te pognas AFK.";
	
while(1) //Must Leave it run constantly.
	{
		sleep2 60000*.TimeInMinutes; //5 Minutes == Will Check Players activity after this time in milliseconds.
		if ( checkidle() > 300) //Check if player has been active or not.
		{
			if ( checkvending() == 2 ) end; //Check if Auto Vending.
			while ( checkidle() > 1 ) //Pause count while player is inactive, also checks for activity.
				sleep2 1000;
		}
			else 
		{
			set .@ActiveTime, .@ActiveTime + .TimeInMinutes; //Count Total Time Active Within the hour.
			if ( .@ActiveTime == .WhatRewardHour ) //Player has been active for .WhatRewardHour throughout the login time.
			{
				mes "Por jugar mas de una hora continua has ganado un premio!.";
				close2;
				getitem .ItemIDReward,.ItemRewardAmount; //When Player has been active for One Hour
				set .@ActiveTime,0; //Reset Time Active.
			}
		}
	}
OnPCLogoutEvent:	
	end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

yeah i noticed too and i delete it but the problem persist ):

ekISXnL.png

 

//=================================
//= Created by -SkittleNugget-
//= Email : [email protected]
//=================================
//= Hourly Points Script.
//=================================
//= Version 1.2
//=================================
//= Notes:
//= 1.0 - Initial Working Script.
//- 1.1 - Removed messages.
//- 1.2 - Added Easy Changeable Options as Requested by "Lil Troll~" (rAthena)
//=================================
-	script	Hourly	-1,{

OnInit:
	set .TimeInMinutes,5; //Check at 5 Minutes
	set .WhatRewardHour,1; //Reward at 1 Hour
	set .ItemIDReward,12103; //Reward ID, 5012
	set .ItemRewardAmount,1; //Reward Amount
end;
	

OnPCLoginEvent: 
	dispbottom "Premio por Hora Online inicia, no te pognas AFK.";
	
while(1) //Must Leave it run constantly.
	{
		sleep2 60000*.TimeInMinutes; //5 Minutes == Will Check Players activity after this time in milliseconds.
		if ( checkidle() > 300) //Check if player has been active or not.
		{
			if ( checkvending() == 2 ) end; //Check if Auto Vending.
			while ( checkidle() > 1 ) //Pause count while player is inactive, also checks for activity.
				sleep2 1000;
		}
			else 
		{
			set .@ActiveTime, .@ActiveTime + .TimeInMinutes; //Count Total Time Active Within the hour.
			if ( .@ActiveTime == .WhatRewardHour ) //Player has been active for .WhatRewardHour throughout the login time.
			{
				mes "Por jugar mas de una hora continua has ganado un premio!.";
				close2;
				getitem .ItemIDReward,.ItemRewardAmount; //When Player has been active for One Hour
				set .@ActiveTime,0; //Reset Time Active.
			}
		}
	}
OnPCLogoutEvent:	
	end;
}

i still dont know why D:!

 

Edit:

now working! i had to delete the existing .txt and create a new one without the "?" thing at the start and then worked, thank you so much!

Edited by Kido
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   131
  • Joined:  11/10/12
  • Last Seen:  

try to make a new txt file and transfer my edit to that.i have no errors.tried it. :)

or here

test.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

thanks! already did it, check my edit :D!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

ow my players say that is not giving any reward ): i tested it and it is not giving D:!

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