Jelly Posted January 26, 2012 Posted January 26, 2012 Looking for daily reward npc script. Like Eden Group NPC. Thanks! Quote
1 Rikimaru Posted January 28, 2012 Posted January 28, 2012 (edited) 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 January 28, 2012 by Rikimaru Quote
master257 Posted January 26, 2012 Posted January 26, 2012 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 .. Quote
Onitsuka Posted May 15, 2012 Posted May 15, 2012 rikimaru this script is, per char or per id can claim daily reward? Quote
Emistry Posted May 15, 2012 Posted May 15, 2012 rikimaru this script is, per char or per id can claim daily reward? per char ,..... if you want per account.. set #lastTimeTalked,gettimetick(2); Quote
7en Posted July 27, 2012 Posted July 27, 2012 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 Quote
xRyusuke Posted July 30, 2012 Posted July 30, 2012 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? Quote
Rikimaru Posted July 30, 2012 Posted July 30, 2012 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 Quote
xRyusuke Posted July 30, 2012 Posted July 30, 2012 I am familiar with programming but not so in RO C language yet. So what you mean now is the # sign made the difference? Quote
Joseph Posted July 30, 2012 Posted July 30, 2012 Yes, script_commands.txt might help you. #name - permanent local account integer variable #name$ - permanent local account string variable Quote
xRyusuke Posted July 31, 2012 Posted July 31, 2012 Yes, I did. It works fine. Great work. Thanks a lot Quote
Question
Jelly
Looking for daily reward npc script.
Like Eden Group NPC.
Thanks!
17 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.