How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
 

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

How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher

Started by PPK, 14 April, 2012, 17:07:17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PPK

Prerequisites
PtokaX 0.4.2.0 build 376 GUI 32bit with Lua 5.1.5 or Service 32bit with Lua 5.1.5.

LuaFileSystem 1.5.0 32bit library.
LuaSocket 2.0.0 32bit library.
Last DiXBoT build, script only.

Setup
Setup PtokaX as always, with your config, scripts etc.

From LuaFileSystem archive unpack lfs.dll to PtokaX_dir\libs\ and rename lfs.dll to pxlfs.dll

From LuaSocket archive unpack PXLuaSocket.dll, PXMime.dll, socket.lua and mime.lua to PtokaX_dir\libs\
From LuaSocket archive unpack content of scripts dir to PtokaX_dir\libs\scripts\
From LuaSocket archive unpack content of socket dir to PtokaX_dir\libs\socket\

From DiXBoT archive unpack DiXBoT.lua to PtokaX_dir\scripts\
From DiXBot archuve unpack content of DiXBoT dir to PtokaX_dir\scripts\DiXBoT

Run
Now it is simple, run PtokaX and then start DiXBoT.lua
When you done everything as is above then you should see in DC client something like:
Quote[2012-04-14 16:53:41] <Hub-Security> This hub is running PtokaX DC Hub 0.4.2.0 [build 376] (UpTime: 0 days, 0 hours, 0 minutes / Users: 0)
[2012-04-14 16:53:47] *** DiXBoT v2.1 Build 3072 for PtokaX 0.4.2.0 on Windows has been Loaded in 3.320 Second(s)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

prop2012

PPK, tried your method...

but running into the following error:

PPK

No you don't, you are used different luafilesystem or luasocket lib. Because ones that i'm linked in my post never show window like this ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

prop2012

That would be difficult PPK, as I am using the files from the archives you are linking to in the top post.
I did not go to other sites or webs to download different versions...your versions are all I have.

PPK

Ops, sorry. I has typo in luafilesystem url :-X Now it points to correct one :P
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Nautilus

Hi I get this error..... and IM follow the instruktions. Someone know the problems

14:08:22] Syntax error loading module 'pxsocket' from file 'C:\Ptokax\scripts\libs\pxsocket.dll':
	Det g?r inte att hitta den angivna proceduren.

PPK

You should not have any libs in PtokaX_dir\scripts\libs ... if you have (from previous dixbot or you unpacked them from dixbot archive) then delete them all  ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

prop2012

For me to get the dixbot running I also had to copy socket.lua and mime.lua to the libs folder.
If I did not do this, dixbot would not start. Dixbot version is the one as link in top post by PPK.

There is one scripting error I receive while running:

Syntax ...nistrator\Dropbox\Code\DiXBoT_Dev\scripts\DiXBoT.lua:1241: attempt to index global 'http' (a boolean value)

But this is more a dixbot issue I think....

PPK

Quote from: prop2012 on 16 April, 2012, 12:31:55
For me to get the dixbot running I also had to copy socket.lua and mime.lua to the libs folder.
Correct, i forgot them. First post updated.
Quote from: prop2012 on 16 April, 2012, 12:31:55
Syntax ...nistrator\Dropbox\Code\DiXBoT_Dev\scripts\DiXBoT.lua:1241: attempt to index global 'http' (a boolean value)
Do you have http.lua in PtokaX_dir\libs\socket\ ?
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall


bastya_elvtars

The error above means that http is redefined somewhere else in the code. http should be a table, and the error message states it is boolean.
Everything could have been anything else and it would have just as much meaning.

PPK

This will be my bug :P That happen when scripters (i'm pointing to Mutor) complains that they don't have libs for Lua 5.2 but they don't do anything for that and leave porting of Lua scripts to non-scripter  ;D
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PPK

Quote from: Mutor on 21 April, 2012, 16:53:59
So it's my fault you screwed up the library?
Library (dll files) working without problem, but their support scripts are broken. And you actually give me reason to not even try to fix them ;D
So luasocket for PtokaX is dead, finally :P
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PPK

Quote from: Mutor on 22 April, 2012, 01:34:47
On POSIX maybe, they won't even load on Windoze. [LUA 5.2]
I'm tested them all multiple times and they load without problems on both lua version and both cpu platforms ::)
Testing script:
require "lsqlite3"

require "lfs"

require "socket"
require "mime"

require "iconv"

local luasql = require "luasql.mysql"
local mysql = luasql.mysql()

require "lxp"

require "base64"

require "md5"
require "des56"

local zlib = require "zlib"

require "gd"

local rex_pcre = require "rex_pcre"

Core.SendToAll("PtokaX version: "..Core.Version
               .."\nPtokaX build: "..Core.BuildNumber
               .."\nLua version: ".._VERSION

               .."\n\nLoaded Lua libraries:\n"

               .."\nLuaSQLite3 version: "..sqlite3.version()
               
               .."\nLuaFileSystem version: "..lfs._VERSION

               .."\nLuaSocket version: "..socket._VERSION
               .."\nLuaMime version: "..mime._VERSION

               .."\nLuaIconv version: "..iconv.VERSION

               .."\nLuaSQL version: "..luasql._VERSION
               .."\nLua-MySQL version: "..luasql._MYSQLVERSION

               .."\nLuaExpat version: "..lxp._VERSION

               .."\nlbase64 version: "..base64.version

               .."\nMD5 version: "..md5._VERSION
               .."\nDes56 version: "..des56._VERSION

               .."\nlzlib version: "..zlib._VERSION

               .."\nLua-GD version: "..gd.VERSION

               .."\nLrexlib version: "..rex_pcre._VERSION

            )

And his result:
Quote[2012-04-21 21:13:28][01:45:20] PtokaX version: 0.4.2.0
PtokaX build: 377
Lua version: Lua 5.2

Loaded Lua libraries:

LuaSQLite3 version: 3.7.11
LuaFileSystem version: LuaFileSystem 1.5.0
LuaSocket version: LuaSocket 2.0.2
LuaMime version: MIME 1.0.2
LuaIconv version: iconv 6
LuaSQL version: LuaSQL 2.3.0
Lua-MySQL version: 5.5.22
LuaExpat version: LuaExpat 1.2.0
lbase64 version: base64 library for Lua 5.1/5.2 / Mar 2010
MD5 version: MD5 1.1.2
Des56 version: DES56 1.1.2
lzlib version: lzlib 0.4-work3
Lua-GD version: lua-gd 2.0.33r2
Lrexlib version: Lrexlib 2.6.0 (for PCRE)
Quote from: Mutor on 22 April, 2012, 01:34:47
If the libs and scripts work in the interpreter, then the problem is in PxLua.
Luasocket is not working with Lua 5.2 interpreter :P That means here is no problem with PXLua ::)
Quote from: Mutor on 22 April, 2012, 01:34:47
If you could make Px to work with standard libraries there would be no need
to develop any modified extension libraries.
Lua don't have any standard libraries for Windows. Most libs don't even have compiled lib for 64bit windows, and 99.9999% of them don't have version for Lua 5.2 available. And in actual state i'm modified C code part of lua libs only for compatibility with Lua 5.2, nothing else.
Quote from: Mutor on 22 April, 2012, 01:34:47
PtokaX for Windows has been closed source since before it was booted off sourceforge.
And how is that related to this ? That was long time ago, even many months before i'm joined PtokaX project.
Quote from: Mutor on 22 April, 2012, 01:34:47
I have never had any involvement in it's development or it's libs.
You asked multiple times for libs. But you never do anything to have them or help with them.
Quote from: Mutor on 22 April, 2012, 01:34:47
Who gave you reason to try to make a dead project work in a beta hub?
DixBot is not only script using libs. So if luasocket is not working then it affect other scripts too...
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PPK

Quote from: prop2012 on 19 April, 2012, 17:12:07
Yes it's there...
I'm updated LuaSocket, download link is same as before. Now it should work without that http related bug ;)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PPK

Quote from: Mutor on 22 April, 2012, 03:01:08
Latest on board is 376.
That's not make difference. 376 and up (last is 378) use same Lua lib... but for sure, here is result from 376  :P
Quote[2012-04-22 12:09:37] <Hub-Security> This hub is running PtokaX DC Hub 0.4.2.0 [build 376] (UpTime: 0 days, 0 hours, 0 minutes / Users: 0)
[2012-04-22 12:09:42] PtokaX version: 0.4.2.0
PtokaX build: 376
Lua version: Lua 5.2

Loaded Lua libraries:

LuaSQLite3 version: 3.7.11
LuaFileSystem version: LuaFileSystem 1.5.0
LuaSocket version: LuaSocket 2.0.2
LuaMime version: MIME 1.0.2
LuaIconv version: iconv 6
LuaSQL version: LuaSQL 2.3.0
Lua-MySQL version: 5.5.22
LuaExpat version: LuaExpat 1.2.0
lbase64 version: base64 library for Lua 5.1/5.2 / Mar 2010
MD5 version: MD5 1.1.2
Des56 version: DES56 1.1.2
lzlib version: lzlib 0.4-work3
Lua-GD version: lua-gd 2.0.33r2
Lrexlib version: Lrexlib 2.6.0 (for PCRE)
Quote from: Mutor on 22 April, 2012, 03:01:08
Svn is posix only.
Really ? That must be fun when posix users try to use visual studio project files and gui in winapi (changelog for 0.4.1.2 contains that both was added) ;D
Actually russians have from SVN compiled PtokaX mod for windows ::)
Quote from: Mutor on 22 April, 2012, 03:01:08
My point was that it is and was closed source.
And you are wrong. Not only that i'm make PtokaX opensource, but i'm make available all libs sources. Even when for most of them i don't need to.
Quote from: Mutor on 22 April, 2012, 03:01:08
Anybody that wants them can compile libs for Windows.
That doesn't mean they will work in Px. Historically, they don't.
They don't  ??? Only who failed was bluebear and all what he need to do to success was to compile existing libs and not create his buggy ones. Others don't have problem with libs compile. Russians have on their board working libs compiled by them  :P
Quote from: Mutor on 22 April, 2012, 03:01:08
By the same token I feel the extensions for a closed source project is the responsibility of that
project's author not it's end users.
Scripters want to use libs, they should do something to have them. Even if they are stupid and thinks that something is closed source when don't. Even when they are stupid and dreaming about standard lua lib  ;D
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

SMF spam blocked by CleanTalk