Lua Converter ( with GUI )
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Lua Converter ( with GUI )

Started by NightLitch, 01 March, 2005, 12:50:50

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NightLitch

here you all go if you have trouble converting...

this is built with plops converter code, I just built a wxLua GUI.

Lua4 to Lua5 Converter

msvcr70.dll

NOTE: file handlings is not converted....




*Changed*

GUI is updated.

- Fixed so even space strfind and strind( is changed ex.


Enjoy!!!
//NL

nEgativE

Oh God, thank U Night ..

blackwings

NL, do you know a safe source to download the "MSVCR70.dll" file?



blackwings

the converter is great, but still you need to change the DataArrival() into whatever is needed + code that need to be devided among the new Arrivals.


NightLitch

#5
QuoteOriginally posted by blackwings
the converter is great, but still you need to change the DataArrival() into whatever is needed + code that need to be devided among the new Arrivals.

As I said this is just a simple GUI with plops converter inbuilt to make it easier to some...

But I will try when I have time maybe extend the converter a little bit more...

And divide DataArrival is hard because there is so many diff. way ppl. program the data arrival everyone has its own way.

I might fix the file handling with a little help from plop, with others that can help me.
//NL

Tw?sT?d-d?v

can some1 help me with this error plz  

697: attempt to call global `read' (a nil value)

bastya_elvtars

QuoteOriginally posted by (uk)jay
can some1 help me with this error plz  

697: attempt to call global `read' (a nil value)

typical file-handler related error
Everything could have been anything else and it would have just as much meaning.

bastya_elvtars

Seems like a BUG to me, sorry to be the first to report. ;)

From:

if user.sMyInfoString and strlen (user.sMyInfoString) > (strlen(user.sName)+13) then

To:

if user.sMyInfoString and strlen (user.sMyInfoString) > (string.len(user.sName)+13) then

btw very nice little tool, only thing i WOULD WELCOME is an Exit button when the 'Conversion finished' dialog comes up.
Everything could have been anything else and it would have just as much meaning.

NightLitch

thx will look into it, and I will add an Exit button...
//NL

plop

damn cool boy.
it's gone be a real tuff job 2 convert scripts 2 the new arrivals.
gotta think a lot because i have no idea yet on how do to this.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

blackwings

#11
QuoteOriginally posted by plop
damn cool boy.
it's gone be a real tuff job 2 convert scripts 2 the new arrivals.
gotta think a lot because i have no idea yet on how do to this.

plop
NL,plop & Mutor, this is just a simple idea that might help you guys to solve the problem
with DataArrival() convertion(even if my idea might not work) =
01) The converter begins wit searching for smaller parts in the DataArrival().
   (from line 3 in the DataArrival)
02) It finds $To: (saves in memory which line it is)
03) it counts the "if"&"for" from the line it finds $To: until it comes 
   to a line with "end"(counts max 1 "if"&"for" per line)
04) Then it counts the "end's" from the when found in "3)" to match the number of "if"&"for" in "3)"
05) Saves in memory which line it found the last "end" counted in "4)"
06) It cuts out those lines an put them inside of a ToArrival().
07) deletes the empty lines in the DataArrival().
08) Makes again a search for things that should be put in seperate Arrival's.(again starts from line 3)
09) When it does find anymore code that should have their own Arrival, it checks line 2.
10) If it found something that identify which the remaining code should go to, it change line 1
    into the proper Arrival.
11) If it doesn't found anything on line 2, then it search for example this =
    Search for this = if,strfind,data  and find this on a single line = 
    if( strfind(data, advDetect,1,1) ) then
12) changes line 1 into function ChatArrival()
13) If the DataArrival() doesn't follow this pattern, the convertion won't be made 
    (like it found "end" at a line with "if"&"for")


NightLitch

It is a good idea Blackwing, but in my eyes amd maybe plops time consuming to even try, because ppl. have build their arrivals in different ways...
//NL

bastya_elvtars

Most scripts have their DataArrival strsub-ed, so they use:

function DataArrival(user,data)

	if strsub(data, 1, 13) == "$ValidateNick" and checknick==1 then >> [color=#FF0000]ValidateNickArrival[/color]
	elseif strsub(data, 1, 8) == "$GetINFO" and not user.bOperator then >> [color=#FF0000]GetINFOArrival[/color]
	elseif strsub(data, 1, 7) == "$MyINFO" then >> [color=#FF0000]MyINFOArrival[/color]
	elseif strsub(data, 1, 7) == "$UserIP" then >> [color=#FF0000]UserIPArrival[/color]
	elseif strsub(data, 1, 4) == "$To:" then >> [color=#FF0000]ToArrival[/color]
	elseif(strsub(data, 1, 12) == "$OpForceMove") then >> [color=#FF0000]OpForceMoveArrival[/color]
	elseif(strsub(data, 1, 5) == "$Kick") then >> [color=#FF0000]KickArrival[/color]
	elseif strsub(data, 1, 1) == "<" then >> [color=#FF0000]ChatArrival[/color]

Now you just omit the DataArrival and convert the crap as i wrote. The whole damn thing would not take 5 mins. And manual conversion is the safest IMHO in cases like this.
Everything could have been anything else and it would have just as much meaning.

NightLitch

I will make a try tomorrow or Friday when I might feeling better....

Going to have an operation on my feets tomorrow, so I guess I need to have my feets high so not to much blood is streaming... heh...

But I'll be around...
//NL

bastya_elvtars

QuoteOriginally posted by NightLitch
I will make a try tomorrow or Friday when I might feeling better....

Going to have an operation on my feets tomorrow, so I guess I need to have my feets high so not to much blood is streaming... heh...

But I'll be around...

This was intended for blackwings... ;P
Everything could have been anything else and it would have just as much meaning.

kepp

#16
Nice work NL, maybe some improvements can be done

function UpdateLogs()
   --// Code --\\
end

Turns out

function Upos.dateLogs()
   --// Code --\\
end

Same goes for comments
Guarding    

bastya_elvtars

Yes, and substance goes to subsmath.tance.  :D
Everything could have been anything else and it would have just as much meaning.

NightLitch

QuoteOriginally posted by kepp
Nice work NL, maybe some improvements can be done

function UpdateLogs()
   --// Code --\\
end

Turns out

function Upos.dateLogs()
   --// Code --\\
end

Same goes for comments

sure Am on it
//NL

NightLitch

*** Converter Updated ***

- Added simple converter for reading files converter
- Fixed errors in code when changing word inside a word

*** Download ***
//NL

Mardeg

In --commented lines words like "format" and "remove" were changed to "string.format" and "os.remove". Comments should be exempt from conversion, no?

Inside "" strings, "A Mardeg script" was changed to "A Marmath.deg script". Fixable?

In a variable declaration:
  leechlog = "path/to/leecher.log"
was changed to
  leechmath.log = "path/to/leecher.log"

NightLitch

Thx will look deeper, but have you tried the newest or the old one ???

thought I had fixed that ??

-- comments and "strings" I can look into more... When I get the time...
//NL

Mardeg

#22
I used the download link in your post above.
Also noticed it missed changing write( to io.write(
and t.remove changed to tos.remove instead of table.remove
It's still a great tool though :)

BeeR

#23
HI alles :]
did try to convert my bots and gets this result:
attempt to perform arithmetic on global `min' (a nil value)

any ide ?? i guess it has something to do with the timer
--> StartTimer() <--
A cold BeeR is stunning !!

LiqUiD~TrolL

good day my mates well i ve used this converter and i added the scripts in ptoka x


but something is wrong here is my message in the ptoka x   :

No syntax errors in script file AnTiFlooD By PloP_(4.5.4).lua5.lua
No syntax errors in script file modem_(no_slow_connections allowed).lua5.lua
No syntax errors in script file plop2_(6txt files).lua5.lua
No syntax errors in script file random_intro_outro.lua5.lua
Syntax ...emp\Rar$EX07.765\scripts\redirectprotection.lua5.lua:63: attempt to index global `checkAdmath' (a nil value)
No syntax errors in script file Release_Bot1 plop 3.2_(VIPS can add releases).lua5.lua
No syntax errors in script file RoboCopv10.01.lua
No syntax errors in script file zRightClicker.lua
Syntax ...lease_Bot1 plop 3.2_(VIPS can add releases).lua5.lua:221: attempt to call global `readfrom' (a nil value)
Syntax ...$EX07.765\scripts\AnTiFlooD By PloP_(4.5.4).lua5.lua:167: attempt to call method `EnableFullData' (a nil value)
________<>________


            -=@_ psydream-land.no-ip.org _@=-


             
http://www.psychedelicdreams.bravehost.com

SMF spam blocked by CleanTalk