Ir para conteúdo

Pesquisar na Comunidade

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

  • 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. Fala Galera do xtibia! estou tentando fazer um metodo para contar as pokeball que o player esta carregar e usar no carry system do server no metodo hasCapaticy da source player.cpp, porem o metodo que eu fiz essa fazendo o servidor crashar ao logar, gostaria de saber oque pode server double PlayerpokemonCountIn(const Item* item) const{ double count = 0; if(item->getPokeball() >= 1) count += 1; const Container* container; if(container = item->getContainer()){ for(ContainerIterator it = container->begin(), end = container->end(); it != end; ++it) { if(it->getPokeball() >= 1){ count += 1; } } } return count;} metodo getPokeball da source item.cpp double Item::getPokeball() const{ if(isStackable()) return items[id].pokeball * std::max((int32_t)1, (int32_t)count); return items[id].pokeball;} usou tfs 0.4 3777 desde já agradeço a ajuda de todos. obs: o prefixo de topico nao possui 0.4 somente 0.3 ou tfs 1.x
  2. Eu queria um script que faça parar a contagem! mesmo se tiver players online eu quero que marque 0 no ot tem como?
  3. Ola Galera presiso de um npç que da uma otfit no meu server e que quando ele ti der a otfit por 3 coraçoes o player nao podera mas se transformar quem poder ajudar +rep
  4. Queria que cada item tivesse uma chance pra que o itemid 8300 fosse 2 vezes mais fácil de acertar If item 8306 changes = levels = { [1] = {50, false, false}, [2] = {20, false, false}, [3] = {10, true, true} }, Else if item 8300 changes = levels = { [1] = {100, false, false}, [2] = {40, false, false}, [3] = {20, true, true} }, script --PERFECT UPGRADE SYSTEM UpgradeHandler = { nameLv = { [1] = "UNIQ", [2] = "RARE", [3] = "EPIC" }, levels = { [1] = {50, false, false}, [2] = {20, false, false}, [3] = {10, true, true} }, broadcast = 3, attributes = { ["attack"] = 3, ["defense"] = 2, ["armor"] = 1 }, message = { console = "Trying to refine %s to level +%s with %s%% success rate.", success = "You have upgraded %s to level +%s", fail = "You have failed in upgrade of %s to level +%s", downgrade = "The upgrade level of %s has downgraded to +%s", erase = "The upgrade level of %s has been erased.", maxlevel = "The targeted %s is already on max upgrade level.", notupgradeable = "This item is not upgradeable.", broadcast = "The player %s was successful in upgrading %s to level +%s.\nCongratulations!!", invalidtool = "This is not a valid upgrade tool.", toolrange = "This upgrade tool can only be used in items with level between +%s and +%s" }, tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, [8300] = {range = {0, 10}, info = {chance = 0, removeable = true}} }, isEquipment = function(self) local weaponType = self:getItemWeaponType() return ((weaponType > 0 and weaponType < 7) or self.item.armor ~= 0) end, setItemName = function(self, name) return doItemSetAttribute(self.item.uid, "name", name) end, chance = function(self) local chances = {} chances.upgrade = (self.levels[self.item.level + 1][1] or 100) chances.downgrade = (self.item.level * 5) chances.erase = (self.item.level * 3) return chances end } function UpgradeHandler:new(item) local obj, ret = {} obj.item = {} obj.item.level = 0 obj.item.uid = item.uid for key, value in pairs(getItemInfo(item.itemid)) do obj.item[key] = value end ret = setmetatable(obj, { __index = function(self, index) if _G[index] then return (setmetatable({callback = _G[index]}, {__call = function(self, ...) return self.callback(item.uid, ...) end} )) else return UpgradeHandler[index] end end}) if ret:isEquipment() then ret:update() return ret end return false end function UpgradeHandler:update() -- this will return the level by the quality or 0 if it has no quality. self.item.level = 0 for r, v in ipairs(self.nameLv) do if self:getItemName():find(v) then self.item.level = r end end end function UpgradeHandler:refine(uid, item) if (self.item.level >= 3) then return true end if not self.item then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.notupgradeable) return "miss" end local tool = self.tools[item.itemid] if(tool == nil) then doPlayerSendTextMessage(uid, MESSAGE_EVENT_DEFAULT, self.message.invalidtool) return "miss" end if(self.item.level > #self.levels) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.maxlevel:format(self.item.name)) return "miss" end if(self.item.level < tool.range[1] or self.item.level >= tool.range[2]) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.toolrange:format(unpack(tool.range))) return "miss" end local chance = (self:chance().upgrade + tool.info.chance) doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.console:format(self.item.name, (self.item.level + 1), math.min(100, chance))) if(tool.info.removeable == true) then doRemoveItem(item.uid, 1) end if chance * 100 > math.random(1, 10000) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_ORANGE, self.message.success:format(self.item.name, (self.item.level + 1))) if (self.item.level + 1) >= self.broadcast then doBroadcastMessage(self.message.broadcast:format(getCreatureName(uid), self.item.name, (self.item.level + 1))) end -- it says if the item's level is greater then 0 (meaning is level equal to 1 or more) if it is add 1 more -- if the current level equals 0 add 1 to it self:setItemName(self.item.level > 0 and self.nameLv[self.item.level + 1].." "..(self:getItemName():gsub(self.nameLv[self.item.level].." ", "")) or self.nameLv[1].." "..self:getItemName()) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item.level > 0 and getItemAttribute(self.item.uid, key) or self.item[key]) + value) end end return "success" else if item.itemid == 8300 then if self.item.level > 0 then -- this will remove any number with a + sign in front of it from the string self:setItemName(self:getItemName():gsub((self.nameLv[self.item.level].." "), "")) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, getItemAttribute(self.item.uid, key) - self.item.level * value) end end end else doRemoveItem(self.item.uid, 1) end doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, item.itemid == 8300 and "Your item level has been reseted." or "You have broken your item while trying to upgrade it.") end end
  5. Estou a testar o ElfBot e o LUbuntu, tudo funciona perfeitamente no wine+playonlinux o meu problema é na hora de esconder e mostrar o bot famoso fechar e apertar shift+f12 pra aparecer o bot de volta... Não sei nem o porque, mas o shift+f12 não funciona pra mostrar e esconder o elfbot e qnd eu escondo o elfbot não sei como mostra-lo de novo Alguém com conhecimento em ElfBot ou LUbuntu(ou qlqr linux desktop) poderia tentar me dar uma força Soluções q eu pensei: 1- Teria como arrumar isso pelo Lubunt,wine,playonlinux pra que funciona-se? 2- Teria como criar uma hotkey do elfbot pra mostrar e esconder o bot? 3- Teria como criar uma daquelas icones no client(nunca fiz isso) pra mostrar ou esconder o bot Não estou usando o fórum, mas faço questão se alguém me ajudar de entrar todos os dias até completar os 20 reps, pq isso tá me atrapalhando mt e não consigo achar solução
  6. Boa noite, estou com um grande problema no meu servidor. Quando eu crio um char normal no site ou uma nova conta, eu não consigo colocar nenhum item na minha bag, nenhum pokemon e nem mesmo stone. Lembrando que a bag está vazia. Erro: You can't carry more than 6 pokemons . Este erro aparece mesmo se eu tentar guardar uma stone ou HDS na minha bag, mesmo não tendo nenhum pokemon em minha bag ou sendo usado.
  7. [15/05/2016 04:13:56] [Error - CreatureScript Interface] [15/05/2016 04:13:56] In a timer event called from: [15/05/2016 04:13:56] data/creaturescripts/scripts/spawn.lua:onSpawn [15/05/2016 04:13:56] Description: [15/05/2016 04:13:56] (luaDoCreatureSetStorage) Creature not found
  8. Criei um script que da proteção de drop até determinado nível. Esta proteção é válida somente para monstros, se você morrer para algum outro personagem, irá dropar loot normalmente. Em creaturescripts crie um arquivo chamado drop.lua e ponha isto: function onDeath(cid, corpse, deathList) local drop, nDrop = function() doCreatureSetDropLoot(cid, true) end, function() doCreatureSetDropLoot(cid, false) end if getPlayerLevel(cid) <= 50 then for _, list in pairs (deathList) do if isMonster(list) then nDrop() else drop() end end else local aol, slot = 2173, getPlayerSlotItem(cid, CONST_SLOT_NECKLACE) if slot.itemid == aol then doPlayerRemoveItem(cid, slot.itemid, 1) nDrop() else drop() end end return trueend Em login.lua adicione isto: registerCreatureEvent(cid, "DROP") E no arquivo creaturescripts.xml adicione esta linha: <event type="death" name="DROP" event="script" value="drop.lua"/>
  9. Eae galera blz? Alguem sabe adicionar sp.def no server?
  10. Estou com um pequeno problema no servidor, o depot está acessível para qualquer um. Se um player guardar algo, outro player pode pegar esse item. ... E aparece umas mensagens na distro ao colocar e remover algo do depot. Print do erro.
  11. meu ot ta no dedicado, só q meu site não tem dominio eu uso servegame.com como faço pra colocar pagseguro automatico ..
  12. Saberia me ajudar?? Queria uma spell de paralyze que eu possa colocar um efeito (se der dano e melhor) E não achei nenhuma no forum,e não consegui formular uma ,teria como ajudar?
  13. Bom dia eu estava afastado de Tibia, e resolvi voltar e fazer um script, porém eu não me recordo da função que pega os itens que tem no tile, então eu queria saber se alguém ai se lembra da função que pegaria um item que esta no tile(eu não sei o id do item, pq é aleatorio, só queria pegar aquele item lá) local positions = { {x = 1052, y = 1056, z = 7}, {x = 1052, y = 1057, z = 7}, {x = 1052, y = 1058, z = 7}, {x = 1052, y = 1059, z = 7}, {x = 1052, y = 1060, z = 7}, {x = 1052, y = 1051, z = 7} } local rep = math.random(1, 20) local count = 1 local cc = 1 local lastPos = nil for i = 1, rep do addEvent(doSendMagicEffect, count * 150, positions[cc], 6) count = count + 1 cc = cc + 1 if cc > #positions then cc = 1 end lastPos = positions[cc] end local getItem = aqui iria a função que vai pegar o item da lastPos
  14. eae galera bom eu compilei a minha sourcer porém sou muito leigo neste assunto eu compilei no windows 64bits gostária de saber o que faço agora que compilei onde acho as bibliotecas enfim o que faço agora para ter o servidor e deixa-lo online?
  15. Galera queria ajuda com um Npc, tipo ele funciona normal eu digo Hi ele diz: Hello Teste. say travel. eu digo travel ele diz: Eu posso levá-lo para? city 1 eu digo city 1 e ele me leva normal. Porem gostaria que o npc verificasse se ele tem X storage se ele nao tiver ele nao e teleportado e ele manda uma mensagem pro player: Voce nao tem tal storage. Script: Ah e se for possivel gostaria de saber se tem como arrumar o BUG de um jogador dizer que vai pra tal cidade e o outro diz ao mesmo tempo, ai quando o outro jogador diz yes vai pra cidade errada que foi a cidade que o outro jogador disse ...
  16. Essa script funcionar assim precisa xxxx item para passar pela porta script
  17. Como faço essa linha para mysql. obrigado db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = 102086 ORDER BY cast(value as INTEGER) DESC;")
  18. Gostaria de saber como eu faço para criar outro mundo na mesma VPS, sendo que eu não tenho as sourcers do servidor. É possível mesmo assim? Se sim como? OBS: Não é só ir lá e mudar o WorldID, eu já fiz isso... Obrigado
  19. fala galera,seguinte o script ta funcionando mais só quando eu do look em mim q aparece, quando eu do look no cara não aparece, como resolver ??? function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function getDeathsAndKills(cid, type) -- by vodka local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0 if (query:getID() ~= -1) then repeat d = d+1 until not query:next() query:free() end return d end function onLogin(cid) registerCreatureEvent(cid, "newlook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,"\n"..(getPlayerSex(thing.uid) == 0 and "Ela" or "Ele").." Matou: ["..getDeathsAndKills(thing.uid, "kill").."] Players.\n"..(getPlayerSex(thing.uid) == 0 and "Ela" or "Ele").." Morreu: ["..getDeathsAndKills(thing.uid, "death").."] Vezes.\n Frags: ["..getPlayerFrags(thing.uid).."]") return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,"\nVC Matou: ["..getDeathsAndKills(cid, "kill").."] Players.\nVC Morreu: ["..getDeathsAndKills(cid, "death").."] Vezes.\nFrags: ["..getPlayerFrags(cid).."].") local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'\n' if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end
  20. Ola, sou novo aqui no forum, gostaria de saber se alguem sabe fazer algum scrip, lib (ou algo do tipo) de um monstro, que não se mova (uma torre no caso) que ataque somente certos players... pode ser somente players que usem tal outfit, ou cor de bota... algo do tipo... agradeço desde ja!
  21. Fala galerinha lembram q antigamente as spear tudo caia no chao ;D é pois é nostalgia pura rsrsrsrs... hj em dia a spear parece uma bala de revolver pois vo usa e ela por magia volta para a mao ou no caso nem sai de la kkkkk minha dificuldade era descobrir como faço para que as spears nao fiquem nas maos e sim caiam no chao qndo usadas para q os players precisem correr ate la onde ela caiu para pega-las de volta. vlw.
  22. [14:50:39.472] sqlite3_prepare_v2(): SQLITE ERROR: unrecognized token: "'''-'', 1459273839)" (INSERT INTO "player_statements" ("player_id", "channel_id", "text" , "date") VALUES (946, 0, '''-'', 1459273839)) Como posso resolver este erro?
  23. Olá, pessoal eu estou com esse erro aparecendo direto no console: Basta o servidor ficar online por umas duas até cinco horas, que ele começa a aparecer, e quando acontece, o server fica todo lagado. ​Preciso muito da ajuda de alguém pra solucionar isso, já tentei substituir arquivos do npchandler e não funcionou.
  24. preciso desse system Duel Por Party para pokemon
×
×
  • Criar Novo...