PtokaX forum

Archive => AllInOne Scripts => Archived 5.1 boards => DiXBoT => Topic started by: PPK on 14 April, 2012, 17:07:17

Title: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 14 April, 2012, 17:07:17
Prerequisites
PtokaX 0.4.2.0 build 376 GUI 32bit with Lua 5.1.5 (http://www.ptokax.org/files/0.4.2.0b376-Lua5.1.5.7z) or Service 32bit with Lua 5.1.5 (http://www.ptokax.org/files/0.4.2.0b376-Lua5.1.5-service.7z).

LuaFileSystem 1.5.0 32bit library (http://www.ptokax.org/files/Libs-376/LuaFileSystem-1.5.0.7z).
LuaSocket 2.0.0 32bit library (http://www.ptokax.org/files/Libs-376/LuaSocket-2.0.2.7z).
Last DiXBoT build, script only (http://demo.dixbot.com/dixbot/Builds/DiXBoT%20v2.1%20Build%203072.zip).

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)
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: prop2012 on 14 April, 2012, 21:58:50
PPK, tried your method...

but running into the following error:
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 14 April, 2012, 22:23:04
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 ::)
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: prop2012 on 15 April, 2012, 08:23:12
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.
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 15 April, 2012, 08:48:21
Ops, sorry. I has typo in luafilesystem url :-X Now it points to correct one :P
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: Nautilus on 15 April, 2012, 14:13:54
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.
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 15 April, 2012, 22:04:02
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  ::)
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: 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.
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....
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 16 April, 2012, 14:52:40
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\ ?
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: prop2012 on 19 April, 2012, 17:12:07
Yes it's there...
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: bastya_elvtars on 19 April, 2012, 21:39:27
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.
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 20 April, 2012, 16:21:44
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
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 21 April, 2012, 17:06:32
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
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 22 April, 2012, 02:01:04
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...
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 22 April, 2012, 02:30:21
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 ;)
Title: Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
Post by: PPK on 22 April, 2012, 12:28:15
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 (http://mydc.ru/forum33.html) 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