Author Topic: How to compile bot  (Read 7987 times)

0 Members and 1 Guest are viewing this topic.

Offline JueLz

  • Double Ace
  • *
  • Posts: 103
  • Karma: +8/-14
  • HT 500
How to compile bot
« 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 ??!!!
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

PtokaX forum

How to compile bot
« on: 25 August, 2006, 20:38:13 »

Offline Stormbringer

  • Fulll Member
  • ****
  • Posts: 73
  • Karma: +27/-17
Re: How to compile bot
« Reply #1 on: 25 August, 2006, 21:50:08 »
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...

Offline st0ne-db

  • Scripter
  • Double Ace
  • ******
  • Posts: 107
  • Karma: +14/-3
Re: How to compile bot
« Reply #2 on: 25 August, 2006, 22:51:00 »
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
« Last Edit: 25 August, 2006, 23:09:05 by st0ne-db »

Offline JueLz

  • Double Ace
  • *
  • Posts: 103
  • Karma: +8/-14
  • HT 500
Re: How to compile bot
« Reply #3 on: 25 August, 2006, 23:01:29 »
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]                          =--

Offline st0ne-db

  • Scripter
  • Double Ace
  • ******
  • Posts: 107
  • Karma: +14/-3
Re: How to compile bot
« Reply #4 on: 25 August, 2006, 23:08:47 »
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

« Last Edit: 25 August, 2006, 23:10:22 by st0ne-db »

Offline Thor

  • Scripter
  • Lord
  • ******
  • Posts: 290
  • Karma: +45/-5
    • Hungarian Direct Connect Site
Re: How to compile bot
« Reply #5 on: 25 August, 2006, 23:12:14 »
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

Offline Stormbringer

  • Fulll Member
  • ****
  • Posts: 73
  • Karma: +27/-17
Re: How to compile bot
« Reply #6 on: 25 August, 2006, 23:59:06 »
Quote
Posted 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

Offline st0ne-db

  • Scripter
  • Double Ace
  • ******
  • Posts: 107
  • Karma: +14/-3
Re: How to compile bot
« Reply #7 on: 26 August, 2006, 00:10:42 »
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

Offline JueLz

  • Double Ace
  • *
  • Posts: 103
  • Karma: +8/-14
  • HT 500
Re: How to compile bot
« Reply #8 on: 26 August, 2006, 00:48:44 »
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]                          =--

Offline st0ne-db

  • Scripter
  • Double Ace
  • ******
  • Posts: 107
  • Karma: +14/-3
Re: How to compile bot
« Reply #9 on: 26 August, 2006, 03:27:44 »
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




« Last Edit: 26 August, 2006, 04:11:07 by st0ne-db »

Offline JueLz

  • Double Ace
  • *
  • Posts: 103
  • Karma: +8/-14
  • HT 500
Re: How to compile bot
« Reply #10 on: 26 August, 2006, 10:22:37 »
Thanks Stone it works
I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

Offline st0ne-db

  • Scripter
  • Double Ace
  • ******
  • Posts: 107
  • Karma: +14/-3
Re: How to compile bot
« Reply #11 on: 26 August, 2006, 10:33:07 »
Thanks Stone it works

No problem  :)

Offline speedX

  • Lord
  • ***
  • Posts: 437
  • Karma: +59/-19
Re: How to compile bot
« Reply #12 on: 26 August, 2006, 10:35:36 »
aaaaa.....can anyone tel me wat is the use to compile a script??
Thanking You,

speedX

Offline st0ne-db

  • Scripter
  • Double Ace
  • ******
  • Posts: 107
  • Karma: +14/-3
Re: How to compile bot
« Reply #13 on: 26 August, 2006, 10:45:24 »
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

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: How to compile bot
« Reply #14 on: 26 August, 2006, 12:04:21 »
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

  • Guest
Re: How to compile bot
« Reply #15 on: 26 August, 2006, 12:19:47 »
Noone can see your l4m3r coding. :P
And some idiots can create commercial scripts for verli.
commercial ? how do you mean that ?

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: How to compile bot
« Reply #16 on: 26 August, 2006, 12:24:45 »
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.
« Last Edit: 26 August, 2006, 12:33:08 by bastya_elvtars »
Everything could have been anything else and it would have just as much meaning.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: How to compile bot
« Reply #17 on: 26 August, 2006, 14:04:30 »
DC is open source
No, Direct Connect is not opensource :P
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline Stormbringer

  • Fulll Member
  • ****
  • Posts: 73
  • Karma: +27/-17
Re: How to compile bot
« Reply #18 on: 26 August, 2006, 15:36:30 »
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.

Offline JueLz

  • Double Ace
  • *
  • Posts: 103
  • Karma: +8/-14
  • HT 500
Re: How to compile bot
« Reply #19 on: 26 August, 2006, 18:09:17 »
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]                          =--

Offline Northwind

  • Triple Ace
  • **
  • Posts: 213
  • Karma: +10/-2
Re: How to compile bot
« Reply #20 on: 26 August, 2006, 20:44:26 »
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...


Offline JueLz

  • Double Ace
  • *
  • Posts: 103
  • Karma: +8/-14
  • HT 500
Re: How to compile bot
« Reply #21 on: 26 August, 2006, 21:20:05 »
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]                          =--

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: How to compile bot
« Reply #22 on: 27 August, 2006, 12:44:21 »
i am compiling scripts because of a server i have ...

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

Offline Mik13

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: How to compile bot
« Reply #23 on: 25 February, 2007, 15:55:17 »
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         :)

Offline Psycho_Chihuahua

  • Systemspecialist IT
  • Emperor
  • **
  • Posts: 1 054
  • Karma: +112/-1
  • I am wherever i want to be
    • PtokaX Luaboard
Re: How to compile bot
« Reply #24 on: 25 February, 2007, 16:04:07 »
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

PtokaX forum

Re: How to compile bot
« Reply #24 on: 25 February, 2007, 16:04:07 »