Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Reset Script Needed (https://forums.graalonline.com/forums/showthread.php?t=87486)

Mattehy 08-19-2009 07:12 PM

Reset Script Needed
 
I want to reset a complete server like Graal Ghetto or Zodiac or somthing how would i do this?

LoneAngelIbesu 08-19-2009 07:52 PM

Reset all the values you're using... Servers use different methods of storing player data, so this isn't something that can be answered until you've shown us exactly how you're storing data.

fowlplay4 08-19-2009 08:17 PM

You have to either:

- Ask Stefan to do it for you.
- Write a Script to do it yourself.

I.e a simple script that would go in your Control-NPC:

PHP Code:

function onActionPlayerOnline() {
  
// Check if Account is in Reset Array
  
if (!(player.account in this.reset)) {
    
// Add Account to Reset Array
    
this.reset.add(player.account);
    
// Reset Account
    
sendtorc("/reset " player.account);
  }


Which is pretty much the equivalent to resetting everyone who logs in with the /reset command.

But as Lone stated, if you have different methods of storing player data you'll have to write scripts to reset them as well.

Mattehy 08-19-2009 08:57 PM

thanks fowl

WhiteDragon 08-19-2009 10:13 PM

On Classic we wanted to keep only certain bits of information and change other pieces, over about 30MiB of textfiles.

We ended up getting all the accounts files from Stefan and then running a bunch of sed commands on the text files to alter them, and then got Stefan to put back the new files.

But if you just want to flat out reset all the accounts then fowl's script should work, as long as the npc-server has rights to reset accounts.

Although, that script could end up screwing up if the this.reset array ever is lost.

Skyld 08-19-2009 10:24 PM

You are lucky that someone helped you but in future, read the forum rules at http://forums.graalonline.com/forums...ent.php?f=153:
Quote:

1. Be clear on your ability level. In other words, do not post asking for scripts, or asking people to fix scripts that are above your ability level. If you are writing a script to aid learning, then try writing a simpler script. If you are looking for a script for a server, then the best solution is probably to hire a scripter.

2. Similarly, do not just post whole scripts for people as a response to their difficulties. If you wish to post a wordy solution, then please feel free; however, please do not post things that people can just copy and paste. It isn't helping people to learn just by doing so. If you'd like to show off your scripts to others, post them in the Code Gallery subforum.
Closed. Anyone who would wish to dispute this, click here.


All times are GMT +2. The time now is 12:10 PM.

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