Results 1 to 8 of 8

Thread: Script AutoUpdate ?

  1. #1
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default Script AutoUpdate ?

    im trying to add an autoupdater to some private scripts, is there a form or way to do it so the script stays private online i.e someone bored on pastebin doesnt stumble upon it *unlikely but for future references and knowledge*

    thank youuu

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  2. #2
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    If you want it to stay private, then you need to post it on a private server/host. Although, if you have a dedicated private script gmail account, that should be decent enough

  3. #3
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    Although, if you have a dedicated private script gmail account, that should be decent enough
    what does that mean? i just started learning about autoupdating like an hour ago ha

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  4. #4
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Setup a brand new gmail account and keep only private scripts on their svn server attached to that account.

  5. #5
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default

    mk thanks! ill see if i can figure it out lol. does this look correct and are my comments describing whats going on right? couldnt find a tut so found this in one of Ashaman88's scripts and made some name changes. idk what the CloseFile(NewFile) purpose is though

    Simba Code:
    procedure AutoUpdater;
    var NewFile:integer;
        OnlineVersion, NewScript, NewFileName:string;
    begin
      if UseAutoChecker then
      begin
        OnlineVersion := GetPage('http://zezima.com/version.txt');  //this is just a number?
        writeln(OnlineVersion);
        writeln(ScriptVersion); //declared at begining of script
        if (trim(OnlineVersion) > ScriptVersion) then   //checking if the number is greater than the script in uses number?
        begin
          NewScript := GetPage('http://zezima.com/scriptname.simba');  //getting the new script?

          NewFileName := ScriptPath+ 'scriptname' + OnlineVersion + '.simba';   //what we are saving the new script as?
          NewFile := Rewritefile(NewFileName, true);         //rewriting the old file with the new file
          try                                                  //if an error occurs when saving??
            WriteFileString(NewFile, NewScript);
          except
            begin
              terminatescript;
            end;
          end;
          CloseFile(NewFile);   //not sure what its closing?
          TerminateScript;
        end else
          writeLn('You have the latest version of the script!');
      end else
        WriteLn('We are not checking for updates!');
    end;

    edit: are you talking about google docs? or google drive they call it now? havent used google for awhile :P then i just add who ever it is to the document and they can view it? but wouldnt they be able to edit the document aswell? sorry im a noob, i have limited experience lol
    Last edited by Sk1nyNerd; 05-21-2013 at 09:13 PM.

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  6. #6
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by ibot_dung11 View Post
    mk thanks! ill see if i can figure it out lol. does this look correct and are my comments describing whats going on right? couldnt find a tut so found this in one of Ashaman88's scripts and made some name changes. idk what the CloseFile(NewFile) purpose is though

    Simba Code:
    procedure AutoUpdater;
    var NewFile:integer;
        OnlineVersion, NewScript, NewFileName:string;
    begin
      if UseAutoChecker then
      begin
        OnlineVersion := GetPage('http://zezima.com/version.txt');  //this is just a number?
        writeln(OnlineVersion);
        writeln(ScriptVersion); //declared at begining of script
        if (trim(OnlineVersion) > ScriptVersion) then   //checking if the number is greater than the script in uses number?
        begin
          NewScript := GetPage('http://zezima.com/scriptname.simba');  //getting the new script?

          NewFileName := ScriptPath+ 'scriptname' + OnlineVersion + '.simba';   //what we are saving the new script as?
          NewFile := Rewritefile(NewFileName, true);         //rewriting the old file with the new file
          try                                                  //if an error occurs when saving??
            WriteFileString(NewFile, NewScript);
          except
            begin
              terminatescript;
            end;
          end;
          CloseFile(NewFile);   //not sure what its closing?
          TerminateScript;
        end else
          writeLn('You have the latest version of the script!');
      end else
        WriteLn('We are not checking for updates!');
    end;

    edit: are you talking about google docs? or google drive they call it now? havent used google for awhile :P then i just add who ever it is to the document and they can view it? but wouldnt they be able to edit the document aswell? sorry im a noob, i have limited experience lol
    Personally I use google docs just fine for public and/or private scripts (different google accounts for private scripts).
    With Google Docs, you can add permissions for edit to a selected list of people while permissions to view is public. However, while permission to view is public, searching for you isn't easy, which is what keeps you fairly safe in respect to keeping your script private

    CloseFile(NewFile); "Closes" the file. Basically when you open or write a file, it's now in your memory, so you need to close it in order to "free" it like you would a DTM or BMP.

  7. #7
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    Personally I use google docs just fine for public and/or private scripts (different google accounts for private scripts).
    With Google Docs, you can add permissions for edit to a selected list of people while permissions to view is public. However, while permission to view is public, searching for you isn't easy, which is what keeps you fairly safe in respect to keeping your script private

    CloseFile(NewFile); "Closes" the file. Basically when you open or write a file, it's now in your memory, so you need to close it in order to "free" it like you would a DTM or BMP.
    alright cool, ill be playing around with it in the few days so i will let you know of any questions.

    and that makes sense, same as C++ but i couldnt find a definet answer. thanks

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  8. #8
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by ibot_dung11 View Post
    alright cool, ill be playing around with it in the few days so i will let you know of any questions.

    and that makes sense, same as C++ but i couldnt find a definet answer. thanks
    Good luck with everything, and if you think I can answer a question I may not notice, feel free to throw a mention on me to grab my attention (it even works in edits).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •