mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-19 14:13:27 +02:00
Version 2.3 - cooldowns in action bar, more advanced bot, new cavebot, bug fixes
This commit is contained in:
@@ -337,7 +337,7 @@ function executeCommand(command)
|
||||
-- detect and convert commands with simple syntax
|
||||
local realCommand
|
||||
if string.sub(command, 1, 1) == '=' then
|
||||
realCommand = 'print(' .. string.sub(command,2) .. ')'
|
||||
realCommand = 'print(tostring(' .. string.sub(command,2) .. '))'
|
||||
else
|
||||
realCommand = command
|
||||
end
|
||||
@@ -363,6 +363,8 @@ function executeCommand(command)
|
||||
addLine('ERROR: incorrect lua syntax: ' .. err:sub(5), 'red')
|
||||
return
|
||||
end
|
||||
|
||||
commandEnv['player'] = g_game.getLocalPlayer()
|
||||
|
||||
-- setup func env to commandEnv
|
||||
setfenv(func, commandEnv)
|
||||
|
Reference in New Issue
Block a user