Ir para conteúdo

luanluciano93

Héroi
  • Registro em

  • Última visita

Tudo que luanluciano93 postou

  1. Game.setWorldType(WORLD_TYPE_PVP)
  2. STYLLER 2019 - CUSTOM YOUROTS Olá pessoal, hoje venho apresentar meu projeto open para vocês. Sou muito fã do mapa STYLLER, sempre em horas vagas procurava joga-lo, para quem não conhece: é um servidor estilo baiak com mais RPG, e como tenho me interessado pela engine OTX, resolvi criar um projeto de servidor styller usando a OTX3 para versão 8.60. O projeto está sendo desenvolvido no github (projeto github) onde posto atualizações diárias (changelog). Vocês podem postar dúvidas, erros/bugs, dicas e qualquer outra coisa aqui no tópico ou criar um issue no github. Lembre-se de dar FOLLOW no projeto no github e SEGUIR o projeto aqui no fórum para acompanhar as atualizações. # Atualizações: → Atualizações # Informações do Servidor e Sistemas: → Versão: 8.60 → Engine: sources OTX3 nas revisões atuais. → Cidades, sistemas e quests. # Créditos: • luanluciano93 • GOD Bon (mapa yourots) • mattyx14 e TFS team (pela engine do servidor) • @leoloko12 (mapa styller) • e outros # Download: - Download-1. Entre no clube STYLLER ... É isso pessoal, espero que gostem
  3. local tilePosition = {x = 100, y = 100, z = 7} local function tileHeal(uid) local pos = getThingPos(uid) if getThingPos(uid) == tilePosition then local heal = math.ceil(getCreatureMaxHealth(uid) / 20) doCreatureAddHealth(uid, heal) doSendMagicEffect(getThingPos(uid), CONST_ME_MAGIC_RED) addEvent(tileHeal, 2000, uid) end end function onStepIn(cid, item, pos, fromPosition) if isPlayer(cid) then addEvent(tileHeal, 2000, cid) end  return true end
  4. -- Sistema de recompensa criado por luanluciano93 dofile('data/sistemas/rewardchest.lua') local function addRewardLoot(uid, bossName, tabela_reward) local money = math.random(10, 40) local msg = "The following items are available in your reward chest:" local chest = doCreateItemEx(REWARDCHEST.rewardBagId) doItemSetAttribute(chest, "description", "Reward System has kill the boss ".. bossName ..".") if table.maxn(tabela_reward) > 0 then for x = 1, table.maxn(tabela_reward) do local rand = math.random(100) if rand <= tabela_reward[x][3] then local count = math.random(1, tabela_reward[x][2]) doAddContainerItem(chest, tabela_reward[x][1], count) msg = msg .. " ".. (count > 1 and count or "") .." "..getItemNameById(tabela_reward[x][1]).."," end end doPlayerSendTextMessage(uid, MESSAGE_INFO_DESCR, msg .. " and ".. money .." platinum coins.") else doPlayerSendTextMessage(uid, MESSAGE_INFO_DESCR, msg .. " ".. money .." platinum coins.") end doAddContainerItem(chest, 2152, money) doPlayerSendMailByName(getPlayerName(uid), chest, REWARDCHEST.town_id) local boss = REWARDCHEST.bosses[bossName] setPlayerStorageValue(uid, boss.storage, 0) doSendMagicEffect(getPlayerPosition(uid), CONST_ME_MAGIC_BLUE) end local function addLoot(tabela_loot, tabela_reward, all_loot) if table.maxn(tabela_loot) > 0 then if all_loot then for x = 1, table.maxn(tabela_loot) do table.insert(tabela_reward, tabela_loot[x]) end else table.insert(tabela_reward, tabela_loot[math.random(table.maxn(tabela_loot))]) end end return tabela_reward end local function onMc(uid, storage) for _, mc in pairs(getPlayersOnline()) do if getPlayerIp(uid) == getPlayerIp(mc) and getPlayerStorageValue(mc, storage) > 0 then return false end end return true end local function rewardChestSystem(bossName) local players = {} local boss = REWARDCHEST.bosses[bossName] for _, uid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(uid, boss.storage) > 0 then if onMc(uid, boss.storage) then table.insert(players, uid) end end end table.sort(players, function(a, b) return getPlayerStorageValue(a, boss.storage) > getPlayerStorageValue(b, boss.storage) end) local porcentagem = math.ceil(getPlayerStorageValue(players[1], boss.storage)) for i = 1, table.maxn(players) do local tabela_reward = {} local pontos = getPlayerStorageValue(players[i], boss.storage) if i == 1 then addLoot(boss.comum, tabela_reward, false) addLoot(boss.semi_raro, tabela_reward, false) addLoot(boss.raro, tabela_reward, false) addLoot(boss.sempre, tabela_reward, true) elseif i >= 2 and pontos >= math.ceil((porcentagem * 0.8)) then addLoot(boss.comum, tabela_reward, false) addLoot(boss.semi_raro, tabela_reward, false) addLoot(boss.raro, tabela_reward, false) addLoot(boss.muito_raro, tabela_reward, false) elseif pontos < math.ceil((porcentagem * 0.8)) and pontos >= math.ceil((porcentagem * 0.6)) then addLoot(boss.comum, tabela_reward, false) addLoot(boss.semi_raro, tabela_reward, false) addLoot(boss.raro, tabela_reward, false) elseif pontos < math.ceil((porcentagem * 0.6)) and pontos >= math.ceil((porcentagem * 0.4)) then addLoot(boss.comum, tabela_reward, false) addLoot(boss.semi_raro, tabela_reward, false) elseif pontos < math.ceil((porcentagem * 0.4)) and pontos >= math.ceil((porcentagem * 0.1)) then addLoot(boss.comum, tabela_reward, false) end addRewardLoot(players[i], bossName, tabela_reward) end end function onDeath(cid, corpse, killer) local boss = REWARDCHEST.bosses[getCreatureName(cid):lower()] if boss then addEvent(rewardChestSystem, 1000, getCreatureName(cid):lower()) end return true end function onStatsChange(cid, attacker, type, combat, value) if isMonster(cid) and type == STATSCHANGE_HEALTHLOSS and isPlayer(attacker) then local boss = REWARDCHEST.bosses[getCreatureName(cid):lower()] if boss and attacker then setPlayerStorageValue(attacker, boss.storage, getPlayerStorageValue(attacker, boss.storage) + math.ceil((value / REWARDCHEST.formula.hit))) end end return true end
  5. if getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end
  6. Essa parte do script que você postou faz isso que você pediu ... if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "CoH", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não pertence á guild "..getGlobalStorageValue(COH_STATUS)..".") end
  7. Em linux não dá para transferir, você tem que compilar na máquina.
  8. @Gabrieldsadaxas testa assim: -- Sistema de recompensa criado por luanluciano93 dofile('data/sistemas/rewardchest.lua') function onStatsChange(cid, attacker, type, combat, value) if isMonster(attacker) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then local boss = REWARDCHEST.bosses[getCreatureName(attacker):lower()] if boss then for _, uid in pairs(getPlayersOnline()) do if getPlayerIp(cid) == getPlayerIp(uid) and getPlayerStorageValue(uid, boss.storage) > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You already have another player inside the reward system.") return true end end setPlayerStorageValue(cid, boss.storage, getPlayerStorageValue(cid, boss.storage) + math.ceil((value / REWARDCHEST.formula.block))) setPlayerStorageValue(cid, REWARDCHEST.storageExaust, os.time() + 5) end elseif (isPlayer(attacker) and (type == STATSCHANGE_HEALTHGAIN or type == STATSCHANGE_MANAGAIN) and (getCreatureHealth(cid) < getCreatureMaxHealth(cid)) and (getPlayerStorageValue(cid, REWARDCHEST.storageExaust) >= os.time())) then for key, valor in pairs(REWARDCHEST.bosses) do if getPlayerStorageValue(cid, valor.storage) > 0 then if getCreatureHealth(cid) + value > getCreatureMaxHealth(cid) then local add = getCreatureMaxHealth(cid) - getCreatureHealth(cid) setPlayerStorageValue(attacker, valor.storage, getPlayerStorageValue(attacker, valor.storage) + math.ceil((add / REWARDCHEST.formula.suport))) else setPlayerStorageValue(attacker, valor.storage, getPlayerStorageValue(attacker, valor.storage) + math.ceil((value / REWARDCHEST.formula.suport))) end end end end return true end
  9. if player:getSex() == 0 then -- se for homem else -- se for mulher end Poste o arquivo da alavanca ...
  10. Não existe mensagem para invasão de The Forned Fox, é uma invasão secreta.
  11. luanluciano93 postou uma resposta no tópico em Suporte Tibia OTServer
    poste o arquivo do talkaction referente ao create monster
  12. Se no seu arquivo de shop.lua existir a função db.executeQuery ou db.query, troque por db.storeQuery, ou vice versa.
  13. local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT) combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY) combat:setArea(createCombatArea(AREA_CIRCLE2X2)) function onGetFormulaValues(player, level, magicLevel) local min = (level / 5) + (magicLevel * 4.5) + 35 local max = (level / 5) + (magicLevel * 7.3) + 55 return -min, -max end combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local function spellAttack(playerGuid, variant) local player = Player(playerGuid) return player and combat:execute(playerGuid, variant) or true end function onCastSpell(creature, variant) creature:say("Invocas a ti oh Deus da eletricidade, Thunder Strike", TALKTYPE_MONSTER_SAY) creature:getPosition():sendMagicEffect(CONST_ME_SOUND_YELLOW) addEvent(spellAttack, 1000, creature:getGuid(), variant) return true end <instant group="attack" name="Teste" words="exori test" level="1" mana="1" range="6" needtarget="1" blockwalls="1" cooldown="1000" needlearn="0" script="teste.lua"> <vocation name="Sorcerer" /> <vocation name="Druid" /> <vocation name="Paladin" /> <vocation name="Knight" /> <vocation name="Master Sorcerer" /> <vocation name="Elder Druid" /> <vocation name="Royal Paladin" /> <vocation name="Elite Knight" /> </instant>
  14. Explica certinho o que ele faz ..
  15. function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true end local guildId = player:getGuild() guildId = guildId and guildId:getId() or 0 if guildId ~= 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "PODE PASSAR!") else player:teleportTo(Position(1012, 960, 9)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end return true end
  16. TFS ou OTX? E qual versão?
  17. local tabela = { Position(972,964,7), Position(972,964,7) } function onTime(interval) local posicao for i = 1, #tabela do if tabela[i] then posicao = Tile(tabela[i]):getItemById(1946) if posicao then posicao:transform(1945) end end end end TESTEI E DEU CERTO!
  18. Poste o arquivo doors.lua em CÓDIGO aqui
  19. Tenta mudar isto: if player:getSex() == 0 then player:addOutfitAddon(outfits[choiceId].female, 3) else player:addOutfitAddon(outfits[choiceId].male, 3) end Por isto: if player:getSex() == 0 then player:addOutfitAddon(outfits[choiceId].female, 1) player:addOutfitAddon(outfits[choiceId].female, 2) else player:addOutfitAddon(outfits[choiceId].male, 1) player:addOutfitAddon(outfits[choiceId].male, 2) end
  20. Aqui ele verifica se na posição existe um item desse ID ... E aqui ele muda o item para este ID. Creio que não seja preciso mexer com UID, pois naquela posição só vai existir aquela alavanca ...
  21. Pelo que me parece a ideia principal seria a alavanca voltar automaticamente depois de X tempo ... Você teria duas alternativas ... 1 - Usar um addEvent no próprio script da alavanca. (não aconselho) 2 - Achar as alavancas pela posição delas ... Mais ou menos assim: local tabela = { [1000] = Position(1184, 1011, 13), [1001] = Position(1184, 1011, 13), } for _, itemUid in ipairs(tabela) do local posicao = tabela[itemUid] if posicao then local tile = posicao:getTile() if tile then local alavanca = tile:getItemById(1945) if alavanca then alavanca:transform(1946) end end end end

Informação Importante

Confirmação de Termo