Jump to content
  • 0

Script that logs player's total time played since first login..


Meister

Question


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

Requesting a script that logs player's total time played since first login and..

a script that records the time of the player played for his/her first login of the day.. and for every hour item will be given to him.. and when 24 hours or past or when he/she logouts and already 24 hours has past since his first login. the log will be removed then and it will be used again for the same mechanics.. Thanks!

Edited by emong
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

search for the hourly point script in script release section ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

http://pastebin.com/raw.php?i=84tP3D9k -- is this the one emistry?

what if I like to add this twist..

OnPCLoginEvent:

for his first hour.. 1 tcg

and 2nd hour 1 tcg

the no. of hours will count as ..

1-2-4-8-16-32- (multiplier by 2) and when it reach 24 hours.. it will announce "Holy Fudge! You've been online for a day now!"

every check in time it will give 1 TCG but for 24 hours it will give 100 cash points.. can you edit it to that one?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try this.

OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
   set @minute,0;
   set #consecutive_hour, #consecutive_hour + 1;
// Every 2 Hours
if( #consecutive_hour % 2 == 0 ){
 getitem 7227,1;
 dispbottom "Gain 1 TCG for every 2 Hours online.";
}
if( #consecutive_hour % 24 == 0 ){
 announce "You have online for 24 hours.",bc_self;
 set #CASHPOINTS,#CASHPOINTS + 100;
 dispbottom "Gain 100 Cash Points. Total : "+#CASHPOINTS;
}
}
stopnpctimer;
initnpctimer

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  12/20/11
  • Last Seen:  

is the vendor counted? because if yes it will exploit the cash points

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

read inside the script ...

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  10/31/12
  • Last Seen:  

what if the player is in @afk mode?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

what if the player is in @afk mode?


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

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...