Difference in LUA and regular eA

By Aeromas, 1 Month ago, written in cpp.
Different in LUA scripting:

Functions for scripts are completely different, you add npcs in a script with "addnpc"(etc)
And you can include all the txt documents of npcs in a folder like this

require "script/npc/folder" All npcs in FOLDER will be executed! Makes it less messy!

Example of script in LUA: /*NOTE THESE 2 SCRIPTS IN TRUNK/STABLE EA SCRIPTING DOES THE SAME THINGS AS LUA SCRIPTING
*/

addnpc("Thisnpc","2ndNAME","izlude.gat",170,180,1,122,"talktonpc") 

function talktonpc() 
npcmes "whatever" 
npcmes "Choose menu yes or no" 
npcnext() // next button
 local r = npcmenu("Yes",1,"No",2) 
if r == 1 then yesfunction; 
elseif r == 2 then nofunction; 
else 
npcclose() 
end 
end 

function yesfunction() 
npcmes "hi" 
npcclose() 
end 

function nofunction() 
npcmes "oh okay, bye" 
end 
end 


Example of script in regular ea trunk/stable (Note there the same)

izlude.gat,170,180,1   script  Thisnpc   122,{

mes "whatever";
mes "Choose menu yes or no";
next;
menu "Yes",yes,"No",no;
yes:
mes "hi";
close;
no:
mes "oh okay, bye";
close;
}