Postado Fevereiro 12, 2018 7 anos Olá Pessoal, estou com problema nos meus scripts, estou fazendo um ot oldschool no otx 3.10 mas estou com problema, aparentemente eu já sei onde está o problema mas não sei como resolver, no caso a linha do script do npc é, (isso com todos os arquivos dentro da pasta script) npcHandler:say('Splendid! Here take your pickaxe.') os say do npc só funcionam se eu colocar ,cid no final, ficando assim npcHandler:say('Splendid! Here take your pickaxe.',cid) fazendo isso funciona, mas são mais de 200 scripts, então eu queria arrumar essa função no npc handler para não precisar mudar todos os scripts de um a um, alguem tem ideia de como fazer ? Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). otx3.10 Base: otx3.10 baseado no tfs Qual erro está surgindo/O que você procura? [C]: in function '__newindex' data/npc/lib/npcsystem/npchandler.lua:609: in function 'say' data/npc/scripts/aldee.lua:19: in function 'callback' data/npc/lib/npcsystem/npchandler.lua:415: in function 'onCreatureSay' data/npc/scripts/aldee.lua:7: in function <data/npc/scripts/aldee.lua:7> Você tem o código disponível? Se tiver publique-o aqui: npcHandler:say('Splendid! Here take your pickaxe.') npcHandler:say('Splendid! Here take your pickaxe.') function NpcHandler:onCreatureSay(creature, msgtype, msg) local cid = creature:getId() local callback = self:getCallback(CALLBACK_CREATURE_SAY) if callback == nil or callback(cid, msgtype, msg) then if self:processModuleCallback(CALLBACK_CREATURE_SAY, cid, msgtype, msg) then if not self:isInRange(cid) then return end if self.keywordHandler ~= nil then if self:isFocused(cid) or not self:isFocused(cid) then local ret = self.keywordHandler:processMessage(cid, msg) if not ret then local callback = self:getCallback(CALLBACK_MESSAGE_DEFAULT) if callback ~= nil and callback(cid, msgtype, msg) then self.talkStart[cid] = os.time() end else self.talkStart[cid] = os.time() end end end end end end function NpcHandler:say(message, focus, publicize, shallDelay, delay) if type(message) == "table" then return self:doNPCTalkALot(message, delay or 6000, focus) end if self.eventDelayedSay[focus] then self:cancelNPCTalk(self.eventDelayedSay[focus]) end local shallDelay = not shallDelay and true or shallDelay if NPCHANDLER_TALKDELAY == TALKDELAY_NONE or shallDelay == false then selfSay(message, focus, publicize and true or false) return end stopEvent(self.eventSay[focus]) self.eventSay[focus] = addEvent(function(npcId, message, focusId) local npc = Npc(npcId) if npc == nil then return end local player = Player(focusId) if player then npc:say(message:gsub("|PLAYERNAME|", player:getName()), TALKTYPE_SAY) end end, self.talkDelayTime * 1000, Npc():getId(), message, focus) end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
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.