Timer
There's a couple ways it can be done.
The first would be linear time using the characters .createdat member.
Using the difference between that and POLCore().systime you could determine the age.
Another way is to track accumulated online time when the person logs on and off. That would require a custom property.
The first would be linear time using the characters .createdat member.
Using the difference between that and POLCore().systime you could determine the age.
Another way is to track accumulated online time when the person logs on and off. That would require a custom property.
Will this help me.
CWO is going to kill me, I loved his newbie dungeon and I am trying to make my stone recognize player age. 
Code: Select all
use uo;
program textcmd_age( who )
var utime := ReadGameClock() - GetObjProperty(who,"logontime");
var dtime := GetObjProperty(who, "onlinetimer")+utime;
if( !dtime )
dtime := 0;
endif
SendSysMessage( who, "Total Online Age: " + dtime, color := 65 );
endprogram
Here is the code for my stone.
Code: Select all
use os;
use uo;
program item_ndstone( who )
var utime := ReadGameClock() - GetObjProperty(who,"logontime");
var dtime := GetObjProperty(who, "onlinetimer")+utime;
if( !dtime )
dtime := 0;
endif
if(dtime <= 36000)
who.frozen := 1;
SendSysMessage( who, "You are granted permision to enter. Now wait.", color := 65 );
Sleep( 15 );
MoveCharacterToLocation( who, 5998, 1472, 0 );
who.frozen := 0;
//SendSysMessage( who, "It works!", color := 65 );
else
SendSysMessage( who, "You are to old to enter. Be gone!", color := 65 );
endif
endprogram