Postado Fevereiro 1, 2015 10 anos Autor Quando vou sumonar o npc Rico da este erro no distro : [Error - LuaScriptInterface::loadFile] data/npc/scripts/rico.lua:32: 'then' expected near 'npcHandler' [01/02/2015 07:26:13] [Warning - NpcScript::NpcScript] Cannot load script: data/npc/scripts/rico.lua [01/02/2015 07:26:13] data/npc/scripts/rico.lua:32: 'then' expected near 'npcHandler' Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
Postado Fevereiro 1, 2015 10 anos local table = { stg = 99487, -- Não mudar stg2 = 99488, -- Não mudar itemid = 3184 -- Id do item que irá ganhar } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) npcHandler.topic = {} 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 if getPlayerStorageValue(cid, table.stg) > 0 then if getPlayerStorageValue(cid, table.stg2) < 1 then if msgcontains(msg, 'mendigo') then npcHandler:say('Ah e voce amigo, eu era aquele mendigo sim, aconteceu varias coisas e aqui estou hahaha... brincadeiras a parte, tenho {algo} pra te dar por ter me ajudado.', cid) npcHandler.topic[cid] = 1 elseif msgcontains(msg:lower(), 'algo') and npcHandler.topic == 1 then npcHandler:say('Sim, faça bom proveito disso.', cid) doPlayerAddItem(cid, table.itemid, 1) setPlayerStorageValue(cid, table.stg2, 1) npcHandler.topic[cid] = 0 end else npcHandler:say('Foi muito bom te conhecer cara, te considero até hoje', cid) npcHandler.topic[cid] = 0 end else npcHandler:say('Nem te conheço cara... vá embora', cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Postado Fevereiro 2, 2015 10 anos Autor Funcionou vlw Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.