lua脚本代码大全,求所有搬运鼠lua的代码

1,求所有搬运鼠lua的代码cheese.formice.com/forum/threads/lua-documentation.52054/官方的【翻译无力=A=诶 。。是/XXXXXX之类的吗?再看看别人怎么说的 。【lua脚本代码大全,求所有搬运鼠lua的代码】
2,LUA脚本中输出一个信息到一个文本中的代码是什么function fun()if a > 5 thenreturnelseprint(a)end只要用个return就可以了最简单的方法:io.output("test.txt")io.write("This is a test string!\n") 或者:local f = assert(io.open("test.txt", "w"))f:write("This is a test string!\n")f:close()
3,lua脚本怎么写出来一个自动点开某程序功能的代码如下代码 :ret = NPCDialog( "Hello bitch" )if ret == OK then print("OK") end对于策划而言 , NPCDialog应该是阻塞的,除家操作此对话框,点击OK或者关闭,不然该函数不会返回 。而对于宿主程序C++而言,如何实现这个函数呢:static int do_npc_dialog( lua_State *L )const char *content = lua_tostring( L, -1 );lua_pushnumber( ret );return 1;}
4,lua给一个完成的读文件和写文件的代码另外还有没有LUA比较实用的1.txt文件------------------------1234567890------------------------read.lua读-----------------------local file = io.open("1.txt")for l in file:lines() do print(l)endfile:close()----------------------write.lua 写----------------------local file = io.open("2.txt","w")file:write("12345")file:close()---------------------------------------ps:网友都是抱着帮大家回答问题 互相帮助的目的才来回答问题的 而不是图你这点分再就是 连初始分都没的题目 也不会有人指望你给多少分的

    推荐阅读