Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''tfs 0.4''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

  1. Não consigo compilar, alguem compila para min? Abra o map.cpp da source do otclient Procure por: Altere para: Link: Scan:
  2. Salve salve pessoal, no inicio desse ano estava dando uma estudada e mexendo com a TFS 0.4 rev3884, e vi que havia alguns bugs e que não tinha Cast incluso. Com base nisso decidi atualizar e otimizar a source, já que ainda ela é uma das mais utilizadas no mundo de Otserv. Decidi compartilhar esse meu trabalho com vocês! Acredito que possa ser uma das melhores REV atualmente. Conto com o seu feedback, caso haja algum bug, algo que tenha que mudar/optimizar, não exite em avisar aqui no tópico. Toda ajuda será bem vinda xD The Forgotten Server, Tibia Versão: 8.60 O que contém nela? Dentro da pasta contém o config.lua com todas as tag já adicionadas. Não esquecam de executar a Query do Cast na DB: Downloads uint8(Effects até 255) Distro: TheForgottenServer.exe Src + datapack: Source & Data Downloads uint8 sem o CAST incluso Distro: TheForgottenServer.exe Src + datapack: Source & Data ------------------------------------------------------- Downloads uint16(Effects até 65534) Distro: TheForgottenServer.exe Src + datapack: Source & Data É necessário fazer a modificação do Hexadecimal no cliente. Aqui tem um já pronto: Cliente.exe(com mc) ou Cliente.exe(sem mc) (só será necessario se utilizar a src com o uint 16.) Lembrado também que precisa utilizar a lib 000-constant.lua deste datapack. ------------------------------------------------------- Scans: Distro(uint8) & Distro(uint16) Source Cliente Obs: Os virus detectado é um falso positivo, então não se preocupem! A distro foi testada em Windows e em Linux Ubuntu 14.04, em ambos funcionaram muito bem! E para quem se interessa em saber onde se localiza os code do Cast, aqui está uma imagem. Você pode achar procurando por "//CAST" Façam um ótimo aproveito
  3. Reporte qualquer bug encontrado. - Mudanças: * Yellow skull arrumado * Monstros andando em cima de corpos * War system arrumado * Anti-divulgação melhorado * Cast system arrumado * Crash bugs arrumados * Adicionado exhaust ao comprar/vender items * Account manager com opção para cidades * /ghost stacking arrumado * !disband arrumado * Erros no linux arrumado * Aleta som arrumado * Bug nos rings arrumado * Adicionado suporte para Visual Studio * Remover battle ao entrar em PZ * Não pode jogar lixo em casas * Salt removido - Downloads: * Distro (x32): https://github.com/Fir3element/binaries/raw/master/x32.rar * Distro (x64 ~ não tem suporte para SQLite e precisa instalar o Microsoft Visual C++ 2010 Redistributable Package (x64)): https://github.com/Fir3element/binaries/raw/master/x64.rar * Source + datapack: https://github.com/Fir3element/3777/archive/master.zip - Scans: * Distro (x32): https://www.virustotal.com/pt/file/2ae89cd10781e7dbacb8864a90812dd39ed32c29996ee65690ef8743d50d763c/analysis/1454415506/ * Distro (x64): https://www.virustotal.com/pt/file/bead1f297a599410446cd6109b6822e8d99ede098de4bef40a69bfd7b043960e/analysis/1454415803/ * Source + datapack: https://www.virustotal.com/pt/file/16b7ffe1dbe08ec1ae989a176715bf0a9317354c0647f2b4ffff89f47aab55fa/analysis/1454415920/
  4. Gente muita gente tinha dificuldade em extender a tela do cliente do Tibia, então eu resolvi ajudar. Está aqui a distro TFS 0.4 rev 3777, com o OTCLIENT mais atualizado. Não coloquei datapack incluso, vocês podem baixar qualquer datapack 8.60 que vai ser compatível. Podem repostar suas modificações, mas coloquem meu crédito. Conteúdo: Distro, Otclient + SRC de ambos. Download Database MYSQL: https://www.mediafire.com/file/pa9xuav9kz4j2gg/tibia.sql/file Download: (39.88 MB, descompactado fica 106 MB) https://www.mediafire.com/file/6oo987114fvf8x7/TFS_860_com_tela_maior.rar/file Scan: https://www.virustotal.com/gui/file/a283cfbaadf383ad115e7452abd1c505ef4e404872595740cad5ce0f6867fc95/detection Imagens: https://i.postimg.cc/FHwhJp6T/Captura-de-Tela-117.png https://i.postimg.cc/Dzq34TLz/Captura-de-Tela-119.png https://i.postimg.cc/8c3tp7yn/scan.jpg
  5. Olá! Eu estava ajudando um cara com um task system , ele disse que pegou na net, mas as alterações que ele queria eu tive que refazer algumas partes do sistemas! Testei e funcionou perfeitamente! Funciona com Poketibia e Tibia! Vamos deixar de enrolação e adicionar o sistema! Lembrando também que funciona com tfs 0.3.6 e tfs 0.4! Não testei com tfs 1.x mas acho que não funciona. Vá em creaturescripts.xml e adicione isso: <event type="kill" name="KillTask" event="script" value="task.lua"/> No login.lua adiciona isso com os demais: registerCreatureEvent(cid, "KillTask") Agora crie um arquivo chamado task.lua e adicione isso: local tasksss = { [1] = {name = "Blastoise", sto = 10212, count = 3, time_sto = 5457, time = 1*24*60*60, sto_count = 14129, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."}, [2] = {name = "Charizard", sto = 10213, count = 5, time_sto = 5458, time = 1*24*60*60, sto_count = 14130, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."},}function onKill(cid, target) for _, t in ipairs(tasksss) do local total_count = t.count local m_sto = t.sto local count_sto = t.sto_count if getPlayerStorageValue(cid, m_sto) ~= -1 then if getCreatureName(target) == t.name then if (total_count - getPlayerStorageValue(cid, count_sto)) == 1 then setPlayerStorageValue(cid, count_sto, getPlayerStorageValue(cid, count_sto) + 1) doPlayerSendTextMessage(cid, 20, "You are killed ".. getPlayerStorageValue(cid, count_sto) .." " .. t.name .. " and finished the task!") return true elseif (total_count - getPlayerStorageValue(cid, count_sto)) >= 1 then setPlayerStorageValue(cid, count_sto, getPlayerStorageValue(cid, count_sto) + 1) doPlayerSendTextMessage(cid, 20, "You are killed ".. getPlayerStorageValue(cid, count_sto) .." of ".. total_count .." " .. t.name .. " kills to finish the task.") return true end end end end return trueend Agora vá em npc/scripts e crie um arquivo chamado task.lua e adicione isso: local tasksss = { [1] = {name = "Blastoise", sto = 10212, count = 3, time_sto = 5457, time = 1*24*60*60, sto_count = 14129, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."}, [2] = {name = "Charizard", sto = 10213, count = 5, time_sto = 5458, time = 1*24*60*60, sto_count = 14130, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."},}local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler)local talkState = {}function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() endfunction creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid value = -1 for i = 1, #tasksss do if msgcontains(msg, tasksss[i].name) and not value ~= -1 then value = i end end if value == -1 then selfSay('I don\'t have a this task!', cid) talkState[talkUser] = 0 return true end local configss = tasksss[value] local name = configss.name local m_sto = configss.sto local time_sto = configss.time_sto local count_sto = configss.sto_count local total_count = configss.count local rest = total_count - getPlayerStorageValue(cid, count_sto) if getPlayerStorageValue(cid, time_sto) < os.time() then -- verifica se o player ainda está no prazo if getPlayerStorageValue(cid, m_sto) <= 0 then -- verifica se o player não pegou está task selfSay('Ready! Now you need kill a '.. total_count .. ' '.. name .. '!', cid) setPlayerStorageValue(cid, m_sto, 1) setPlayerStorageValue(cid, total_count, 0) talkState[talkUser] = 0 else if rest <= 0 then -- Verifica se o player matou todos os monstros nescessários doPlayerAddItem(cid, configss.rewardid, configss.rewardcount) setPlayerStorageValue(cid, count_sto, 0) setPlayerStorageValue(cid, m_sto, -1) setPlayerStorageValue(cid, time_sto, os.time() + configss.time) doPlayerAddExperience(cid, configss.rewardexp) doSendAnimatedText(getCreaturePosition(cid), configss.rewardexp, 215) selfSay(configss.text, cid) talkState[talkUser] = 0 else selfSay('You need to kill '..rest..' '..name..' to gain a reward.', cid) talkState[talkUser] = 0 end end else selfSay('You already did this task, player. Wait '..math.ceil((getPlayerStorageValue(cid, time_sto) - os.time())/(60*60))..' hours to do it again.', cid) talkState[talkUser] = 0 endendnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new()) Pronto, agora volte para a pasta npc e crie um novo arquivo .xml chamado de Task e adicione isso lá: <?xml version="1.0" encoding="UTF-8"?><npc name="Npc Nome" script="task.lua" walkinterval="350000" floorchange="0" speed="0"> <health now="150" max="150"/> <look type="369" head="91" body="102" legs="83" feet="0"/> <parameters> <parameter key="message_greet" value="You want gain a task of {Blastoise}?"/> </parameters></npc> Pronto, agora o sistema de task está funcionando, e para adicionar um novo monstro pra fazer a task? Basta editar a tabela, mas não esqueça que tem que atualizar a tabela nos 2 scripts .lua !! local tasksss = { [1] = {name = "Blastoise", sto = 10212, count = 3, time_sto = 5457, time = 1*24*60*60, sto_count = 14129, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."}, [2] = {name = "Charizard", sto = 10213, count = 5, time_sto = 5458, time = 1*24*60*60, sto_count = 14130, money = 100, rewardid = 7621, rewardcount = 100, rewardexp = 10000, text = "Congratulations! You finished this task. In 24h, you will be able to do it again."},} Para configurar siga as seguintes instruções: Modificações da versão 2.0: Corrigido bug de apenas o primeiro monstro configurado funcionava, agora todos configurados funcionam! Quando player fala qual quer coisa que não seja o nome do monstro, diz que não tem aquela task! Modificado modo de contagem de kill, agora monstra quantos você matou e o total que precisa matar, quando mata o ultimo monstro, aparece a mensagem que terminou a task! Créditos: Criador @miguel223 Drazyn1291 -- Editei e reformulei muita coisa! Adicionei coisas como a contagem que falta ao matar os monstros, editei pra fazer a task apenas se o player falar com o NPC e outras coisas!
  6. Ha um tempo atrás eu procurei um Pet System bem simples pro meu servidor, e achei um muito bacana. TFS: 0.4 Tibia: 8.6 O script funciona corretamente, eu fiz apenas algumas alterações e queria compartilhar caso vocês tenham as mesmas exigências que eu; * Ao tentar usar o PET em PZ não da mais erro na distro, sobe um efeito FAILED! no player e manda uma mensagem. * Agora cada PET precisa de um storage para ser usado, no meu caso, cada PET tem sua quest individual. Indo para o assunto... Vá em "data/actions/scripts", copie algum arquivo da pasta e cole, renomeie para "simple_pet" e adicione isso dentro: function onUse(cid, item, frompos, item2, topos)local dolls = {[11256] = {pet = "Rat"},[11207] = {pet = "Demon"},[5791] = {pet = "Dragon"},}local go = dolls[item.itemid]local summon = getCreatureSummons(cid)---------------------------------------------------if not (getTilePzInfo(getCreaturePosition(cid))) thenif #summon >= 1 thenfor _, pid in ipairs(summon) dodoRemoveCreature(pid)doCreatureSay(cid, ""..go.pet..", Recuar!", TALKTYPE_ORANGE_1)endreturn trueendif item.itemid == 5791 thenif getPlayerStorageValue(cid, 6666) == 1 thendoConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid)))doCreatureSay(cid, ""..go.pet..", GO!", TALKTYPE_ORANGE_1)else doPlayerSendTextMessage(cid, 19, "Voce precisa da quest para usar esse PET!")doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180)endend if item.itemid == 11256 thenif getPlayerStorageValue(cid, 4444) == 1 thendoConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid)))doCreatureSay(cid, ""..go.pet..", GO!", TALKTYPE_ORANGE_1)else doPlayerSendTextMessage(cid, 19, "Voce precisa da quest para usar esse PET!")doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180)endendif item.itemid == 11207 thenif getPlayerStorageValue(cid, 4445) == 1 thendoConvinceCreature(cid, doSummonCreature(go.pet, getCreaturePosition(cid)))doCreatureSay(cid, ""..go.pet..", GO!", TALKTYPE_ORANGE_1)else doPlayerSendTextMessage(cid, 19, "Voce precisa fazer a quest para usar esse PET!")doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180)endendelsedoPlayerSendTextMessage(cid, 19, "Voce nao pode sumonar seu PET em Protect Zone!")doSendAnimatedText(getPlayerPosition(cid), "Failed!", 180)return trueendend Muito bem, agora sigamos para "actions.xml" e adicione essa tag: <action itemid="11256;11207;11144;9019" event="script" value="simple_pet.lua"/> Agora para você configurar: Nesta parte do código: local dolls = {[11256] = {pet = "Crystal Spider"},[11207] = {pet = "Ashmunrah"},[11144] = {pet = "Demon"},[9019] = {pet = "Vampire"},} Oque está entre [ e ] nós colocamos os Item ID dos items que vão chamar o PET. Já entre { e } aonde está entre aspas, colocamos o nome do PET.E na tag do "actions.xml" adicionamos estes MESMOS Item Ids, separando-os por ; ficando: <action itemid="ID;ID;ID;ID" event="script" value="simple_pet.lua"/> Para o PET teleportar para você quando subir escadas, ou ficar muito longe, vá em "config.lua" e procure por: teleportPlayerSummons Se estiver false coloque true, se estiver "no", coloque "yes" Demonstração: http://imgur.com/a/emO4I Obrigado pela atenção galera, espero que tenham gostado, e qualquer dúvida tentarei ajudar vocês. Não tenho certeza se esse sistema não tem aqui, mas não estava achando então decidi postar :3 Se Ajudei Rep + CRÈDITOS: LUQUINHA "Um Sitezinho Qualquer"
  7. Galera, tenho um sistema de task com a Grizzly Adams, e quando termina de matar todos monstros, vc fala report, e ela não faz nada, não responde nada, só responde se falar task para começar outra, poderiam me ajudar? ot estreiou ontem esta foda
  8. Olá galera, vocês conhecem as lendas dos Trolls que de baixo de uma ponte? Eles estão sempre na espreita, aguardando alguém para roubar, assassinar, estuprar e comer suas almas (as últimas partes são brincadeira). Me baseando nessa lenda eu fiz esse simples script, é um dos primeiros códigos que consigo desenvolver sozinho(tive ajuda), eu espero que ajude alguém em algum lugar do tempoespaço, é um script ótimo se você assim como eu gosta de pontes e também sempre teve a vontade de incrementar alguns de seus mapas com scripts. 1º. Acesse a pasta raiz do seu servidor, logo após siga o seguinte caminho: data/movements e abra o arquivo movements.xml. O código que você devera adicionar dentro deste arquivo está listado abaixo. <movevent type="StepIn" actionid="DigiteONumeroDeUmaActionAqui" event="script" value="ponte.lua"/> 2º. Dentro de data/movements abra a pasta 'scripts' e crie um arquivo .lua nomeado de 'ponte', dentro deste adicione o seguinte código. function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) local configuration = { monstrosTime = 1*5*1000, -- tempo até a criatura aparecer tempoDeStorage = 1*20*1000, -- em quanto tempo será removido a storage e se tornará possivel as criaturas resurgirem storage = 987459, -- numero da storage monsters = { [1] = {name = "Troll Champion", pos = {x = 1001, y = 1110, z = 9}}, -- Nome, quantidade e posição dos monstros, altere a vontade [2] = {name = "Troll", pos = {x = 1000, y = 1107, z = 9}}, [3] = {name = "Troll", pos = {x = 1007, y = 1109, z = 9}} } } if isPlayer(cid) == true then if getPlayerStorageValue(cid, configuration.storage) < 1 then doCreatureSay(cid, "A ponte não parece segura e quando você dá o primeiro passo ouve um grunhido e nota a presença de um ser estranho.", TALKTYPE_ORANGE_1) -- MSG que você quer exibir addEvent(function() for k, v in pairs(configuration.monsters) do doCreateMonster(v.name, v.pos) end end, configuration.monstrosTime) setPlayerStorageValue(cid, configuration.storage, 1) addEvent(function() setPlayerStorageValue(cid, configuration.storage, 0) end, configuration.tempoDeStorage) end end return true end 3º. Inicie o seu servidor e adicione o número da 'ActionID' que você inseriu em 'movements.xml' a algum piso de sua preferência, no caso eu adicionei no meio da ponte. Seja criativo.
  9. Boa noite, pessoal em resumo preciso de sources para TFS 0.4 com effects 256+, hp em porcentagem, pois preciso compilar um WDOBO (Dbo) para linux, alguém poderia me passar ? Obrigado.
  10. Galera irei disponibilizar a distro que uso TFS 0.4 (rev 3777) que retirei o Salt, ele causa um problema onde só é possível criar acc pelo site, como resolvi agora também é possível pelo tibia "1/1", ela acompanha: System War Ant-Divulg (Direto na distro) No-OTBM (Faz aceitar qualquer items.otbm) No-Salt (que citei a cima) Caso precise do config.lua. Caso use outra versão da distro e irá usar o mesmo config.lua Mude: worldType para "open", adicione em mapName ao final do nome ".otbm" e ela só aceita criptografia sha1 em "encryptionType" mude para "sha1", visando sua melhor proteção de seus dados. -- The Forgotten Server Config -- Account manager accountManager = true namelockManager = true newPlayerChooseVoc = false newPlayerSpawnPosX = 95 newPlayerSpawnPosY = 117 newPlayerSpawnPosZ = 7 newPlayerTownId = 1 newPlayerLevel = 1 newPlayerMagicLevel = 0 generateAccountNumber = false -- Unjustified kills -- NOTE: *Banishment and *BlackSkull variables are >summed up< -- (dailyFragsToRedSkull + dailyFragsToBanishment) with their -- *RedSkull equivalents. -- Auto banishing works only if useBlackSkull set to negative. -- advancedFragList is not advised if you use huge frags -- requirements. useFragHandler = true redSkullLength = 30 * 24 * 60 * 60 blackSkullLength = 45 * 24 * 60 * 60 dailyFragsToRedSkull = 3 weeklyFragsToRedSkull = 5 monthlyFragsToRedSkull = 10 dailyFragsToBlackSkull = dailyFragsToRedSkull weeklyFragsToBlackSkull = weeklyFragsToRedSkull monthlyFragsToBlackSkull = monthlyFragsToRedSkull dailyFragsToBanishment = dailyFragsToRedSkull weeklyFragsToBanishment = weeklyFragsToRedSkull monthlyFragsToBanishment = monthlyFragsToRedSkull blackSkulledDeathHealth = 40 blackSkulledDeathMana = 0 useBlackSkull = true advancedFragList = false -- Banishments -- violationNameReportActionType 1 = just a report, 2 = name lock, 3 = player banishment -- killsBanLength works only if useBlackSkull option is disabled. notationsToBan = 3 warningsToFinalBan = 4 warningsToDeletion = 5 banLength = 7 * 24 * 60 * 60 killsBanLength = 7 * 24 * 60 * 60 finalBanLength = 30 * 24 * 60 * 60 ipBanishmentLength = 1 * 24 * 60 * 60 broadcastBanishments = true maxViolationCommentSize = 200 violationNameReportActionType = 2 autoBanishUnknownBytes = false -- Battle -- NOTE: showHealingDamageForMonsters inheritates from showHealingDamage. -- loginProtectionPeriod is the famous Tibia anti-magebomb system. -- deathLostPercent set to nil enables manual mode. worldType = "open" protectionLevel = 1 pvpTileIgnoreLevelAndVocationProtection = true pzLocked = 60 * 1000 huntingDuration = 60 * 1000 criticalHitChance = 7 criticalHitMultiplier = 1 displayCriticalHitNotify = false removeWeaponAmmunition = true removeWeaponCharges = true removeRuneCharges = true whiteSkullTime = 15 * 60 * 1000 noDamageToSameLookfeet = false showHealingDamage = false showHealingDamageForMonsters = false fieldOwnershipDuration = 5 * 1000 stopAttackingAtExit = false loginProtectionPeriod = 10 * 1000 deathLostPercent = 10 stairhopDelay = 2 * 1000 pushCreatureDelay = 2 * 1000 deathContainerId = 1987 gainExperienceColor = 215 addManaSpentInPvPZone = true squareColor = 0 allowFightback = true fistBaseAttack = 7 -- Connection config worldId = 0 ip = "127.0.0.1" loginPort = 7171 gamePort = 7172 loginTries = 10 retryTimeout = 5 * 1000 loginTimeout = 60 * 1000 maxPlayers = 1000 motd = "Welcome to the Forgotten Server!" displayOnOrOffAtCharlist = false onePlayerOnlinePerAccount = true allowClones = false serverName = "Forgotten" loginMessage = "Welcome to the Forgotten Server!" statusTimeout = 5 * 60 * 1000 replaceKickOnLogin = true forceSlowConnectionsToDisconnect = false loginOnlyWithLoginServer = false premiumPlayerSkipWaitList = false -- Database -- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database. -- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value. -- encryptionType can be plain, md5, sha1, sha256, sha512 or vahash. sqlType = "sqlite" sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "" sqlDatabase = "theforgottenserver" sqlFile = "theforgottenserver.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "sha1" -- Deathlist deathListEnabled = true deathListRequiredTime = 1 * 60 * 1000 deathAssistCount = 19 maxDeathRecords = 5 -- Guilds ingameGuildManagement = true levelToFormGuild = 8 premiumDaysToFormGuild = 0 guildNameMinLength = 4 guildNameMaxLength = 20 -- Highscores highscoreDisplayPlayers = 15 updateHighscoresAfterMinutes = 60 -- Houses buyableAndSellableHouses = true houseNeedPremium = true bedsRequirePremium = true levelToBuyHouse = 1 housesPerAccount = 0 houseRentAsPrice = false housePriceAsRent = false housePriceEachSquare = 1000 houseRentPeriod = "never" houseCleanOld = 0 guildHalls = false -- Item usage timeBetweenActions = 200 timeBetweenExActions = 1000 hotkeyAimbotEnabled = true -- Map -- NOTE: storeTrash costs more memory, but will perform alot faster cleaning. mapName = "forgotten.otbm.gz" mapAuthor = "Komic" randomizeTiles = true storeTrash = true cleanProtectedZones = true mailboxDisabledTowns = "" -- Process -- NOTE: defaultPriority works only on Windows and niceLevel on *nix -- niceLevel works only on *nix systems -- coresUsed are seperated by comma cores ids used by server process, -- default is -1, so it stays untouched (automaticaly assigned by OS). defaultPriority = "high" niceLevel = 5 coresUsed = "-1" -- Startup startupDatabaseOptimization = true updatePremiumStateAtStartup = true confirmOutdatedVersion = false -- Spells formulaLevel = 5.0 formulaMagic = 1.0 bufferMutedOnSpellFailure = false spellNameInsteadOfWords = false emoteSpells = false -- Outfits allowChangeOutfit = true allowChangeColors = true allowChangeAddons = true disableOutfitsForPrivilegedPlayers = false addonsOnlyPremium = true -- Miscellaneous -- NOTE: promptExceptionTracerErrorBox works only with precompiled support feature, -- called "exception tracer" (__EXCEPTION_TRACER__ flag). dataDirectory = "data/" logsDirectory = "data/logs/" bankSystem = true displaySkillLevelOnAdvance = false promptExceptionTracerErrorBox = true maximumDoorLevel = 500 maxMessageBuffer = 4 -- VIP list separateVipListPerCharacter = false vipListDefaultLimit = 20 vipListDefaultPremiumLimit = 100 -- Saving-related -- useHouseDataStorage usage may be found at README. saveGlobalStorage = true useHouseDataStorage = false storePlayerDirection = false -- Loot -- monsterLootMessage 0 to disable, 1 - only party, 2 - only player, 3 - party or player (like Tibia's) checkCorpseOwner = true monsterLootMessage = 3 monsterLootMessageType = 25 -- Ghost mode ghostModeInvisibleEffect = false ghostModeSpellEffects = true -- Limits idleWarningTime = 14 * 60 * 1000 idleKickTime = 15 * 60 * 1000 reportsExpirationAfterReads = 1 playerQueryDeepness = 2 tileLimit = 0 protectionTileLimit = 0 houseTileLimit = 0 -- Premium-related freePremium = false premiumForPromotion = true -- Blessings -- NOTE: blessingReduction* regards items/containers loss. -- eachBlessReduction is how much each bless reduces the experience/magic/skills loss. blessings = true blessingOnlyPremium = true blessingReductionBase = 30 blessingReductionDecrement = 5 eachBlessReduction = 8 -- Rates -- NOTE: experienceStages configuration is located in data/XML/stages.xml. -- rateExperienceFromPlayers 0 to disable. experienceStages = false rateExperience = 5.0 rateExperienceFromPlayers = 0 rateSkill = 3.0 rateMagic = 3.0 rateLoot = 2.0 rateSpawn = 1 -- Monster rates rateMonsterHealth = 1.0 rateMonsterMana = 1.0 rateMonsterAttack = 1.0 rateMonsterDefense = 1.0 -- Experience from players -- NOTE: min~Threshold* set to 0 will disable the minimum threshold: -- player will gain experience from every lower leveled player. -- max~Threshold* set to 0 will disable the maximum threshold: -- player will gain experience from every higher leveled player. minLevelThresholdForKilledPlayer = 0.9 maxLevelThresholdForKilledPlayer = 1.1 -- Stamina -- NOTE: Stamina is stored in miliseconds, so seconds are multiplied by 1000. -- rateStaminaHits multiplies every hit done a creature, which are later -- multiplied by player attack speed. -- rateStaminaGain is multiplying every second of logged out time, eg: -- 60 * 1000 / 3 = 20 seconds, what gives 1 stamina minute for 3 being logged off. -- rateStaminaThresholdGain is dividing in case the normal gain (that is -- multiplied by rateStaminaGain, btw.) passed above threshold, eg: -- 60 * 1000 / 3 = 20 / 4 = 5 seconds (3 * 4 = 12 minutes for 1 stamina minute). -- staminaRatingLimit* is in minutes. rateStaminaLoss = 1 rateStaminaGain = 3 rateStaminaThresholdGain = 12 staminaRatingLimitTop = 40 * 60 staminaRatingLimitBottom = 14 * 60 staminaLootLimit = 14 * 60 rateStaminaAboveNormal = 1.5 rateStaminaUnderNormal = 0.5 staminaThresholdOnlyPremium = true -- Party -- NOTE: experienceShareLevelDifference is float number. -- experienceShareLevelDifference is highestLevel * value experienceShareRadiusX = 30 experienceShareRadiusY = 30 experienceShareRadiusZ = 1 experienceShareLevelDifference = 2 / 3 extraPartyExperienceLimit = 20 extraPartyExperiencePercent = 5 experienceShareActivity = 2 * 60 * 1000 -- Global save -- NOTE: globalSaveHour means like 03:00, not that it will save every 3 hours, -- if you want such a system please check out data/globalevents/globalevents.xml. globalSaveEnabled = false globalSaveHour = 8 globalSaveMinute = 0 shutdownAtGlobalSave = true cleanMapAtGlobalSave = false -- Spawns deSpawnRange = 2 deSpawnRadius = 50 -- Summons maxPlayerSummons = 2 teleportAllSummons = false teleportPlayerSummons = false -- Status statusPort = 7171 ownerName = "" ownerEmail = "@otland.net" url = "http://otland.net/" location = "Europe" displayGamemastersWithOnlineCommand = false -- Logs -- NOTE: This kind of logging does not work in GUI version. -- For such, please compile the software with __GUI_LOGS__ flag. displayPlayersLogging = true prefixChannelLogs = "" runFile = "" outputLog = "" truncateLogsOnStartup = false -- Manager -- NOTE: managerPassword left blank disables manager. managerPort = 7171 managerLogs = true managerPassword = "" managerLocalhostOnly = true managerConnectionsLimit = 1 -- Admin -- NOTE: adminPassword left blank disables manager. -- Set to anything if you set adminRequireLogin to false. -- adminEncryption available options: rsa1024xtea; -- remember to set correct data! adminPort = 7171 adminLogs = true adminPassword = "" adminLocalhostOnly = true adminConnectionsLimit = 1 adminRequireLogin = true adminEncryption = "" adminEncryptionData = "" A Distro não foi feita por min então estarei deixando os créditos dela na distro. A Compilação foi feita por min e não deu nenhum erro. Ela está sem as dlls caso precise de alguma procure o nome dela no Google, baixe e coloque na pasta de seu OT, caso tenhas mais problemas deixe comentário. Se você Esteve com o mesmo problema e te ajudei Rep+ Link Para Download Do Executável: http://www.mediafire.com/download/7l6od8gdkob5572/Baiak-Map.exe Link Das Sources p/ Quem Queira Compilar: http://www.mediafire.com/download/auib21zd0i3o40o/sources_7.rar Scan Do Executável: https://www.virustotal.com/pt/url/ec493975bc373285e3fcf30709339c84bcac700bbf66334bdb9108b9628f38e9/analysis/1436509651/ Scan Das Sources: https://www.virustotal.com/pt/url/a3c207f0c2f1b0aea8cc411692f7a8ff40fed5c570bbc60ede6442fdcef11403/analysis/1436511749/ Obs. p/ Mods.: Meu antigo tropico foi poque não conseguia compilar as sources, mas como consegui, sem problemas resolvi compartilhar.
  11. Clarym

    War system

    Iae Bom, instalei um script de War System desse tópico instalei passo a passo 4 vezes e continua o erro, é o seguinte erro: Quando uma guild invita a outra para guerra ocorre tudo tranquilo, mas se os jogadores relogarem os escudos de war e a própria war some, tem como pegar white skull e tudo, e também depois que você reloga seu battle fica infinitamente, não sai, você não tem como deslogar mais. Alguém pode me ajudar?
  12. Tungs

    Pokémon HP

    As Principais funções são: -Level System Diferenciado - Profissões - Poke Balls que serão adicionadas: Poké Ball, Great Ball, Ultra Ball, Master Ball, Saffari Ball,Premier Ball, Net Ball, Cherish Ball, Dive Ball, Lure Ball, Moon Gall, Quick Ball, Love Ball, Golden Ball, Super Ball, Heavy Ball, Love Ball, Dusk Ball, Fast Ball, Treecko's Ball, Torchic's Ball, Pikachu's Ball, Mudkip's Ball - Races: Dark, Steel e Fairy - Addon System (100%) - Kanto, Jotho, Hoeen, Sinnoh (Pokémons) (100%) - Kanto, Jotho, Hoeen, Sinnoh (Mapa) (50%) - Quests juntando Anime e Games (Nintendo & Anime) (15%) - Egg system - Npcs de Animes/Games Legendas: Vermelho e Riscado: Removido Azul: De 30 a 50% Roxo: Menos de 30% Verde: 100% Vídeos: Por favor, caso seja: Mapper, Scripter, Spriter URGENTE Contate-nos FACEBOOK @Bennyyw Patrocina nós <3
  13. Ola amigos, estou querendo abrir um otserv.. Já tentei de todas as maneiras, olhei os tutoriais daqui e nada.. Não consigo colocar o servidor online (Consigo apenas com o ip 127.0.0.1) Tentei abri as portas do firewall do windows e ao que tudo indica deu certo... Mas ainda assim não é possivel se conectar, então pensei vamos pro hoteador.. O meu modem é um da net aqui Modelo: C6500 DOC SIS 3.0 E lá acabo ficando um pouco confuso pra liberar as portas não sei como fazer exatamente, qual ip inserir.. Se é IPV4, ou o IP do meuip.com, etc.. Se alguem puder solucionar meu problema ficaria muito grato!!
  14. Bom, vou ser o mais direto possível: Estou tentando adicionar um novo slot no servidor, de versão 8.54 e TFS 0.4, mudei nas sources e já as compilei com sucesso, segue abaixo no spoiler as alterações feitas na mesma: items.h #define ITEMS 13000 #define SLOTP_WHEREEVER 0xFFFFFFFF #define SLOTP_HEAD 1 << 0 #define SLOTP_NECKLACE 1 << 1 #define SLOTP_BACKPACK 1 << 2 #define SLOTP_ARMOR 1 << 3 #define SLOTP_RIGHT 1 << 4 #define SLOTP_LEFT 1 << 5 #define SLOTP_LEGS 1 << 6 #define SLOTP_FEET 1 << 7 #define SLOTP_RING 1 << 8 #define SLOTP_AMMO 1 << 9 #define SLOTP_DEPOT 1 << 10 #define SLOTP_TWO_HAND 1 << 11 #define SLOTP_EYE 1 << 15 #define SLOTP_HAND SLOTP_LEFT | SLOTP_RIGHT items.cpp else if(tmpStrValue == "eye") { it.slotPosition |= SLOTP_EYE; it.wieldPosition = SLOT_EYE; } movement.cpp else if(tmpStrValue == "eye") slot = SLOTP_EYE; case SLOT_EYE: slotp = SLOTP_EYE; break; player.cpp if((item->getSlotPosition() & SLOTP_HEAD) || (item->getSlotPosition() & SLOTP_NECKLACE) || (item->getSlotPosition() & SLOTP_BACKPACK) || (item->getSlotPosition() & SLOTP_ARMOR) || (item->getSlotPosition() & SLOTP_LEGS) || (item->getSlotPosition() & SLOTP_FEET) || (item->getSlotPosition() & SLOTP_RING) || (item->getSlotPosition() & SLOTP_EYE)) ret = RET_CANNOTBEDRESSED; case SLOT_EYE: if(item->getSlotPosition() & SLOTP_EYE) ret = RET_NOERROR; break; creature.h enum slots_t { SLOT_PRE_FIRST = 0, SLOT_WHEREEVER = SLOT_PRE_FIRST, SLOT_FIRST = 1, SLOT_HEAD = SLOT_FIRST, SLOT_NECKLACE = 2, SLOT_BACKPACK = 3, SLOT_ARMOR = 4, SLOT_RIGHT = 5, SLOT_LEFT = 6, SLOT_LEGS = 7, SLOT_FEET = 8, SLOT_RING = 9, SLOT_AMMO = 10, SLOT_DEPOT = 11, SLOT_LAST = SLOT_DEPOT, SLOT_HAND = 12, SLOT_EYE = 15, SLOT_TWO_HAND = SLOT_HAND }; enums.h enum ConditionId_t { CONDITIONID_DEFAULT = -1, CONDITIONID_COMBAT = 0, CONDITIONID_HEAD, CONDITIONID_NECKLACE, CONDITIONID_BACKPACK, CONDITIONID_ARMOR, CONDITIONID_RIGHT, CONDITIONID_LEFT, CONDITIONID_LEGS, CONDITIONID_FEET, CONDITIONID_RING, CONDITIONID_EYE, CONDITIONID_AMMO, CONDITIONID_OUTFIT }; Após as sources, o único local em que encontrei nos scripts em lua, foi no 'data/lib/000-constant.lua' e deixei assim: CONST_SLOT_FIRST = 1 CONST_SLOT_HEAD = CONST_SLOT_FIRST CONST_SLOT_NECKLACE = 2 CONST_SLOT_BACKPACK = 3 CONST_SLOT_ARMOR = 4 CONST_SLOT_RIGHT = 5 CONST_SLOT_LEFT = 6 CONST_SLOT_LEGS = 7 CONST_SLOT_FEET = 8 CONST_SLOT_RING = 9 CONST_SLOT_AMMO = 10 CONST_SLOT_EYE = 15 CONST_SLOT_LAST = CONST_SLOT_AMMO Deixei um item no 'data/items/items.xml' com o slotType="eye" que foi criado, e fiz as seguintes alterações no OTClient: modules/game_inventory/inventory.lua InventorySlotStyles = { [InventorySlotHead] = "HeadSlot", [InventorySlotNeck] = "NeckSlot", [InventorySlotBack] = "BackSlot", [InventorySlotBody] = "BodySlot", [InventorySlotRight] = "RightSlot", [InventorySlotLeft] = "LeftSlot", [InventorySlotLeg] = "LegSlot", [InventorySlotFeet] = "FeetSlot", [InventorySlotFinger] = "FingerSlot", [InventorySlotAmmo] = "AmmoSlot", [InventorySlotEye] = "EyeSlot" } modules/game_inventory/inventory.otui EyeSlot < InventoryItem id: slot15 image-source: /images/game/slots/eye &position: {x=65535, y=14, z=0} e MiniWindow id: inventoryWindow !text: tr('Inventory') icon: /images/topbuttons/inventory height: 175 @onClose: modules.game_inventory.onMiniWindowClose() &save: true MiniWindowContents HeadSlot anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter margin-top: 3 BodySlot anchors.top: prev.bottom anchors.horizontalCenter: prev.horizontalCenter margin-top: 3 LegSlot anchors.top: prev.bottom anchors.horizontalCenter: prev.horizontalCenter margin-top: 3 FeetSlot anchors.top: prev.bottom anchors.horizontalCenter: prev.horizontalCenter margin-top: 3 NeckSlot anchors.top: slot1.top anchors.right: slot1.left margin-top: 10 margin-right: 5 LeftSlot anchors.top: prev.bottom anchors.horizontalCenter: prev.horizontalCenter margin-top: 3 FingerSlot anchors.top: prev.bottom anchors.horizontalCenter: prev.horizontalCenter margin-top: 3 BackSlot anchors.top: slot1.top anchors.left: slot1.right margin-top: 10 margin-left: 5 RightSlot anchors.top: prev.bottom anchors.horizontalCenter: prev.horizontalCenter margin-top: 3 AmmoSlot anchors.top: prev.bottom anchors.horizontalCenter: prev.horizontalCenter margin-top: 3 EyeSlot anchors.top: prev.bottom anchors.horizontalCenter: prev.horizontalCenter margin-top: 3 PurseButton margin-top: 3 anchors.top: prev.bottom anchors.horizontalCenter: prev.horizontalCenter modules/gamelib/player.lua InventorySlotOther = 0 InventorySlotHead = 1 InventorySlotNeck = 2 InventorySlotBack = 3 InventorySlotBody = 4 InventorySlotRight = 5 InventorySlotLeft = 6 InventorySlotLeg = 7 InventorySlotFeet = 8 InventorySlotFinger = 9 InventorySlotAmmo = 10 InventorySlotPurse = 11 InventorySlotEye = 15 InventorySlotFirst = 1 InventorySlotLast = 10 Com todas estas alterações, o que foi feito: O slot foi adicionado com sucesso no OTClient, aparecendo sem erros, com imagem e posicionado; O console não encontrou erro ao debugar o items.xml (testei um tipo aleatório, e dá erro o erro padrão das sources, então o tipo "eye" está correto nas sources); Dei /i em um item do tipo "eye" pra ver se o mesmo iria para o slot, mesmo caso não existisse graficamente, ele deveria ficar salvo nos dados do personagem no banco de dados, e isto não ocorreu, logo o problema está entre as sources e o client; Enfim, nas sources o tipo "eye" foi criado, mas ainda não é reconhecido verdadeiramente, espero que alguém possa me ajudar, segue em anexo as sources e todos os arquivos que citei ter editado: help.rar
  15. Galera alguem me indicar um tutorial ou me ensina como posso passar meu servidor de 8.54 pra 8.60 me ajudem por favor, ja consegui mudar o mapa pra 8.6!!
  16. Bom galera, sou novato no Fórum, e estou iniciando um projeto de Poketibia do 0, consegui compilar com Sucesso o Server TFS 0.4 sem nenhum erro nem warning. \õ/ Porém, segui o tutorial do edubart no Github pra compilar o cliente, utilizando o Visual 2015, e tive vários problemas ao compilar... vou definir melhor, vou colocar o log da compilação abaixo. A compilação acontece com sucesso, porém com várias warnings e nenhum erro, o arquivo otclient.exe é criado, porém não consigo roda-lo! Me ajudem por favor, agradeço !
  17. galera alguem me ajuda pfv eu to usando o cliente da DarkXpoke porem to tentando colocar o module Shop da Wone PIECE acho que e assim que se fala hehe mais o cliente nao reconhece ajuda ai pfv do rep a vida toda pra quem me ajuda to rancando os cabelos ja ;-;
  18. Bem galera, é uma magia feita para o TFS 0.4, creio que não irá funcionar em versões anteriores. Ela é bem simples, segue: spell "nomedoplayer Ao usar a magia, você é teleportado para o target. Fiz para dá para um amigo, pro dbo dele. spell.lua local config = { storage = 6330, -- stg do teletransporte effect = 65, -- efeito cost = 1000 -- mana necessaria} function onCastSpell(cid, var) local target = variantToNumber(var) local mana = getPlayerMana(cid) if getPlayerStorageValue(cid, config.storage) <= 0 then doPlayerSendCancel(cid, "Você ainda não aprendeu o teletransporte.") return false if isPlayer(target) and mana < config.cost then doCreatureAddHealth(cid, -(config.cost-mana)) end if isCreature(cid) then doSendMagicEffect(getThingPos(cid), config.effect) doPlayerAddSpentMana(cid, -mana) doPlayerAddMana(cid, -mana) doTeleportThing(cid, getThingPos(target)) doSendMagicEffect(getThingPos(cid), config.effect) end return trueend O xml é só copiar a magia exura sio, e modificar apenas os nomes e value. (porque eu não tenho nenhum tfs com o xml p colocar bj)
  19. O título já diz tudo haha... Creio que seja simples, quando utilizado o fire bug na caldeira apagada, ela acende E após 5 minutos a caldeira apaga automaticamente
  20. Bom, creio que o script seja um pouco complexo (ou não) O player utiliza o firebug na fornalha Nisto ela acende, então ele da use na "sanfona" da fornalha e aparece o magic effect de vapor em cima da bigorna, então o item esta pronto para a forja Nos 100 iron ires necessários pra forjar o Huge of Crude iron (matéria prima para forja) Utiliza-se então a "sanfona" novamente para aquecer o item sob a bigorna e é utilizado o 'Foge Hammer' Conforme é utilizado o Forge Hammer aquece, então é necessário dar user nele e depois no barril para resfriá-lo e assim utilizar novamente (Quando os itens são recém forjados, eles ainda estão quentes, então pode-se reforjá-los dando user na "sanfona" para "derretê-los" e voltarem a ser matéria pria) O Foge Hammer tem a mesma Sprite que o War Hammer, porém seu id tanto 'frio' quanto 'quente' são diferentes do War Hammer e do War Hammer Enchanted E por final os itens que podem ser forjados aleatoriamente Desde já agradeço
  21. Sabem que quando nós jogamos um item sobre a bp ele entra? queria remover isso, queria que so entrasse ao jogar diretamente dentro creio que seja nesse arquivo container.cpp ////////////////////////////////////////////////////////////////////////// OpenTibia - an opensource roleplaying game////////////////////////////////////////////////////////////////////////// This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program. If not, see <http://www.gnu.org/licenses/>.////////////////////////////////////////////////////////////////////////#include "otpch.h"#include "container.h"#include "game.h"#include "iomap.h"#include "player.h"extern Game g_game;ContainerContainer(uint16_t type) : Item(type){ maxSize = items[type].maxItems; serializationCount = 0; totalWeight = 0.0;}Container~Container(){ for(ItemListiterator cit = itemlist.begin(); cit != itemlist.end(); ++cit) { (*cit)->setParent(NULL); (*cit)->unRef(); } itemlist.clear();}Item* Containerclone() const{ Container* _item = static_cast<Container*>(Itemclone()); for(ItemListconst_iterator it = itemlist.begin(); it != itemlist.end(); ++it) _item->addItem((*it)->clone()); return _item;}Container* ContainergetParentContainer(){ if(Cylinder* cylinder = getParent()) { if(Item* item = cylinder->getItem()) return item->getContainer(); } return NULL;}void ContaineraddItem(Item* item){ itemlist.push_back(item); item->setParent(this);}Attr_ReadValue ContainerreadAttr(AttrTypes_t attr, PropStream& propStream){ switch(attr) { case ATTR_CONTAINER_ITEMS: { uint32_t count; if(!propStream.getLong(count)) return ATTR_READ_ERROR; serializationCount = count; return ATTR_READ_END; } default: break; } return ItemreadAttr(attr, propStream);}bool ContainerunserializeItemNode(FileLoader& f, NODE node, PropStream& propStream){ if(!ItemunserializeItemNode(f, node, propStream)) return false; uint32_t type; for(NODE nodeItem = f.getChildNode(node, type); nodeItem; nodeItem = f.getNextNode(nodeItem, type)) { //load container items if(type != OTBM_ITEM) return false; PropStream itemPropStream; f.getProps(nodeItem, itemPropStream); Item* item = ItemCreateItem(itemPropStream); if(!item) return false; if(!item->unserializeItemNode(f, nodeItem, itemPropStream)) return false; addItem(item); updateItemWeight(item->getWeight()); } return true;}void ContainerupdateItemWeight(double diff){ totalWeight += diff; if(Container* parent = getParentContainer()) parent->updateItemWeight(diff);}double ContainergetWeight() const{ return ItemgetWeight() + totalWeight;}stdstring ContainergetContentDescription() const{ stdstringstream s; return getContentDescription(s).str();}stdstringstream& ContainergetContentDescription(stdstringstream& s) const{ bool begin = true; Container* evil = const_cast<Container*>(this); for(ContainerIterator it = evil->begin(); it != evil->end(); ++it) { Container* tmp = (*it)->getContainer(); if(tmp && !tmp->empty()) continue; if(!begin) s << ", "; else begin = false; s << (*it)->getNameDescription(); } if(begin) s << "nothing"; return s;}Item* ContainergetItem(uint32_t index){ size_t n = 0; for(ItemListconst_iterator cit = getItems(); cit != getEnd(); ++cit) { if(n == index) return *cit; else ++n; } return NULL;}uint32_t ContainergetItemHoldingCount() const{ uint32_t counter = 0; for(ContainerIterator it = begin(); it != end(); ++it) ++counter; return counter;}bool ContainerisHoldingItem(const Item* item) const{ for(ContainerIterator it = begin(); it != end(); ++it) { if((*it) == item) return true; } return false;}void ContaineronAddContainerItem(Item* item){ const Position& cylinderMapPos = getPosition(); SpectatorVec list; SpectatorVeciterator it; g_game.getSpectators(list, cylinderMapPos, false, false, 2, 2, 2, 2); //send to client Player* player = NULL; for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->sendAddContainerItem(this, item); } //event methods for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->onAddContainerItem(this, item); }}void ContaineronUpdateContainerItem(uint32_t index, Item* oldItem, const ItemType& oldType, Item* newItem, const ItemType& newType){ const Position& cylinderMapPos = getPosition(); SpectatorVec list; SpectatorVeciterator it; g_game.getSpectators(list, cylinderMapPos, false, false, 2, 2, 2, 2); //send to client Player* player = NULL; for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->sendUpdateContainerItem(this, index, oldItem, newItem); } //event methods for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->onUpdateContainerItem(this, index, oldItem, oldType, newItem, newType); }}void ContaineronRemoveContainerItem(uint32_t index, Item* item){ const Position& cylinderMapPos = getPosition(); SpectatorVec list; SpectatorVeciterator it; g_game.getSpectators(list, cylinderMapPos, false, false, 2, 2, 2, 2); //send change to client Player* player = NULL; for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->sendRemoveContainerItem(this, index, item); } //event methods for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->onRemoveContainerItem(this, index, item); }}ReturnValue Container__queryAdd(int32_t index, const Thing* thing, uint32_t count, uint32_t flags) const{ if(((flags & FLAG_CHILDISOWNER) == FLAG_CHILDISOWNER)) { //a child container is querying, since we are the top container (not carried by a player) //just return with no error. return RET_NOERROR; } const Item* item = thing->getItem(); if(!item) return RET_NOTPOSSIBLE; if(!item->isPickupable()) return RET_CANNOTPICKUP; if(item == this) return RET_THISISIMPOSSIBLE; if(const Container* container = item->getContainer()) { for(const Cylinder* cylinder = getParent(); cylinder; cylinder = cylinder->getParent()) { if(cylinder == container) return RET_THISISIMPOSSIBLE; } } if(index == INDEX_WHEREEVER && !((flags & FLAG_NOLIMIT) == FLAG_NOLIMIT) && full()) return RET_CONTAINERNOTENOUGHROOM; const Cylinder* topParent = getTopParent(); if(topParent != this) return topParent->__queryAdd(INDEX_WHEREEVER, item, count, flags | FLAG_CHILDISOWNER); return RET_NOERROR;}ReturnValue Container__queryMaxCount(int32_t index, const Thing* thing, uint32_t count, uint32_t& maxQueryCount, uint32_t flags) const{ const Item* item = thing->getItem(); if(!item) { maxQueryCount = 0; return RET_NOTPOSSIBLE; } if(((flags & FLAG_NOLIMIT) == FLAG_NOLIMIT)) { maxQueryCount = stdmax((uint32_t)1, count); return RET_NOERROR; } int32_t freeSlots = stdmax((int32_t)(capacity() - size()), (int32_t)0); if(item->isStackable()) { uint32_t n = 0; if(index != INDEX_WHEREEVER) { const Thing* destThing = __getThing(index); const Item* destItem = NULL; if(destThing) destItem = destThing->getItem(); if(destItem && destItem->getID() == item->getID()) n = 100 - destItem->getItemCount(); } maxQueryCount = freeSlots * 100 + n; if(maxQueryCount < count) return RET_CONTAINERNOTENOUGHROOM; } else { maxQueryCount = freeSlots; if(maxQueryCount == 0) return RET_CONTAINERNOTENOUGHROOM; } return RET_NOERROR;}ReturnValue Container__queryRemove(const Thing* thing, uint32_t count, uint32_t flags) const{ int32_t index = __getIndexOfThing(thing); if(index == -1) return RET_NOTPOSSIBLE; const Item* item = thing->getItem(); if(item == NULL) return RET_NOTPOSSIBLE; if(count == 0 || (item->isStackable() && count > item->getItemCount())) return RET_NOTPOSSIBLE; if(!item->isMovable() && !hasBitSet(FLAG_IGNORENOTMOVABLE, flags)) return RET_NOTMOVABLE; return RET_NOERROR;}Cylinder* Container__queryDestination(int32_t& index, const Thing*, Item** destItem, uint32_t&){ if(index == 254 /*move up*/) { index = INDEX_WHEREEVER; *destItem = NULL; Container* parentContainer = dynamic_cast<Container*>(getParent()); if(parentContainer) return parentContainer; else return this; } else if(index == 255 /*add wherever*/) { index = INDEX_WHEREEVER; *destItem = NULL; return this; } else { if(index >= (int32_t)capacity()) { /* if you have a container, maximize it to show all 20 slots then you open a bag that is inside the container you will have a bag with 8 slots and a "grey" area where the other 12 slots where from the container if you drop the item on that grey area the client calculates the slot position as if the bag has 20 slots */ index = INDEX_WHEREEVER; } if(index != INDEX_WHEREEVER) { Thing* destThing = __getThing(index); if(destThing) *destItem = destThing->getItem(); if(Cylinder* subCylinder = dynamic_cast<Cylinder*>(*destItem)) { index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } } } return this;}void Container__addThing(Creature* actor, Thing* thing){ return __addThing(actor, 0, thing);}void Container__addThing(Creature*, int32_t index, Thing* thing){ if(index >= (int32_t)capacity()) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__addThing], index:" << index << ", index >= capacity()" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } Item* item = thing->getItem(); if(!item) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__addThing] item == NULL" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; }#ifdef __DEBUG_MOVESYS__ if(index != INDEX_WHEREEVER && size() >= capacity()) { stdclog << "Failure: [Container::__addThing] size() >= capacity()" << stdendl; return /*RET_CONTAINERNOTENOUGHROOM*/; }#endif item->setParent(this); itemlist.push_front(item); totalWeight += item->getWeight(); if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(item->getWeight()); //send change to client if(getParent() && getParent() != VirtualCylindervirtualCylinder) onAddContainerItem(item);}void Container__updateThing(Thing* thing, uint16_t itemId, uint32_t count){ int32_t index = __getIndexOfThing(thing); if(index == -1) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__updateThing] index == -1" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } Item* item = thing->getItem(); if(!item) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__updateThing] item == NULL" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } const ItemType& oldType = Itemitems[item->getID()]; const ItemType& newType = Itemitems[itemId]; const double oldWeight = item->getWeight(); item->setID(itemId); item->setSubType(count); const double diffWeight = -oldWeight + item->getWeight(); totalWeight += diffWeight; if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(diffWeight); //send change to client if(getParent()) onUpdateContainerItem(index, item, oldType, item, newType);}void Container__replaceThing(uint32_t index, Thing* thing){ Item* item = thing->getItem(); if(!item) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__replaceThing] item == NULL" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } uint32_t count = 0; ItemListiterator cit = itemlist.end(); for(cit = itemlist.begin(); cit != itemlist.end(); ++cit) { if(count == index) break; ++count; } if(cit == itemlist.end()) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__updateThing] item not found" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } totalWeight -= (*cit)->getWeight(); totalWeight += item->getWeight(); if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(-(*cit)->getWeight() + item->getWeight()); itemlist.insert(cit, item); item->setParent(this); //send change to client if(getParent()) { const ItemType& oldType = Itemitems[(*cit)->getID()]; const ItemType& newType = Itemitems[item->getID()]; onUpdateContainerItem(index, *cit, oldType, item, newType); } (*cit)->setParent(NULL); itemlist.erase(cit);}void Container__removeThing(Thing* thing, uint32_t count){ Item* item = thing->getItem(); if(!item) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__removeThing] item == NULL" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } int32_t index = __getIndexOfThing(thing); if(index == -1) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__removeThing] index == -1" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } ItemListiterator cit = stdfind(itemlist.begin(), itemlist.end(), thing); if(cit == itemlist.end()) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__removeThing] item not found" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } if(item->isStackable() && count != item->getItemCount()) { const double oldWeight = -item->getWeight(); item->setItemCount(stdmax(0, (int32_t)(item->getItemCount() - count))); const double diffWeight = oldWeight + item->getWeight(); totalWeight += diffWeight; //send change to client if(getParent()) { if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(diffWeight); const ItemType& it = Itemitems[item->getID()]; onUpdateContainerItem(index, item, it, item, it); } } else { //send change to client if(getParent()) { if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(-item->getWeight()); onRemoveContainerItem(index, item); } totalWeight -= item->getWeight(); item->setParent(NULL); itemlist.erase(cit); }}Thing* Container__getThing(uint32_t index) const{ if(index > size()) return NULL; uint32_t count = 0; for(ItemListconst_iterator cit = itemlist.begin(); cit != itemlist.end(); ++cit) { if(count == index) return *cit; else ++count; } return NULL;}int32_t Container__getIndexOfThing(const Thing* thing) const{ uint32_t index = 0; for(ItemListconst_iterator cit = getItems(); cit != getEnd(); ++cit) { if(*cit == thing) return index; else ++index; } return -1;}int32_t Container__getFirstIndex() const{ return 0;}int32_t Container__getLastIndex() const{ return size();}uint32_t Container__getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const{ uint32_t count = 0; for(ItemListconst_iterator it = itemlist.begin(); it != itemlist.end(); ++it) { if((*it) && (*it)->getID() == itemId && (subType == -1 || subType == (*it)->getSubType())) count += (*it)->getItemCount(); } return count;}stdmap<uint32_t, uint32_t>& Container__getAllItemTypeCount(stdmap<uint32_t, uint32_t>& countMap) const{ for(ItemListconst_iterator it = itemlist.begin(); it != itemlist.end(); ++it) countMap[(*it)->getID()] += (*it)->getItemCount(); return countMap;}void ContainerpostAddNotification(Creature* actor, Thing* thing, const Cylinder* oldParent, int32_t index, CylinderLink_t/* link = LINK_OWNER*/){ Cylinder* topParent = getTopParent(); if(!topParent->getCreature()) { if(topParent == this) { //let the tile class notify surrounding players if(topParent->getParent()) topParent->getParent()->postAddNotification(actor, thing, oldParent, index, LINK_NEAR); } else topParent->postAddNotification(actor, thing, oldParent, index, LINK_PARENT); } else topParent->postAddNotification(actor, thing, oldParent, index, LINK_TOPPARENT);}void ContainerpostRemoveNotification(Creature* actor, Thing* thing, const Cylinder* newParent, int32_t index, bool isCompleteRemoval, CylinderLink_t/* link = LINK_OWNER*/){ Cylinder* topParent = getTopParent(); if(!topParent->getCreature()) { if(topParent == this) { //let the tile class notify surrounding players if(topParent->getParent()) topParent->getParent()->postRemoveNotification(actor, thing, newParent, index, isCompleteRemoval, LINK_NEAR); } else topParent->postRemoveNotification(actor, thing, newParent, index, isCompleteRemoval, LINK_PARENT); } else topParent->postRemoveNotification(actor, thing, newParent, index, isCompleteRemoval, LINK_TOPPARENT);}void Container__internalAddThing(Thing* thing){ __internalAddThing(0, thing);}void Container__internalAddThing(uint32_t#ifdef __DEBUG_MOVESYS__ index#endif , Thing* thing){#ifdef __DEBUG_MOVESYS__ stdclog << "[Container::__internalAddThing] index: " << index << stdendl;#endif if(!thing) return; Item* item = thing->getItem(); if(item == NULL) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__internalAddThing] item == NULL" << stdendl;#endif return; } itemlist.push_front(item); item->setParent(this); totalWeight += item->getWeight(); if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(item->getWeight());}void Container__startDecaying(){ for(ItemListconst_iterator it = itemlist.begin(); it != itemlist.end(); ++it) (*it)->__startDecaying();}ContainerIterator Containerbegin(){ ContainerIterator cit(this); if(!itemlist.empty()) { cit.over.push(this); cit.current = itemlist.begin(); } return cit;}ContainerIterator Containerend(){ ContainerIterator cit(this); return cit;}ContainerIterator Containerbegin() const{ Container* evil = const_cast<Container*>(this); return evil->begin();}ContainerIterator Containerend() const{ Container* evil = const_cast<Container*>(this); return evil->end();}ContainerIteratorContainerIterator():base(NULL) {}ContainerIteratorContainerIterator(Container* _base):base(_base) {}ContainerIteratorContainerIterator(const ContainerIterator& rhs):base(rhs.base), over(rhs.over), current(rhs.current) {}bool ContainerIteratoroperator==(const ContainerIterator& rhs){ return !(*this != rhs);}bool ContainerIteratoroperator!=(const ContainerIterator& rhs){ assert(base); if(base != rhs.base) return true; if(over.empty() && rhs.over.empty()) return false; if(over.empty()) return true; if(rhs.over.empty()) return true; if(over.front() != rhs.over.front()) return true; return current != rhs.current;}ContainerIterator& ContainerIteratoroperator=(const ContainerIterator& rhs){ this->base = rhs.base; this->current = rhs.current; this->over = rhs.over; return *this;}Item* ContainerIteratoroperator*(){ assert(base); return *current;}Item* ContainerIteratoroperator->(){ return *(*this);}ContainerIterator& ContainerIteratoroperator++(){ assert(base); if(Item* item = *current) { Container* container = item->getContainer(); if(container && !container->empty()) over.push(container); } ++current; if(current == over.front()->itemlist.end()) { over.pop(); if(over.empty()) return *this; current = over.front()->itemlist.begin(); } return *this;}ContainerIterator ContainerIteratoroperator++(int32_t){ ContainerIterator tmp(*this); ++*this; return tmp;}
  22. Olá, gostaria de saber como vocês aprenderam a programar? Pois gostaria de aprender *---* E queria algumas dicas sobre programação e Tutoriais, etc.... *-----*
  23. E aí galera do Xtibia, beleza? Hoje tô aqui trazendo um script que eu não encontrei aqui no Fórum, então resolvi fazer ele. "Ain, mas pra ki ki eli schervi?" Simples. Ele funciona de maneira muito semelhante ao "teste de vocations" de Dawnport. Vindo itens e pots ao passar pelo tile, e impedindo que tu passe pelo piso caso tenha ultrapassado o lvl máximo. Foi testado em TFS 0.4 rev 3777. Bom, sem mais enrolação: Crie um arquivo chamado knight.lua na pasta Movements e cole isso aqui: E adicione a tag no movements.xml: "Ain, mas esse aí só vai transformar em Knight" Simples, é só customizar a seu gosto, modificando no config{} o id da voc. Bem, foi isso aí. Caso alguém tenha erros, é só comentar aqui que tentarei ajudar. E caso alguém queira aprimorar e postar aqui, sinta-se livre, recomecei a scriptar há pouco tempo.
  24. Auguem pode ajudar-me com este error q da no exe do serve preciso disso urgentemente [error -spell interface] in a timer event called from: data/spells/scripts/lvl100/bomb.lua:onCastSpell Description: <luaDoCombat> Creature not found
  25. Apresentação Olá! Estou aqui para apresentar o projeto PLight! Até uns dias atrás a nós da equipe do PLight estávamos postando apenas atualizações no facebook, mas tinha uma galera que achava que isso era mais um PDA! Você talvez deve está pensando agora, "não é um PDA?", então vamos responder que não! Ai você se pergunta, "Se não é PDA, qual a base?", essa é a pergunta mais interessante Não utilizamos nenhuma base, nós criamos em cima de um tfs 0.4 novinha, que acabou de sair do forno kk Equipe A equipe atualmente tem 1 Scripter (Aprendendo Programação), 2 Mapper e 1 Spriter (Iniciante). Nós temos as seguintes vagas para Spriters e Designers. Caso queira se candidatar para as vagas de Spriters ou Designers, pode comentar o tópico esclarecendo os seguintes requerimentos: Nome: Idade: Função: Demostração de trabalho: Meio de contato (Skype, facebook, etc): Projeto Vamos parar de enrolação e irei apresentar umas das partes mais interessante do projeto, os sistemas Go/Back System 100% Level System 100% Pokeballs 100% (Poke Ball, Great Ball, Super Ball e Ultra Ball) Evolution System 100% Catch System 100% Autoloot System 100% Gender System 100% (Male tem 10% mais de dano, Female tem 10% mais de vida, Genderless tem 5% a mais de cada) Heal System 100% (Nurse, Potion, Revive, etc) Teleport System 100% (ex: !teleport Saffron) Language System 100% Task System 100% (Basico, irá sofrer bastante modificações) Order System 100% (Fly, Ride, Light, Rock Smash, Cut, Dig, etc) Passive System 100% Boost System 100% Vantagem, Desvantagem e Imunidade 100% Ghost System 100% Pokemon Spells 100% Pokedex 100% Carry 100% Look System 100% (Diferença: Ao dar look em house, tem interação com Language System) Basic Addon System 100% Inovações 1- Cut System 4- Technical Machine Preview Agora irei mostrar algumas prints e um vídeo E Agora um pequeno vídeo que fizemos! Bom, espero que gostem do projeto Fique atento que iremos postar novas prints das novas features! Facebook Group Facebook Page Entrem lá para interagirem mais com a equipe Caso queiram dar críticas construtivas, opiniões, ideias, etc entra no grupo ou manda inbox da página ^^
×
×
  • Criar Novo...