Results 1 to 15 of 15

Thread: Text to Chri

  1. #1
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default Text to Chri

    Re-make of another old script:

    Code:
    function WhatCase(c: char): integer;
    var alph: string;
    var i, e: integer;
    begin
      alph:= 'abcdefghijklmnopqrstuvwxyz';
     for i:= 1 to length(alph) do
       begin
         for e:= 1 to length(alph) do
           begin
             if (i > 1) then
               begin
                 alph:= uppercase(alph);
                 if (c = strget(alph, e)) then
                   begin
                     result:= 2;
                     exit;
                   end;
               end else
               begin
                alph:= lowercase(alph);
                 if (c = strget(alph, e)) then
                   begin
                     result:= 1;
                     exit;
                   end;
               end;
            end;
        end;
    end;
    
    function TextVal(c: char): integer;
    var i: integer;
    begin
     if (WhatCase(c) = 1) then
       begin
        for i:= 97 to 122 do
          begin
            if (c = Chr(i)) then
              begin
                result:= i;
                exit;
              end;
          end;
       end else
       begin
         for i:= 65 to 90 do
           begin
             if (c = Chr(i)) then
               begin
                 result:= i;
                 exit;
               end;
           end;
       end;
     for i:= 1 to 255 do //Other characters. Or if it didn't find the others.
       begin
         if (c = Chr(i)) then
           begin
             result:= i;
             exit;
           end;
       end;
    end;
    
    function TextToChri(s: string): string;
    var i: integer;
    begin
     for i:= 1 to length(s) do
       begin
        if (i >= length(s)) then
          result:= result + 'Chr(' + inttostr(TextVal(strget(s, i))) + ')'
         else
          result:= result + 'Chr(' + inttostr(TextVal(strget(s, i))) + ')' + ' + ';
       end;
    end;

  2. #2
    Join Date
    Feb 2006
    Location
    Aussie
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haha, thats pretty awesome, but it only gives the code for CAPITALS, you should make a const or sumthin, so that it can give you CAPS or normal code.

    probably didn't make sence,

  3. #3
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Blah, still get's the point across

  4. #4
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Dude, your a legend
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  5. #5
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    There's a use for this? - Woot. I'm a legend!

  6. #6
    Join Date
    Feb 2006
    Location
    Aussie
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haha, yes you are...

  7. #7
    Join Date
    Feb 2006
    Posts
    1,022
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Starblaster100
    Dude, your a legend
    Couldn't of put it better myself!

  8. #8
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by XxKanexX
    There's a use for this? - Woot. I'm a legend!
    Ofcourse there is a use for this! There is a use for everything you post!
    Email me EVERYTHING you have ever made please and ill put good use to it
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  9. #9
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah, Calm down Stary <3 Lol

    Thanks for the comments, guys ;D

  10. #10
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by XxKanexX
    Ah, Calm down Stary <3 Lol

    Thanks for the comments, guys ;D
    DUDE IM WAITING FOR MY EMAIL !!!!!11!!!1!!11!!!ONE!!!ONE!!!!!11!NFNDHDIIJDUHGFS DIOJRFUGJBSDOVOGEVOBREOBRVOB....!
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  11. #11
    Join Date
    Feb 2006
    Location
    Wisconsin (like farm-town, USA) :P
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Better check your spam folder Gmail might be filtering useless scripts!

  12. #12
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by driger1592
    Better check your spam folder Gmail might be filtering useless scripts!
    haha, very clever. i like it
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  13. #13
    Join Date
    Mar 2006
    Location
    USA
    Posts
    948
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I know this is a little old but ty anyways this is so useful

  14. #14
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I edited it with a new version i made for Starblaster.

    It now recognizes capitals and other characters.

  15. #15
    Join Date
    May 2006
    Location
    Australia
    Posts
    370
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's the beginnings of SCAR character obfuscation :P
    ------
    Strong Holder
    Kill Goblins and Zombies in (ex) bot free zones. Loot & Bank. Stable: 1.2b

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Grabbing or reading Text from a game text box
    By British in forum OSR Help
    Replies: 16
    Last Post: 02-27-2009, 08:02 AM
  2. Text help
    By Leech in forum OSR Help
    Replies: 2
    Last Post: 10-03-2008, 07:55 PM
  3. Getting text from text window?
    By Gone Fishing in forum OSR Help
    Replies: 8
    Last Post: 04-24-2008, 07:33 PM

Posting Permissions

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