meu script esta com o seguinte problema:
[22/07/2010 09:03:17] [Error - LuaScriptInterface::loadFile] data/npc/scripts/Manwe.lua:27: unexpected symbol near 'then'
[22/07/2010 09:03:17] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/Manwe.lua
[22/07/2010 09:03:17] data/npc/scripts/Manwe.lua:27: unexpected symbol near 'then'
Pelo q eu entendo tem um simbulo errado perto de um then, mas eu ja tentei de tudo e a unica coisa q funcionou
foi deletar todos esses "do", ou seja, o meu npc ficaria inutil T_T socorro
ta aki o meu script do npc
local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
if msgcontains (msg, 'raça') then
if getPlayerStorageValue(cid,30013) == 1 then
selfSay('Voce veio ao lugar certo, o Rei de Arda! Me diga, jovem alma, qual a sua raça? um orc?',cid)
setPlayerStorageValue(cid, 30013, 1)
end
if msgcontains(msg, 'orc') then
if getPlayerStorageValue(cid, 30013) == -1 then
selfsay('Hmm, entao lhe enviarei para seus semelhantes!',cid)
doPlayerRemoveOutfit(cid,333) then
doPlayerAddOutfit(cid,5) then
doTeleportThing(cid,x=175 y=175 z=7) then
doPlayerSetSex(cid,1) then
end
end
end
return false
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())