Ir para conteúdo

Fir3element

Héroi
  • Registro em

  • Última visita

Tudo que Fir3element postou

  1. Não posso ajudar se não usarem o datapack completo... se copiar só a distro e um arquivo ou outro, com certeza vai ter bugs.
  2. ah sim.. eu quis dizer sobre o bug de comprar items o de fast attack acho q abaixo de 1000ms já acontece enfim, por enquanto to sem tempo de arrumar essas coisas, mas quando der eu ajeito tudo
  3. cara não lembro.. tem que dar uma olhada no github -- distro desatualizada, deve ter algumas melhores por ai
  4. locked seria true ou false eu acho
  5. troca LuaScriptInterface por LuaInterface
  6. pega bons scripts prontos e procura entender o que cada linha faz
  7. não é walkable.lua, é walkback.lua data/movements/scripts
  8. por isso eu disse "no tfs 0.4" esse ai é otx n é?
  9. se alguém souber arrumar me avisa.. pq ta tenso achar onde é esse bug aheuhea
  10. sqlite ta rodando ok eu acho mas n recomendo ngm usar, horrível d+ só desvantagens
  11. base top, gostei rep+
  12. no tfs 0.4 eu uso assim: bool Game::playerSay(uint32_t playerId, uint16_t channelId, SpeakClasses type, const std::string& receiver, const std::string& text, ProtocolGame* pg) { Player* player = getPlayerByID(playerId); if(!player || player->isRemoved()) return false; if (pg != NULL && pg->getIsCast() && !player->isAccountManager()) { if(player->hasCondition(CONDITION_EXHAUST, 64597)) return false; if(Condition* conditionchannel = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 2000, 0, false, 64597)) player->addCondition(conditionchannel); if(g_talkActions->onPlayerSay(player, type == SPEAK_SAY ? (unsigned)CHANNEL_DEFAULT : channelId, text, false, pg)) return true; PlayerCast pc = player->getCast(); for(std::list<CastBan>::iterator it = pc.muted.begin(); it != pc.muted.end(); ++it) if(it->ip == pg->getIP()) { pg->publicSendMessage(player, SPEAK_PRIVATE, "You are muted on this cast."); return false; } if(playerTalkToChannel(player, type, text, channelId, pg)) return true; else return false; } uint32_t muted = 0; bool mute = player->isMuted(channelId, type, muted); if(muted && mute) { char buffer[75]; sprintf(buffer, "You are still muted for %d seconds.", muted); player->sendTextMessage(MSG_STATUS_SMALL, buffer); return false; } ..........
  13. player.cpp, função getDescription coloca pra ler um storage na descr, + fácil q query
  14. fiz em 5 min aq, nem testei local config = { minlevel = 150, --- level inical para resetar price = 10000, --- preço inicial para resetar newlevel = 20, --- level após reset priceByReset = 0, --- preço acrescentado por reset percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total) maxresets = 50, levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset } --- end config local function getResets(uid) local resets = getPlayerStorageValue(uid, 378378) if resets < 0 then resets = 0 end return resets end local function addReset(cid) local resets = getResets(cid) setPlayerStorageValue(cid, 378378, resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) local hp = getCreatureMaxHealth(cid) local resethp = hp*(config.percent/100) setCreatureMaxHealth(cid, resethp) local differencehp = (hp - resethp) doCreatureAddHealth(cid, -differencehp) local mana = getCreatureMaxMana(cid) local resetmana = mana*(config.percent/100) setCreatureMaxMana(cid, resetmana) local differencemana = (mana - resetmana) doCreatureAddMana(cid, -differencemana) local guid = getPlayerGUID(cid) doRemoveCreature(cid) local description = resets+1 db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..description.."]' WHERE `players`.`id`= ".. guid) db.executeQuery("UPDATE `players` SET `level`="..config.newlevel..",`experience`= 0 WHERE `players`.`id`= ".. guid) return true end function onSay(cid, words, param, channel) local newPrice = config.price + (getResets(cid) * config.priceByReset) local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset) if param == "quantity" then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a total of '..getResets(cid)..' reset(s).') end if getResets(cid) < config.maxresets then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'You want to reset your character? It will cost '..newPrice..' gp\'s!') elseif getPlayerMoney(cid) < newPrice then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'Its necessary to have at least '..newPrice..' gp\'s for reseting!') elseif getPlayerLevel(cid) < newminlevel then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'The minimum level for reseting is '..newminlevel..'!') end doPlayerRemoveMoney(cid,newPrice) addEvent(function() if isPlayer(cid) then addReset(cid) end end, 3000) local number = getResets(cid)+1 local msg ="---[Reset: "..number.."]-- You have reseted! You'll be disconnected in 3 seconds." doPlayerPopupFYI(cid, msg) return true end
  15. vc tem que achar a função q fala no channel do cast, no caso do tfs 0.4: função Game::playerSay, arquivo game.cpp dai adiciona isso aqui: if(player->hasCondition(CONDITION_EXHAUST, 64597)) return false; if(Condition* conditionchannel = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 2000, 0, false, 64597)) player->addCondition(conditionchannel);
  16. ah sim #define EVENT_CREATURE_THINK_INTERVAL 500 Só trocar 500 por 1000 não vou fazer esse commit pq prejudicaria algumas pessoas obs: não precisa de elfbot pra fazer isso
  17. 1. quest log padrão do tfs 2. normal aqui, ta usando meu otb/xml? tenho nem ideia de qual é essa problema, explica ai cara nunca vi esse problema, não uso muito linux tbm kkkk rodou mysql ou sqlite?
  18. https://github.com/otland/forgottenserver vc tem que dizer pro compilador onde tá as libs, tem uns tutoriais bons aqui no tk
  19. comece aprendendo a ligar um servidor -> utilizar banco de dados (mysql) -> configurar um acc maker -> compilar um servidor
  20. como funciona seu sistema de critical/dodge? storage? database?
  21. o gesior tem um método de checagem, só diz que a conta foi criada se realmente executou a query, então tem alguma config errada ai
  22. tem, já fiz um bucado de vezes... só desfazer o commit "8.6 update": https://github.com/Fir3element/0.3.6pl1/commits/master
  23. bacana, bem simples e útil já tá completo?
  24. Na função addBuyableItem você tem que adicionar quantidade antes do name, tipo: shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 1, 'snakebite rod') pronto, coloquei

Informação Importante

Confirmação de Termo