Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-19-2009, 07:12 PM
Mattehy Mattehy is offline
Developer
Mattehy's Avatar
Join Date: Jul 2009
Posts: 58
Mattehy is on a distinguished road
Reset Script Needed

I want to reset a complete server like Graal Ghetto or Zodiac or somthing how would i do this?
__________________
Develop 4 Lyf
  #2  
Old 08-19-2009, 07:52 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
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.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
  #3  
Old 08-19-2009, 08:17 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
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.
__________________
Quote:
  #4  
Old 08-19-2009, 08:57 PM
Mattehy Mattehy is offline
Developer
Mattehy's Avatar
Join Date: Jul 2009
Posts: 58
Mattehy is on a distinguished road
thanks fowl
__________________
Develop 4 Lyf
  #5  
Old 08-19-2009, 10:13 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
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.
  #6  
Old 08-19-2009, 10:24 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
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.
__________________
Skyld

Last edited by Darlene159; 08-19-2009 at 11:25 PM.. Reason: :(
Closed Thread


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 11:15 AM.


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