Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Using external modules (luasockets!)
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
paperkettle
How do I cheat?
Reputation: 0

Joined: 18 Nov 2011
Posts: 7

PostPosted: Fri Nov 18, 2011 4:30 am    Post subject: Using external modules (luasockets!) Reply with quote

I'm new to Cheat Engine.. just gotta say - it is a really astonishing program! I love that it has Lua too!

I'd like to be able to use the luasocket module (I'm aiming to have CE sending/receiving UDP messages via Lua) but I'm having trouble.

When I copy all of the source files for the luasocket module into Cheat Engine's directory, and try to do
Code:
require('socket')

I get errors that I'm missing lua dlls. I think luasocket's core.dll is looking for a lua5.1.dll file, rather than a lua5.1-32.dll file.

Of course, if I just put a lua5.1.dll into Cheat Engine's folder, things go awry - using two different main lua dlls doesn't seem to work out.

Any thoughts on how I would use external modules like luasocket with Cheat Engine?

Thanks!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25295
Location: The netherlands

PostPosted: Fri Nov 18, 2011 4:44 am    Post subject: Reply with quote

have you copied the lua5.1-32.dll from ce to lua5.1.dll or did you use the same dll as in the package of luasocket ? (the lua dll by ce is slghtly different from standard, so use ce's one )
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
paperkettle
How do I cheat?
Reputation: 0

Joined: 18 Nov 2011
Posts: 7

PostPosted: Fri Nov 18, 2011 5:31 am    Post subject: Reply with quote

Thanks for the quick reply!

Yeah I noticed you have your own lua build for CE.

To use the luasocket module, I think I need lua's primary dll to be named "lua5.1.dll" in the Cheat Engine folder.

On a whim, I tried making a duplicate of your lua5.1-32.dll and renaming it to lua5.1.dll... but that caused CE to crash when opening a socket.

I'm going to try to see if I can rebuild the luasocket module such that it looks for your lua5.1-32.dll
I've read a lot of problems people have trying to do their own build of the luasocket module.. so we'll see.

Ever consider adding the sockets module to CE? It could make for epic remote communication with the lua engine!
Back to top
View user's profile Send private message
paperkettle
How do I cheat?
Reputation: 0

Joined: 18 Nov 2011
Posts: 7

PostPosted: Sat Nov 19, 2011 1:06 am    Post subject: Reply with quote

My noobsauce noodling has yet to produce a working build of luasocket that links to your custom lua dll. Confused
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25295
Location: The netherlands

PostPosted: Sat Nov 19, 2011 3:39 am    Post subject: Reply with quote

No idea either.

But try recompiling luasocket to use lua5.1-32.dll instead of lua5.1.dll.
Perhaps lua makes use of global variables inside it's dll messing stuff up

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
hiring_dude
Newbie cheater
Reputation: 0

Joined: 28 Nov 2010
Posts: 20

PostPosted: Fri Dec 30, 2011 4:34 pm    Post subject: Reply with quote

Yop,
i would like to post/retreive multiple user statistics data from a web server.
did you succeeded to make it work paperkettle ? Laughing

i just pasted unzipped "luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip"
directly on the main CE folder
Code:
socket = require("socket")
print(socket._VERSION)
-- LuaSocket 2.0.2


Code:
http = require("socket.http")
print(http.request("http://www.cs.princeton.edu/~diego/professional/luasocket"))

== access violation..
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25295
Location: The netherlands

PostPosted: Sat Dec 31, 2011 5:10 am    Post subject: Reply with quote

I've compiled lua socket with my own lua version's header files and that works:
http://cheatengine.org/temp/ce_luasocket.rar (you may need the vc8 runtime if you don't have it)

for other modules, here's the sourcecode of my lua build:
http://cheatengine.org/temp/luasrc.rar

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
hiring_dude
Newbie cheater
Reputation: 0

Joined: 28 Nov 2010
Posts: 20

PostPosted: Mon Jan 02, 2012 1:15 am    Post subject: Reply with quote

thank you very much !
Quote:
And what are your good intentions for this
year? Wink
Back to top
View user's profile Send private message
paperkettle
How do I cheat?
Reputation: 0

Joined: 18 Nov 2011
Posts: 7

PostPosted: Thu Jan 05, 2012 4:29 am    Post subject: Reply with quote

So awesome!! Thanks!! I'll give it a try an report back!!
Back to top
View user's profile Send private message
paperkettle
How do I cheat?
Reputation: 0

Joined: 18 Nov 2011
Posts: 7

PostPosted: Tue Jan 10, 2012 5:30 pm    Post subject: Reply with quote

hmm.
I get a "error loading module 'socket.core' from file '.\socket\core.dll': system error 14001

I installed vc8 runtime as well.

Anyone else have any luck?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25295
Location: The netherlands

PostPosted: Tue Jan 10, 2012 5:33 pm    Post subject: Reply with quote

Make sure you installed the 32-bit VC8 runtime (not the 64-bit one, even if you have 64-bit windows)

also, run cheatengine-i386.exe, not the 64-bit version of ce

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
paperkettle
How do I cheat?
Reputation: 0

Joined: 18 Nov 2011
Posts: 7

PostPosted: Mon Jan 16, 2012 6:17 pm    Post subject: Reply with quote

Double checking: VC8 is VC++ 2005 right?
In any case I've tried all sorts of VC++ runtime installers (2005,2008,2010) and no luck. Using 32 bit installers and cheatengine-i386.exe

I still get:
"error loading module 'socket.core' from file '.\socket\core.dll': system error 14001
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25295
Location: The netherlands

PostPosted: Mon Jan 16, 2012 11:25 pm    Post subject: Reply with quote

Sorry, Visual studio 2008 runtime

14001 means the SxS(side by side) configuration on your system isn't setup properly, which indicates a problem with the runtime

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
hiring_dude
Newbie cheater
Reputation: 0

Joined: 28 Nov 2010
Posts: 20

PostPosted: Wed Jan 18, 2012 5:25 pm    Post subject: Reply with quote

Hi, sorry for late answer (apartment moving),but i've got the same error problem..

socket = require("socket")
print(socket._VERSION)

Error:error loading module 'socket.core' from file '.\socket\core.dll':
system error 14001
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25295
Location: The netherlands

PostPosted: Wed Jan 18, 2012 5:41 pm    Post subject: Reply with quote

redownload http://cheatengine.org/temp/ce_luasocket.rar
this one is compiled without the runtime DLL requirement

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites