MelMel Posted May 8, 2013 Posted May 8, 2013 Hello rathena, can i please request for a script that work like this: a npc that will only reward the player item id ex:9189 every one hour if they click them and if it's not time yet they wont get the item even if they click the npc. and same account character will not be able to get the item from the npc if they already get. i really want them to click it to be able to get the item not automaticly like hourly point or hourly rewards. thanks in advance Quote
1 Capuche Posted May 9, 2013 Posted May 9, 2013 and same account character will not be able to get the item from the npc if they already get. i really want them to click it to be able to get the item not automaticly like hourly point or hourly rewards. // ~~~~~ show time left in days, hours, minutes and seconds ~~~~~ function script timeleft__ { if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; if ( .@day ) return .@day +" day "+ .@hour +" hour"; else if ( .@hour ) return .@hour +" hour "+ .@min +" min"; else if ( .@min ) return .@min +" min "+ .@sec +" sec"; else return .@sec +" sec"; } prontera,150,165,5 script Hourly reward 87,{ if ( #hourly_timer > gettimetick(2) ) { mes "You must wait "+ callfunc( "timeleft__", #hourly_timer - gettimetick(2) ) +"."; close; } mes "Here your hourly Item : x"+ .item_amount +" ^ff0000"+ getitemname( .item_ID ); getitem .item_ID, .item_amount; #hourly_timer = gettimetick(2) + 3600; close; OnInit: .item_ID = 501; .item_amount = 1; end; } 1 Quote
-1 zodiacro Posted December 11, 2018 Posted December 11, 2018 On 5/9/2013 at 1:25 AM, icabit said: try my attachment i got this script way back in eathena days xD works like a charm for me it automatically gives the player the item I tried it but it shown error [Error]: quest_add: quest 61000 not found in DB. [Debug]: Source (NPC): Hourly at prontera (159,187) [Debug]: Function: setquest (1 parameter): [Debug]: Data: number value=61000 [Error]: quest_add: quest 61000 not found in DB. [Debug]: Source (NPC): Hourly at prontera (159,187) [Debug]: Function: setquest (1 parameter): [Debug]: Data: number value=61000 [Error]: quest_add: quest 61000 not found in DB. [Debug]: Source (NPC): Hourly at prontera (159,187) [Debug]: Function: setquest (1 parameter): [Debug]: Data: number value=61000 [Error]: quest_add: quest 61000 not found in DB. [Debug]: Source (NPC): Hourly at prontera (159,187) [Debug]: Function: setquest (1 parameter): [Debug]: Data: number value=61000 Quote
MelMel Posted May 8, 2013 Author Posted May 8, 2013 (edited) · Hidden by Capuche, May 9, 2013 - Duplicate post Hidden by Capuche, May 9, 2013 - Duplicate post sorry double post... please erase this. very sorry Edited May 8, 2013 by MelMel
icabit Posted May 8, 2013 Posted May 8, 2013 (edited) try my attachment i got this script way back in eathena days xD works like a charm for me it automatically gives the player the item Edited May 8, 2013 by icabit Quote
Jaburak Posted May 8, 2013 Posted May 8, 2013 Try this; - script hourlypoints -1,{ //--Start of the Script OnPCLoginEvent: attachnpctimer ""+strcharinfo(0)+""; initnpctimer; end; OnTimer30000: //Check if Vending (normal or @at) if(checkvending() >= 1 || checkchatting() == 1) { dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again."; stopnpctimer; end; } //Check if Idle getmapxy( .@map$, .@x, .@y, 0 ); if(@map$ == .@map$ && @x == .@x && @y == .@y) { set @afk, @afk + 1; } //If move timer resets else { set @afk, 0; } set @map$, .@map$; set @x, .@x; set @y, .@y; //Idle Check for 5 Minutes if(@afk == 5) { dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again."; stopnpctimer; end; } end; OnTimer60000: set @minute, @minute + 1; //Check for 1 Minute if(@minute == 60){ set @minute,0; set hourlypoints,hourlypoints+10; dispbottom "You received 10 Hourly Points by staying ingame for 1 hour"; } //Check for 12 hours consecutive if(@consecutive_hour == 6) { set @consecutive_hour,0; set hourlypoints,hourlypoints+10; dispbottom "You received 10 Hourly Points by staying ingame for consecutive of 6 hour"; } stopnpctimer; initnpctimer; end; } prontera,200,180,1 script Hourly Points Trader 106,{ mes "Do you really want to trade your Points?"; menu "Yes",-,"No",Lno; next; if(pvppoints < 10) goto Lnenough; mes "Here you go!"; set pvppoints,pvppoints-10; getitem 7227,100; close; Lnenough: mes "You do not have enough ^008800Hourly Points^000000."; close; Lno: mes "Please decide."; close; } Quote
syndrome93 Posted October 3, 2013 Posted October 3, 2013 .. this work in rAthena only.. when i use eAthena version it does'nt work.. how? Quote
Lil Troll Posted October 3, 2013 Posted October 3, 2013 (edited) .. Try this: prontera,150,165,5 script Hourly reward 87,{ if ( #hourly_timer > gettimetick(2) ) { mes "You must wait "+ callfunc( "timeleft__",#hourly_timer-gettimetick(2) ) +"."; close; } mes "Here your hourly Item : x"+ .item_amount +" ^ff0000"+ getitemname( .item_ID ); getitem .item_ID, .item_amount; set #hourly_timer,gettimetick(2)+3600; close; OnInit: set .item_ID,501; set .item_amount,1; end; } Edited October 4, 2013 by Capuche Remove long evil quote to make the topic more readable Quote
syndrome93 Posted October 4, 2013 Posted October 4, 2013 (edited) ... still didn't work ... Edited October 4, 2013 by Capuche Remove long evil quote to make the topic more readable Quote
Capuche Posted October 4, 2013 Posted October 4, 2013 You must change the synthax in the function http://rathena.org/wiki/Set Quote
syndrome93 Posted October 5, 2013 Posted October 5, 2013 You must change the synthax in the function http://rathena.org/wiki/Set can you make that script for me please? because i'm nubie in script.. T_T i want player to click the NPC and the npc Give the reward for player every 5 minutes.. here's my script.. work in rAthena but didn't work in eAthena.. // ~~~~~ show time left in days, hours, minutes and seconds ~~~~~ function script timeleft__ { if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; if ( .@day ) return .@day +" day "+ .@hour +" hour"; else if ( .@hour ) return .@hour +" hour "+ .@min +" min"; else if ( .@min ) return .@min +" min "+ .@sec +" sec"; else return .@sec +" sec"; } ra_temple,109,147,5 script Hourly Reward 1247,{ if ( #hourly_timer > gettimetick(2) ) { mes "You must wait "+ callfunc( "timeleft__", #hourly_timer - gettimetick(2) ) +"."; close; } mes "Thanks For Coming :)"; announce ""+strcharinfo(0)+" Telah Mengambil Reward Hourly",bc_all| bc_white; getitem 19999,1; // Die RO Sign getitem 675,1; // Mitrhil Coin #hourly_timer = gettimetick(2) + 300; close; end; } Quote
Capuche Posted October 5, 2013 Posted October 5, 2013 Even a newbie can make this change... you're just lazy. function script timeleft__ { set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; if ( .@day ) return .@day +" day "+ .@hour +" hour"; else if ( .@hour ) return .@hour +" hour "+ .@min +" min"; else if ( .@min ) return .@min +" min "+ .@sec +" sec"; else return .@sec +" sec"; } prontera,150,165,5 script Hourly reward 87,{ if ( #hourly_timer > gettimetick(2) ) { mes "You must wait "+ callfunc( "timeleft__", #hourly_timer - gettimetick(2) ) +"."; close; } mes "Thanks For Coming :)"; announce ""+strcharinfo(0)+" Telah Mengambil Reward Hourly",bc_all| bc_white; getitem 19999,1; // Die RO Sign getitem 675,1; // Mitrhil Coin set #hourly_timer, gettimetick(2) + 300; close; OnInit: set .item_ID, 501; set .item_amount, 1; end; } Quote
Question
MelMel
Hello rathena,
can i please request for a script that work like this:
a npc that will only reward the player item id ex:9189 every one hour if they click them
and if it's not time yet they wont get the item even if they click the npc.
and same account character will not be able to get the item from the npc if they already get.
i really want them to click it to be able to get the item not automaticly like hourly point or hourly rewards.
thanks in advance
13 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.