Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GBall RC Command Issue (https://forums.graalonline.com/forums/showthread.php?t=134264642)

Emera 09-25-2011 07:16 PM

GBall RC Command Issue
 
I find that backing up the server using an RC command is quick, easy and simple. I don't want to have all of this listed in the control-npc however.

PHP Code:

{
    {
      
"levels/ganis/*.gani"false
    
}, {
      
"scripts/*"false
    
}, {
      
"weapons/*"false
    
}, {
      
"levels/images/*"false
    
}, {
      
"levels/*"false
    
}, {
      
"levels/guilds/*.txt"false
    
}, {
      
"npcs/*"false
    
}, FOLDER_NPCS
  


So I made a new DB-NPC called GBall_Backupfiles. I want to be able to make the Control-NPC read from the Backupfiles NPC and write the .arc file according to what it finds inside the the backupfile NPC. I am having issues. I can't figure out how to make it read from the NPC, since I am normally a fan of sql, and don't store data with DB-NPC's much. Here is the portion of the control NPC concerned with the backing up.

PHP Code:

findnpc("GBall").GBall("Backup of Lexia""data/Lexia_backupfiles"@server.backupnumber@"_"npc("GBall_Backupfiles").this.backupfiles); 

and here is the NPC GBall_Backupfiles.

PHP Code:

this.backupfiles = {
  {
    {
      
"levels/ganis/*.gani"false
    
}, {
      
"scripts/*"false
    
}, {
      
"weapons/*"false
    
}, {
      
"levels/images/*"false
    
}, {
      
"levels/*"false
    
}, {
      
"levels/guilds/*.txt"false
    
}, {
      
"npcs/*"false
    
}, FOLDER_NPCS
  
}
}; 

Can anybody help me out :D

fowlplay4 09-25-2011 07:29 PM

You would just specify:

GBall_Backupfiles.backup_files

In the GBall command.

GBall_Backupfiles.this.backup_files

would be referring to:

this.this.backup_files = {};

In your GBall_Backupfiles script.

Emera 09-25-2011 07:55 PM

Quote:

Originally Posted by fowlplay4 (Post 1669126)
You would just specify:

GBall_Backupfiles.backup_files

In the GBall command.

GBall_Backupfiles.this.backup_files

would be referring to:

this.this.backup_files = {};

In your GBall_Backupfiles script.

:O Thank you very much.


All times are GMT +2. The time now is 11:19 PM.

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