I have to thanks first our friend Capaverde (user form another forum) he have done thue fist version of this script (first but too much bugged)
But now is another version better ;D
What this command does?
You say can execute some piece of script like this:
Well, to install is easy, add this tag on talkactions.xml:
And on lua.lua
add this:
:thumbup:
But now is another version better ;D
What this command does?
You say can execute some piece of script like this:
And more./lua doCreatureSay(getPlayerByName('Player'),'omg!',1)
/lua doRemoveCreature(getPlayerByName('Player'))
/lua print('Hello word!')
/lua saveServer() os.exit()
/lua ...
Well, to install is easy, add this tag on talkactions.xml:
Code:
<talkaction log="yes" access="5" words="/lua" event="script" value="lua.lua"/>
add this:
Lua:
function onSay(cid, words, param) --- command /lua By mock
_G.cid = cid
local f , err = loadstring(param)
if f then
local ret,err = pcall(f)
if not ret then
doPlayerSendTextMessage(cid, 25,'Lua error:\n'..err)
end
else
doPlayerSendTextMessage(cid, 25,'Lua error:\n'..err)
end
return TRUE
end