stydianx Posted October 28, 2012 Posted October 28, 2012 This NPC gives rewards to players every time they have played or stayed online for 2 hours.. Quote
Xhiro Posted October 29, 2012 Posted October 29, 2012 Isn't it the same as this? http://rathena.org/board/topic/73048-can-someone-confirm-this-hourly-points-system/ Quote
stydianx Posted October 29, 2012 Author Posted October 29, 2012 (edited) nice.. heres the script.. but can i change the currency? instead of kafra point or cash point, i want it to be silver coins. and a NPC where it can exchange the prizes. [color=#465584][font=Courier,]prontera,156,184,4 script kfbdskfsdkf 99,{[/font][/color] [color=#465584][font=Courier,]if ( @hourpointtick <= .tick ) {[/font][/color] [color=#465584][font=Courier,]mes "you need to be active for more than "+( ( .sleeploop/1000 * @hourpointtick ) /60 )+" minutes to get prize";[/font][/color] [color=#465584][font=Courier,]close;[/font][/color] [color=#465584][font=Courier,]}[/font][/color] [color=#465584][font=Courier,]mes "here is your reward";[/font][/color] [color=#465584][font=Courier,]getitem 501,1;[/font][/color] [color=#465584][font=Courier,]set @hourpointafk, 0;[/font][/color] [color=#465584][font=Courier,]set @hourpointtick, 0;[/font][/color] [color=#465584][font=Courier,]close2;[/font][/color] [color=#465584][font=Courier,]OnPCLoginEvent:[/font][/color] [color=#465584][font=Courier,]while(1) {[/font][/color] [color=#465584][font=Courier,]getmapxy .@map$, .@x, .@y, 0;[/font][/color] [color=#465584][font=Courier,]if ( .@map$ == @hourpointmap$ && .@x == @hourpointx && .@y == @hourpointy ||[/font][/color] [color=#465584][font=Courier,]checkvending() || checkchatting() ) {[/font][/color] [color=#465584][font=Courier,]set @hourpointafk, @hourpointafk +1 ;[/font][/color] [color=#465584][font=Courier,]if ( @hourpointafk >= .afk && @hourpointafk % .afk == 0 ) {[/font][/color] [color=#465584][font=Courier,]dispbottom "you have afk for "+( ( .sleeploop/1000 * @hourpointafk ) /60 )+" minutes";[/font][/color] [color=#465584][font=Courier,]set @hourpointtick, 0;[/font][/color] [color=#465584][font=Courier,]}[/font][/color] [color=#465584][font=Courier,]}[/font][/color] [color=#465584][font=Courier,]else {[/font][/color] [color=#465584][font=Courier,]set @hourpointafk, 0;[/font][/color] [color=#465584][font=Courier,]set @hourpointtick, @hourpointtick +1 ;[/font][/color] [color=#465584][font=Courier,]if ( @hourpointtick > .tick ) {[/font][/color] [color=#465584][font=Courier,]dispbottom "You have earn 1 kafra point. Please claim it from "+ strnpcinfo(1);[/font][/color] [color=#465584][font=Courier,]end;[/font][/color] [color=#465584][font=Courier,]}[/font][/color] [color=#465584][font=Courier,]}[/font][/color] [color=#465584][font=Courier,]set @hourpointmap$, .@map$; set @hourpointx, .@x; set @hourpointy, .@y;[/font][/color] [color=#465584][font=Courier,]sleep2 .sleeploop;[/font][/color] [color=#465584][font=Courier,]}[/font][/color] [color=#465584][font=Courier,]end; // shouldn't reach here anyway, just in case[/font][/color] [color=#465584][font=Courier,]OnInit:[/font][/color] [color=#465584][font=Courier,]set .sleeploop, 30000; // every 30 seconds[/font][/color] [color=#465584][font=Courier,]set .tick, 120; // loop 120 times of 30 seconds == 1 hour[/font][/color] [color=#465584][font=Courier,]set .afk, 10; // loop 10 times of 30 seconds = 5 minutes[/font][/color] [color=#465584][font=Courier,]}[/font][/color] Edited October 29, 2012 by stydianx Quote
Aya Posted October 29, 2012 Posted October 29, 2012 Use Emistry's Script. Fully working: http://pastebin.com/raw.php?i=Dt2sW00K // Find set #CASHPOINTS, #CASHPOINTS + 1; //Change get item #####,1 //itemID,qty Quote
stydianx Posted October 29, 2012 Author Posted October 29, 2012 this has an built in NPC right? Quote
Aya Posted October 30, 2012 Posted October 30, 2012 this has an built in NPC right? It doesn't have an NPc. Quote
stydianx Posted October 30, 2012 Author Posted October 30, 2012 okay.. i'll just make my own then Quote
cadz Posted October 30, 2012 Posted October 30, 2012 (edited) Use Emistry's Script. Fully working: http://pastebin.com/raw.php?i=Dt2sW00K is this with announcer? okay.. i'll just make my own then can you share the script? =D Edited October 30, 2012 by cadz Quote
Aya Posted October 30, 2012 Posted October 30, 2012 Use Emistry's Script. Fully working: http://pastebin.com/raw.php?i=Dt2sW00K is this with announcer? can you share the script? =D No announcer. But it will display at the bottom of your chat box. I mean the MESSAGE window. Quote
cadz Posted October 30, 2012 Posted October 30, 2012 Use Emistry's Script. Fully working: http://pastebin.com/raw.php?i=Dt2sW00K is this with announcer? can you share the script? =D No announcer. But it will display at the bottom of your chat box. I mean the MESSAGE window. do i need to put in sql? Quote
Aya Posted October 30, 2012 Posted October 30, 2012 Use Emistry's Script. Fully working: http://pastebin.com/raw.php?i=Dt2sW00K is this with announcer? can you share the script? =D No announcer. But it will display at the bottom of your chat box. I mean the MESSAGE window. do i need to put in sql? Nope. Quote
cadz Posted October 30, 2012 Posted October 30, 2012 can you help me with this? //Exit to Prontera 06guild_01,48,50,5 script exit 899,{ killmonster2; <<<<< not working i want to kill aall monster when your leaving the room when monster died no drop. warp "prontera.gat" ,155,176; } Quote
Ryokem Posted October 30, 2012 Posted October 30, 2012 can you help me with this? //Exit to Prontera 06guild_01,48,50,5 script exit 899,{ killmonster2; <<<<< not working i want to kill aall monster when your leaving the room when monster died no drop. warp "prontera.gat" ,155,176; } Kindly refer to this thread please: http://rathena.org/board/topic/73301-help-me-with-the-script/ Quote
Question
stydianx
This NPC gives rewards to players every time they have played or stayed online for 2 hours..
15 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.