Jump to content

Utility: Another Hourly Point System


Nyaniverse

Recommended Posts


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.02
  • Content Count:  51
  • Reputation:   34
  • Joined:  09/09/23
  • Last Seen:  

Here's my own version of an Hourly Point System

  • Simple and easy to configure
  • Makes use of Account Variable to track time
  • Records player's playtime every 5 minutes, allowing continuous tracking even if they log off in between*
  • Provides detailed time when they last received their reward/bonus/hourly point
  • Removes Vendors from the system automatically

No support will be provided, unless it's a bug issue.

/*
	Author: Nyani
	Version 1.0
	----------------------------------------------
	Playtime System
	----------------------------------------------
	Changelogs
	1.0 - Initial Release
	
*/

-	script	PlaytimeCount	-1,{
    end;
OnPCLoginEvent:
    //if(BaseLevel < 30) end;
	@starttime$ = gettimestr("%Y-%m-%d %H:%M:%S", 21);
    message  strcharinfo(0),"Playtime Point System is now enabled. Please note that vending will disqualify you from gaining points.";
	addtimer 300000,"PlaytimeCount::OnPointUpdate"; // 5 minutes
	dispbottom "Play Point System start time: "+@starttime$;
    dispbottom "[ "+#playtimepts+"0/60 ] minutes completed.";
end;
OnPointUpdate:
    if ( checkvending(strcharinfo(0)) == 2 ){
        dispbottom "You have been removed from the Playtime Point System. Please re-log to opt-in again.";
        deltimer strnpcinfo(3)+"::OnPointUpdate";
        end;
    }
    @playtime += 1;
    if(@playtime == 2){
		@playtime = 0;
        #playtimepts += 1;
        if(#playtimepts == 6){
            #playtimepts = 0;
			#YourPtsHere += 1;
            @playtime = 0;
            message strcharinfo(0),"[Playtime Points]: You have received your Playtime Reward at "+gettimestr("%Y-%m-%d %H:%M:%S", 21)+".";
			@prevtime$ = gettimestr("%Y-%m-%d %H:%M:%S", 21);
        }
    }
	deltimer "PlaytimeCount::OnPointUpdate";
	addtimer 300000,"PlaytimeCount::OnPointUpdate";
end;
OnPlaytimeCheck:
	dispbottom "Last Reward: "+@prevtime$;
	dispbottom "Minutes: "+#playtimepts+"0/60";
	dispbottom "Current points: "+#YourPtsHere;
end;
OnInit:
	bindatcmd "playtime",strnpcinfo(0)+"::OnPlaytimeCheck";
end;
}

 

  • Like 2
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
Reply to this topic...

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