03-29-2011, 09:27 AM
All scripts and plugins base on Lua language.
Language is simple but for people who know something about programing allow to use other things (like classes, other extensions...)
Lua is language used for making extensions to games, program AI (In WoW, GTA for example.).
Why Lua ? Hmm, it's fast, easy to integrate, works, and lot of people know it.
Links:
To start create folder named "scripts" in L2Tower directory. And create file *.lua.
Example of script:
Use CH BSOE when HP go lower than 5%.
Important: Every function listed here what returns * (pointer) to something. Like GetTarget(), may return NULL (nil in lua). GetMe will never return NULL .
Language is simple but for people who know something about programing allow to use other things (like classes, other extensions...)
Lua is language used for making extensions to games, program AI (In WoW, GTA for example.).
Why Lua ? Hmm, it's fast, easy to integrate, works, and lot of people know it.
Links:
- http://www.lua.org/manual/5.1/
- http://www.rasterbar.com/products/luabind/docs.html
- http://lua-users.org/wiki/TutorialDirectory
- http://luatut.com/
- http://www.ac-web.org/forums/showthread.php?t=70966
- http://lua.gts-stolberg.de/en/
- http://cpp0x.pl/forum/temat/?id=904
To start create folder named "scripts" in L2Tower directory. And create file *.lua.
Example of script:
Use CH BSOE when HP go lower than 5%.
Code:
repeat
Sleep(100);
until GetMe():GetHpPrecent()<5.0;
if (GetMe():IsAlikeDeath() == false) then
UseItem(5858);
end;
ShowToClient("Script", "Ups, you have low HP");
Important: Every function listed here what returns * (pointer) to something. Like GetTarget(), may return NULL (nil in lua). GetMe will never return NULL .