generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help with string.gmatch

Previous Thread :: Next Thread 
1518NICENICKEY is not online. 1518NICENICKEY
Joined: 29 Apr 2009
Total Posts: 1136
23 Jul 2012 10:29 PM
--ENCODE
line = [[Mom: Hello.]]
line = string.lower(line)
line = string.gsub(line,"%d","??/")
line = string.gsub(line,"[%p%s.]+","??/")
line = string.gsub(line,"a","01/")
line = string.gsub(line,"b","02/")
line = string.gsub(line,"c","03/")
line = string.gsub(line,"d","04/")
line = string.gsub(line,"e","11/")
line = string.gsub(line,"f","12/")
line = string.gsub(line,"g","13/")
line = string.gsub(line,"h","14/")
line = string.gsub(line,"i","21/")
line = string.gsub(line,"j","22/")
line = string.gsub(line,"k","23/")
line = string.gsub(line,"l","24/")
line = string.gsub(line,"o","31/")
line = string.gsub(line,"m","32/")
line = string.gsub(line,"n","33/")
line = string.gsub(line,"p","34/")
line = string.gsub(line,"q","41/")
line = string.gsub(line,"r","42/")
line = string.gsub(line,"s","43/")
line = string.gsub(line,"t","44/")
line = string.gsub(line,"u","51/")
line = string.gsub(line,"v","52/")
line = string.gsub(line,"w","53/")
line = string.gsub(line,"x","54/")
line = string.gsub(line,"y","61/")
line = string.gsub(line,"z","62/")
line = string.gsub(line," ","63/")
line = string.gsub(line,"%.","64/")
print(line)



I am trying to make line = string.gsub(line,"[%p%s.]+","??/") have to change all the punctuations except for '.' exactly.. I cant seem to find a way to remove the "." from %p..

Results from lua tester.


32/31/32/??/14/11/24/24/31/??/

Its changing a "." to a ??/ not a 64/
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
23 Jul 2012 10:29 PM
Maybe:

"[.]"

?

† KMXD †
Report Abuse
1518NICENICKEY is not online. 1518NICENICKEY
Joined: 29 Apr 2009
Total Posts: 1136
23 Jul 2012 10:32 PM
Worked but then

32/31/32/:63/14/11/24/24/31/64/

I don`t want the ":" in there, which "%p" is supposed to change to "??/"...
Report Abuse
1518NICENICKEY is not online. 1518NICENICKEY
Joined: 29 Apr 2009
Total Posts: 1136
23 Jul 2012 10:45 PM
Bump
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
23 Jul 2012 10:51 PM
So this is how ppls encode things without using loadstring.
Report Abuse
1518NICENICKEY is not online. 1518NICENICKEY
Joined: 29 Apr 2009
Total Posts: 1136
23 Jul 2012 10:54 PM
No.. This is not a thing for loadstring, I just like to encode and script random things.
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
23 Jul 2012 10:57 PM
So you just made your own encode table?
Report Abuse
1518NICENICKEY is not online. 1518NICENICKEY
Joined: 29 Apr 2009
Total Posts: 1136
23 Jul 2012 10:58 PM
Yes, for fun.. It can also send encoded nice chat through Data Presistance.
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
23 Jul 2012 11:32 PM
Nice.
Can you give me a script with print("hello world")?
But encoded.
Report Abuse
1518NICENICKEY is not online. 1518NICENICKEY
Joined: 29 Apr 2009
Total Posts: 1136
23 Jul 2012 11:37 PM
Once agian, this is not for scripting.. I use this for fun..

34/42/21/33/44/??/??/14/11/24/24/31/63/53/31/42/24/04/??/??/
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
23 Jul 2012 11:45 PM
I will test this tomorow on my pc.
Im on mobile phone.
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
23 Jul 2012 11:47 PM
You gave me an idea

For when the byte code is removed, I'll make a _G.byte library. Same thing as string.byte I hope.
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
23 Jul 2012 11:53 PM
Can you explain more? I.don't understand.
Report Abuse
koen500 is not online. koen500
Joined: 23 Feb 2011
Total Posts: 2277
24 Jul 2012 12:38 AM
34/42/21/33/44/??/??/14/11/24/24/31/63/53/31/42/24/04/??/??/
Can you run this in a script too?
Report Abuse
1518NICENICKEY is not online. 1518NICENICKEY
Joined: 29 Apr 2009
Total Posts: 1136
24 Jul 2012 11:46 AM
I said this is for fun, This will not work on roblox, the Encoder will but the output code wont.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image