sader1992

Utility: sader's Hourly Rewards

Recommended Posts

sader's Hourly Rewards


//===== rAthena Script =======================================
//= saders Hourly Rewards
//===== By: ==================================================
//= Sader1992
//https://rathena.org/board/profile/30766-sader1992/
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: ===================================== 
//= rAthena Project
//https://rathena.org/board/files/file/ (this the first version there is no url yet)
//https://github.com/sader1992/sader_scripts
//===== Description: =========================================
//==== all the configuration are in the last
//==== support gepard / ip / or without them
//==== if you use ip/gepard sql will be used for that
//==== can add minimem level to get the rewards
//==== can change the time
//==== can ban the vending from the rewards (it will reset after relogin)
//==== can add rewards else then variable
//==== there is a shop npc for the variable
//==== you can make it only for vip
//==== can ban idle players for X time from the Hourly Rewards
//==== player can ban his char from getting the reward by @HourlyBan (it will reset after relogin)
//============================================================
//==== please send me a message if you find error
//==== if you like my work maybe consider support me at paypal
//==== [email protected]
//============================================================
//============================================================

after loading the script you will need to re login to the game

configuration In the last of the script

OnInit:
	.s_idle = 0; //	ban hourly rewards from idle players ? 0 no / 1 yes {if player didn't move for x time he wont get hourly reward}  , DEFAULT = 0
	.s_idle_time = 1800; //	this the time for idle in secend  , DEFAULT = 1800 (30 min)
	.s_vip = 0; //	1 = only for VIP / 0 = for everyone  , DEFAULT = 0
	.s_time = 3600000; //	1000 = 1 secend | 60000 = 1 min | 3600000 = 1 houre  , DEFAULT = 3600000 (1 hr)
	.s_hourly_level = 0; //	Minimam level to get the Houerly rewards / 0 = no minimem level  , DEFAULT 0
	.s_GePard_ip = 0; //	0 = no Gepard / 1 = Gepard / 2 = IP  , DEFAULT 0
	.s_vinding = 7; //	DEFAULT 7 / 0 = will give the reward even if vending / 1 = no normal vending / 2 = no @autotrade / 4 = no buyingstore | Example: if you want to ban normal vend and buying store you add the numbers 1+4=5
	query_logsql("CREATE TABLE IF NOT EXISTS `sader_variables_log` (`unique_id` INT( 11 ) UNSIGNED NOT NULL DEFAULT  '0',`ip` VARCHAR(100) NOT NULL,`variable` VARCHAR(32) NOT NULL, `index` INT NOT NULL, `value` INT NOT NULL,`account_id` INT NOT NULL,`char_id` INT NOT NULL,`char_name` VARCHAR(30) NOT NULL) ENGINE=MyISAM");
	bindatcmd("UnHourlyBan",strnpcinfo(3)+"::OnUnHourlyBan",99,99);
	bindatcmd("HourlyBan",strnpcinfo(3)+"::OnHourlyBan",0,99);
end;

Hourly_Rewads:
	//put the Hourly Rewards here
	#HourlyRewards += 1;
	//getitem 905,1; //	if you want to add items as reward you can add them here like that
	//getexp 10000,5000; //	if you wanna add exp as reward add them here like that
	//if(#Hourly_Rewads_Check == 5){getitem 905,1;} //	like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr
	//if(#Hourly_Rewads_Check >= 5){getitem 905,1;} //	like this you can add reward for Xhr and this reward will be given for that X in this example 5 mean that the player did pass 5hr or more
return;
}
prontera,151,171,5	pointshop	Hourly Rewards Shop	667,#HourlyRewards,901:1,902:10,903:15,904:1,905:200
//<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>,<ITEM_ID>:<PRICE>

 

for any error contact me plz

for faster update and fixes https://github.com/sader1992/sader_scripts

//==== if you like my work maybe consider support me at paypal
//==== [email protected]


  • Submitter
  • Submitted
    10/10/2017
  • Category
  • Video
  • Content Author
    sader1992

 

  • Upvote 2
  • Love 3
  • Like 1

Share this post


Link to post
Share on other sites

nice i just was looking for something like this and made by you more to be test, i gonna try download and test on some days, Thx! <3

  • Upvote 1

Share this post


Link to post
Share on other sites

v1.1 FIX Critical issue with gepard/ip and compatibility with my other scripts

i would suggest updating the script as soon as Passoble if you use ip or GePard Check

Share this post


Link to post
Share on other sites

Hello,

I want to confirmed..

Did this scripts included :

1. If player autotrade/vending, his reward will be pause or stop
2. Limit once per PC? To avoid player who multiple client abuse this script?
3. Giving points instead of rewards? Like every 1 hour got 1 points.. Then points can exchange with points reward shop?

Thank you for your script.. /no1 

Share this post


Link to post
Share on other sites
6 hours ago, rakuzas said:

1. If player autotrade/vending, his reward will be pause or stop
2. Limit once per PC? To avoid player who multiple client abuse this script?
3. Giving points instead of rewards? Like every 1 hour got 1 points.. Then points can exchange with points reward shop?

1 autotrading would be same as @HourlyBan you can change that by commenting the line 65 #Hourly_Ban = 1;

please see the configuration for 2 and 3

Share this post


Link to post
Share on other sites
9 hours ago, sader1992 said:

1 autotrading would be same as @HourlyBan you can change that by commenting the line 65 #Hourly_Ban = 1;

please see the configuration for 2 and 3

nice..

/no1

Thank you.. ^_^

Share this post


Link to post
Share on other sites

UpdatedMonday at 11:07 PM

Approve please

Edited by sader1992

Share this post


Link to post
Share on other sites

hello sir sader ..

i'm using your script and i want to ask some question >_<

in your screenshot, the shop for hourly rewards shows the hourly points player have, right? so people know how many points they have ..

but, when i'm using your script. on the shop it show nothing (only showing an items and price in zeny*even if we still need hourly points,not zeny to buy it*)  >_< ..

why is that? ..

The shop are still there and run perfectly, but we dont know how many points we already have >_<

please help..

thanks anyway ^-^ ..

Edited by amemachi

Share this post


Link to post
Share on other sites
On 10/30/2017 at 6:51 AM, amemachi said:

hello sir sader ..

i'm using your script and i want to ask some question >_<

in your screenshot, the shop for hourly rewards shows the hourly points player have, right? so people know how many points they have ..

but, when i'm using your script. on the shop it show nothing (only showing an items and price in zeny*even if we still need hourly points,not zeny to buy it*)  >_< ..

why is that? ..

The shop are still there and run perfectly, but we dont know how many points we already have >_<

please help..

thanks anyway ^-^ ..

the shop is point shop that use the variable

so even if it look like zeny in your server you would need hourly points to buy from it (unless you src edit your server)

for me in the screen shot i am using client 2017 however i did test it on the client 2015 and it show the variable but i didn't test it on older clients

for showing the amount for the players you can make a simple command script to tell the players how many pointss they have ( i will add it in the next update if i make an update for it)

like that

add this under OnInit:
	
	bindatcmd("MyHourlyPoints",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
	bindatcmd("MHP",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
	

and after some end; (THAT THE LINE START WITH IT WITHOUT <TAB> BEFORE IT) add

OnMyHourlyPoints:
	message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points .";
end;

by that by using the command @myhourlypoints or @mhp you will be message say to you how much you have Hourly Points

Edited by sader1992

Share this post


Link to post
Share on other sites
On 10/31/2017 at 6:02 PM, sader1992 said:

the shop is point shop that use the variable

so even if it look like zeny in your server you would need hourly points to buy from it (unless you src edit your server)

for me in the screen shot i am using client 2017 however i did test it on the client 2015 and it show the variable but i didn't test it on older clients

for showing the amount for the players you can make a simple command script to tell the players how many pointss they have ( i will add it in the next update if i make an update for it)

like that

add this under OnInit:
	
	bindatcmd("MyHourlyPoints",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
	bindatcmd("MHP",strnpcinfo(3)+"::OnMyHourlyPoints",0,99);
	

and after some end; (THAT THE LINE START WITH IT WITHOUT <TAB> BEFORE IT) add

OnMyHourlyPoints:
	message strcharinfo(0),"[Hourly Rewards]: You have " + #HourlyRewards + " Hourly Points .";
end;

by that by using the command @myhourlypoints or @mhp you will be message say to you how much you have Hourly Points

thank you very much sir ^_^ ..

  • Love 1

Share this post


Link to post
Share on other sites
35 minutes ago, Faeto said:

How do I load this in?

as any script

put the file in the npc folder and type the name in the script conf files

Share this post


Link to post
Share on other sites
1 hour ago, koloridjo said:

hello, @sader1992 can you add if VIP member get double point ?

under this

Hourly_Rewads:
	//put the Hourly Rewards here
	#HourlyRewards += 1;

add

	if(vip_status(VIP_STATUS_ACTIVE)){	//your vip exception
		#HourlyRewards += 1;	//extra points for vip
	}

 

Edited by sader1992

Share this post


Link to post
Share on other sites
17 hours ago, sader1992 said:

under this

Hourly_Rewads:
	//put the Hourly Rewards here
	#HourlyRewards += 1;

add

	if(vip_status(VIP_STATUS_ACTIVE)){	//your vip exception
		#HourlyRewards += 1;	//extra points for vip
	}

 

Thank you @sader1992 

Share this post


Link to post
Share on other sites

I would like to make that when the player leaves the game, time stops counting, and when it returns, the time goes back to where it stopped. For example, if the point is received every 1 hour, if the player leaves after 20 minutes, when he enters again, the time continues at 20 minutes, this way the player does not waste time if he needs to change char or disconnected .

Is it possible?

Share this post


Link to post
Share on other sites

How to make this continue the time even the character recon.

Share this post


Link to post
Share on other sites

just a suggestion if sader still supporting this release

 

image.png.a95fd6961b5a014296399da7c7c0a5f1.png

is it possible that if you dont have enough point the message appeared below should be "You dont have enough hourly points" or "You dont have enough points"?

Share this post


Link to post
Share on other sites
7 hours ago, Quesooo said:

just a suggestion if sader still supporting this release

 

image.png.a95fd6961b5a014296399da7c7c0a5f1.png

is it possible that if you dont have enough point the message appeared below should be "You dont have enough hourly points" or "You dont have enough points"?

this message is src side not script side so that can't be happening with a script

  • Upvote 1

Share this post


Link to post
Share on other sites

how to put sql query for this script?

Share this post


Link to post
Share on other sites

How to add the command to show how much time is left to win 1 point
example: @ presence (You are online 47 minutes ago)

Share this post


Link to post
Share on other sites

Hi @sader1992 i got this error how to fix this?

 

image.png.d1641f721aa30d4b0d291b6eb1682ebf.png

Thank you.

Share this post


Link to post
Share on other sites

coz you doesnt have gepard

its for gepard user, just disable feature last_unique_id

  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, melv0 said:

coz you doesnt have gepard

its for gepard user, just disable feature last_unique_id

thanks

Share this post


Link to post
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
Reply to this topic...

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

Loading...