Ir para conteúdo

machine

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    machine recebeu reputação de elipe em (Resolvido)[PEDIDO] Summon Monsters   
    data\spells\scripts\summon crie mixsummon.lua ou qualquer outro nome que quiser, lembre se trocar, troque no spells.xml também.
    local max = 1 function onCastSpell(cid, var) local dir = getPlayerLookDir(cid) local ppos = getPlayerPosition(cid) if(dir==1)then ppos.x = ppos.x + 1 elseif(dir==2)then ppos.y = ppos.y + 1 elseif(dir==3)then ppos.x = ppos.x - 1 elseif(dir==0)then ppos.y = ppos.y - 1 end local count, pos = #getCreatureSummons(cid), getThingPos(cid) if count == max then doPlayerSendCancel(cid, 'Voce nao pode sumonar mais criaturas.') doSendMagicEffect(pos, CONST_ME_POFF) return false end local summon = getCreatureSummons(cid) local MaximoSummon = 4 if (table.maxn(summon) < MaximoSummon) then local spider = doConvinceCreature(cid, doCreateMonster("spider", ppos)) local wolf = doConvinceCreature(cid, doCreateMonster("wolf", ppos)) local orc = doConvinceCreature(cid, doCreateMonster("orc", ppos)) local demon = doConvinceCreature(cid, doCreateMonster("demon", ppos))         doPlayerSendTextMessage(cid, 22, "Voce summonou quatro criaturas!") end end Entendendo o script acima
    local spider = doConvinceCreature(cid, doCreateMonster("spider", ppos))
    local wolf = doConvinceCreature(cid, doCreateMonster("wolf", ppos))
    local orc = doConvinceCreature(cid, doCreateMonster("orc", ppos))
    local demon = doConvinceCreature(cid, doCreateMonster("demon", ppos))
     
    onde esta em vermelho é os monsters, troque para qual quiser.
     
    data\spells abra o spells.xml e adicione a seguinte linha
        <instant name="Summon 4 Monsters" words="mixsummon" lvl="25" params="1" exhaustion="2000" needlearn="0" event="script" value="summon/mixsummon.lua">         <vocation id="1"/>         <vocation id="2"/>         <vocation id="5"/>         <vocation id="6"/>     </instant> testa ai
  2. Gostei
    machine recebeu reputação de diarmaint em [ERRO] Account manager = invalid password   
    Executa essa query
    UPDATE `accounts` SET `password` = SHA1(`password`); Depois essa
    UPDATE `server_config` SET `value` = "2" WHERE `key` = "encryption"; testa ai
  3. Gostei
    machine recebeu reputação de SWAT O MITO em [ERRO] Account manager = invalid password   
    Executa essa query
    UPDATE `accounts` SET `password` = SHA1(`password`); Depois essa
    UPDATE `server_config` SET `value` = "2" WHERE `key` = "encryption"; testa ai
  4. Gostei
    machine recebeu reputação de Macarini em [ERRO] Account manager = invalid password   
    Executa essa query
    UPDATE `accounts` SET `password` = SHA1(`password`); Depois essa
    UPDATE `server_config` SET `value` = "2" WHERE `key` = "encryption"; testa ai
  5. Gostei
    machine recebeu reputação de xWhiteWolf em 4 erros   
    1 - O mais simples dos 4 erros é esse. Todos os pokemon são agressivos, quero deixar a maioria passivo.
     
    http://www.tibiaking.com/forum/topic/28062-monstros-passivos/
     
    2 - Nurse joy não responde ao comando Hi , Por exemplo : O player fala hi, é ela não oresponde nada.
     
    Aparece algum erro na distro? Posta seu script pra tentar ajudar.
     
    3 - As portraits não aparecem ( nem uma portrait de nenhum pokemon aparece)
     
    Como assim não aparece? da algum erro na distro?
    Tente com um char normal, sem ser GOD ou GM.
     
    4 - Acho que minhas Action estão bugadas , não consiggo usar poke bolls , ou box , ou coisas parecidas.
     
    Não consegue usar como? pra capturar o monster? qual servidor você está usando?
  6. Gostei
    machine recebeu reputação de luanluciano93 em [PhpMyADMIN] PERDER HOUSE SE NAO LOGA A 5 DIAS   
    Não testei, faz um backup antes.. Primeiro deleta os players inativos DELETE FROM players WHERE level < 200 AND lastlogin < UNIX_TIMESTAMP() - 5*24*60*60 200 = level max dos players que vão ser deletado caso fique inativo por 5 dias;
    5 = dias
     
    Depois limpa as casas
    UPDATE `houses` SET owner =0 WHERE owner >0 AND owner NOT IN ( SELECT id FROM players );
  7. Gostei
    machine recebeu reputação de J4dson em (Resolvido)Duvida simples demais   
    bom, ali naquele script que você botou da frozen starlight é só você editar nessa parte aqui:
     
    <attribute key="shootType" value="shiverarrow"/>
     
    onde está shivearrow você muda para um desses da lista que o BeatiFul Pain postou aqui no fórum
     
    segue o link da lista > http://www.tibiaking.com/forum/topic/30269-todos-os-shoot-type/
     
    depois que você escolher um é só mudar.
     
    Exemplo:
        <item id="2361" article="a" name="frozen starlight">
            <attribute key="weight" value="420"/>
            <attribute key="attack" value="60"/>
            <attribute key="weaponType" value="distance"/>
            <attribute key="shootType" value="energyball"/>
            <attribute key="hitChance" value="90" />
            <attribute key="range" value="10"/>
        </item>
     
    @Edit, uma dica já que não da pra usar o frozen starlight voando, use o shootType energyball, como no exemplo acima, vai ficar mais parecido
  8. Gostei
    machine deu reputação a ViitinG em [Creaturescript] Icones no minimap com descrição   
    Bom para quem não sabe como funciona o script,é uma marcação que fica no minimap(in-game) que ao deixar o ponteiro do mouse em cima aparece uma descrição,pode ser mudado tanto a descrição quanto o icone que aparece no minimap.
     
    • Adicionando o script •
     
     
     
     
    Em "data/creaturescripts/creaturescripts.xml" adicione está tag :
    <event type="think" name="IconMap" event="script" value="iconmap.lua"/> Em "data/creaturescripts/scripts" crie um arquivo lua chamado "iconmap" e cole isso dentro :
    local config = { storage = 030220122041, version = 1, marks = { {mark = 5, pos = {x = 1095, y = 1062, z = 7}, desc = "Temple."}, {mark = 4, pos = {x = 895, y = 996, z = 7}, desc = "Depot."} } } local f_addMark = doPlayerAddMapMark if(not f_addMark) then f_addMark = doAddMapMark end function onThink(cid, interval) if(isPlayer(cid) ~= TRUE or getPlayerStorageValue(cid, config.storage) == config.version) then return end for _, m in pairs(config.marks) do f_addMark(cid, m.pos, m.mark, m.desc ~= nil and m.desc or "") end setPlayerStorageValue(cid, config.storage, config.version) return TRUE end Em "data/creaturescripts/scripts/login.lua" adicione está tag no fim do script :
    registerCreatureEvent(cid, "IconMap") Caso use TFS 1.0 use este register no login.lua :
    player:registerEvent(cid, "IconMap") Creditos : Comedinhas.  -   ViitinG pelo tutorial.
     
     
    • Configurando •
     
     
     
    • Icones •
     

  9. Gostei
    machine deu reputação a Absolute em [Clean House] Remover casas de quem não loga   
    Olá Galera do TK, venho hoje rapidamente trazer um sistema muito útil e pedido em meu tópico do !eject system: http://www.tibiaking.com/forum/topic/35060-eject-system-expulsar-player-inativo-da-house/

     
    Explicação:
    Sabe aqueles players chatos que compram as melhores casas e não logam no servidor e enche a desgrama da casa de item só para os novos players não comprar? Pois é, isto não existirá mais! =D
    Este script é apenas um arquivo que você colocará em sua pasta mods e ele executará toda vez que o servidor for reiniciado, ou seja: Quando o servidor ligar ele irá verificar os players que não logam a X dias (configurável) e então expulsa-los da casa movendo seus items para o depot deixando a casa sem dono.
     
     
     
     
    Vamos ao que interessa;   Na pasta principal do servidor, onde fica a distro que roda o servidor e tudo mais, entre na pasta MODS e crie um arquivo com o nome de cleanhouses.xml e dentro coloque o seguinte: <?xml version="1.0" encoding="UTF-8"?> <mod name="Cleanhouses" version="1.03" author="nsanee" contact="tibiaking.com" enabled="yes"> <description> v.1.03 - Added 'onlyNonPremium' configurable. Removed modlib, since the script is run once anyway we don't need it loaded at all times. It shouldn't now stop execution when a house is nameless. v.1.02 - now uses only one sql query, removed multiworld configurable since it's not needed anymore v.1.01 - small fixes, optimized query + multiworld support. This mod will clean houses of inactive players and move their items to the depot. config explained: days - If the player hasn't logged in for this number of days his house will be freed. log - true/false, whether to enable logging of which houses have been cleaned. file - path to the log file, where logs will be stored. Ignored if 'log' set to false onlyNonPremium - if set to 'true', the script will clean only the houses of players who don't have any pacc days left. other notes: DO NOT remove doSaveServer() at the end, otherwise if your server happens to crash before the nearest server save you will regret it =) </description> <globalevent name="cleanhouses" type="start" event="buffer"><![CDATA[ local config = { days = 3, log = true, file = getDataDir() .. "/logs/cleanhouses.txt", onlyNonPremium = true } local ns_query =[[ SELECT houses.owner, houses.id as hid, houses.name as house_name ,players.name FROM houses LEFT JOIN players ON players.id=houses.owner LEFT JOIN accounts ON players.account_id=accounts.id WHERE players.lastlogin < (UNIX_TIMESTAMP() - ]] ..config.days.. [[*24*60*60) ]] ..(config.onlyNonPremium and ' AND accounts.premdays=0 ' or '')..[[ AND players.world_id =]] .. getConfigValue("worldId") local house = db.getResult(ns_query) local logs = " :: Houses cleaned:\n\n" if house:getID() ~= -1 then repeat logs = logs .. house:getDataString('house_name') ..", owned by " .. house:getDataString('name') .. "\n" setHouseOwner(house:getDataInt('hid'), 0) until not house:next() house:free() else logs = logs .. "There were no houses to clean." end if config.log then doWriteLogFile(config.file, logs) end addEvent(doSaveServer, 1000) ]]></globalevent> </mod> Pronto, salve e feche.
     
    Toda vez que o servidor iniciar irá expulsar os players que não logam aos dias configuráveis.
     
     

     
     
     
    Como configurar:
     days = 3 * É o número em DIAS que o player terá que ficar sem logar para perder a casa.
     
     
     
    Configure apenas isto, o resto aconselho não mexer, caso queira aprimorar o sistema aconselho ser avançado na área para não causar erros no mesmo.
     
     
     

    O Mesmo foi testado hoje por mim e está em funcionalidade a todas as versões de TFS.
     
     
     
    Créditos:
    Absolute
    nsanee (otland)




    Demais dúvidas deixe-me saber!
     
     
     
    Até o próximo
  10. Gostei
    machine deu reputação a 9k22 em Anti-Mage bomb (diferente *-*)   
    Olha, esse script ele não bloqueia os MC e nem coloca um limite.
     
    O script funciona da seguinte forma.
    Quando 1 player entra, ele terá que espera "x seconds" para entrar em outro character.
     
    em creaturescript/scripts crie um arquivo .lua e adicione:

    local config =   {     seconds = 7,     onlyWithSameIP = "yes" } --DONT MODIFY config.onlyWithSameIP = getBooleanFromString(config.onlyWithSameIP) local m_lastLogin, m_lastIP = 0, 0 function onLogin(cid)     local timeNow, playerIP = os.time(), getPlayerIp(cid)         if(m_lastLogin + config.seconds >= timeNow and             (config.onlyWithSameIP == FALSE or m_lastIP == playerIP)) then             return false         end     m_lastIP = playerIP     m_lastLogin = timeNow     return true end  
    seconds = Segundos para o mesmo IP entrar em outro character
     
     
    Login.lua:

    registerCreatureEvent(cid, "NOME_DO_SCRIPT")  
    TAG:

    <event type="login" name="AntiMageBomb" event="script" value="NOME_DO_SCRIPT.lua"/>  
     
    Versão testada: TFS 0.4
    Créditos: Subyth
  11. Gostei
    machine deu reputação a rollback em Como que cria um npc de barco   
    Primeiro crie um arquivo.xml na pasta NPC com o nome de Capitao coruja depois coloque isso dentro.


    <npc name="Capitao Coruja" script="data/npc/scripts/coruja.lua" walkinterval="0" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="129" head="114" body="119" legs="114" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. ! Eu posso te levar para {Dorion}, {yalahar}, {alfon}, {venonh}, {anknor}, {smallville} e {goroma}.. Onde deseja ir?" /> <parameter key="message_decline" value="Vai custar |TOTALCOST| gold coins. Vai viajar? Voce pode ir em outras cidades indo ao tapete do meu primo!"/> </parameters> </npc> enceguida abra a pasta NPC/SCRIPTS crie um arquivo coruja.xml e coloque isso dentro. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start 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 -- OTServ event handling functions end -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para Yalahar por 210 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 210, destination = {x=1555, y=2576, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Eu posso te levar para {dorion}, {Yalahar}, {Alfon}, {venonh} e {Anknor} por um pequeno custo.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'dorion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para Dorion por 110 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 110, destination = {x=31, y=79, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'dorion\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'alfon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para alfon por 115 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 115, destination = {x=114, y=282, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'Alfon\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'venonh'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para venonh por 100 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 100, destination = {x=238, y=370, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'venohn\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'anknor'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para anknor por 175 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 175, destination = {x=487, y=261, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'Anknor\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'anknor'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para anknor por 100 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 100, destination = {x=487, y=261, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'anknor\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'smallville'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para smallville por 190 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 190, destination = {x=1995, y=2394, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'smallville\' for just a small fee.'}) -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'goroma'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para Goroma por 55 gold coins?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 55, destination = {x=1367, y=195, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'}) keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'goroma\' for just a small fee.'}) -- Makes sure the npc reacts when you say hi, bye etc. npcHandler:addModule(FocusModule:new())


    Agora editando o script


    local travelNode = keywordHandler:addKeyword({'yalahar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer viajar para Yalahar por 210 gold coins?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 210, destination = {x=1555, y=2576, z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'})

    keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Eu posso te levar para {dorion}, {Yalahar}, {Alfon}, {venonh} e {Anknor} por um pequeno custo.'})

    Vermelho é a menssagem que ele vai perguntar para o player
    Amarelo premium = true aque é se pode viajar so premmy ou free tbm pra por free coloca premium = false já pra so premmy premium = true
    Verde level = 2 se precisar de level vc edita pra o lvl que quiser
    cost = 210 , é o preço da viagem.
    destination = {x=1555, y=2576, z=6 voce edita pra onde o player vai ser levado e assim é a mesma coisa em todos.

    Já para editar a menssagem do npc você muda em capitao coruja.xml

    Eu posso te levar para {Dorion}, {yalahar}, {alfon}, {venonh}, {anknor}, {smallville} e {goroma}.. Onde deseja ir?
    Te ajudei? REP+

Informação Importante

Confirmação de Termo