How to compile bot
 

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 compile bot

Started by JueLz, 25 August, 2006, 20:38:13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JueLz

I have a bot with some commands i'd like to compile for my hub....
does anyone know how to compile ??!!!
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

Stormbringer

It sucks to compile script...
DC is open source, the bot should stay open source too...
You can use the text editor Scite to compile scripts, but it sucks...

st0ne-db

#2
Quote from: JueLz on 25 August, 2006, 20:38:13
I have a bot with some commands i'd like to compile for my hub....
does anyone know how to compile ??!!!

download the LUA binaries from:

LUA 5.1.1
LUA 5.0.2


Extract the files and look for:

luac5.exe   <-- LUA 5.1.1
luac50.exe <-- LUA 5.0.2

open a DOS window... and compile the script..

luac5 luascript.lua

after completion look for the file called a.out in the folder you compiled in.
rename it from luac.out to desired scriptname.lua

thats it, hope this help you.

-St0ne db

JueLz

ill try it out
Posted on: 25 August 2006, 23:56:54
Can you write down here the commands on how to compile
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

st0ne-db

#4
Quote from: JueLz on 25 August, 2006, 23:01:29
Can you write down here the commands on how to compile

Get the binaries from my last post..

open a DOS window..  goto Start --> Run --> cmd.exe

then change directory to where you extracted the files...


C:\Documents and Settings\St0ne db>cd \lua

run the compiler....

C:\lua>luac50 myscript.lua

look for the file called  luac.out


C:\lua>dir

Directory of C:\lua

08/25/2006  04:05 PM    <DIR>          .
08/25/2006  04:05 PM    <DIR>          ..
07/31/2006  05:34 PM    <DIR>          bak
05/05/2005  08:30 AM           106,496 lua50.dll
03/18/2005  11:11 AM           217,088 lua50.exe
08/25/2006  04:05 PM             9,253 luac.out
03/18/2005  11:11 AM           114,688 luac50.exe
08/01/2006  09:37 PM             9,827 myscript.lua
08/05/2006  02:26 AM    <DIR>          tar
              17 File(s)      1,037,035 bytes
               6 Dir(s)   9,322,995,712 bytes free



rename it to whatever you want..

C:\lua>ren luac.out myscript-c.lua


-St0ne db


Thor

Quote from: st0ne-db on 25 August, 2006, 22:51:00
open a DOS window... and compile the script..

luac5 luascript.lua
Start menu -> Run... -> cmd
Go into the folder where you extracted the luac5 file and write then eg.:
luac5 c:\PtokaX\scripts\I_wanna_compie_it.lua
then you see in there an I_wanna_compie_it.out file. You should rename it to the filename, what you want, like this: whis_is_my_firstandlast_compoled_bot.lua ;D

Stormbringer

QuotePosted by: Hungarista
Start menu -> Run... -> cmd
Go into the folder where you extracted the luac5 file and write then eg.:
luac5 c:\PtokaX\scripts\I_wanna_compie_it.lua
then you see in there an I_wanna_compie_it.out file. You should rename it to the filename, what you want, like this: whis_is_my_firstandlast_compoled_bot.lua Grin

just a correction Hungarista:
The output filename is:
This_is_my_firstandlast_compiled_bot_It's_a_promise.lua
Grin

st0ne-db

Quote from: Stormbringer on 25 August, 2006, 23:59:06
just a correction Hungarista:
The output filename is:
This_is_my_firstandlast_compiled_bot_It's_a_promise.lua
Grin

This is the way luac works....

usage: luac [options] [filenames].  Available options are:
  -        process stdin
  -l       list
  -o name  output to file `name' (default is "luac.out")
  -p       parse only
  -s       strip debug information
  -v       show version information
  --       stop handling options



without the -o switch the compiler will use the default output name of:  luac.out

to specify a different filename..

luac -o luascript-c.lua luascript.lua

-St0ne db

JueLz

1 question can't i run it the normal way?
like... just clickin in the icon?
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

st0ne-db

#9
no, it uses a command line interface... DOS is the only way.
But you can add it to the context menu in windows xp. Here's how:

Open My Computer..
Click Tools --> Folder Options..
Click the File Types tab..
Find the extension LUA in the list, highlight it..
Click the Advanced button..
Click New..

For LUA5.0.2 enter these values:

Action:  Compile -> LUA5.0.2
Application: "C:\LUA\LUAC5.EXE" -o "%L.c50" "%L"

making sure to set the correct path to the lua compiler

For LUA5.1.1 enter these values:

Action: Compile -> LUA5.1.1
Application: "C:\LUA\LUAC5.1.EXE" -o "%L.c51" "%L"

again... the path is very important.. make sure it is correct.

Click Ok... Ok...

your done... now when you right click on a lua file you can compile it... and a new file will appear
in the current folder with the extension of .c50 or c51 for lua5.0.2 and lua5.1.1
just rename the file to .lua and you are done.

-St0ne db





JueLz

I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

st0ne-db


speedX

aaaaa.....can anyone tel me wat is the use to compile a script??
Thanking You,

speedX

st0ne-db

Quote from: speedX on 26 August, 2006, 10:35:36
aaaaa.....can anyone tel me wat is the use to compile a script??

"The main advantages of precompiling chunks are: faster loading, protecting source code from user changes, and off-line syntax error detection."

"Pre-compiling does not imply faster execution because in Lua chunks are always compiled into bytecodes before being executed. luac simply allows those bytecodes to be saved in a file for later execution."

check this page http://www.lua.org/manual/4.0/luac.html

or just google "luac" and hit 'im feeling lucky'   :P

-St0ne db

bastya_elvtars

Quote from: speedX on 26 August, 2006, 10:35:36
aaaaa.....can anyone tel me wat is the use to compile a script??

Noone can see your l4m3r coding. :P
And some idiots can create commercial scripts for verli.
Everything could have been anything else and it would have just as much meaning.

Herodes

Quote from: bastya_elvtars on 26 August, 2006, 12:04:21
Noone can see your l4m3r coding. :P
And some idiots can create commercial scripts for verli.
commercial ? how do you mean that ?

bastya_elvtars

#16
Quote from: Herodes on 26 August, 2006, 12:19:47
commercial ? how do you mean that ?

Sell it for money. It's an antiflood script.

You've gotta be the member of the closed section, pay a fee of 10EUR per year.
Then you can get the script. It is compiled, and will work only on your hub. No warranties, and you will be banned from the closed section if you redistribute, these terms and conditions can be changed anytime.
This is a quick version of what is described here.
Everything could have been anything else and it would have just as much meaning.

PPK

"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Stormbringer

Thx PPK, one more time... I don't know how I could live without you....
The compilation sucks, it's a fact.
Soooooooo fun when you want change something in the script, and you can't cause the code is block!!!!
Even for design impossible to change even one line, sorry but the compilation is a true shit.
Compiled script are not flexible, and most of hub owners are looking for flexible scripts, that you can customize to looks pretty on your hub.

JueLz

Yes but i want to compile a bot for a major good reason
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

Northwind

Quote from: JueLz on 26 August, 2006, 18:09:17
Yes but i want to compile a bot for a major good reason
hmhm i not seeing any of your scripts on any lua board. So does this mean u use others code and brand it to your own. I think answer is yes when u didnt already know how to compile scripts. I never liked robocop as it was compiled, now im happy with leviathan what has all i need and its not compiled. I can say that most of users aint want to use compiled as they are less configurable...


JueLz

I also love leviathan
i don't like compiled bot.....
i am compiling scripts because of a server i have ...
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

bastya_elvtars

Quote from: JueLz on 26 August, 2006, 21:20:05
i am compiling scripts because of a server i have ...

???
Everything could have been anything else and it would have just as much meaning.

Mik13

It is possible,  to compile only a part of a code that it would be possible to change the menu and some options?
Excuse for my English         :)

Psycho_Chihuahua

You could compile the bot and use a *.ini file for various settings.

But like most others think here - COMPILING IS LAME -  :P

"Exeption: Scripts like D2AF are best to be compiled so no sukkers can get around the security or identification methods"
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

SMF spam blocked by CleanTalk