Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-01-2005, 11:45 AM
hotrian hotrian is offline
Who?
Join Date: May 2003
Location: Eatonville, Washington, 98328
Posts: 56
hotrian is on a distinguished road
Send a message via AIM to hotrian Send a message via MSN to hotrian
Question Level doesnt exist check?

NPC Code:
   
copylevel orilevel.nw,folder/newlevel.nw; Copies orilevel.nw to folder/newlevel.nw
deletelevel level.nw; deletes level.nw



To reduce lag it would make sence to delete a copied level
Im sure that G2K2 doesnt have 10000 Dungeon levels
It would make sence to " if {playerscount<1} deletelevel #L; "

But then if I logged out then logged back in, the level would be gone

Is there a way to detect if the player is on a level that doesnt exist?
Sence if you log onto a level that has been deleted
it stops at "loading player attributes"

(Yes i do know that those commands are serverside...)

-Edit
I suppose it could also be done by checking who was in the level
then checking if they are all online or not
and like rechecking every 30 seconds or something

Last edited by hotrian; 08-01-2005 at 12:29 PM..
Reply With Quote
  #2  
Old 08-01-2005, 07:35 PM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
Save the accounts of the players in the instance (copied levels) to a string in a database NPC when they enter. When they leave, make it remove them from the string. Every hour, make the DB go through the list of instances. If an instance's string is empty, it deletes that instance.
Reply With Quote
  #3  
Old 08-03-2005, 03:50 PM
hotrian hotrian is offline
Who?
Join Date: May 2003
Location: Eatonville, Washington, 98328
Posts: 56
hotrian is on a distinguished road
Send a message via AIM to hotrian Send a message via MSN to hotrian
That works too lol
Reply With Quote
  #4  
Old 08-03-2005, 04:01 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
levelexists() in GScript2.
Reply With Quote
  #5  
Old 08-03-2005, 07:01 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally Posted by Rick
levelexists() in GScript2.
I thought it did in gscript1?
Reply With Quote
  #6  
Old 08-04-2005, 06:00 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
Quote:
Originally Posted by Python523
I thought it did in gscript1?
I don't know, hence I said GScript2.
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 08:32 PM.


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