Author Topic: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher  (Read 6210 times)

0 Members and 1 Guest are viewing this topic.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
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)
« Last Edit: 16 April, 2012, 14:50:44 by PPK »
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PtokaX forum


Offline prop2012

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-1
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #1 on: 14 April, 2012, 21:58:50 »
PPK, tried your method...

but running into the following error:
« Last Edit: 14 April, 2012, 22:02:22 by prop2012 »

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #2 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 ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline prop2012

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-1
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #3 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.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #4 on: 15 April, 2012, 08:48:21 »
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

Offline Nautilus

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #5 on: 15 April, 2012, 14:13:54 »
Hi I get this error..... and IM follow the instruktions. Someone know the problems

Code: [Select]
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.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #6 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  ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline prop2012

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-1
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #7 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....

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #8 on: 16 April, 2012, 14:52:40 »
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.
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

Offline prop2012

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-1
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #9 on: 19 April, 2012, 17:12:07 »
Yes it's there...

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 730
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #10 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.
Everything could have been anything else and it would have just as much meaning.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #11 on: 20 April, 2012, 16:21:44 »
This will be my bug :P That happen when scripters (i'm pointing to American Idiot) 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

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #12 on: 21 April, 2012, 17:06:32 »
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

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #13 on: 22 April, 2012, 02:01:04 »
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:
Code: [Select]
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)
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 ::)
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.
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.
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.
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

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #14 on: 22 April, 2012, 02:30:21 »
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

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 478
  • Karma: +209/-22
  • PtokaX developer
Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #15 on: 22 April, 2012, 12:28:15 »
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)
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 ::)
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.
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
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
« Last Edit: 22 April, 2012, 12:31:19 by PPK »
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

PtokaX forum

Re: How to run DiXBot on PtokaX 0.4.2.0 build 376 and higher
« Reply #15 on: 22 April, 2012, 12:28:15 »