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 09-12-2009, 04:49 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
CopyLevel() help

well, i have done copylevel() before and it worked but now that i tried to use it again, it won't work.

Weapon:
PHP Code:
function onCreated() {
  
copylevel"test.nw""insides/test_" player.account ".nw" );
  
with findplayer"Deas_Voice" ) ) {
    
setlevel2"test_" player.account ".nw"player.xplayer.y);
  }

FolderConfig:
NPC Code:
level  insides/*.nw



NPC-Server Folder Rights:
NPC Code:
r levels/*.nw
rw levels/insides/*.nw



..and yes, insides/ does exists, it have 1 level inside it already.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #2  
Old 09-12-2009, 04:59 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
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
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
onCreated() on serverside is an event that doesn't have a player scope, and since you're trying to read 'player.account' in it, it reads it as '0'.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #3  
Old 09-12-2009, 05:01 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Also, make sure you lowercase the player.account because levels can't contain capital letters. This might be helpful.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #4  
Old 09-12-2009, 05:12 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by xXziroXx View Post
onCreated() on serverside is an event that doesn't have a player scope, and since you're trying to read 'player.account' in it, it reads it as '0'.
i tried onActionServerSide() too and triggerd it from clientside by onPlayerChats().
will try again but from clientside and send player.account from the clientside.

Quote:
Originally Posted by Tigairius View Post
Also, make sure you lowercase the player.account because levels can't contain capital letters. This might be helpful.
hmm, lowercase you say? that's not true, because i used player.account before in CopyLevel(), and i already read the how-to.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #5  
Old 09-12-2009, 05:22 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Try adding this to your folder config.

level *.nw

If you still aren't having any luck just store the test.nw in your insides folder, and use:

PHP Code:
function onPlayerEnters() {
  
copylevel("insides/test.nw""insides/inside_" player.account ".nw");

__________________
Quote:
Reply With Quote
  #6  
Old 09-12-2009, 05:27 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
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
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by fowlplay4 View Post
If you still aren't having any luck just store the test.nw in your insides folder, and use:
I thought the destination folder had to be a subfolder to the original folder? At least it used to work like that
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #7  
Old 09-12-2009, 05:27 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by fowlplay4 View Post
Try adding this to your folder config.

level *.nw
it's already added by default.
Quote:
Originally Posted by fowlplay4 View Post
If you still aren't having any luck just store the test.nw in your insides folder, and use:
it did work moving the test level to the sub-folder.

*Edit:
Weapon:
PHP Code:
function onActionServerSidecommandacc ) {
  switch ( 
command ) {
    case 
"Copy":
      
copylevel"test.nw""insides/test_" acc ".nw" );
      
temp.findplayeracc );
        
temp.f.setlevel2"test_" acc ".nw"temp.f.xtemp.f.y);
    break;
  }
}
//#CLIENTSIDE
function onPlayerChats() {
  if ( 
player.chat == "/copy" ) {
    
triggerserver("gui"name"Copy"player.account); 
  }

still getting failed when trying to warp to the level ( and the level isn't copied )
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #8  
Old 09-12-2009, 05:33 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
ah, i got it working, thanks everyone
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #9  
Old 09-12-2009, 05:47 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by xXziroXx View Post
I thought the destination folder had to be a subfolder to the original folder? At least it used to work like that
Nope, Zodiac's instance levels are copied from the base levels in the same folder.

Also Deas, you don't need to send your account in the trigger :P

You can use player.account just fine.
__________________
Quote:
Reply With Quote
  #10  
Old 09-12-2009, 06:01 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
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
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Post

Quote:
Originally Posted by fowlplay4 View Post
Nope, Zodiac's instance levels are copied from the base levels in the same folder.
Guess they changed it sometime after 2005 then
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #11  
Old 09-12-2009, 06:29 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by fowlplay4 View Post
Also Deas, you don't need to send your account in the trigger :P

You can use player.account just fine.
i know i can, but just i don't understand what i did wrong.
( i had player.account on serverside but i'm not sure if that was the problem. )
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #12  
Old 09-13-2009, 05:04 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
I'm not sure why this wasn't working for you. I just tested it on Valikorlia and it works just fine. Mind enlightening others, who might have the same problem? The only thing I could guess is that the levels have to be in the same folder.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #13  
Old 09-13-2009, 07:21 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by LoneAngelIbesu View Post
I'm not sure why this wasn't working for you. I just tested it on Valikorlia and it works just fine. Mind enlightening others, who might have the same problem? The only thing I could guess is that the levels have to be in the same folder.
well, i'm not sure what i did to make it work, but the levels doesn't need to be in the same folder, i have 1 level in levels/ and copies that level to levels/insides/.
sorry.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
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:44 AM.


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