Ir para conteúdo
Banner com Efeitos

Fir3element

Héroi
  • Registro em

  • Última visita

Tudo que Fir3element postou

  1. ahhhhh qual distro c ta usando?
  2. usa CTRL+F11 pra compilar, aq deu certo
  3. tem q mudar de void p/ bool, troca sua função por essa: (recompila o projeto, não da build só não) bool Game::showHotkeyUseMessage (Player* player, Item* item) { int32_t subType = -1; if(item->hasSubType() && !item->hasCharges()) subType = item->getSubType(); const ItemType& it = Item::items[item->getID()]; uint32_t count = player->__getItemTypeCount(item->getID(), subType, false); if(player->hasCondition(CONDITION_EXHAUST, 4597)) { player->sendCancelMessage("You have to wait."); return false; } char buffer[40 + it.name.size()]; if(count == 1) sprintf(buffer, "Using the last %s...", it.name.c_str()); else sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str()); if(Condition* showHotkeyExhaust = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 1000, 0, false, 4597)) player->addCondition(showHotkeyExhaust); player->sendTextMessage(MSG_INFO_DESCR, buffer); return true; } e no arquivo game.h void showHotkeyUseMessage(Player* player, Item* item); por bool showHotkeyUseMessage(Player* player, Item* item);
  4. troca esse RET_YOUHAVETOWAIT por alguma mensagem q vc quer q apareça no caso a minha é: "Sorry, you have to wait."
  5. void Game::showHotkeyUseMessage(Player* player, Item* item) { int32_t subType = -1; if(item->hasSubType() && !item->hasCharges()) subType = item->getSubType(); const ItemType& it = Item::items[item->getID()]; uint32_t count = player->__getItemTypeCount(item->getID(), subType, false); if(player->hasCondition(CONDITION_EXHAUST, 4597)) { player->sendCancelMessage(RET_YOUHAVETOWAIT); return false; } char buffer[40 + it.name.size()]; if(count == 1) sprintf(buffer, "Using the last %s...", it.name.c_str()); else sprintf(buffer, "Using one of %d %s...", count, it.pluralName.c_str()); if(Condition* showHotkeyExhaust = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_EXHAUST, 1000, 0, false, 4597)) player->addCondition(showHotkeyExhaust); player->sendTextMessage(MSG_INFO_DESCR, buffer); }
  6. stamina regen no treiner (coloca actionid no tile): STAMINA_MESSAGE = "You won 5 minutes of stamina." STAMINA_TIME = 60 * 1000 STAMINA_EFFECT = 12 STAMINA_ADD = 5 function event(cid) if isPlayer(cid) then doPlayerAddStamina(cid, STAMINA_ADD) doPlayerSendTextMessage(cid, 27, STAMINA_MESSAGE) eventCheck = addEvent(event, STAMINA_TIME, cid) end end function onStepIn(cid, item, position, fromPosition, pos) if isPlayer(cid) then doPlayerSendTextMessage(cid, 27, "Every 1 minute of training you gain 5 minutes of stamina.") eventCheck = addEvent(event, STAMINA_TIME, cid) end return true end function onStepOut(cid, item, position, fromPosition) if isPlayer(cid) then doPlayerSendTextMessage(cid, 27, "You left the training area.") stopEvent(eventCheck) end return true end em pz: https://gist.github.com/vankk/ebd1377d52b3b92028ecad632e949d0c
  7. player.cpp, função Player::getAttackSpeed() você teria que colocar o valor da skill fist no meio dessa fórmula, pra pegar o valor usa essa função: getSkill(SKILL_FIST, SKILL_LEVEL)
  8. muda para 64M e reinicia o mysql
  9. Costuma ser falta de memória ram, ou uma configuração no mysql: max_allowed_packet Fica no arquivo my.ini, tenta encontrar ai e vê qual valor tá usando.
  10. Qual a configuração da máquina? (sistema operacional e memória ram)
  11. costuma dar isso por causa de alguma dll errada, da uma verificada ai
  12. ta compilando por onde? acho que teu compilador não tem nenhuma lib instalada kk
  13. posta a source ai
  14. OTX 2 é baseado no TFS 0.3.7 rev ± 5885, e o TFS 0.4 é rev ± 3777-3884 2 mil atualizações... não vai ter compatibilidade em tudo
  15. Não é melhor remover axe e club, deixando apenas sword? Dai vc troca o nome pra qual vc quer
  16. Fiz meio incompleto, falta terminar a função que retorna as top guilds... Se alguém quiser terminar ? -- globalevents.xml <globalevent name="topguild" interval="1000" event="script" value="topguild.lua"/> scripts/topguild.lua local function getTopGuild() local info = db.getResult("???") if info:getID() ~= -1 then local guildid = info:getDataInt("???") info:free() return guildid -- deve retornar uma tabela end return false end function onThink(interval, lastExecution) local topGuild = getTopGuild() -- deve retornar uma tabela com os IDs das guilds. Ex.: {5, 9, 1, 10, 7} for _, cid in ipairs(getPlayersOnline()) do if(isInArray(topGuild, getPlayerGuildId(cid))) then doSendAnimatedText(getCreaturePosition(cid), "TOP GUILD", COLOR_RED) end end return true end
  17. provavelmente o erro ta no .xml do NPC, não nessa lib
  18. posta o script ai... (se quiser mandar no privado, pra n dar problema)
  19. fiz algo rápido aqui, mas tem um problema... o ot n pode fechar nesses 10 dias ? e o item vai dar problema se for utilizado dentro da backpack script base só local function removeTP(position) if getThingfromPos(position).itemid == 1387 then doRemoveItem(getThingfromPos(position).uid) end return true end function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = {x = 96, y = 122, z = 7} -- pra onde o tp vai local tempo = 10 * 86400 * 1000 doCreateTeleport(1387, pos, fromPosition) addEvent(removeTP, tempo, fromPosition) doRemoveItem(item.uid) return false end
  20. Fir3element postou uma resposta no tópico em Suporte Tibia OTServer
    teria que fazer o seguinte: 1. criar o monstro numa área separada X 2. logo em seguida já criar um addEvent com uma função pra remover o monstro nessa área X acho q ± isso: local function removeMonster(pos, name) local spec = getSpectators(pos, 100, 100) if spec ~= nil then for _, s in pairs(spec) do if isMonster(s) and getCreatureName(s) == name then doRemoveCreature(s) end end end end function onTimer(time, interval, thinkInterval) local pos, name, timeToRemove = {x = 32238, y = 32244, z = 7}, "Rosak", 60 doCreateMonster(name, pos) addEvent(removeMonster, timeToRemove * 60 * 60 * 1000, pos, name) return true end
  21. source atualizada... arrumei o bug do party e um do cast adicionei o projeto do dev-cpp de volta tb
  22. ambos os arquivos foram deletados da internet, logo, só estão ai para atrapalhar
  23. tem que deletar a parte que checa versão e blacklist na source (otserv.cpp)
  24. bom então... anotei o bug aqui pra arrumar mais pra frente ?
  25. não era pra usar isso tudo não tá usando qual distro? (se for tfs 0.4, tem um bug no cast)

Informação Importante

Confirmação de Termo