Ir para conteúdo

Celulose

Membro
  • Registro em

  • Última visita

Tudo que Celulose postou

  1. @shanden4502 eu tive um problema parecido com isso, porém no caso meu era uma spell que retirava mana do player algo parecido com essa function onCastSpell(cid, var) local mana = getCreatureMana(cid) if doCreatureAddMana(cid, -mana) then if doPlayerAddSpentMana(cid, mana) then return false else doCreatureAddMana(cid, mana) end end return false end conforme ele usava essa spells e usava potion o char não deslogava
  2. @Jeff Delay function onStepOut(cid, item, position, fromPosition) if(getTileInfo(position).creatures > 0) then return true end local newPosition = {x = position.x, y = position.y, z = position.z} if(isInArray(verticalOpenDoors, item.itemid)) then newPosition.x = newPosition.x + 1 else newPosition.y = newPosition.y + 1 end doRelocate(position, newPosition) local tmpPos = position tmpPos.stackpos = -1 local i, tmpItem, tileCount = 1, {uid = 1}, getTileThingByPos(tmpPos) while(tmpItem.uid ~= 0 and i < tileCount) do tmpPos.stackpos = i tmpItem = getTileThingByPos(tmpPos) if(tmpItem.uid ~= item.uid and tmpItem.uid ~= 0 and isMoveable(tmpItem.uid)) then doRemoveItem(tmpItem.uid) else i = i + 1 end end doTransformItem(item.uid, item.itemid - 1) return true end
  3. Celulose postou uma resposta no tópico em Suporte Tibia OTServer
    posta seu game.cpp não é o diagonal que tu está querendo ?:
  4. @WooX faz em c++ sabe que amo só c++ kk
  5. Poem meus créditos, quem passou essa base pra 8.60 foi eu ! e fora alguns sistemas!
  6. @KyureJL addEvent(doSendDistanceShoot, 1, getCreaturePosition(cid), {x = poz.x, y = poz.y-2, z = poz.z}, 46) 46 = efeito addEvent(doSendDistanceShoot, 400, {x = poz.x, y = poz.y-2, z = poz.z}, pos, 136) 136 = efeito addEvent(doSendMagicEffect, 300, {x = poz.x+1, y = poz.y-1, z = poz.z}, 186) 186 = efeito addEvent(doSendMagicEffect, 600, {x = pos.x+2, y = pos.y, z = pos.z}, 235) 235 = efeito addEvent(doSendMagicEffect, 1600, {x = pos.x+1, y = pos.y+1, z = pos.z}, 82) 82 = efeito
  7. mandar para aba?: explica melhor ai
  8. @GM Luck posta 004-database.lua
  9. posta o script bro
  10. atshost.com.br @Ryaan
  11. 14.04 uso faz 2 anos já
  12. Aumenta em vocation.xml um valor alto e vê se ocorre a queda de cpu outra forma player.cpp procura por uint32_t Player::getAttackSpeed() const uint32_t Player::getAttackSpeed() const { int32_t SpeedAttack; SpeedAttack = getSkill(SKILL_FIST, SKILL_LEVEL); if(SpeedAttack < 10) SpeedAttack = 3000; else if(SpeedAttack >= 10 && SpeedAttack < 20) SpeedAttack = 2800; else if(SpeedAttack >= 20 && SpeedAttack < 30) SpeedAttack = 2600; else if(SpeedAttack >= 30 && SpeedAttack < 40) SpeedAttack = 2400; else if(SpeedAttack >= 40 && SpeedAttack < 50) SpeedAttack = 2200; else if(SpeedAttack >= 50 && SpeedAttack < 60) SpeedAttack = 2000; else if(SpeedAttack >= 60 && SpeedAttack < 70) SpeedAttack = 1800; else if(SpeedAttack >= 70 && SpeedAttack < 80) SpeedAttack = 1600; else if(SpeedAttack >= 80 && SpeedAttack < 90) SpeedAttack = 1400; else if(SpeedAttack >= 90 && SpeedAttack < 100) SpeedAttack = 1200; else if(SpeedAttack >= 100 && SpeedAttack < 110) SpeedAttack = 1000; else if(SpeedAttack >= 110 && SpeedAttack < 120) SpeedAttack = 800; else if(SpeedAttack >= 120 && SpeedAttack < 130) SpeedAttack = 600; else SpeedAttack = 400; return SpeedAttack; }
  13. tu pode corrigir isso com diversas forma .. 1: otimizar seus script. 2: otimizar distro. a otx github corrigiu alguns bugs que aumentava muito a cpu . agora tu usa tfs não tem mais att, tenta migrar pra otx. antigamente eu tinha esses problema trabalhei nas otimização uso um vps de 10gb e já peguei 439 players (Derivado) e cpu ficava 60% hoje com 150 fica 33%
  14. @mateuscorrea <event type="combat" name="SummonAntKillPlayer" event="script" value="SummonAntKillPlayer.lua"/> <event type="combat" name="PlayerAntKillSummon" event="script" value="PlayerAntKillSummon.lua"/> SummonAntKillPlayer.lua function onCombat(cid, target) if isInArray(getCreatureSummons(target), cid) then return false end return true end PlayerAntKillSummon.lua function onCombat(cid, target) if cid == getCreatureMaster(target) then doPlayerSendCancel(cid, "Voce nao pode matar seu summon.") return false end return true end login.lua registerCreatureEvent(cid, "PlayerAntKillSummon") registerCreatureEvent(cid, "SummonAntKillPlayer") Creditos ackerzin
  15. local configs = { players_db = {}, save_delay = 5, -- Segundos } function savePlayer() if isPlayer(cid) then if #configs.players_db > 0 then doPlayerSave(configs.players_db[1]) table.remove(configs.players_db, 1) return addEvent(savePlayer, configs.save_delay * 1000) end return true end end function onThink(interval) for _, cid in ipairs(getPlayersOnline()) do table.insert(configs.players_db, cid) end savePlayer() return true end
  16. Celulose postou uma resposta no tópico em Suporte Tibia OTServer
    Usa esse mod cria um arquivo bank.xml <?xml version="1.0" encoding="UTF-8"?> <mod name="Custom Bank" version="1.0" author="slawkens - edited by: mattyx14" contact="[email protected]" enabled="yes"> <!-- Bank Command --> <config name="command-bank-config"><![CDATA[ transferDisabledVocations = {0} -- disable non vocation characters ]]></config> <talkaction words="!bank;/bank" event="script"><![CDATA[ domodlib('command-bank-config') local config = { transferDisabledVocations = transferDisabledVocations } local function validAmount(amount) return (isNumber(amount) and amount > 0 and amount < 4294967296) end local function getAmount(amount, cid, f) return (amount == 'all' and f(cid) or tonumber(amount)) end local function getPlayerVocationByName(name) local result = db.getResult("SELECT `vocation` FROM `players` WHERE `name` = " .. db.escapeString(name)) if(result:getID() == -1) then return false end local value = result:getDataString("vocation") result:free() return value end function onSay(cid, words, param, channel) if(param == '') then doPlayerPopupFYI(cid, "Bank management manual.\n\n" .. "!bank or /bank balance - show your account balance\n" .. "!bank or /bank deposit 100 - deposit 100 gold\n" .. "!bank or /bank withdraw 50 - withdraw 50 gold\n" .. "!bank or /bank transfer 30 God - transfer 30 gold to player God\n\n" .. "Tip: you can also use 'all' as amount.\n" .. "!bank or /bank deposit all - deposit all gold you have\n" .. "!bank or /bank withdraw all - withdraw all gold from your bank account" ) return true end local t = string.explode(param, " ", 2) local command = t[1]:lower() if(command == 'balance') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your account balance is " .. getPlayerBalance(cid) .. " gold.") elseif(command == 'deposit') then if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Amount is required.") return true end local amount = getAmount(t[2], cid, getPlayerMoney) if(validAmount(amount) and getPlayerMoney(cid) >= amount and doPlayerDepositMoney(cid, amount)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, amount .. " gold has been deposited.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough money to deposit.") end elseif(command == 'withdraw') then if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Amount is required.") return true end local amount = getAmount(t[2], cid, getPlayerBalance) if(validAmount(amount) and getPlayerBalance(cid) >= amount and doPlayerWithdrawMoney(cid, amount)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, amount .. " gold has been withdrawn.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough money to withdraw.") end elseif(command == 'transfer') then if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Amount is required.") return true end if(not t[3]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player name to transfer is required.") return true end local amount, target = tonumber(t[2]), t[3] if(getPlayerGUID(cid) == getPlayerGUIDByName(target)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot transfer money to yourself.") elseif(isInArray(config.transferDisabledVocations, getPlayerVocation(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your vocation cannot transfer money.") elseif(not validAmount(amount) or getPlayerBalance(cid) < amount) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough money to transfer.") else local targetVocation = getPlayerVocationByName(target) if(not playerExists(target) or not targetVocation or isInArray(config.transferDisabledVocations, targetVocation) or not doPlayerTransferMoneyTo(cid, target, amount)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This player does not exist on this world or have no vocation.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have transferred " .. amount .. " gold to \"" .. target .."\".") end end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid command usage. Use '!bank' to view manual.") end return true end ]]></talkaction> </mod>
  17. creaturescript algum script onThink exemplo: function onThink(cid, interval) local itemid = 13496 local outfit = {lookType = 501} if isPlayer(cid) and getPlayerItemCount(cid, itemid) >= 1 and getPlayerStorageValue(cid, 30023) >= 1 then doPlayerSetVocation(cid, 535) doPlayerRemoveItem(cid, itemid, 1) doCreatureChangeOutfit(cid, outfit) addEvent(doRemoveCreature, 1, cid) elseif isPlayer(cid) and getPlayerItemCount(cid, itemid) >= 1 then doPlayerSetVocation(cid, 530) doPlayerRemoveItem(cid, itemid, 1) doCreatureChangeOutfit(cid, outfit) addEvent(doRemoveCreature, 1, cid) end return true end
  18. @Phineasz <outfit id="2" storageId="8000" storageValue="1" premium="no" default="0"> <list gender="0-3" lookType="501" name="Goku Instinct"/> </outfit>
  19. @KOLISAO top, vê se não vende esse baiak e posta aqui também. vai saber né WESLEY
  20. @Kannabian 2020-04-11 17-59-17.mp4 OTX ^ conforme coloquei ai
  21. Testei na otx e está funcionando Na 0.3 era pra funcionar Estou pelo celular agora, assim que eu chegar vou olhar Salva o msg.lua em ansi Fórum está bugando, se tiver em utf vai bugar
  22. algo bem simples porém funcional kk @Spooky Ghost se tu deixar em login.lua não vai mandar a mensagem precisa ser feito a verificação dentro do script local channels = { [4] = {txt = "(Game-Chat) Este canal é apenas para CONVERSAS CASUAIS e SOCIALIZAÇÃO. Negociações e spam/flood são proibidas neste canal, respeito e educação são essenciais. Siga as regras para não ser mutado"}, -- GameChat [5] = {txt = "(TRADE) Este canal é apenas para TROCAS de itens relacionados ao jogo. Qualquer coisa além disso pode ocasionar um mute ou banimento."}, -- Trade [9] = {txt = "(HELP) Este canal é apenas para AJUDA, Faça sua pergunta educadamente, ou se você estiver respondendo uma dúvida, seja claro e objetivo. Falta de educação você será mutado ou ate mesmo banido!"}, -- Help [12] = {txt = "(LOOT) Este canal vai lhe mostrar o loot dos monstros que você matou."}, -- loot channel [11] = {txt = "(COOLDOWN) Este canal vai lhe mostrar o cooldown(tempo de espera) de seus Jutsus Especiais(Combo)."}, -- loot channel } function onJoinChannel(cid, channelId, users) local t = channels[channelId] if t then addEvent(doPlayerSendChannelMessage, 150, cid, "", t.txt, TALKTYPE_CHANNEL_O, channelId) end return true end function onLogin(cid) doPlayerOpenChannel(cid, 4) doPlayerOpenChannel(cid, 5) doPlayerOpenChannel(cid, 9) doPlayerOpenChannel(cid, 12) doPlayerOpenChannel(cid, 11) return true end <event type="joinchannel" name="OpenChannelDialog" script="msg.lua"/> <event type="login" name="OpenChannelDialog" script="msg.lua"/> login.lua : registerCreatureEvent(cid, "OpenChannelDialog") PS: não pode ter doPlayerOpenChannel no login.lua ! otx : local channels = { [4] = {txt = "(Game-Chat) Este canal é apenas para CONVERSAS CASUAIS e SOCIALIZAÇÃO. Negociações e spam/flood são proibidas neste canal, respeito e educação são essenciais. Siga as regras para não ser mutado"}, -- GameChat [5] = {txt = "(TRADE) Este canal é apenas para TROCAS de itens relacionados ao jogo. Qualquer coisa além disso pode ocasionar um mute ou banimento."}, -- Trade [9] = {txt = "(HELP) Este canal é apenas para AJUDA, Faça sua pergunta educadamente, ou se você estiver respondendo uma dúvida, seja claro e objetivo. Falta de educação você será mutado ou ate mesmo banido!"}, -- Help [12] = {txt = "(LOOT) Este canal vai lhe mostrar o loot dos monstros que você matou."}, -- loot channel [11] = {txt = "(COOLDOWN) Este canal vai lhe mostrar o cooldown(tempo de espera) de seus Jutsus Especiais(Combo)."}, -- loot channel } function onChannelJoin(cid, channelId, users) local t = channels[channelId] if t then addEvent(doPlayerSendChannelMessage, 150, cid, "", t.txt, TALKTYPE_CHANNEL_O, channelId) end return true end function onLogin(cid) doPlayerOpenChannel(cid, 4) doPlayerOpenChannel(cid, 5) doPlayerOpenChannel(cid, 9) doPlayerOpenChannel(cid, 12) doPlayerOpenChannel(cid, 11) return true end <event type="login" name="OpenChannelDialog" script="msg.lua"/> <event type="channeljoin" name="OpenChannelDialog" script="msg.lua"/> login.lua: registerCreatureEvent(cid, "OpenChannelDialog") PS: não pode ter doPlayerOpenChannel no login.lua !

Informação Importante

Confirmação de Termo