Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-18-2007, 03:34 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Does what it should do, but not too impressive.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #2  
Old 02-18-2007, 05:52 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by contiga View Post
Does what it should do, but not too impressive.
I only wrote it up because someone on this forum needed it. If you think it can be done better, then by all means go ahead.
__________________
Reply With Quote
  #3  
Old 02-20-2007, 01:06 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
I am bumbing this because I made an error in the getUTC, that caused an addition/subtraction of a day in the getUTC function.
The code needs to be replaced with:
PHP Code:
function getUTC(year,month,day,hour,minutes,seconds) {
  
// Given the year, month, day, hour, minutes, and seconds
  // It will return the UTC var (Unix standard time)
  // IE: the number of seconds since Jan 1st, 1970
  // IE timevar2 in graal.
  
year -= 1601;
  
sendtorc(isLeapYear(yearSPC isLeapYear(temp.year2));
  
temp.days int(year/400) - int(year/100) + int(year/4) + year 365;
  
temp.daysinmonth = {31,28 isLeapYear(year+1),31,30,31,30,31,31,30,31,30,31};
  for(
i=0;i<month-1;i++)
    
temp.days += temp.daysinmonth[i];
  
temp.days += day 134775;
  return 
temp.days 86400 hour 3600 minutes 60 seconds;

Apparently I cannot edit my original post anymore.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.