Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-26-2006, 03:25 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
copylevel()

Could anyone give me a working example of it? Ive used this command in GS1 before, but for some reason I just couldnt get it to work yesterday (tried both GS1, GS2 with both a Weapon and a DB NPC).
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #2  
Old 05-26-2006, 04:53 PM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
copylevel("path/to/level","new/path/to/copy")

new/path/to/copy has to be a different folder than the first
ie:
copylevel("levels/onlinestartlocal.graal","levels/backup/onlinestartlocal.graal");
Reply With Quote
  #3  
Old 05-26-2006, 06:46 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Somewhere in the serversided part of the NPC System/Main:


NPC Code:

echo( "Copying level..");
copylevel( "levels/genlevel1.nw", "levels/generated/genlevel1.nw");



also tried

NPC Code:

echo( "Copying level..");
copylevel( "genlevel1.nw", "generated/genlevel1.nw");




Nothing worked, and the "Copying level.." text is shown on RC.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #4  
Old 05-30-2006, 02:07 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
*bump*

Still not working for me..
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #5  
Old 05-30-2006, 02:11 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
do you have savelevels=true in your serveroptions?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #6  
Old 05-30-2006, 03:16 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
savelevels=false

Changing to true.. now let me test if it works!


EDIT: Didnt work..
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #7  
Old 05-31-2006, 02:43 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
does the generated/ folder exist? That might be one of the reasons it's not working.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #8  
Old 05-31-2006, 07:03 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
savelevels=true is only for updateboard2.

There has to be a file already in the folder you are copying to.
Reply With Quote
  #9  
Old 05-31-2006, 02:08 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Warcaptain
savelevels=true is only for updateboard2.

There has to be a file already in the folder you are copying to.
There doesn't have to be a file in the directory for the directory to exist.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #10  
Old 05-31-2006, 08:59 PM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Quote:
Originally Posted by ApothiX
There doesn't have to be a file in the directory for the directory to exist.
The directory will exist in the file browser, but without a file in it it does not physically exist. The only function that makes new folders, to my knowlege, is savevars/lines. copylevel will NOT. You need a placeholder file, that takes up some form of space. ie: not a 0kb file.
Reply With Quote
  #11  
Old 05-31-2006, 09:17 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Warcaptain
The directory will exist in the file browser, but without a file in it it does not physically exist. The only function that makes new folders, to my knowlege, is savevars/lines. copylevel will NOT. You need a placeholder file, that takes up some form of space. ie: not a 0kb file.
That would be correct. Didnt work untill I put a file into the folder, and well - now it works.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #12  
Old 06-01-2006, 01:39 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Warcaptain
The directory will exist in the file browser, but without a file in it it does not physically exist. The only function that makes new folders, to my knowlege, is savevars/lines. copylevel will NOT. You need a placeholder file, that takes up some form of space. ie: not a 0kb file.
If you put a file in it originally, and then delete the file, the directory will still exist. Which is why it is handy to have the 'delete folder' option on RC2.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 10:16 PM.


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