Ir para conteúdo

vitinhoo96

Membro
  • Registro em

  • Última visita

Tudo que vitinhoo96 postou

  1. Sim consegui arruma aqui, era so fechar com end haha vlw
  2. Apareceu esse erro quando fui abrir o ot pra testar >>> Loading talkactions... [Error - LuaInterface::loadFile] data/talkactions/scripts/autoloot.lua:9: unexpected symbol near 'if' [Error - Event::checkScript] Cannot load script (data/talkactions/scripts/autoloot.lua) data/talkactions/scripts/autoloot.lua:9: unexpected symbol near 'if' Script do autoloot e como coloquei o que me passou -- Sistema de auto loot criado por V�tor Bertolucci - Killua function onUse(cid, item, toPosition) exhausted = 20 -- tempo em segundos storage = 5858, -- Storage usada para o exhausted if (getPlayerStorageValue(cid, cfg.storage) > os.time() and getPlayerStorageValue(cid, cfg.storage) < 100+os.time()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Aguarde um momento para" .. getPlayerStorageValue(cid, cfg.storage) - os.time() .. ' second' .. ((getPlayerStorageValue(cid, cfg.storage) - os.time()) == 1 and "" or "s") .. " usar esse comando novamente.") function ExistItemByName(name) -- by vodka local items = io.open("data/items/items.xml", "r"):read("*all") local get = items:match('name="' .. name ..'"') if get == nil or get == "" then return false end return true end local function getPlayerList(cid) local tab = {} if getPlayerStorageValue(cid, 04420021) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420021)) end if getPlayerStorageValue(cid, 04420031) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420031)) end if getPlayerStorageValue(cid, 04420041) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420041)) end if getPlayerStorageValue(cid, 04420051) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420051)) end if #tab > 0 then return tab end return false end local function addToList(cid, name) local itemid = getItemIdByName(name) if getPlayerList(cid) and isInArray(getPlayerList(cid), itemid) then return false end if getPlayerStorageValue(cid, 04420021) == -1 then return doPlayerSetStorageValue(cid, 04420021, itemid) elseif getPlayerStorageValue(cid, 04420031) == -1 then return doPlayerSetStorageValue(cid, 04420031, itemid) elseif getPlayerStorageValue(cid, 04420041) == -1 then return doPlayerSetStorageValue(cid, 04420041, itemid) elseif getPlayerStorageValue(cid, 04420051) == -1 then return doPlayerSetStorageValue(cid, 04420051, itemid) end end local function removeFromList(cid, name) local itemid = getItemIdByName(name) if getPlayerStorageValue(cid, 04420021) == itemid then return doPlayerSetStorageValue(cid, 04420021, -1) elseif getPlayerStorageValue(cid, 04420031) == itemid then return doPlayerSetStorageValue(cid, 04420031, -1) elseif getPlayerStorageValue(cid, 04420041) == itemid then return doPlayerSetStorageValue(cid, 04420041, -1) elseif getPlayerStorageValue(cid, 04420051) == itemid then return doPlayerSetStorageValue(cid, 04420051, -1) end return false end function onSay(cid, words, param) if param == "" then local fi = getPlayerStorageValue(cid, 04420021) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420021)) or "" local se = getPlayerStorageValue(cid, 04420031) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420031)) or "" local th = getPlayerStorageValue(cid, 04420041) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420041)) or "" local fo = getPlayerStorageValue(cid, 04420051) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420051)) or "" local stt = getPlayerStorageValue(cid, 04421011) == 1 and "sim" or "nao" local str = getPlayerStorageValue(cid, 04421001) == 1 and "sim" or "nao" doPlayerPopupFYI(cid, "<--- Informacoes Do Auto Loot --->\n\n--Configurando o AutoLoot--\n\n1- Coletar Dinheiro: !autoloot gold\n2- Ligar coleta de items: !autoloot power\n3- Para adicionar um novo item no autoloot, digite: !autoloot add, nome do item\n4- Para retirar um item do autoloot, digite: !autoloot remove, nome do item\n5- Para limpar todos os slots, digite: !autoloot clear\n6- Para informacoes de quanto voce ja fez utilizando a coleta de dinheiro, use: !autoloot goldinfo\n7- Se seu autoloot bugar use !autoloot desbug\n\n\n[Coletar dinheiro] --- Ligado? ("..stt..").\n[Coletar itens] --- Ligado? ("..str..").\n\n----- Configuracao Dos Slots -----\n[AUTO-LOOT] ---Slot 1: "..fi.."\n[AUTO-LOOT] ---Slot 2: "..se.."\n[AUTO-LOOT] ---Slot 3: "..th.."\n[AUTO-LOOT] ---Slot 4: "..fo.."\n\n\n\n\nWars-Baiak\nwww.war-baiak.com") return true end local t = string.explode(param, ",") if t[1] == "power" then local check = getPlayerStorageValue(cid, 04421001) == -1 and "ligou" or "desligou" doPlayerSetStorageValue(cid, 04421001, getPlayerStorageValue(cid, 04421001) == -1 and 1 or -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce "..check.." o auto loot.") elseif t[1] == "gold" then local check = getPlayerStorageValue(cid, 04421011) == -1 and "ligou" or "desligou" doPlayerSetStorageValue(cid, 04421011, getPlayerStorageValue(cid, 04421011) == -1 and 1 or -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce "..check.." a coleta de dinheiro.") doPlayerSetStorageValue(cid, 04421021, 0) elseif t[1] == "goldinfo" then local str = getPlayerStorageValue(cid, 04421011) == -1 and "O sistema de coleta de dinheiro esta desligado" or "O sistema ja coletou "..getPlayerStorageZero(cid, 04421021).." gold coins" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, str) elseif t[1] == "add" then if ExistItemByName(t[2]) then local item = getItemIdByName(t[2]) if isInArray({2160, 2148, 2152}, item) then return doPlayerSendCancel(cid, "Voce nao pode adicionar moedas no autoloot. Para coletar dinheiro use !autoloot gold") end if isPremium(cid) then if getPlayerStorageValue(cid, 04420011) < 3 then if addToList(cid, t[2]) then doPlayerSetStorageValue(cid, 04420011, getPlayerStorageValue(cid, 04420011) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, t[2].." adicionado a sua lista do auto loot! Para ver sua lista diga !autoloot list") else doPlayerSendCancel(cid, t[2].." ja esta em sua lista!") end else doPlayerSendCancel(cid, "Sua lista ja tem 4 itens! Voce deve remover algum antes de adicionar outro.") end else if getPlayerStorageValue(cid, 04420011) < 1 then if addToList(cid, t[2]) then doPlayerSetStorageValue(cid, 04420011, getPlayerStorageValue(cid, 04420011) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, t[2].." adicionado a sua lista do auto loot! Para ver sua lista diga !autoloot") else doPlayerSendCancel(cid, t[2].." ja esta em sua lista!") end else doPlayerSendCancel(cid, "Voce ja tem um item adicionado no auto loot! Para adicionar outro, voce deve remover o item atual.") end end else doPlayerSendCancel(cid, "Este item nao existe!") end elseif t[1] == "remove" then if ExistItemByName(t[2]) then if removeFromList(cid, t[2]) then doPlayerSetStorageValue(cid, 04420011, getPlayerStorageValue(cid, 04420011) - 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, t[2].." removido da sua lista do auto loot!") else doPlayerSendCancel(cid, "Este item nao esta na sua lista!") end else doPlayerSendCancel(cid, "Este item nao existe!") end elseif t[1] == "clear" then if getPlayerStorageValue(cid, 04420011) > -1 then doPlayerSetStorageValue(cid, 04420011, -1) doPlayerSetStorageValue(cid, 04420021, -1) doPlayerSetStorageValue(cid, 04420031, -1) doPlayerSetStorageValue(cid, 04420041, -1) doPlayerSetStorageValue(cid, 04420051, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Lista limpa!") else doPlayerSendCancel(cid, "Sua lista ja esta limpa!") end elseif t[1] == "desbug" or t[1] == "desbugar" then doPlayerSetStorageValue(cid, 04420011, -1) doPlayerSetStorageValue(cid, 04420021, -1) doPlayerSetStorageValue(cid, 04420031, -1) doPlayerSetStorageValue(cid, 04420041, -1) doPlayerSetStorageValue(cid, 04420051, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Desbugado!") elseif t[1] == "list" then local fi = getPlayerStorageValue(cid, 04420021) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420021)).."\n" or "" local se = getPlayerStorageValue(cid, 04420031) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420031)).."\n" or "" local th = getPlayerStorageValue(cid, 04420041) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420041)).."\n" or "" local fo = getPlayerStorageValue(cid, 04420051) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420051)).."\n" or "" doPlayerPopupFYI(cid, "O sistema auto loot esta coletando:\n "..fi..""..se..""..th..""..fo) end return true end
  3. Estou com esse erro no meu autoloot alguem poderia me ajudar?? OTX Server Version: (2.1.70 - 1591) Está surgindo algum erro? Se sim coloque-o aqui. Você tem o código disponível? Se tiver publique-o aqui: function ExistItemByName(name) -- by vodka local items = io.open("data/items/items.xml", "r"?read("*all") local get = items:match('name="' .. name ..'"') if get == nil or get == "" then return false end return true end local function getPlayerList(cid) local tab = {} if getPlayerStorageValue(cid, 04420021) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420021)) end if getPlayerStorageValue(cid, 04420031) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420031)) end if getPlayerStorageValue(cid, 04420041) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420041)) end if getPlayerStorageValue(cid, 04420051) ~= -1 then table.insert(tab, getPlayerStorageValue(cid, 04420051)) end if #tab > 0 then return tab end return false end local function addToList(cid, name) local itemid = getItemIdByName(name) if getPlayerList(cid) and isInArray(getPlayerList(cid), itemid) then return false end if getPlayerStorageValue(cid, 04420021) == -1 then return doPlayerSetStorageValue(cid, 04420021, itemid) elseif getPlayerStorageValue(cid, 04420031) == -1 then return doPlayerSetStorageValue(cid, 04420031, itemid) elseif getPlayerStorageValue(cid, 04420041) == -1 then return doPlayerSetStorageValue(cid, 04420041, itemid) elseif getPlayerStorageValue(cid, 04420051) == -1 then return doPlayerSetStorageValue(cid, 04420051, itemid) end end local function removeFromList(cid, name) local itemid = getItemIdByName(name) if getPlayerStorageValue(cid, 04420021) == itemid then return doPlayerSetStorageValue(cid, 04420021, -1) elseif getPlayerStorageValue(cid, 04420031) == itemid then return doPlayerSetStorageValue(cid, 04420031, -1) elseif getPlayerStorageValue(cid, 04420041) == itemid then return doPlayerSetStorageValue(cid, 04420041, -1) elseif getPlayerStorageValue(cid, 04420051) == itemid then return doPlayerSetStorageValue(cid, 04420051, -1) end return false end function onSay(cid, words, param) if param == "" then local fi = getPlayerStorageValue(cid, 04420021) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420021)) or "" local se = getPlayerStorageValue(cid, 04420031) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420031)) or "" local th = getPlayerStorageValue(cid, 04420041) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420041)) or "" local fo = getPlayerStorageValue(cid, 04420051) ~= -1 and getItemNameById(getPlayerStorageValue(cid, 04420051)) or "" local stt = getPlayerStorageValue(cid, 04421011) == 1 and "sim" or "Nao" local str = getPlayerStorageValue(cid, 04421001) == 1 and "sim" or "Nao" doPlayerPopupFYI(cid, " <--- Informações Do Auto Loot --->\n{Auto-Loot} ---Coletar dinheiro, Ligado? ("..stt.."). Para ligar ou desligar, digite: !autoloot gold \n{Auto-Loot} ---Coletar itens, Ligado? ("..str.."). Para ligar ou desligar, digite: !autoloot power\n\n{Auto-Loot} --Configuraçao Dos Slots:\n{Auto-Loot} ---Slot 1: "..fi.."\n{Auto-Loot} ---Slot 2: "..se.."\n{Auto-Loot} ---Slot 3: "..th.."\n{Auto-Loot} ---Slot 4: "..fo.."\n\n{Auto-Loot} ---Para adicionar um novo item no autoloot, digite: !autoloot add, <nome do item>\n{Auto-Loot} ---Para retirar um item do autoloot, digite: !autoloot remove, <nome do item>\n{Auto-Loot} ---Para limpar todos os slots, digite: !autoloot clear\n{Auto-Loot} ---Para informações de quanto voce ja fez utilizando a coleta de dinheiro, use: !autoloot goldinfo\n\nSe seu autoloot bugar use !autoloot desbug.") return true end local t = string.explode(param, ",") if t[1] == "power" then local check = getPlayerStorageValue(cid, 04421001) == -1 and "ligou" or "desligou" doPlayerSetStorageValue(cid, 04421001, getPlayerStorageValue(cid, 04421001) == -1 and 1 or -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce "..check.." o auto loot.") elseif t[1] == "gold" then local check = getPlayerStorageValue(cid, 04421011) == -1 and "ligou" or "desligou" doPlayerSetStorageValue(cid, 04421011, getPlayerStorageValue(cid, 04421011) == -1 and 1 or -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce "..check.." a coleta de dinheiro.") doPlayerSetStorageValue(cid, 04421021, 0) elseif t[1] == "goldinfo" then local str = getPlayerStorageValue(cid, 04421011) == -1 and "O sistema de coleta de dinheiro esta desligado" or "O sistema ja coletou "..getPlayerStorageZero(cid, 04421021).." gold coins" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, str) elseif t[1] == "add" then if ExistItemByName(t[2]) then local item = getItemIdByName(t[2]) if isInArray({2160, 2148, 2152, 2157, 9971}, item) then return doPlayerSendCancel(cid, "Voce nao pode adicionar moedas no autoloot. Para coletar dinheiro use !autoloot gold") end else if getPlayerStorageValue(cid, 04420011) < 1 then if addToList(cid, t[2]) then doPlayerSetStorageValue(cid, 04420011, getPlayerStorageValue(cid, 04420011) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, t[2].." adicionado à sua lista do auto loot! Para ver sua lista diga !autoloot") else doPlayerSendCancel(cid, t[2].." ja esta em sua lista!") end else doPlayerSendCancel(cid, "Sua lista ja tem 2 itens! Voce deve remover algum antes de adicionar outro.") end end else doPlayerSendCancel(cid, "Este item nao existe!") end elseif t[1] == "remove" then if ExistItemByName(t[2]) then if removeFromList(cid, t[2]) then doPlayerSetStorageValue(cid, 04420011, getPlayerStorageValue(cid, 04420011) - 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, t[2].." removido da sua lista do auto loot!") else doPlayerSendCancel(cid, "Este item nao esta na sua lista!") end else doPlayerSendCancel(cid, "Este item nao existe!") end elseif t[1] == "clear" then if getPlayerStorageValue(cid, 04420011) > -1 then doPlayerSetStorageValue(cid, 04420011, -1) doPlayerSetStorageValue(cid, 04420021, -1) doPlayerSetStorageValue(cid, 04420031, -1) doPlayerSetStorageValue(cid, 04420041, -1) doPlayerSetStorageValue(cid, 04420051, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Lista limpa!") else doPlayerSendCancel(cid, "Sua lista ja esta limpa!") end elseif t[1] == "desbug" or t[1] == "desbugar" then doPlayerSetStorageValue(cid, 04420011, -1) doPlayerSetStorageValue(cid, 04420021, -1) doPlayerSetStorageValue(cid, 04420031, -1) doPlayerSetStorageValue(cid, 04420041, -1) doPlayerSetStorageValue(cid, 04420051, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Desbugado!") elseif t[1] == "list" then local fi = getPlayerStorageValue(cid, 04420021) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420021)).."\n" or "" local se = getPlayerStorageValue(cid, 04420031) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420031)).."\n" or "" local th = getPlayerStorageValue(cid, 04420041) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420041)).."\n" or "" local fo = getPlayerStorageValue(cid, 04420051) ~= -1 and ""..getItemNameById(getPlayerStorageValue(cid, 04420051)).."\n" or "" doPlayerPopupFYI(cid, "O sistema auto loot esta coletando:\n "..fi..""..se..""..th..""..fo) end if(not checkExhausted(cid, 6667, 5)) then return true end return true end
  4. Bom dia, Cara me salvou em kkkk resolvido, muito obrigado
  5. Estou com esse erro, alguem pode me ajudar a criar essa tabela no phpmyadmin? Está surgindo algum erro? Se sim coloque-o aqui.
  6. Alguém poderia me ajudar a colocar exausted em todas talkactions, porque estão usando algum comando pra lagar o ot... Sempre quando está lagando tudo, eu dou closesrver, na hora o lag Lara e fica liso, só que quando do openserver, o lagbtodo volta. Meu ot e OTX
  7. Alguém poderia me ajudar com script pra online bônus, a a cada 30 horas completa o player ganha 1 item? Servidor OTX
  8. Alguem ajuda pra comprar items nas alavanca, usando o dinheiro que o player tem no banco ? Tipo o player farmou tantos KK ao inves de ele ir sacar o diheiro no npc bank ele pode ir direto na alavanca e comprar. Uso OTX
  9. Mais queria por em todos, ae tenho que por 1 por 1?
  10. Bom dia, alguem poderia me ajudar, como que coloco exauted em todos talkactions, porque estão lagando o ot usando o elfbot e a talkaction "comando" . Queria por todasas talkactions um tempo pra pode usar de novo, exemplo: !serverinfo (se eu da !serverinfo de novo, fala que tenho que esperar 10 segundo pra usar comando de novo)... Alguem me ajuda?
  11. vitinhoo96 postou uma resposta no tópico em Suporte Tibia OTServer
    --[[ Real Castle Event Desenvolvido por V�tor Bertolucci (Killua) ]] function onTime() if not realCastle.isOpen() then realCastle.open() else realCastle.close() end return true end
  12. vitinhoo96 postou uma resposta no tópico em Suporte Tibia OTServer
    Então no script do castle 48 tem que ter alguma coisa pra atulaizar no site a guild dominante?
  13. Não achei isso ai la no mods, olha o mod meu <?xml version="1.0" encoding="UTF-8"?> <mod name="Mod Cast" version="1.0" author="Martyx" contact="[email protected]" enabled="yes"> <event type="logout" name="cast-log-out" event="script"><![CDATA[ function onLogout(cid, forceLogout) db.executeQuery("UPDATE `players` SET `broadcasting` = 0, `viewers` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") return true end ]]></event> <globalevent name="viewers" interval="10000" event="script"><![CDATA[ function onThink(interval) local players = getPlayersOnline() for _, pid in ipairs(players) do local data = getPlayerSpectators(pid) if(data.broadcast) then db.executeQuery("UPDATE `players` set `viewers` = " .. table.maxn(data.names) .. " where `id` = " .. getPlayerGUID(pid) .. ";") end end return true end ]]></globalevent> <talkaction words="/cast;!cast" event="script"><![CDATA[ function onSay(cid, words, param, channelId) local t, data = string.explode(param, " ", 1), getPlayerSpectators(cid) if(isInArray({'off', 'no', 'disable'}, t[1])) then data.mutes = {} data.broadcast = false doPlayerSetSpectators(cid, data) db.executeQuery("UPDATE `players` SET `broadcasting` = 0, `viewers` = 0 WHERE `id` = " .. getPlayerGUID(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have disabled your cast stream.") elseif(isInArray({'on', 'yes', 'enable'}, t[1])) then data.broadcast = true doPlayerSetSpectators(cid, data) db.executeQuery("UPDATE `players` SET `broadcasting` = 1 WHERE `id` = " .. getPlayerGUID(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have enabled your cast stream.") elseif(isInArray({'show', 'count', 'see'}, t[1])) then if(data.broadcast) then local count = table.maxn(data.names) if(count > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are currently watched by " .. count .. " people.") local str = "" for _, name in ipairs(data.names) do str = str .. (str:len() > 0 and ", " or "") .. name end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "None is watching your stream right now.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not streaming right now.") end elseif(isInArray({'kick', 'remove'}, t[1])) then if(data.broadcast) then if(t[2]) then if(t[2] ~= "all") then local found = false for _, name in ipairs(data.names) do if(t[2]:lower() == name:lower()) then found = true break end end if(found) then table.insert(data.kick, t[2]) doPlayerSetSpectators(cid, data) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " has been kicked.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " not found.") end else data.kick = data.names doPlayerSetSpectators(cid, data) end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to type a name.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not streaming right now.") end elseif(isInArray({'ban', 'block'}, t[1])) then if(data.broadcast) then if(t[2]) then local found = false for _, name in ipairs(data.names) do if(t[2]:lower() == name:lower()) then found = true break end end if(found) then table.insert(data.bans, t[2]) doPlayerSetSpectators(cid, data) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " has been banned.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " not found.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to type a name.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not streaming right now.") end elseif(isInArray({'unban', 'unblock'}, t[1])) then if(data.broadcast) then if(t[2]) then local found, i = 0, 1 for _, name in ipairs(data.bans) do if(t[2]:lower() == name:lower()) then found = i break end i = i + 1 end if(found > 0) then table.remove(data.bans, found) doPlayerSetSpectators(cid, data) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " has been unbanned.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " not found.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to type a name.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not streaming right now.") end elseif(isInArray({'bans', 'banlist'}, t[1])) then if(table.maxn(data.bans)) then local str = "" for _, name in ipairs(data.bans) do str = str .. (str:len() > 0 and ", " or "") .. name end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently banned spectators: " .. str .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your ban list is empty.") end elseif(isInArray({'mute', 'squelch'}, t[1])) then if(data.broadcast) then if(t[2]) then local found = false for _, name in ipairs(data.names) do if(t[2]:lower() == name:lower()) then found = true break end end if(found) then table.insert(data.mutes, t[2]) doPlayerSetSpectators(cid, data) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " has been muted.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " not found.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to type a name.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not streaming right now.") end elseif(isInArray({'unmute', 'unsquelch'}, t[1])) then if(data.broadcast) then if(t[2]) then local found, i = 0, 1 for _, name in ipairs(data.mutes) do if(t[2]:lower() == name:lower()) then found = i break end i = i + 1 end if(found > 0) then table.remove(data.mutes, found) doPlayerSetSpectators(cid, data) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " has been unmuted.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Spectator " .. t[2] .. " not found.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to type a name.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not streaming right now.") end elseif(isInArray({'mutes', 'mutelist'}, t[1])) then if(table.maxn(data.mutes)) then local str = "" for _, name in ipairs(data.mutes) do str = str .. (str:len() > 0 and ", " or "") .. name end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently muted spectators: " .. str .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your mute list is empty.") end elseif(isInArray({'auth', 'protect', 'protection', 'protected'}, t[1])) then if(isInArray({'off', 'no', 'disable'}, t[2])) then data.auth = false doPlayerSetSpectators(cid, data) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your chat is now unprotected, all spectators can chat without authentication.") elseif(isInArray({'on', 'yes', 'enable'}, t[2])) then data.auth = true doPlayerSetSpectators(cid, data) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your chat is now protected, all spectators have to authenticate before they can talk.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your chat is currently " .. (data.auth and "protected" or "unprotected") .. " from guests.") end elseif(isInArray({'password', 'guard'}, t[1])) then if(t[2]) then if(isInArray({'off', 'no', 'disable'}, t[2])) then if(data.password:len() ~= 0) then db.executeQuery("UPDATE `players` SET `broadcasting` = `broadcasting` - 2 WHERE `id` = " .. getPlayerGUID(cid)) end data.password = "" doPlayerSetSpectators(cid, data) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have removed password for your stream.") else if(data.password:len() ~= 0) then db.executeQuery("UPDATE `players` SET `broadcasting` = `broadcasting` + 2 WHERE `id` = " .. getPlayerGUID(cid)) end data.password = string.trim(t[2]) doPlayerSetSpectators(cid, data) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have set new password for your stream.") end elseif(data.password ~= "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your stream is currently protected with password: " .. data.password .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your stream is currently not protected.") end elseif(isInArray({'status', 'info'}, t[1])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your stream is currently " .. (data.broadcast and "enabled" or "disabled") .. ".") else doPlayerPopupFYI(cid, "Available commands:\n\n/cast on - enables the stream\n/cast off - disables the stream\n/cast password {password} - sets a password on the stream\n/cast password off - disables the password protection\n/cast auth on - enables requirement of authentication on chat\n/cast auth off - disables requirement of authentication on chat\n/cast kick {name} - kick a spectator from your stream\n/cast ban {name} - locks spectator IP from joining your stream\n/cast unban {name} - removes banishment lock\n/cast bans - shows banished spectators list\n/cast mute {name} - mutes selected spectator from chat\n/cast unmute {name} - removes mute\n/cast mutes - shows muted spectators list\n/cast show - displays the amount and nicknames of current spectators\n/cast status - displays stream status") end return true end ]]></talkaction> </mod>
  14. Sim esta criado, porem não abre o chat, agora se aperta CTRL+O ai ele abre e da pra conversar, mas queria que quando digitava !cast on, ele ja abria o chat automatico
  15. sim ele esta funcioando certinho, consigo ver o player assisinto a cast, mas quando digito o comando !cast on, ele não abre o channel chat, tenho que apertar CTRL+O pra abrir o chat pra conversar com os espectadores
  16. consegui resolver ja, so que agora quando digito !cast on, nao aprece nem um erro, porem não abre o channel do cast
  17. Quando digito !cast on, aparece esse erro logo a baixo, só que o cast fica con consigo ver, porem da esse erro enorme,e chega ate da uma trava no servidor. alguem poe me ajuda a solucionar? Eu uso esse OTX \/ The OTX Server Version: (2.1.70 - 1591) - Codename: (Mycological) Compilied with Microsoft Visual C++ version 10.0 for arch 64 Bits at Feb 3 2016 17:02:53 Esse é o script do cast que utilizei [MODS] Cast on/off em OTX! 8.60 - Tibia Clássico (migrando) - Tibia King - Tudo sobre Tibia, OTServ e Bots!
  18. Já consegui resolver, só troquei a minha database do MySQL vlw
  19. [8/5/2022 0:39:29] [Error - Action Interface] [8/5/2022 0:39:29] data/actions/scripts/events/realCastle.lua:onUse [8/5/2022 0:39:29] Description: [8/5/2022 0:39:29] data/actions/scripts/events/realCastle.lua:5: attempt to concatenate a boolean value [8/5/2022 0:39:29] stack traceback: [8/5/2022 0:39:29] data/actions/scripts/events/realCastle.lua:5: in function <data/actions/scripts/events/realCastle.lua:1>
  20. erro continua [7/5/2022 9:50:0] [Error - Action Interface] [7/5/2022 9:50:0] data/actions/scripts/events/realCastle.lua:onUse [7/5/2022 9:50:0] Description: [7/5/2022 9:50:0] data/actions/scripts/events/realCastle.lua:3: attempt to concatenate a boolean value [7/5/2022 9:50:0] stack traceback: [7/5/2022 9:50:0] data/actions/scripts/events/realCastle.lua:3: in function <data/actions/scripts/events/realCastle.lua:1>
  21. alguem me ajuda?
  22. Utilizo servidor OTX Estou com um erro que ao dar use no livro, pra ver qual guild esta com o dominio do castle aparece um erro esse é o erro que aparece esse é o script que fala aonde o erro esta
  23. OTX Servidor não esta com nem uma erro, porem quando o castle abre e o player domina ele e da a hora de fechar, mesmo fechado ele fica aparecendo a mensagem que o castle esta aberto ate tal hora, porem não esta aberto, porque a guild ja dominou e ja tomou posso do castle, mas as mensagem de castle aberto continua a aparecer! Esse é o script castle globalevents aonde fica mandando a mensagem Esse é a globalevents.xml que adicionar o codigo <globalevent name="Real Castle" time="21:00" event="script" value="realCastle.lua"/> <globalevent name="Real Castle Close" time="21:45" event="script" value="realCastle.lua"/>
  24. vitinhoo96 postou uma resposta no tópico em Suporte Tibia OTServer
    Boa noite, alguem poderia me ajudar com algum themabox pra quando o player dominar o Castle 48, e mostrar no site a guild dominante? conseguir mas esta com um erro pra aparecer a guild dominante Fatal error: Call to a member function fetch() on a non-object in C:\xampp\htdocs\layouts\tibiarl\layout.php on line 1078 essa é minha linha 1078 do layout.php <?php $queryCastle = $SQL->query("SELECT `name`, `id` FROM `guilds` WHERE `real_castle` = 1 ORDER BY id DESC LIMIT 1")->fetch(); if ($queryCastle) { $guild = new Guild(); $guild->load($queryCastle["id"]); if ($guild->isLoaded()) { $guildName = $guild->getName(); $guildLogo = $guild->getGuildLogoLink(); $url = "?subtopic=guilds&action=show&guild=".urlencode($guild->getID()).""; } } ?>

Informação Importante

Confirmação de Termo