Author Topic: Scriptsmanager v1.0  (Read 4207 times)

0 Members and 1 Guest are viewing this topic.

Offline lewymati

  • Major(1)
  • Posts: 38
Scriptsmanager v1.0
« on: March 12, 2008, 09:22:48 am »
Script Name: Scriptsmanager v1.0
Script Description: Scriptsmanager is a script which allows you turning on and off your scripts "in fly"(without restarting server).
Original Author(s): lewymati
Core Version: 2.6.3
Code:
Code: [Select]
procedure scripton(ID:integer; ScriptName: string);
var
  s:string;
begin
  if FileExists('scripts/scriptsmanager/includes/'+ScriptName+'.txt') then
  begin
    s:=readfile('scripts/scriptsmanager/includes/'+ScriptName+'.txt');
    writefile('scripts/'+ScriptName+'/Includes.txt',s);   
    command('/recompile '+ScriptName);     
  end
  else
    WriteConsole(ID,'Script '+ScriptName+' doesn''t exist.',$EE00FF00);   
end;

procedure scriptoff(ID:integer; ScriptName: string);
var
  s:string;
begin
  if FileExists('scripts/scriptsmanager/includes/'+ScriptName+'.txt') then
  begin
    writefile('scripts/'+ScriptName+'/Includes.txt','');
    command('/recompile '+ScriptName);   
  end
  else
  begin
    if FileExists('scripts/'+ScriptName+'/Includes.txt') then
    begin
      s:=readfile('scripts/'+ScriptName+'/Includes.txt');
      writefile('scripts/scriptsmanager/includes/'+ScriptName+'.txt',s);
      writefile('scripts/'+ScriptName+'/Includes.txt','');
      command('/recompile '+ScriptName); 
    end
    else
      WriteConsole(ID,'Script '+ScriptName+' doesn''t exist.',$EE00FF00);
  end;     
end;

Read readme.txt file first.(included in zip file) :)

//fixed bug - reattached...
« Last Edit: March 13, 2008, 10:02:29 am by lewymati »

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Scriptsmanager v1.0
« Reply #1 on: March 12, 2008, 11:02:28 am »
yes, yes!, YES! thanks a lot for this script, my server will be using it soon :)

Offline rumpel

  • Camper
  • ***
  • Posts: 410
Re: Scriptsmanager v1.0
« Reply #2 on: March 12, 2008, 11:59:23 am »
hmm o.O when you delete or rename the uncludes.txt and uploading another script and do /recompile you did the same... or  i am wrong?
banned.

Offline Laser Guy

  • Veteran
  • *****
  • Posts: 1679
Re: Scriptsmanager v1.0
« Reply #3 on: March 12, 2008, 12:13:49 pm »
God lord, this is just saving my ass man! Thx.
Text goes here...

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Scriptsmanager v1.0
« Reply #4 on: March 12, 2008, 12:23:00 pm »
hmm o.O when you delete or rename the uncludes.txt and uploading another script and do /recompile you did the same... or  i am wrong?
yes, it kinda works like that. but if you have a server you dont wanna fuck around with includes and recompiles all the time ^_^

Offline rumpel

  • Camper
  • ***
  • Posts: 410
Re: Scriptsmanager v1.0
« Reply #5 on: March 12, 2008, 01:03:55 pm »
yeah ah okay.. dont have many script on my serv
but i think its very useful :)
banned.

Offline lewymati

  • Major(1)
  • Posts: 38
Re: Scriptsmanager v1.0
« Reply #6 on: March 13, 2008, 09:53:29 am »
Thanks goes to Bombski who found bug (linux is case sensitive, and the file needs to be Includes.txt and not includes.txt)...

Fixed and reattached  ;D

Offline Replica

  • Major
  • *
  • Posts: 96
Re: Scriptsmanager v1.0
« Reply #7 on: May 26, 2008, 07:02:51 am »
Possible bug:
I can't seem to turn on scripts once they have been disabled.  I don't get a message saying that they have been turned off when I use /scriptoff examplenamehere, and when I try /scripton examplenamehere, it says that examplenamehere doesn't exist. 

using a windows server... 

Offline lewymati

  • Major(1)
  • Posts: 38
Re: Scriptsmanager v1.0
« Reply #8 on: May 26, 2008, 10:36:05 am »
firstly u have to have all scripts turned on (;

have some issues?
Talk to me on msn (lewymati@wp.pl)
sometimes u can meet me on #multimode channel at irc.quakenet.org