Postado Agosto 9, 2012 12 anos boa cara! mais deu esse erro aki: [09/08/2012 03:58:48] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/blocklinks.lua:52: unfinished long comment near '<eof>' [09/08/2012 03:58:48] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/blocklinks.lua) [09/08/2012 03:58:48] data/talkactions/scripts/blocklinks.lua:52: unfinished long comment near '<eof>'
Postado Agosto 11, 2012 12 anos function getFixedText(cid, text, replace) local wrongWords = {"otservlist.org", "ots-list.pl", "servegame.com", "no-ip.biz", "hopto.org", "no-ip.org", ".com"} local lowerText = string.lower(text) local noSpaceText = string.gsub(string.gsub(string.gsub(lowerText, "%s", ""), "%p", ""),"-", "") for w = 1, #wrongWords do wordLen = string.len(wrongWords[w]) for p = 1, string.len(text) do if(string.sub(lowerText, p, p+wordLen-1) == wrongWords[w]) then text = string.sub(text, 1, p-1) .. string.rep(replace, wordLen) .. string.sub(text, p+wordLen) end end end if(string.lower(text) == lowerText) then for c = 1, #wrongWords do if(string.find(noSpaceText, string.gsub(string.gsub(wrongWords[c], "%p", ""),"-", "")) ~= nil) then return "I want to post forbidden links.." end end end return text end local blocked_channels = {5,8,9} --Game-Chat, Real Chat, Help Channel local trade_channels = {6,7} --All trade channels <- These are also blocked local replace = "°" --Symbols which are shown instead of forbidden links -> ° local delay = {16246,5} -- {empty_storage, lenght of muted} function onSay(cid, words, param, channel) local fixedWords = getFixedText(cid, words, replace) if words ~= fixedWords and getPlayerAccess(cid) == 0 then if getPlayerStorageValue(cid,delay[1]) > os.time() then return doPlayerSendCancel(cid,"You are still muted for ".. getPlayerStorageValue(cid,delay[1])-os.time() .." seconds.") end setPlayerStorageValue(cid,delay[1],os.time()+delay[2]) if channel == CHANNEL_DEFAULT then doCreatureSay(cid, fixedWords, TALKTYPE_SAY) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden.") return true elseif isInArray(trade_channels, channel) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden on the trade channel.") return true elseif isInArray(blocked_channels, channel) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden.") doPlayerSendChannelMessage(cid, getCreatureName(cid), fixedWords, TALKTYPE_CHANNEL_Y, channel) return true end end return false end troca por esse Retirado. Skype: joaoxtibia85.
Postado Agosto 11, 2012 12 anos arrumado, chequem meu post edit: sky foi alguns segundos mais rapido. enfim. arrumei lá. Editado Agosto 11, 2012 12 anos por dukeeh (veja o histórico de edições)
Postado Agosto 13, 2012 12 anos SHOW DE BOLA, agora nao tem como os cara anunciar mesmo usando ip com letras minuscular e maiusculas haha, valew mesmo brow, funfo certinho, to usandocom o trunk3777 e suas dlls abrç Aldebaran-OT Baiak Custom inaugurado 27/08/12
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.