HelloKekette Posted September 13, 2013 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 36 Reputation: 0 Joined: 09/09/13 Last Seen: April 11, 2014 Share Posted September 13, 2013 Hi ! I'm looking a script for reward on connection. I looked for little and I just found npc which make that. Here is my little request: Each connexion give a bonus : - By day : 2 Gold - By week : 10 Gold - By Mounth : 35 Gold. I saw stolao and Emistry's script but .... too complicate for me xd I'm newbie in Scripting :s I fund this too : http://rathena.org/board/topic/86980-easy-custom-online-reward/#entry220541 I'm not sure if its a good start to my request... Special thanks to people who helps me Best regards ! ps : sorry for my bad english. im Polish ! Quote Link to comment Share on other sites More sharing options...
Capuche Posted September 18, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted September 18, 2013 - script login_reward -1,{ OnPCLoginEvent: .@pow = 1 << 10; .@todays = gettime(8); if ( login_reward % .@pow == .@todays ) end; .@count += .reward_day;// reward of the day login_reward = ( login_reward &~ ( login_reward % .@pow ) ) + .@todays + .@pow;// update day and count day +1 ; day/count day/check week/check month if ( login_reward != .@todays + .@pow ) {// login_reward was not empty .@count_day = ( login_reward >> 10 ) % .@pow; .@cond_ofthemonth = ( ( login_reward >> 30 ) % .@pow ) != ( .@count_day / 31 ); if ( ( ( login_reward >> 20 ) % .@pow ) != ( .@count_day / 7 ) ) { .@count += .reward_week; login_reward = login_reward + pow( 2,20 ); .@weekly_message$ = ( .@cond_ofthemonth ? ", " : " and " ) + .reward_week +" golds for being online a week"; } if ( .@cond_ofthemonth ) { .@count += .reward_month; login_reward = login_reward + pow( 2,30 ); .@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; } with the settings .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 Quote Link to comment Share on other sites More sharing options...
HelloKekette Posted September 19, 2013 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 36 Reputation: 0 Joined: 09/09/13 Last Seen: April 11, 2014 Author Share Posted September 19, 2013 Thanks ! Quote Link to comment Share on other sites More sharing options...
Question
HelloKekette
Hi !
I'm looking a script for reward on connection. I looked for little and I just found npc which make that. Here is my little request:
Each connexion give a bonus :
- By day : 2 Gold
- By week : 10 Gold
- By Mounth : 35 Gold.
I saw stolao and Emistry's script but .... too complicate for me xd I'm newbie in Scripting :s
I fund this too : http://rathena.org/board/topic/86980-easy-custom-online-reward/#entry220541
I'm not sure if its a good start to my request...
Special thanks to people who helps me
Best regards !
ps : sorry for my bad english. im Polish !
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.