Diss Posted July 7, 2013 Group: Members Topic Count: 67 Topics Per Day: 0.02 Content Count: 207 Reputation: 1 Joined: 05/01/13 Last Seen: July 23, 2016 Share Posted July 7, 2013 (edited) hi guys !! anyone can fix this script if can be the reward for this npc is random ex. gold, gold coin,etc //===== rAthena Script ======================================= //= Ai Daily Gold Giver //===== By: ================================================== //= Jupeto ( [email protected] ) //===== Current Version: ===================================== //= 1.0.0 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Earn guild points by taking quests either item or mob hunt //===== Additional Comments: ================================= // 1.0.0 Release //============================================================ prontera,156,182,2 script Daily Gold 54,{ function SYS_ConvertTime; set .@npcname$, "[Daily Gold]"; // NPC Name set .@itemid, 969; // Item ID to give ( 969 is Gold ) set .@itemamount, 20; // Amount of item to give set .@timdelay, 86400; // Time delay a user can get golds, 86400 is one day in seconds. mes .@npcname$; mes "Hello there."; mes "I am a special gold dealer, who will give you " + .@itemamount + " " + ( ( .@itemamount > 1 ) ? "pieces" : "piece" ) + " of " + getitemname( .@itemid ) + " once per day."; next; mes .@npcname$; mes "Would you like to get your free " + .@itemamount + " " + ( ( .@itemamount > 1 ) ? "pieces" : "piece" ) + " of " + getitemname( .@itemid ) + " now?"; next; if(select("Yes","No") == 2) { mes .@npcname$; mes "Ok, good bye then."; close; } if(TimedGold > gettimetick(2)) { mes .@npcname$; mes "I am sorry " + strcharinfo(0) + ", but you can only get " + .@itemamount + " " + ( ( .@itemamount > 1 ) ? "pieces" : "piece" ) + " of " + getitemname( .@itemid ) + " once per day."; next; mes .@npcname$; mes "You have to wait for " + SYS_ConvertTime( TimedGold - gettimetick(2) ) + " left"; close; } mes .@npcname$; mes "Ok, here goes!"; close2; getitem .@itemid,.@itemamount; set TimedGold, gettimetick(2) + .@timdelay; dispbottom "Daily Gold : Please be reminded that you may only get " + .@itemamount + " " + ( ( .@itemamount > 1 ) ? "pieces" : "piece" ) + " of " + getitemname( .@itemid ) + " once per day."; function SYS_ConvertTime { set @time, getarg( 0 ); set @time$, ""; set @days, @time / 86400; set @hours, ( @time / 3600 ) - ( @days * 24 ); set @minutes, ( @time / 60 ) - ( @days * 1440 ) - ( @hours * 60 ); set @seconds, @time % 60; set @seconds$, @seconds + " second" + ( ( @seconds < 2 ) ? "" : "s" ); set @minutes$, @minutes + " minute" + ( ( @minutes < 2 ) ? "" : "s" ); set @hours$, @hours + " hour" + ( ( @hours < 2 ) ? "" : "s" ); set @days$, @days + " day" + ( ( @days < 2 ) ? "" : "s" ); set @time$, @days$ + " " + @hours$ + " " + @minutes$ + " and " + @seconds$; return @time$; } } thanks in advance !! Edited July 7, 2013 by Capuche To Code Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 7, 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 July 7, 2013 Use F_RandMes function getitem callfunc( "F_RandMes", 3, 1101, 1201, 1501 ),.@itemamount; http://rathena.org/board/topic/78263-scripting-faqtipstricks/ for more infos Quote Link to comment Share on other sites More sharing options...
Diss Posted July 8, 2013 Group: Members Topic Count: 67 Topics Per Day: 0.02 Content Count: 207 Reputation: 1 Joined: 05/01/13 Last Seen: July 23, 2016 Author Share Posted July 8, 2013 Use F_RandMes function getitem callfunc( "F_RandMes", 3, 1101, 1201, 1501 ),.@itemamount; http://rathena.org/board/topic/78263-scripting-faqtipstricks/ for more infos thanks sir its work .. Quote Link to comment Share on other sites More sharing options...
Question
Diss
hi guys !! anyone can fix this script
if can be the reward for this npc is random ex. gold, gold coin,etc
thanks in advance !!
Edited by CapucheTo Code
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.