Ir para conteúdo

narazaky

Membro
  • Registro em

  • Última visita

Tudo que narazaky postou

  1. vdd, testei no otx nao bugou, ate que chegou na ultima charge, perdao pelo post
  2. Para que essas lenga lengas toda? o.O vai em item.xml e mude isso <item id="2173" article="an" name="amulet of loss"> <attribute key="weight" value="420"/> <attribute key="slotType" value="necklace"/> <attribute key="preventDrop" value="1"/> <attribute key="charges" value="1"/> </item> para isso <item id="2173" article="an" name="amulet of loss"> <attribute key="weight" value="420"/> <attribute key="slotType" value="necklace"/> <attribute key="preventDrop" value="1"/> <attribute key="charges" value="30"/> </item>
  3. tente esse function onTime(interval) doReloadInfo(RELOAD_ACTIONS) doBroadcastMessage("Reloading actions") return true end @edit demorei de mais '-'
  4. vai na database e depois em accounts, depois disso vai na sua acc do seu adm e coloca em type 5
  5. ms falei talk action '-'
  6. consertei um erro na declaraçao de variavel, estou usando tfs 1.0 deste topico: http://www.tibiaking.com/forum/topic/36403-global-full-1053-tfs-10-full-oramond-completo-atualiza%C3%A7%C3%A3o-v5/ Baixe e teste, o erro mostre aqui
  7. eu uso no meu servidor e nao da problema
  8. Gostei, muito bom, depois testo aqui. rep +
  9. qual erro deu? vai em talk action/script e crie um arquivo muted.lua e add isso: local CHANNEL_HELP = 7 local muted = createConditionObject(CONDITION_CHANNELMUTEDTICKS) local tempo = 300000 setConditionParam(muted, CONDITION_PARAM_SUBID, CHANNEL_HELP) setConditionParam(muted, CONDITION_PARAM_TICKS, tempo) function onSay(cid, words, param, channel) if words == "/mute" then local t = string.explode(string.lower(param), ",") local player = Player(cid) if not player:getGroup():getAccess() then return true end if (param == nil) or (param == '') or (not param) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Enter the name of the player") return true end if (Player(t[1])) then if(getCreatureCondition(Player(t[1]), CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"The player "..getPlayerName (t [1]) .." is already mutated.") return true end doAddCondition(Player(t[1]), muted) Player(t[1]):sendTextMessage(MESSAGE_STATUS_DEFAULT,"You have been muted by the "..getPlayerName (cid) .." with "..tempo / 1000 .." seconds.") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"The player "..getPlayerName (t [1]) .." has been mutated by "..tempo / 1000 .." seconds.") return true elseif (not Player(t[1])) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"A player with that name is not online.") return true end end if words == "/unmute" then local t = string.explode(string.lower(param), ",") local player = Player(cid) if not player:getGroup():getAccess() then return true end if (param == nil) or (param == '') or (not param) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Enter the name of the player") return true end if (Player(t[1])) then if(getCreatureCondition(Player(t[1]), CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP)) then doRemoveCondition(Player(t[1]), CONDITION_CHANNELMUTEDTICKS, CHANNEL_HELP) Player(t[1]):sendTextMessage(MESSAGE_STATUS_DEFAULT,"You have been desmuted by the "..getPlayerName (cid) ..".") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"The player "..getPlayerName(t[1]).." has been desmutated.") return true else player:sendCancelMessage("The player "..getPlayerName(t[1]).." is not muted") return true end else Player(cid):sendCancelMessage("A player with that name is not online.") return true end end end depois no talkaction.xml add isso: <talkaction words="/mute" separator=" " script="muted.lua" /> <talkaction words="/unmute" separator=" " script="muted.lua" />
  10. narazaky postou uma resposta no tópico em Suporte Tibia OTServer
    Esse link pode te ajudar.
  11. execute essas querys nasua database INSERT INTO `players` VALUES (9, 'Drunou Sample', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, ''), (11, 'Infernalist Sample', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, ''); e vai no config.php e add isso $config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample', 9 => 'Drunou Sample', 11 => 'Infernalist Sample'); $config['site']['newchar_vocations'][1] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample', 9 => 'Drunou Sample', 11 => 'Infernalist Sample');
  12. Para mudar de sql para mysql nao muda nada no servidor (tfs inferior a 1.0) vc so precisa ir no config.lua e colocar o que se pede. -- MySql sqlType = "MySql" sqlHost = "127.0.0.1" sqlPort = 3306 sqlUser = "root" sqlPass = "suasenha" sqlDatabase = "nomedabd" sqlFile = "schemas/otxserver.s3db"--otxserver.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 mysqlReconnectionAttempts = 3 encryptionType = "sha1" --// encryptionType can be (plain, md5, sha1, sha256 or sha512). obs vc tem que cria os samples dos vocaçoes do rad @off Ai ai, esses ots do radbr estão causando muitas polemicas aqui no forum D:
  13. você esta usando com o personagem deslogado?
  14. da mensagem em vermelho, tente esse: function onSay(cid, words, param) if not getPlayerFlagValue(cid, PlayerFlag_CanBroadcast) then return true end local player = Player(cid) print("> broadcasted: \"" .. param .. "\".") for _, pid in ipairs(Game.getPlayers()) do pid:sendTextMessage(MESSAGE_STATUS_WARNING, param) end return false end editt O comando de mutar, vc quer em todos os canais ou so no help?
  15. recebi um pedido por pm e fiz vou colocar os creditos All Valeuuu
  16. Para quem não sabe, o sistema de notificação serve para alertar o jogador e punir sem precisar dar ban* *só insistir, ele será banido automaticamente, mas para isso terá que notificar 3 vezes. primeiramente executa isso no seu banco de dados CREATE TABLE `account_not` ( `id` int(11) NOT NULL AUTO_INCREMENT, `idacc` int(11) NOT NULL, `comment` varchar(255) NOT NULL, `not_by` int(11) NOT NULL, `not_at` bigint(20) NOT NULL, PRIMARY KEY (`id`,`idacc`) ); e depois isso ALTER TABLE accounts ADD qntnot INT(11) NOT NULL DEFAULT 0 Agora vai na pasta do seu servidor, abre o compat.lua e coloca isso: function getNots(name) local accountId = getAccountNumberByPlayerName(name) local resultId = db.storeQuery("SELECT `qntnot` FROM `accounts` WHERE `id` = " .. accountId .." LIMIT 1") if resultId ~= false then local nots = result.getDataInt(resultId, "qntnot") result.free(resultId) return nots end return 0 end function setNots(name, amount) return db:query("UPDATE `accounts` SET `qntnot` = ".. (getNots(name) + amount) .." WHERE `id` ="..getAccountNumberByPlayerName(name).."") end Feito o que foi falo acima, vai em talkaction/script e cria um arquivo em lua e coloca isso Se ele não tiver a função string.explode só colocar isso no global.lua depois do dofile Por fim vai em talkaction.xml e coloque isso: <talkaction words="/not" separator=" " script="NOMEDOARQUIVO.lua" /> Como usar /not nome,comentario (opcional), quantidade(opcional) /not nome @edit Erro de nao gravar na db, corrigido. Créditos: narazaky (eu)
  17. valeu, mas tinha feito essa aqui: function getNots(name) local accountId = getAccountNumberByPlayerName(name) local resultId = db.storeQuery("SELECT `qntnot` FROM `accounts` WHERE `id` = " .. accountId .." LIMIT 1") if resultId ~= false then local nots = result.getDataInt(resultId, "qntnot") result.free(resultId) return nots end return 0 end
  18. Se for 9.x confira esse: http://www.tibiaking.com/forum/topic/27552-lua-ban-system-96/
  19. narazaky postou uma resposta no tópico em Suporte & Pedidos
    Tem um bug ao clicar com o direito em se mesmo, a janela aparece fora
  20. Eai galera, estou com um problema nessa função: function getNots(cid) local accountId = getAccountNumberByPlayerName(cid) local nots = db.storeQuery("SELECT `qntnot` FROM `accounts` WHERE `id` = " .. accountId) if (nots == nil) or (not < 0) then not = 0 end return not end tipo esta tudo certo, porem quando aplico uma setada no jogador ao invez de pular de 1 em 1, pula pelo ID do jogador, exemplo, acc id = 10 qnd seto ele pula de 0 para 10 depois para 20 e assim vai, ao invez de 0 para 1 bla bla a função de setar function setNots(cid, amount) return db:query("UPDATE `accounts` SET `qntnot` = '".. getNots(cid) + amount .."' WHERE `id` ='"..getAccountNumberByPlayerName(cid).."'") end alguém poderia ajudar?
  21. é de fato encontrei meu erro, porem nao deslogava....... perdao galera @topic Uma duvida, voce colou isso no seu creatureevent? <event type="logout" name="logout" event="script" value="seuscript.lua"/>
  22. se eu coloquei para retornar falso, é pra avisar para a distro que ocorreu algo de errado e ele nao pode deslogar e se estivesse true o jogador simplesmente desloga sem receber o aviso. CoMO ESTA O ALGORITIMO FUNÇAO LAÇO DE REPETIÇÃO ESTRUTURA DE DECISAO RETORNO DO IF FIM DA ESTRUTURA DA DECISAO FIM DO LAÇO RETORNO DA FUNÇÃO FIM DA FUNÇAO ou seja, se colocar no retorno do if, nao mudara nada, tem qe colocar no retorno da funçao http://www.tibiaking.com/forum/topic/34420-callbacks-de-creaturescripts/

Informação Importante

Confirmação de Termo