![]() |
script help
Hello, i have a script. it basically makes the npc server reset someones attributes if they havnt been reset.
function onCreated() { this.resetver = 1; } function onActionPlayerOnline() { temp.rplayers.loadvars("resetlog.txt"); if (makevar("temp.rplayers.acct_" @ player.account) < this.resetver) { sendtorc(format("/reset %s", player.account)); makevar("temp.rplayers.acct_" @ player.account) = this.resetver; temp.rplayers.savevars("resetlog.txt", 0); return false; } It isnt working though someone help me fix it please. |
|
If you want to reset players as they login use something like this:
PHP Code:
I personally dislike that method, I would reset all accounts for once, instead of resetting them as players login as you requested. |
Quote:
|
Is there a script that resets all accounts at once? I would prefere that.
please tell me seich =] |
I personally dislike that method, I would reset all accounts for once, instead of resetting them as players login as you requested.
How could I do that? You know, resetting every player at once? Please explain to me. |
if (playerenters) {
sendtorc("/reset" SPC player.account); } Ok, that works, but it doesn't do it only once, It continues to reset. How do I stop this? |
Quote:
PHP Code:
|
Tig, you seem to have a good knowledge of scripting. Is there a script that when I update the npc server, it resets every account in the whole game? Like and it wont have to wait for them to log on and disconnect them?
|
I don't think that's possible. The closest thing you'll get, which should be good enough is that once that script that Tig gave you is in the Control-NPC, you can right click on that and select 'Reset'. That should make it so every play that logs in again will have their account reset automatically their next login onto your playerworld.
|
I know Stefan has a handy serveroption for it but there is no way for a developer to do it. Unless you deleted all the account folders but there would probably be repercussions to that
|
The account folders/files also store staff data on them(like rights, IP/PCID access yada yada). I don't think there would be a direct repercussion if you delete all files other than staff, but giving the NPC server RW rights to account folders is risky, though not too risky if you remove the rights as soon as you're done.
|
As Dusty said above, you could delete the files in the accounts folder. I have done this before, but I haven't tested it multiple times, so I'm not sure if it's still working. If you give the NPC-Server rights to the accounts/ folder temporarily you could use a script to scan & delete the accounts folder. Also restart the GServer & NPC-Server once you're done for changes to take full effect. Your rights & everything will be gone though, so make sure the server owner is present to re-add your rights. This method is also highly unrecommended unless you have a great knowledge of what you're doing.
|
PHP Code:
|
Quote:
|
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 09:36 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.