So, you say !demon, and this is supposed to tp you to demon if you have an item.
Lua:
local table = {
['!demon'] = {{x=94, y=125, z=7},5},
['!hydra'] = {{x=88, y=127, z=7},5}
}
function onSay(cid, words, param, channel)
if getPlayerItemCount(cid,2345) == TRUE then
for v = 1, #table do
if msgcontains(msg, [v]) then
doTeleportThing(cid, v[1])
doSendMagicEffect(ppos,v[2])
elseif getPlayerItemCount(cid,2345) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need a tp wand for this")
end
return true
end
end
end
Code:
[Error - LuaScriptInterface::loadFile] data/talkactions/scripts/tpsay.lua:9: unexpected symbol near '['
[29/11/2010 16:36:39] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/tpsay.lua)
[29/11/2010 16:36:39] data/talkactions/scripts/tpsay.lua:9: unexpected symbol near '['
[29/11/2010 16:36:39] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/tpsay.lua:9: unexpected symbol near '['
[29/11/2010 16:36:39] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/tpsay.lua)
[29/11/2010 16:36:39] data/talkactions/scripts/tpsay.lua:9: unexpected symbol near '['