RyokoMVP Posted February 7, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 209 Reputation: 3 Joined: 11/28/11 Last Seen: May 2, 2019 Share Posted February 7, 2012 (edited) hello , i want request a script like this npc will spawn in prontera and count 1x / day if player click this npc... after player click npc will count the login sign in... and npc will display most TOP 10 Login Count... ( will show Nickname ) but for Admin , will show account_id and nickname 1 ID / 1 DAY GM Can Reset in game and only gm lv 99 can reset this npc... thanks b4 ^^ Edited February 7, 2012 by RyokoMVP Quote Link to comment Share on other sites More sharing options...
Peopleperson49 Posted February 7, 2012 Group: Members Topic Count: 219 Topics Per Day: 0.05 Content Count: 1181 Reputation: 141 Joined: 01/27/12 Last Seen: April 15 Share Posted February 7, 2012 I suggest you give a reward for clicking on the NPC! Give free blue potions or something that makes it worth it. Stick with simple useable items. Otherwise not everybody will take the time to click on it. However why not use a OnPCLoginEvent to count people. Below is a super SIMPLE of an example for you. I just made that out of my head so excuse its simplicity! Just add an interface NPC to it and make it store account names. - script AttendanceScript -1,{ OnPCLoginEvent: mes "Welcome back to WhateverRO!"; set $DailyLoginCount,$DailyLoginCount+1; end; } Here is a more modified version for you. It tracks the time and will only characters to be counted once. I also modified the first version to not use permanent server variable. By changing the variable you can make it only work once per account instead of once per character (like I currently have it). Peopleperson49 - script AttendanceScript -1,{ OnPCLoginEvent: dispbottom "Welcome back!"; dispbottom "Thanks your for playing WhateverRO!"; if (#LoginTracker>=gettimetick(2)) { set #DailyLoginCount,#DailyLoginCount+1; set #LoginTracker,gettimetick(2)+86400; end; } Quote Link to comment Share on other sites More sharing options...
llchrisll Posted February 8, 2012 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted February 8, 2012 - script AttendanceScript -1,{ OnPCLoginEvent: dispbottom "Welcome back!"; dispbottom "Thanks your for playing WhateverRO!"; if (#LoginTracker>=gettimetick(2)) { set #DailyLoginCount,#DailyLoginCount+1; set #LoginTracker,gettimetick(2)+86400; end; } I would change the if (#LoginTracker>=gettimetick(2)) { into if (#LoginTracker <= gettimetick(2)) { Attention at the ">=" from yours and "<=" from mine . Now think what could that mean ^^. If you can solve this, I'll give you a cookie . Regards, Chris Quote Link to comment Share on other sites More sharing options...
RyokoMVP Posted February 8, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 209 Reputation: 3 Joined: 11/28/11 Last Seen: May 2, 2019 Author Share Posted February 8, 2012 @chris & peopleperson49 thanks for help me , but im still need a NPC because i need people can see the list of top 10 players... and because the npc it's not easy to click...it will spawn in some place and need kill a few of monster to go there.... because every 1 month GM will reset the list of top ten and give a permanent custom wings reward to player ~_~ Quote Link to comment Share on other sites More sharing options...
Peopleperson49 Posted February 8, 2012 Group: Members Topic Count: 219 Topics Per Day: 0.05 Content Count: 1181 Reputation: 141 Joined: 01/27/12 Last Seen: April 15 Share Posted February 8, 2012 I see, you actually made it a game. However, if you change the >= it will make it only work less than 24 hours. So after 24 hours they can't click on it anymore. Basically it takes the current epoc time and adds 86,400 seconds to it. If you click again before that 86,400 seconds then it knows that 24 hours hasn't passed yet. By changing it then you are saying it has to be clicked before the 24 hours and once it is exceeded they cannot ever click on it again (because wont meet the <24 hour conditions). Atleast, thats how I picture it in my mind. Quote Link to comment Share on other sites More sharing options...
RyokoMVP Posted February 8, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 209 Reputation: 3 Joined: 11/28/11 Last Seen: May 2, 2019 Author Share Posted February 8, 2012 @people : so you can make a npc like that for me ? i need name display for top 10 clickers Quote Link to comment Share on other sites More sharing options...
Peopleperson49 Posted February 8, 2012 Group: Members Topic Count: 219 Topics Per Day: 0.05 Content Count: 1181 Reputation: 141 Joined: 01/27/12 Last Seen: April 15 Share Posted February 8, 2012 I could man, but I don't have time now. And I'm not really sure when I will. Try posting in the script request area for specific script. Peopleperson49 Quote Link to comment Share on other sites More sharing options...
llchrisll Posted February 8, 2012 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted February 8, 2012 (edited) However, if you change the >= it will make it only work less than 24 hours. So after 24 hours they can't click on it anymore. Basically it takes the current epoc time and adds 86,400 seconds to it. If you click again before that 86,400 seconds then it knows that 24 hours hasn't passed yet. By changing it then you are saying it has to be clicked before the 24 hours and once it is exceeded they cannot ever click on it again (because wont meet the <24 hour conditions). Atleast, thats how I picture it in my mind. Wtf? Let me ask you something.... What means ">=" for you? - script AttendanceScript -1,{ OnPCLoginEvent: dispbottom "Welcome back!"; dispbottom "Thanks your for playing WhateverRO!"; if (#LoginTracker>=gettimetick(2)) { set #DailyLoginCount,#DailyLoginCount+1; set #LoginTracker,gettimetick(2)+86400; end; } This will never work, escpecially on the first execution. Reason: The scripts checks for the value of "#LoginTracker", but since it's the first exection it has the value of "0". And gettimetick(2) gets the UNIX Time in seconds, which is obviously higher than 0. Hint: Read the doc/script_commands.txt for more info. Next explanation: The "#LoginTracker" only increases when the "if" is true, which can't happen (like stated above) and the gettimetick(2) ALWAYS continues to count the seconds. >= means Higher and equal <= means Less and equal Also to make tit an "clickable" NPC, try changing the header. Currently it's an floating NPC. Example: prontera,150,180,0%TAB%script%TAB%Login Tracker%TAB%100,{ I hope I could explain it properly. Regards, Chris Edited February 9, 2012 by llchrisll Quote Link to comment Share on other sites More sharing options...
RyokoMVP Posted February 12, 2012 Group: Members Topic Count: 37 Topics Per Day: 0.01 Content Count: 209 Reputation: 3 Joined: 11/28/11 Last Seen: May 2, 2019 Author Share Posted February 12, 2012 (edited) However, if you change the >= it will make it only work less than 24 hours. So after 24 hours they can't click on it anymore. Basically it takes the current epoc time and adds 86,400 seconds to it. If you click again before that 86,400 seconds then it knows that 24 hours hasn't passed yet. By changing it then you are saying it has to be clicked before the 24 hours and once it is exceeded they cannot ever click on it again (because wont meet the <24 hour conditions). Atleast, thats how I picture it in my mind. Wtf? Let me ask you something.... What means ">=" for you? - script AttendanceScript -1,{ OnPCLoginEvent: dispbottom "Welcome back!"; dispbottom "Thanks your for playing WhateverRO!"; if (#LoginTracker>=gettimetick(2)) { set #DailyLoginCount,#DailyLoginCount+1; set #LoginTracker,gettimetick(2)+86400; end; } This will never work, escpecially on the first execution. Reason: The scripts checks for the value of "#LoginTracker", but since it's the first exection it has the value of "0". And gettimetick(2) gets the UNIX Time in seconds, which is obviously higher than 0. Hint: Read the doc/script_commands.txt for more info. Next explanation: The "#LoginTracker" only increases when the "if" is true, which can't happen (like stated above) and the gettimetick(2) ALWAYS continues to count the seconds. >= means Higher and equal <= means Less and equal Also to make tit an "clickable" NPC, try changing the header. Currently it's an floating NPC. Example: prontera,150,180,0%TAB%script%TAB%Login Tracker%TAB%100,{ I hope I could explain it properly. Regards, Chris i already try...yes its work 100% and but i need if click all people can see top ten clickers list and admin have a reset menu o.O and btw where i can see who is click this npc ? and btw if i spam click npc will spam " welcome back , thanks for playing whatever ro " too no one can help me ? :'( Edited February 12, 2012 by Arcenciel Quote Link to comment Share on other sites More sharing options...
Question
RyokoMVP
hello , i want request a script like this
npc will spawn in prontera and count 1x / day if player click this npc...
after player click npc will count the login sign in...
and npc will display most TOP 10 Login Count... ( will show Nickname )
but for Admin , will show account_id and nickname
1 ID / 1 DAY
GM Can Reset in game and only gm lv 99 can reset this npc...
thanks b4 ^^
Edited by RyokoMVPLink to comment
Share on other sites
8 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.