Jump to content
  • 0

H> Daily Reward


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

Hello everyone can someone help me how to put a exact time cool down in this daily reward ,example when they talk to the npc they will  see the time left to claim another reward thanks in advance

Heres my Script:

//====================== rAthena Script ===============================================================
//=== Made by Rikimaru
//=== Topic Link : http://rathena.org/board/topic/58004-request-daily-reward-npc-script/
//==================== Information ====================================================================
//==== Daily Reward Script
//================= Version : =========================================================================
//=== V 1.1   Fixed a typo in the Script [ Rikimaru ]
//=== V 1.0   Finished Scripting the Daily Reward Script [ Rikimaru ]
//============== Credits : ============================================================================
//=== Credits to Rikimaru for the Daily Reward Script
//=== rAthena Profile Link : http://rathena.org/board/user/434-rikimaru/
//=====================================================================================================
//*************************************************************************
prontera,146,92,6    script    Daily Reward NPC    757,{
//=========================== Settings ================================================================
set .@rewname$,"[ Daily Reward ]";
set .rewardid,12744;
set @rewardamount,1;
//======================= Settings End ================================================================
//*****************************************************************************************************
if(gettimetick(2) > #lastTimeTalked) {
mes .@rewname$;
mes "Hello "+strcharinfo(0)+",I";
mes "am here to give you a daily";
mes "Reward. Do you want to have it?";
next;
switch(select("-Yes,sure!:-No,bye!:-Cancel")) {
case 1:
mes .@rewname$;
mes "Okay going to give you the item!";
next;
mes "Welcome...this is Daily gift...";
getitem 12987,2;
getitem 12263,2;
getitem 14606,2;
getitem 12264,2;
mes "Okay have fun with it!";
set #lastTimeTalked,gettimetick(2)+86400;
close;
case 2:
mes .@rewname$;
mes "Okay goodbye!";
close;
case 3:
close;
}
}
mes .@rewname$;
mes "Sorry you can get the";
mes "Reward again after ";
mes "24 Hours are over!";
close;
OnTimer0050:
        showscript "Daily Rewards", getnpcid(0);
        initnpctimer;
        end;
OnInit:
        initnpctimer;
        end;
}

// Duplicates
//============================================================
alberta,29,240,6    duplicate(Daily Reward NPC)    Daily Reward NPC#alb    757
aldebaran,145,118,4    duplicate(Daily Reward NPC)    Daily Reward NPC#ald    757
geffen,115,66,6    duplicate(Daily Reward NPC)    Daily Reward NPC#gef    757
morocc,156,102,6    duplicate(Daily Reward NPC)    Daily Reward NPC#mor    757
payon,184,104,4    duplicate(Daily Reward NPC)    Daily Reward NPC#pay    757
izlude,134,93,4    duplicate(Daily Reward NPC)    Daily Reward NPC#izl    757
payon,172,226,4    duplicate(Daily Reward NPC)    Daily Reward NPC#pay1    757
yuno,148,187,6    duplicate(Daily Reward NPC)    Daily Reward NPC#yun    757

 

Edited by Mael
Use codebox
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  241
  • Reputation:   18
  • Joined:  06/04/14
  • Last Seen:  

On 6/24/2021 at 6:43 PM, chadness said:

Hello everyone can someone help me how to put a exact time cool down in this daily reward ,example when they talk to the npc they will  see the time left to claim another reward thanks in advance

Heres my Script:


//====================== rAthena Script ===============================================================
//=== Made by Rikimaru
//=== Topic Link : http://rathena.org/board/topic/58004-request-daily-reward-npc-script/
//==================== Information ====================================================================
//==== Daily Reward Script
//================= Version : =========================================================================
//=== V 1.1   Fixed a typo in the Script [ Rikimaru ]
//=== V 1.0   Finished Scripting the Daily Reward Script [ Rikimaru ]
//============== Credits : ============================================================================
//=== Credits to Rikimaru for the Daily Reward Script
//=== rAthena Profile Link : http://rathena.org/board/user/434-rikimaru/
//=====================================================================================================
//*************************************************************************
prontera,146,92,6    script    Daily Reward NPC    757,{
//=========================== Settings ================================================================
set .@rewname$,"[ Daily Reward ]";
set .rewardid,12744;
set @rewardamount,1;
//======================= Settings End ================================================================
//*****************************************************************************************************
if(gettimetick(2) > #lastTimeTalked) {
mes .@rewname$;
mes "Hello "+strcharinfo(0)+",I";
mes "am here to give you a daily";
mes "Reward. Do you want to have it?";
next;
switch(select("-Yes,sure!:-No,bye!:-Cancel")) {
case 1:
mes .@rewname$;
mes "Okay going to give you the item!";
next;
mes "Welcome...this is Daily gift...";
getitem 12987,2;
getitem 12263,2;
getitem 14606,2;
getitem 12264,2;
mes "Okay have fun with it!";
set #lastTimeTalked,gettimetick(2)+86400;
close;
case 2:
mes .@rewname$;
mes "Okay goodbye!";
close;
case 3:
close;
}
}
mes .@rewname$;
mes "Sorry you can get the";
mes "Reward again after ";
mes "24 Hours are over!";
close;
OnTimer0050:
        showscript "Daily Rewards", getnpcid(0);
        initnpctimer;
        end;
OnInit:
        initnpctimer;
        end;
}

// Duplicates
//============================================================
alberta,29,240,6    duplicate(Daily Reward NPC)    Daily Reward NPC#alb    757
aldebaran,145,118,4    duplicate(Daily Reward NPC)    Daily Reward NPC#ald    757
geffen,115,66,6    duplicate(Daily Reward NPC)    Daily Reward NPC#gef    757
morocc,156,102,6    duplicate(Daily Reward NPC)    Daily Reward NPC#mor    757
payon,184,104,4    duplicate(Daily Reward NPC)    Daily Reward NPC#pay    757
izlude,134,93,4    duplicate(Daily Reward NPC)    Daily Reward NPC#izl    757
payon,172,226,4    duplicate(Daily Reward NPC)    Daily Reward NPC#pay1    757
yuno,148,187,6    duplicate(Daily Reward NPC)    Daily Reward NPC#yun    757

 

Using search bar is not prohibited.

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

9 hours ago, Ronald said:

Using search bar is not prohibited.

 

Thanks man problem solved in few edits

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  241
  • Reputation:   18
  • Joined:  06/04/14
  • Last Seen:  

3 hours ago, chadness said:

Thanks man problem solved in few edits

You're always welcome. Happy to be of help!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

13 minutes ago, Ronald said:

You're always welcome. Happy to be of help!

sometimes there not in the search bar ?

 

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