Beginner Help Needed

TheyCallMeTim13

Wiki Monster
Talents
Fearless Donors
Mar 3, 2017
411
45
28
#21
Darkenki post_id=41885 time=1523305023 user_id=15105 said:
I am a noob I am trying but it seems I cant get it to work or even make it recognize commands
when I speak it does not recognize either ...
Also what benifits do i get if I upgrade to mark 3 ???

I also need to know from where can i get facebook login and logout if i can get a script and a step by step guide ?
pls help
LMFAO, are you joking or is this for real?
 

corroder

Novice Cheater
Mar 3, 2017
18
0
1
#22
if input=="save" then
print("This feature has not been implemented.")
end
if 'save' mean is to save the table, then :

1. function to make a new directory on local disk :
Code:
function mkdir(dirname)
 path = TrainerOrigin or getMainForm()
 os.execute("mkdir "..dirname)
end
2. function to save table to local disk
Code:
do
local function exportstring( s )
 s = string.format( "%q",s )
 s = string.gsub( s,"\\\n","\\n" )
 s = string.gsub( s,"\r","\\r" )
 s = string.gsub( s,string.char(26),"\"..string.char(26)..\"" )
 return s
end

function table.save(  tbl,filename )
 local charS,charE = "   ","\n"
 local file,err
 if not filename then
 file =  { write = function( self,newstr ) self.str = self.str..newstr end, str = "" }
 charS,charE = "",""
 elseif filename == true or filename == 1 then
 charS,charE,file = "","",io.tmpfile()
 else
 file,err = io.open( filename, "w" )
 if err then return _,err end
 end
 local tables,lookup = { tbl },{ [tbl] = 1 }
 file:write( "return {"..charE )
 for idx,t in ipairs( tables ) do
 if filename and filename ~= true and filename ~= 1 then
 file:write( "-- Table: {"..idx.."}"..charE )
 end
 file:write( "{"..charE )
 local thandled = {}
 for i,v in ipairs( t ) do
 thandled[i] = true
 if type( v ) ~= "userdata" then
 if type( v ) == "table" then
 if not lookup[v] then
 table.insert( tables, v )
 lookup[v] = #tables
 end
 file:write( charS.."{"..lookup[v].."},"..charE )
 elseif type( v ) == "function" then
 file:write( charS.."loadstring("..exportstring(string.dump( v )).."),"..charE )
 else
 local value =  ( type( v ) == "string" and exportstring( v ) ) or tostring( v )
 file:write(  charS..value..","..charE )
 end
 end
 end
 for i,v in pairs( t ) do
 if (not thandled[i]) and type( v ) ~= "userdata" then
 if type( i ) == "table" then
 if not lookup[i] then
 table.insert( tables,i )
 lookup[i] = #tables
 end
 file:write( charS.."[{"..lookup[i].."}]=" )
 else
 local index = ( type( i ) == "string" and "["..exportstring( i ).."]" ) or string.format( "[%d]",i )
 file:write( charS..index.."=" )
 end
 if type( v ) == "table" then
 if not lookup[v] then
 table.insert( tables,v )
 lookup[v] = #tables
 end
 file:write( "{"..lookup[v].."},"..charE )
 elseif type( v ) == "function" then
 file:write( "loadstring("..exportstring(string.dump( v )).."),"..charE )
 else
 local value =  ( type( v ) == "string" and exportstring( v ) ) or tostring( v )
 file:write( value..","..charE )
 end
 end
 end
 file:write( "},"..charE )
 end
 file:write( "}" )
 if not filename then
 return file.str.."--|"
 elseif filename == true or filename == 1 then
 file:seek ( "set" )
 return file:read( "*a" ).."--|"
 else
 file:close()
 return 1
 end
end
end
3. To use
Code:
myTable = {}
mydir = 'Test'
myFile = 'testSave.lua'

mkdir(mydir)
table.save(myTable,mydir..'\\'..myFile)
 
Top Bottom