Jump to content
  • 0

Need Help to modification this script


crixxz

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  10/03/13
  • Last Seen:  

-	script	login_reward	-1,{
OnPCLoginEvent:
	.@pow = 1 << 10;
	.@todays = gettime(8);
	if ( #login_reward % .@pow == .@todays ) end;
	.@count = .reward_day;
	#login_reward = ( #login_reward &~ ( #login_reward % .@pow ) ) + .@todays + .@pow;
	.@count_day = ( #login_reward >> 10 ) % .@pow;
	if ( .@count_day % 7  == 0 ) {
		.@count += .reward_week;
		.@weekly_message$ = ( .@cond_ofthemonth ? ", " : " and " ) + .reward_week +" golds for being online a week";
	}
	if ( .@count_day % 31 == 0 ) {
		.@count += .reward_month;
		.@montly_message$ = " and " + .reward_month +" golds for being online a month";
	}
	getitem 969, .@count;
	dispbottom "Here your daily reward ! You got "+ .reward_day +" golds"+ .@weekly_message$ + .@montly_message$ +".";
	end;
OnInit:
	.reward_day = 2;// reward of the day : amount of gold
	.reward_week = 10;// reward of the week : amount of gold
	.reward_month = 35;// reward of the month : amount of gold
	end;
}

i got this script from http://rathena.org/board/topic/88005-how-to-make-this-account-based/?p=225329

this script get directly reward after login.

how to add 1 hour after login, just got a daily reward..?

thanks advance /no1

Edited by crixxz
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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


- script login_reward -1,{

OnPCLoginEvent:

addtimer 3600, strnpcinfo(3) + "::Onijnuionion";

end;

Onijnuionion:

.@pow = 1 << 10;

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  10/03/13
  • Last Seen:  

-	script	login_reward	-1,{
OnPCLoginEvent:
	addtimer 3600, strnpcinfo(3) + "::Onijnuionion";
	end;
Onijnuionion:
	.@pow = 1 << 10;

thanks for the answer, i will try it /lv/no1

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:  

I forgot addtimer need the timer in millisecs

addtimer 3600000, strnpcinfo(3) + "::Onijnuionion";// 1h
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   0
  • Joined:  10/03/13
  • Last Seen:  

 

I forgot addtimer need the timer in millisecs

addtimer 3600000, strnpcinfo(3) + "::Onijnuionion";// 1h

thanks Capuche, work perfectly /no1

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