Ir para conteúdo

GamerGoiano

Conde
  • Total de itens

    626
  • Registro em

  • Última visita

  • Dias Ganhos

    69

Tudo que GamerGoiano postou

  1. @gabrielsf https://xtibia.com/forum/topic/250832-tutorial-criando-site-com-znote-aac-para-tfs-12/
  2. Alguem conseguiu compilar a source do Servidor? Eu consegui usar a source do OTCV8 e compilar e funcionou com esse servidor
  3. @gabrielsf Voce tem que ligar o servidor e se registrar pra poder logar
  4. São os modulos abaixo editado + modulos de shop de pokemon com gráfico editado
  5. Mas só de olhar da pra ver que é modulos aqui do forum editados '-'
  6. Tudo sistema do OTCV8 ou do forum com visual editado Mas parabéns pela edição!
  7. @gordituber data/talkactions/scripts/create_item.lua Apaga isso e reabre o sv: if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end
  8. Estou afim de fazer um poketibia do 0 (sem pegar nada de PDA / DXP) Tenho conhecimento mediano em C++, C#, Lua e PHP Não sei qual versão vou fazer ainda, será discutido com a equipe Em pauta: TFS 1.4 10.98 / 1.5 8.60 No momento preciso de alguém que me ajude com adição de itens de poketibia no tibia cru para fazer e ficar testando os sistemas. Envie os seguintes dados: Nome: Idade: Contato (Discord ou Whatsapp): Experiência: (Fale sobre algum conhecimento que voce tem)
  9. GamerGoiano

    Reward

    Testa aew local bossDeath = CreatureEvent("BossDeath") function bossDeath.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified) -- Deny summons and players if not creature or creature:isPlayer() or creature:getMaster() then return true end -- Boss function local monsterType = creature:getType() -- Make sure it is a boss if monsterType and monsterType:isRewardBoss() then local bossId = creature:getId() local timestamp = os.time() ResetAndSetTargetList(creature) -- Avoid dividing by zero local totalDamageOut, totalDamageIn, totalHealing = 0.1, 0.1, 0.1 local scores = {} local info = GlobalBosses[bossId] -- Check if info table is not empty if info ~= nil and next(info) ~= nil then local damageMap = creature:getDamageMap() for guid, stats in pairs(info) do local player = Player(stats.playerId) local part = damageMap[stats.playerId] local damageOut, damageIn, healing = (stats.damageOut or 0) + (part and part.total or 0), stats.damageIn or 0, stats.healing or 0 totalDamageOut = totalDamageOut + damageOut totalDamageIn = totalDamageIn + damageIn totalHealing = totalHealing + healing table.insert(scores, { player = player, guid = guid, damageOut = damageOut, damageIn = damageIn, healing = healing, }) end local participants = 0 for _, con in ipairs(scores) do local score = (con.damageOut / totalDamageOut) + (con.damageIn / totalDamageIn) + (con.healing / totalHealing) -- Normalize to 0-1 con.score = score / 3 if score ~= 0 then participants = participants + 1 end end table.sort(scores, function(a, b) return a.score > b.score end) local expectedScore = 1 / participants for _, con in ipairs(scores) do -- Ignoring stamina for now because I heard you get receive rewards even when it's depleted local reward, stamina if con.player then reward = con.player:getReward(timestamp, true) stamina = con.player:getStamina() else stamina = con.stamina or 0 end -- Initialize playerLoot as a table local playerLoot = {} if con.score ~= 0 then local lootFactor = 1 -- Tone down the loot a notch if there are many participants lootFactor = lootFactor / participants ^ (1 / 3) -- Increase the loot multiplicatively by how many times the player surpassed the expected score local lootMultiplier = con.score / expectedScore local lootAmount = math.floor(info.lootAmount * lootFactor * lootMultiplier) -- Make sure the player gets at least 1 gold if lootAmount < 1 then lootAmount = 1 end playerLoot[ITEM_GOLD_COIN] = lootAmount -- Add items to playerLoot table if info.items then for _, item in ipairs(info.items) do local itemId, count = item[1], item[2] local itemLootAmount = math.floor(count * lootFactor * lootMultiplier) playerLoot[itemId] = itemLootAmount end end if con.player then -- Add loot to player con.player:sendTextMessage(MESSAGE_INFO_DESCR, "You have received the following rewards for participating in a boss battle:") for itemId, count in pairs(playerLoot) do local item = ItemType(itemId) con.player:addItem(itemId, count) con.player:sendTextMessage(MESSAGE_INFO_DESCR, count .. " x " .. item:getDescription()) end -- Add reward to player con.player:addReward(timestamp, info.rewardAmount) local newReward = con.player:getReward(timestamp, true) con.player:sendTextMessage(MESSAGE_INFO_DESCR, "You received " .. (newReward - reward) .. " reward points for your performance.") end end end end end
  10. GamerGoiano

    Reward

    Manda o script ai pra nós
  11. Não entendi como não deu certo ai, sendo que usei o script do Poison Gás do Vileplume, que causa dano em area e vai acompanhando o personagem que deu cast kkk Acabei de testar meu código aqui e deu certo function spellCallback(cid, centerPos, count) if Creature(cid) then local area = combat:getArea() local radius = (area:getWidth() - 1) / 2 -- raio do círculo dentro da área local randomPos = centerPos:getPosRandomPos(radius) -- posição aleatória dentro do círculo -- restante da função if count > 0 or math.random(0, 1) == 1 then -- restante do if end if count < 3 then count = count + 1 addEvent(spellCallback, math.random(1000, 4000), cid, centerPos, count) end end end
  12. @gabrielsaintz local function spellCallback(cid, position, count) local creature = Creature(cid) if creature then if count > 0 or math.random(0, 1) == 1 then position:sendMagicEffect(CONST_ME_HITBYFIRE) doAreaCombat(cid, COMBAT_FIREDAMAGE, position, 0, -100, -100, CONST_ME_EXPLOSIONHIT) end if count < 5 then count = count + 1 addEvent(spellCallback, math.random(1000, 4000), cid, creature:getPosition(), count) end end end function onCastSpell(creature, variant, isHotkey) spellCallback(creature:getId(), creature:getPosition(), 0) return true end
  13. GamerGoiano

    Vault

    Não sei quanto é 200kkk, vou supor que o valor é 2 000 000 000 Experimenta ai o código pra ver se funciona function onUse(cid, item, fromPosition, itemEx, toPosition) local cidMoney = getPlayerMoney(cid) local vaultmoney = getItemAttribute(itemEx.uid, "money") if (getItemAttribute(itemEx.uid, "money") == 0) then doSetItemAttribute(itemEx.uid, "money", math.min(cidMoney, 2000000000)) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce depositou "..math.min(cidMoney, 2000000000).." dolares!") if getPlayerMoney(cid) >= 1000000 and getPlayerMoney(cid) < 10000000 then item = doPlayerAddItem(cid, 7896, 1) doItemSetAttribute(item, "money", math.min(cidMoney, 2000000000)) doPlayerRemoveItem(cid, itemEx, 1) doRemoveItem(itemEx.uid, 1) end if getPlayerMoney(cid) >= 10000000 and getPlayerMoney(cid) < 100000000 then item = doPlayerAddItem(cid, 7897, 1) doItemSetAttribute(item, "money", math.min(cidMoney, 2000000000)) doPlayerRemoveItem(cid, itemEx, 1) doRemoveItem(itemEx.uid, 1) end if getPlayerMoney(cid) >= 100000000 and getPlayerMoney(cid) <= 2000000000 then item2 = doPlayerAddItem(cid, 7898, 1) doItemSetAttribute(item2, "money", math.min(cidMoney, 2000000000)) doPlayerRemoveItem(cid, itemEx, 1) doRemoveItem(itemEx.uid, 1) end doPlayerRemoveMoney(cid, math.min(cidMoney, 2000000000)) else item2 = doPlayerAddItem(cid, 7895, 1) doItemSetAttribute(item2, "money", 0) doPlayerRemoveItem(cid, itemEx, 1) doRemoveItem(itemEx.uid, 1) doPlayerAddMoney(cid, math.min(vaultmoney, 2000000000)) end return true end
  14. Tem umas funções diferentes dependendo da source tipo isflyeable isrideable, algo assim, tem que conferir se tem na sua source
  15. @M i s s qual versão do seu TFS? me fala o que voce quer no script que mando aqui
  16. https://xtibia.com/forum/topic/209121-urgente-dúvida-em-alavancaitem-teleport/ Se precisar de ajuda pra modificar só falar
  17. Coloca 3 itens e depois puxa alavanca e é reportado? @M i s s
  18. Ficaria nessa pegada, não está 100%, nem que dar uma ajustada ai local dailyItens = { itemQ_before_50 = { 12193, 13863, 19530, 12272, 12184, 13892, 12270, 13901, 12203, 13900, 12208, 12268, 13898, 12276, 12275, 19527, 12169, 19531, 12199, 13874, 12204, 12334, 13889, 12182, 19539, 13867, 12148, 12191, 19543, 19540, 12168, 12269, 19535, 12195, 13873, 12280, 12166, 12284, 12141, 12285, 19528, 12178, 19526, 12167, 13864, 12178, 12341, 19534, 19536, 12154, 13897, 12160 }, itemQ_after_50 = { 12244, 12242, 11446, 12232, 11454, 19202, 11452, 11447, 11443, 11450, 11449, 11445, 11448, 11453, 11444, 11441, 11442 }, minCount = 15, maxCount = 30, ItemRare = { 12244, 12242, 11446, 12232, 11454, 19202, 11452, 11447, 11443, 11450, 11449, 11445, 11448, 11453, 11444, 11441,11442 }, minRcount = 2, maxRcount = 5 } local count = 0 for i=1,dailyItens.minCount do local item = dailyItens.itemQ_before_50[math.random(#dailyItens.itemQ_before_50)] table.insert(itens, { itemid = item, count = 1, valor = cash[item] }) count = count + 1 end for i=dailyItens.minCount+1,dailyItens.maxCount do local item = nil if count < 50 then item = dailyItens.itemQ_before_50[math.random(#dailyItens.itemQ_before_50)] else item = dailyItens.itemQ_after_50[math.random(#dailyItens.itemQ_after_50)] end table.insert(itens, { itemid = item, count = 1, valor = cash[item] }) count = count + 1 end for i=1,math.random(dailyItens.minRcount, dailyItens.maxRcount) do local item = dailyItens.ItemRare[math.random(#dailyItens.ItemRare)] table.insert(itens, { itemid = item, count = 1,valor = cash[item] }) end
  19. @raulcdj Deve resolver o problema de vcs local toloot = {11441, 11442, 11443, 11444, 11445, 11446, 11447, 11448, 11449,11450, 11451, 11452, 11453, 11454, 12618, 12232, 12244} -- PREFERENCIAL - SE QUISER APENAS COM ALGUNS ITENS local useSpecific = false --True para lotear somente os itens que estiverem na tabela toloot, false para todos os itens do corpse function onUse(cid, item, frompos, item2, topos) local corpseOwner = getItemAttribute(item.uid, "corpseowner") if corpseOwner and corpseOwner ~= cid then doPlayerSendCancel(cid, "Você não é o proprietário.") return true end local items = {} for x = (getContainerSize(item.uid) - 1), 0, -1 do local k = getContainerItem(item.uid, x) table.insert(items, {i=k.itemid, q=k.type}) doRemoveItem(k.uid) end if #items == nil then return false end for y=1, #items do -- Verifica se o item está na tabela toloot ou se useSpecific é false if useSpecific == false or table.contains(toloot, items[y].i) then doPlayerAddItemStacking(cid, items[y].i, items[y].q) doPlayerSendTextMessage(cid, 20, "Looted "..items[y].q.."x "..getItemNameById(items[y].i)..".") end end return true end
  20. GamerGoiano

    (BUG) Revive

    @BrunooMaciell revivendo o tópico pq um amigo meu está com o mesmo problema -- Verifica se a pokebola é ultraball, masterball ou superball if item2.itemid == ULTRABALL_ID or item2.itemid == MASTERBALL_ID or item2.itemid == SUPERBALL_ID then -- Se for, mantém o mesmo tipo de pokebola após o uso do item Revive doTransformItem(item2.uid, item2.itemid) else -- Se não for, transforma em uma pokebola simples doTransformItem(item2.uid, POKEBALL_ID) end
  21. Manda o código que edito pra vc @wenderotpoke
  22. Onde voce achou TFS 1.6 @naval288 Me fala qual base voce está usando e se apareceu algum erro no console Registrou o script no XML?
  23. Cria um discord e manda ai @boxxer321 Ajudo com o que eu poder
  24. @MalBack vou considerar que está usando TFS 1.3 Troca o X, Y e Z <action actionid="45001" event="script" value="teleportar.lua"/> teleportar.lua: local destination = Position(X, Y, Z) local cooldown_time = 30 -- em minutos local last_use = {} function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) if not player then return false end -- Verificar se passou o tempo do cooldown_time if last_use[cid] and os.time() - last_use[cid] < cooldown_time * 60 then player:sendTextMessage(MESSAGE_STATUS_SMALL, "You must wait " .. cooldown_time .. " minutes before using this again.") return true end -- verificar se o player deu use no tile ou item correto if item and item.itemid ~= 0 then -- player deu use em um item player:sendTextMessage(MESSAGE_STATUS_SMALL, "You cannot use this with an item.") return true end local tile = Tile(toPosition) if not tile or not tile:getItemById(0) then -- player deu use em um item que não existe ou em um tile vazio player:sendTextMessage(MESSAGE_STATUS_SMALL, "You must use this on a tile.") return true end -- teleport player and update last_use player:teleportTo(destination, true) last_use[cid] = os.time() return true end
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...