Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN2 SCRIPTS

- Jump to comments -
Name  Timestamp
Author  Ryne Anderson
Submitted / Updated  10-21-2006 / 11-22-2006
Category  Scripting routines
Type  Type - Time
Format  Code Only
Patch  1.00
Description
A timestamp routine - every PW needs one right? These timestamps have been tested on the NWN2 pre-release toolset and NWN2 MP Beta - so they should be accurate. Should someone find an issue with them, please let me know so I can fix it right away!

Also if you have any ideas for features you would like to see added, let me know. :).

The use of the script is fairly straightforward, call TimeStamp() when you want to get the current time (probably want to store this somewhere). You can compare timestamps to see if a certain amount of time has passed - i.e., a monster spawning 5 minutes after it has been defeated.
//------------------------------------------------------------------------------
--------
//Written by Ryne Anderson of the Bid for Transcendence: The Age of Knowledge PW team.
//http://www.age-of-knowledge.com/
//Feel free to duplicate or modify this code to your content.  But please be kind
//and give credit where credit is due =).
//
//Before calling TimeStamp() - make sure you have configured how many
//Minutes per hour your module is set up for (the default is 2).  To configure it
//simply call SetMinPerHour(xxx) once - a good place to do it is on the event 'On Module Load'
//*To see how many minutes/hour your module is set to, go to 
//View -> Module Properties -> Minutes Per Game Hour
//
//TimeStamp() usage
//Just call TimeStamp() when you want to store the current time of the module.
//To see if something occurred x minutes ago...
//1) Create a new timestamp 
//2) Retrieve the previously stored timestamp
//3) Subtract the previously stored timestamp from the new timestamp
//4) If the result is greater than x, then x minutes have passed.
//
//ex)
//int iMinutesPassed = 10;
//int iCurrentTime = TimeStamp();
//int iPreviousTime = GetLocalInt(GetModule(),"LastStoredTime");
//if(iCurrentTime - iPreviousTime >= iMinutesPassed)
//{
//		...do stuff here
//}
//Note : All time comparisons must be done in minutes.
//------------------------------------------------------------------------------
--------

Files

NameTypeSizeDownloads
bft_gen_timestamp.NSSbft_gen_timestamp.NSS
Submitted: 10-21-2006 / Last Updated: 10-23-2006
NSS7.31Kb345
V 1.1 - changed the default 'minutes / hour' setting to 2. Added a comment to the top to better explain how to set up the system.
SCORE OUT OF 10
10
1 votes
View Stats
Cast Your Vote!
Voting FAQ

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (2):

Posted by SorceressAshura at 2006-11-14 12:30:14    Voted 10.00 on 11/14/06
Great tool, thanks for explaning it to me Ryne. I can use this for scripts that are suppose to run once every hour. Or even work it into my weather system.
_________________________
AKA: GuardianofLore.

Interested in joining Rhydin's PW Staff?
Come make your dreams, a reality.

Posted by BFT|Ryne at 2006-10-22 21:10:38    
New version is in. There is only 1 timestamp function, but should work out great :).

You must be Logged In to post comments in this section.

10 - A Masterpiece, Genuinely Groundbreaking
9 - Outstanding, a Must Have
8 - Excellent, Recommended to Anyone
7 - Very Good, Deserves a Look
6 - Good, Qualified Recommendation
5 - Fair, Solid yet Unremarkable
4 - Some Merit, Requires Improvements
3 - Poor Execution, Potential Unrealized
2 - Very Little Appeal
1 - Not Recommended to Anyone

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Prefab Areas


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters