Jump to content
  • 0

Request Login Count


RyokoMVP

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

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 RyokoMVP
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

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;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

- 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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

@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 ~_~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

@people : so you can make a npc like that for me ? i need name display for top 10 clickers

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

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 by llchrisll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

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 by Arcenciel
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...