Jump to content
  • 0

May i request auto item giver every hour !


Lary

Question


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   3
  • Joined:  04/03/13
  • Last Seen:  

hello,

 

 

prontera,155,181,5	script	Sample	718,{
	set .Hour,24;
	if( #dailytimer < gettimetick(2) ) {
		mes "You have Gained a Daily Gift.";
		set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
		getitem 6101,1; //set the price here
	}else{
		set .@last,#dailytimer - gettimetick(2);
		set .@hour, .@last % ( 24 * 3600 ) / 3600;
		set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;
		set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;
		mes "You have to wait to get your next Daily Gift.";
		mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";
	}
	close;
}

 

 
 
c'd you plz edit this script in such a way, Players receive an item every hour as a gift.....
 
 
/thx  a Billion in Advance....
Edited by Capuche
Script in [Code]
Link to comment
Share on other sites

22 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


- script hourlygift -1,{

OnPCLoginEvent:

set .Hour,1;

if( #dailytimer < gettimetick(2) ) {

mes "You have Gained a Hourly Gift.";

set #dailytimer,gettimetick(2) + ( .Hour * 3600 );

getitem 6101,1; //set the price here

}else{

set .@last,#dailytimer - gettimetick(2);

set .@hour, .@last % ( 24 * 3600 ) / 3600;

set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;

set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;

mes "You have to wait to get your next Hourly Gift.";

mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";

}

close;

}

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  71
  • Reputation:   0
  • Joined:  05/13/16
  • Last Seen:  

Hi Anakid, 

 

Will this work to those people that are afk? If possible, I want to use your script but I need a little mod. I wish NOT to give any gift to the players that are on vending, chat, or afk. Is it possible?

Thanks!!!

Edited by geoffreypogi
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  71
  • Reputation:   0
  • Joined:  05/13/16
  • Last Seen:  

On 10/28/2013 at 7:50 AM, Patskie said:

Change : 


OnTimer60000:

to : 


OnTimer60000:
if ( checkidle() >= 5 ) end;

Hi Patskie,

 

where should I put this? I want to make sure that those IDLE people won't receive the gift. Thanks! 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  

Like this?;

-	script	dailygift	-1,{
set .Hour,24;

OnPCLoginEvent:
if( #dailytimer < gettimetick(2) ) {
mes "You have Gained a Daily Gift.";
set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
getitem 6101,1; //set the price here
}else{
set .@last,#dailytimer - gettimetick(2);
set .@hour, .@last % ( 24 * 3600 ) / 3600;
set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;
set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;
mes "You have to wait to get your next Daily Gift.";
mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";
}
close;
}
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

@Anakid

In your script the player get a gift everyday and A c e S p a d e ask to give a gift every hour.

 

Players receive an item every hour as a gift.....

Automatically or the player must click on the NPC to get the gift ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  

You can easily change the amount of hour in the script.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   3
  • Joined:  04/03/13
  • Last Seen:  

@Anakid

In your script the player get a gift everyday and A c e S p a d e ask to give a gift every hour.

 

Players receive an item every hour as a gift.....

Automatically or the player must click on the NPC to get the gift ?

Every hour automatically, when the player is online...

 

 

 

You can easily change the amount of hour in the script.

May i know how to do that ? Sry i am so noob at programming....Thanks a Billion in Advance...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  

You can only get the gift once every hour. If you relogged; it will only show the delay.

set .Hour,1;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   3
  • Joined:  04/03/13
  • Last Seen:  

You can only get the gift once every hour. If you relogged; it will only show the delay.

 

set .Hour,1;

dude, the script gives the item every time i login regardless of the timing interval, Plz help....Thanks

Edited by A c e S p a d e
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   3
  • Joined:  04/03/13
  • Last Seen:  

-	script	hourlygift	-1,{
OnPCLoginEvent:
set .Hour,1;
if( #dailytimer < gettimetick(2) ) {
mes "You have Gained a Hourly Gift.";
set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
getitem 6101,1; //set the price here
}else{
set .@last,#dailytimer - gettimetick(2);
set .@hour, .@last % ( 24 * 3600 ) / 3600;
set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;
set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;
mes "You have to wait to get your next Hourly Gift.";
mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";
}
close;
}

Perfect  /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   0
  • Joined:  08/20/13
  • Last Seen:  

ser can u help me.. because i use this script but not working..? can u help me please

//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= nostafu
//===== Current Version: =============================================
//= 1.3
//===== 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 12 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//====================================================================
- script hourlypoints -1,{
//--Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
OnTimer30000:
//Check if Vending (normal or @at)
if(checkvending() >= 1 || checkchatting() == 1) {
dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again.";
stopnpctimer;
end;
}
//Check if Idle
getmapxy( .@map$, .@x, .@y, 0 );
if(@map$ == .@map$ && @x == .@x && @y == .@y) {
set @afk, @afk + 1;
}
//If move timer resets
else {
set @afk, 0;
}
set @map$, .@map$; set @x, .@x; set @y, .@y;
//Idle Check for 5 Minutes
if(@afk == 10) {
dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
stopnpctimer;
end;
}
end;
OnTimer60000:
set @minute, @minute + 1;
dispbottom "You played "+@minute+" minutes.";
//Check for 1 Minute
if(@minute == 60){
   set @minute,0;
    set .@point_amt, 20; //Points to get every hour (default: 10)
    set #CASHPOINTS, #CASHPOINTS + .@point_amt;
    dispbottom "You received "+.@point_amt+" Cashpoints by staying ingame for 1 hour";
    dispbottom "Current Balance = "+#CASHPOINTS+" Cashpoints";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 12 hours consecutive
if(@consecutive_hour == 12) {
    set @consecutive_hour,0;
    set .@cpoint_amt, 100; //Points to get for 12 Consecutive hours (default: 50)
    set #CASHPOINTS, #CASHPOINTS + .@cpoint_amt;
    dispbottom "You receive "+.@cpoint_amt+" Cashpoints in playing for 12 consecutive hours";
    dispbottom "Current Balance = "+#CASHPOINTS+" Cashpoints";
}
stopnpctimer;
initnpctimer;
end;
}
//--End of the Script

 

 

Any one can edit this script?.. edit the cash point into TCG??? thanks a lot!

Edited by Emistry
changed to code bbcode.
Link to comment
Share on other sites


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

 set #CASHPOINTS, #CASHPOINTS + .@point_amt;

change to

getitem 722,.@point_amt;

and make your own topic next time !

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   0
  • Joined:  08/20/13
  • Last Seen:  

thankyou so much :) soryy... im new here ^_^ btw thanks again!



@sir emistry

how can i put the amount of the TCG?.. like 1 hr = 100 tcg 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

thankyou so much :) soryy... im new here ^_^ btw thanks again!

@sir emistry

how can i put the amount of the TCG?.. like 1 hr = 100 tcg 

Set the amount :

set .@point_amt, 20; //Points to get every hour (default: 10)
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  97
  • Reputation:   0
  • Joined:  02/11/13
  • Last Seen:  

-	script	hourlygift	-1,{
OnPCLoginEvent:
set .Hour,1;
if( #dailytimer < gettimetick(2) ) {
mes "You have Gained a Hourly Gift.";
set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
getitem 6101,1; //set the price here
}else{
set .@last,#dailytimer - gettimetick(2);
set .@hour, .@last % ( 24 * 3600 ) / 3600;
set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;
set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;
mes "You have to wait to get your next Hourly Gift.";
mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";
}
close;
}

 

 

even youre afk you will receive the reward right?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  116
  • Reputation:   4
  • Joined:  01/11/12
  • Last Seen:  

 

-	script	hourlygift	-1,{
OnPCLoginEvent:
set .Hour,1;
if( #dailytimer < gettimetick(2) ) {
mes "You have Gained a Hourly Gift.";
set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
getitem 6101,1; //set the price here
}else{
set .@last,#dailytimer - gettimetick(2);
set .@hour, .@last % ( 24 * 3600 ) / 3600;
set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;
set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;
mes "You have to wait to get your next Hourly Gift.";
mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";
}
close;
}

 

 

even youre afk you will receive the reward right?

 

it does not have idle check, so yeah.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  97
  • Reputation:   0
  • Joined:  02/11/13
  • Last Seen:  

Can someone put an idle check in this script? maybe 5 minutes? then you wont get the price :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Change : 

OnTimer60000:

to : 

OnTimer60000:
if ( checkidle() >= 5 ) end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  97
  • Reputation:   0
  • Joined:  02/11/13
  • Last Seen:  

Change : 

OnTimer60000:

to : 

OnTimer60000:
if ( checkidle() >= 5 ) end;

 

Thanks :3

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   0
  • Joined:  11/08/13
  • Last Seen:  

where do i put the on timer on what line? 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  11
  • Reputation:   0
  • Joined:  07/07/12
  • Last Seen:  

-	script	hourlygift	-1,{
OnPCLoginEvent:
set .Hour,1;
if( #dailytimer < gettimetick(2) ) {
mes "You have Gained a Hourly Gift.";
set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
getitem 6101,1; //set the price here
}else{
set .@last,#dailytimer - gettimetick(2);
set .@hour, .@last % ( 24 * 3600 ) / 3600;
set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;
set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;
mes "You have to wait to get your next Hourly Gift.";
mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";
}
close;
}

 

 

 
what if want to change the system of calculation becomes "how long they are online., if it is recorded in the database for 1hr him online., it will get the prize"

and apply multiples. eg 1hr got 605 items in increments of 1. then if they are online for 3 jam.maka will automatically receive 3item

This script will still run even if the character is not online time

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  06/02/14
  • Last Seen:  

 

Like this?;

-	script	dailygift	-1,{
set .Hour,24;

OnPCLoginEvent:
if( #dailytimer < gettimetick(2) ) {
mes "You have Gained a Daily Gift.";
set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
getitem 6101,1; //set the price here
}else{
set .@last,#dailytimer - gettimetick(2);
set .@hour, .@last % ( 24 * 3600 ) / 3600;
set .@min, .@last % ( 24 * 3600 ) % 3600 / 60;
set .@sec, .@last % ( 24 * 3600 ) % 3600 % 60;
mes "You have to wait to get your next Daily Gift.";
mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";
}
close;
}

 

sir anakid, i want to use this script, but i need a little modification,

i want to gift a daily gift for vending character or with command @autotrade

 

can you help me sir..

 

Billion of thanks from newbie

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