Jump to content
  • 0

Request: daily reward npc script


Jelly

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  186
  • Reputation:   0
  • Joined:  01/08/12
  • Last Seen:  

Looking for daily reward npc script.

Like Eden Group NPC.

Thanks!

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  658
  • Reputation:   57
  • Joined:  11/20/11
  • Last Seen:  

Okay I made you a Script.

It's like this , the Player talks to the NPC and if he wants to redeem the items,he get's the items and after that he has to wait 24 Hours (1 Day or 86000 seconds ) until he is able to get the item again. You'll just have to edit the NPC Name , location and the Item ID and Item Amount under the Settings.

set .@rewname$,"[ Daily Reward ]";
set .rewardid,607;
set @rewardamount,10;

Change

set .@rewname$,"[ YOURNPCNAME ]";

Change

set .rewardid,YOUR ITEM WHICH IS GIVEN OUT ENTER THE ID HERE;

Change

set @rewardamount,THE AMOUNT OF THE ITEM WHICH IS GIVEN OUT;

Link to Script:

Pastebin.com : http://pastebin.com/1jGzVR1m

Codebox :

//====================== 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,149,191,5 script Daily Reward 911,{
//=========================== Settings ================================================================
set .@rewname$,"[ Daily Reward ]";
set .rewardid,607;
set @rewardamount,10;
//======================= Settings End ================================================================
//*****************************************************************************************************
if(gettimetick(2) - lastTimeTalked > (60 * 60 * 24)) {
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 .@rewname$;
getitem .rewardid,@rewardamount;
mes "Okay have fun with it!";
set lastTimeTalked,gettimetick(2);
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;
}

I hope this helped you!

Greetings ,

~ Rikimaru

Edited by Rikimaru
Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  186
  • Reputation:   0
  • Joined:  01/08/12
  • Last Seen:  

Looking for script...

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  69
  • Reputation:   2
  • Joined:  05/29/12
  • Last Seen:  

Can add more items?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   1
  • Joined:  01/07/12
  • Last Seen:  

You could do something like have your array of items to give or w.e reward you want, and just lock them out of it if they have voted in the last 24 hours ..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  186
  • Reputation:   0
  • Joined:  01/08/12
  • Last Seen:  

Thank you so much!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   0
  • Joined:  02/23/12
  • Last Seen:  

rikimaru this script is, per char or per id can claim daily reward?

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:  

rikimaru this script is, per char or per id can claim daily reward?

per char ,.....

if you want per account..

set #lastTimeTalked,gettimetick(2);

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   0
  • Joined:  02/23/12
  • Last Seen:  

thanx emistry

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   2
  • Joined:  07/24/12
  • Last Seen:  

rikimaru this script is, per char or per id can claim daily reward?

per char ,.....

if you want per account..

set #lastTimeTalked,gettimetick(2);

i did what emistry said but im still having per char not account

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   0
  • Joined:  07/24/12
  • Last Seen:  

rikimaru this script is, per char or per id can claim daily reward?

per char ,.....

if you want per account..

set #lastTimeTalked,gettimetick(2);

i did what emistry said but im still having per char not account

I did the same, but my players still can claim the rewards using different character from the same account.

Can some one help to make it into Per account?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  658
  • Reputation:   57
  • Joined:  11/20/11
  • Last Seen:  

Make sure to edit it to this :

This is important :

if(gettimetick(2) - #lastTimeTalked > (60 * 60 * 24)) {
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 .@rewname$;
getitem .rewardid,@rewardamount;
mes "Okay have fun with it!";
set #lastTimeTalked,gettimetick(2);
close;

So you have to edit that part to what I posted now :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   0
  • Joined:  07/24/12
  • Last Seen:  

I am familiar with programming but not so in RO C language yet. So what you mean now is the # sign made the difference?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Yes, script_commands.txt might help you.

#name - permanent local account integer variable

#name$ - permanent local account string variable

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   0
  • Joined:  07/24/12
  • Last Seen:  

Thanks for the info

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  658
  • Reputation:   57
  • Joined:  11/20/11
  • Last Seen:  

So,did you test if the Script works now?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   0
  • Joined:  07/24/12
  • Last Seen:  

Yes, I did. It works fine.

Great work. Thanks a lot

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