Ir para conteúdo
Banner com Efeitos

luangop

Membro
  • Registro em

  • Última visita

Tudo que luangop postou

  1. Não testei, pode ter algo errado rsrs Testa ai e fala se funcionou, caso de algum erro, poste. data/globalevents/scripts/spawnboss.lua local monsters = { ["Monstro 1"] = { x = 1357 , y = 1144 , z = 10 }, ["Monstro 2"] = { x = 1357 , y = 1144 , z = 10 }, ["Monstro 3"] = { x = 1357 , y = 1144 , z = 10 }, ["Monstro 4"] = { x = 1357 , y = 1144 , z = 10 }, ["Monstro 5"] = { x = 1357 , y = 1144 , z = 10 }, ["Monstro 6"] = { x = 1357 , y = 1144 , z = 10 }, ["Monstro 7"] = { x = 1357 , y = 1144 , z = 10 }, ["Monstro 8"] = { x = 1357 , y = 1144 , z = 10 }, ["Monstro 9"] = { x = 1357 , y = 1144 , z = 10 }, ["Monstro 10"] = { x = 1357 , y = 1144 , z = 10 }, } local monster_sorteado = math.random(#monsters) function onThink(interval, lastExecution, thinkInterval) for a, b in pairs(monster_sorteado) do local name = a local pos = b doCreateMonster(name, pos, false) doBroadcastMessage("O Boss ".. a .." nasceu!") end return true end data/globalevents/globalevents.xml <globalevent name="SpawnBoss" interval="7200" event="script" value="spawnboss.lua"/> Para testes, configure um valor menor em 'interval', em segundos. (7200 = 2 horas)
  2. Não sei se conseguirei ajudar, mas poste a LIB desse seu sistema. (onde estão as funções addPlayerRep etc)
  3. Creio que a linha: if getPlayerPosition(cid) == pos then Funcionaria assim: if isInArray(pos, getPlayerPosition(cid)) then
  4. Ficou confuso, faça um post com seu pedido de script e me marca, vira bagunça fazer pedido no post dos outros.
  5. A noite vou dar uma estudada melhor! Tente reduzir para segundos ao invés de milissegundos. Na linha: if isMonster(target) and getCreatureName(target):lower() == 'target' and getPlayerStamina(cid) < 42 * 60 * 60 * 1000 then Mude para: if isMonster(target) and getCreatureName(target):lower() == 'target' and (getPlayerStamina(cid) < 42 * 60 * 60) then @Luis Gustavo de M A
  6. luangop postou uma resposta no tópico em Suporte Tibia OTServer
    Poste o script viptile.lua Que isso sirva para o futuro: Sempre que for pedir ajuda com algum erro, já poste o script.
  7. Provavelmente o erro ocorre quando o player atinge 100% da stamina, crie uma função para verificar a stamina do player, se estiver full, o script não roda. Ou seja, mude a linha: if isMonster(target) and getCreatureName(target):lower() == 'target' then para if isMonster(target) and getCreatureName(target):lower() == 'target' and getPlayerStamina(cid) < 42 * 60 * 60 * 1000 then
  8. Esse seu premium_points e por storage? valor na database? descreva melhor.. Qual seu TFS?
  9. luangop postou uma resposta no tópico em Suporte Tibia OTServer
    @ES Ichigo Percebi que você deixou passar isso: if getPlayerLevel(cid) >= level and price >= 50 then doRemoveItem(2160, 50) rsrs if getPlayerLevel(cid) >= level and getPlayerItemCount(cid, 2160) >= price then doPlayerRemoveItem(cid, 2160, 50) Reformulando todo script, eu faria assim: function onUse(cid, item, fromPosition, itemEx, toPosition) local level = 1000 local price = 50 toPos = { x = 359 , y = 1667 , z = 7 } if getPlayerLevel(cid) >= level and getPlayerItemCount(cid, 2160) >= price then doPlayerRemoveItem(cid, 2160, price) doTeleportThing(cid, toPos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você foi teleportado!") else if getPlayerLevel(cid) < level and getPlayerItemCount(cid, 2160) < price then str = "Você não possui level ".. level .." e não tem ".. price .." HD!!!" elseif getPlayerLevel(cid) < level and getPlayerItemCount(cid, 2160) >= price then str = "Você não possui level ".. level .."!" elseif getPlayerItemCount(cid, 2160) < price and getPlayerLevel(cid) >= level then str = "Você não possui ".. price .." HD!" end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end Tem uma forma melhor, eu sei disso, porém eu me perco se botar muito if em cima de if kkk
  10. Não funcionou na forma que eu fiz?
  11. Mano, vou te dar uma ideia. Ao completar todas as funcionalidades, poderia criar um post explicando cada tag =) manacost >> Custo de mana para summonar o monstro com utevo res, caso a flag summonable esteja em 1.
  12. Procure em suas libs (data/lib), a função doSendPokeBall Deve estar em some functions.lua ou algo assim e poste a função toda.
  13. Falhei então... por isso odeio trabalhar com MOD. Foi mal
  14. Se fosse TFS 0.4 eu faria fácil mas infelizmente nunca estudei FTS 1.x... mas posso tentar ajudar. Você possui alguma biblioteca de funções para seu TFS? qual versão do seu TFS? Dei uma pesquisada e acredito estar usando a versão atual do TFS... Sem testar, e primeira vez que mecho em TFS1.x+ hehe function onUse(player, item, position, fromPosition, toPosition) local storage = 99654 -- storage que vai salvar o exaust local tempo = 2 -- em minutos local sec = tempo * 60 if player:getStorageValue(storage) >= os.time() then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait ".. player:getStorageValue(storage) - os.time() .." seconds.") return true end player:setStorageValue(storage, os.time() + sec) local position = player:getPosition() local chance = math.random(1, 30) if chance <= 28 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You ransack the pile but fail to find any useful parts.") item:transform(11253) item:decay() Game.createMonster("Guzzlemaw", position) elseif chance == 29 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Amidst the pile of various bones you find a large, hollow part, similar to a pipe.") player:addItem(22389, 1) item:transform(11253) item:decay() elseif chance == 30 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a mouthpiece for a horn.") player:addItem(22391, 1) item:transform(11253) item:decay() end return true end
  15. Que sistema cabuloso aueuaue Acho que isso pode resolver: <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = TRUE, needlvl = {TRUE, level = 50}, costmana = {TRUE, mana = 300}, addrate = 50, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="7440" event="script"><![CDATA[ domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 62164) >= os.time() then return doPlayerSendCancel(cid, "Voce ja ta Sob o Efeito da Potion.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "Voce Precisar ser Premium Para Usar") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "Voce Precisa ser " .. configs.needlvl.level .. " Para usar a Potion.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "Voce Precisar ter " .. configs.costmana.mana .. " de Mana Para usar a Potion") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "Efeito Final da Pocao de EXP.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O Efeito da Pocao vai acabar em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora Voce Esta Recebendo mais EXP por Matar Monstros.") setPlayerStorageValue(cid, 62164, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62164, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62164) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000 , cid, 62164, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62164))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "O Efeito da Potion Termina em.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "O Efeito da Potion Termina em "..a..".") end end return TRUE ]]></creaturescript> </mod>
  16. luangop postou uma resposta no tópico em Suporte Tibia OTServer
    Cara, existe incontáveis erros nesse sistema... Seria mais fácil refazer do 0. Só que eu não trabalho com spells. Eu poderia fazer com talkaction, se desejar. Para os players vai parecer como se fosse spell mesmo. Só preciso que me confirme essas informações: Dentro dessa área existe um teleport de saída? Qualquer um pode usar essa spell, ou tem algum requerimento de level, vocation ou storage? Caso tenha, diga o level e todas vocationID que poderá usar tal spell. Ah... fui ler na internet agora a respeito desse Kamui, é totalmente diferente do que eu estava imaginando, e não tenho idéia de como reproduzir tal ato Foi mal.
  17. luangop postou uma resposta no tópico em Suporte Tibia OTServer
    Então o funcionamento é o seguinte: Um player "fala" a spell e cria um teleport, o qual some após 5 segundos. Qualquer um pode entrar nele, sendo que quem entra ganha uma storage. É isso? Então a action id 5678 que você está usando serve para dar tal storage? Fez isso por movement com StepIn?
  18. luangop postou uma resposta no tópico em Suporte Tibia OTServer
    Deixe-me ver se entendi. Vc quer uma "spell" que quando o player usa, é teleportado para um lugar, ganha uma storage, e volta para onde estava? Tem necessidade de ser criado um "teleport"? Pois assim tem possibilidade de outro player entrar e acabar bugando tudo..
  19. luangop postou uma resposta no tópico em Suporte Tibia OTServer
    Wtf? Esse script ai deveria criar um teleport na pos do usuario, que some milesimos de segundos depois? kkk Não seria mais fácil vc criar uma talkaction?
  20. luangop postou uma resposta no tópico em Suporte Tibia OTServer
    Não entendi... vc quer que apenas o usuário seja teleportado, sem levar o alvo junto, ou quer que o usuário seja levado para o mesmo lugar que o alvo?
  21. Simplificando um pouco o sistema: invasion.lua function criarm() local name = {"Zoralurk"} local pos = { x = 1357 , y = 1144 , z = 10 } local sname = name[math.random(1,#name)] doCreateMonster(sname, pos, false) return true end function onThink(interval, lastExecution, thinkInterval) doBroadcastMessage("O Boss Zoralurk está para renascer em 1 minuto.") addEvent(doBroadcastMessage, 60000, "Zoralurk renasceu!") addEvent(criarm, 60000) return true end globalevents.xml <globalevent name="invasion" interval="10800" event="script" value="invasion.lua"/> O tempo está definido no interval do .xml 3600 = 1 hora. Logo 3600 x 3 = 10800 = 3 horas. Obs: Desta forma o evento não tem horário fixo, o primeiro spawn do boss é 3 horas depois do server iniciado, e então se repete a cada 3 horas. Sobre a mensagem de quem matou... isso deve ser em creaturescript e não sei fazer
  22. Eu li os scripts, e está configurado para quando abrir a sala de times, o script remove um item de bloqueio (pedra, parede, qualquer coisa) liberando o portal. O script não tem função de criar portal. Para criar um teleport ao abrir a sala de times, faça o seguinte: No script team_dota.lua use isso: function onSay(cid, words, param, channel) local mensage1 = "[Evento Dota] Liberada Sala dos Times! Quem quiser Participar, vá para a sala de times até o Evento começar. Depois que começar, sÓ na outra rodada! Gogo (TELEPORTE PARA O DOTA NO TEMPLO DA CIDADE PRINCIPAL)" -- Mensagem Inicial tppos = {x=677, y=14, z=7} -- Posição onde o teleport sera criado topos = {x=677, y=14, z=7} -- Posição da Sala dos Times if getThingfromPos(tppos).itemid == 1387 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "A sala ja esta aberta.") return true else doCreateTeleport(1387, topos, tppos) broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE) end end E no start_dota.lua retire a linha: doCreateItem(1304, {x=677, y=14, z=7}) e no lugar dela ponha: tppos = {x=601, y=44, z=7} == pos de onde e criado o teleport quando usa /start-dota gettppos = getThingfromPos(tppos) doRemoveItem(gettppos.uid,1)
  23. Olha, ta hard uaeuaue function onSay(cid, words, param) local t = { posMon = { x = 1126 , y = 520 , z = 7 }, --A Position que todos os monsters iram nascer name = "snake", name1 = "nukenin", name2 = "renegade", pos = { x = 1024 , y = 914 , z = 5 }, ---onde tp vai ser criado topos = { x = 1018 , y = 514 , z = 7 } ---a position para onde sera teleportado } if param == "open" then if getTileItemById(t.pos, 1387).uid > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O teleporte já foi aberto, digite !closeteleport para fechar o portal.") else doBroadcastMessage("O Evento Vai Todo Mundo Pro Inferno irá começar, corra antes que você perca a chance de conhecer o capata!", 25) doCreateTeleport(1387, t.topos, t.pos) doSendMagicEffect(t.pos , math.random(28,30)) doCreateMonster(t.name, t.posMon) doCreateMonster(t.name1, t.posMon) doCreateMonster(t.name2, t.posMon) end elseif param == "close" then local t = getTileItemById(t.pos, 1387).uid if t > 0 then doRemoveItem(t,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O teleporte não foi aberto.") end end return TRUE end
  24. function onSay(cid, words, param) local t = { posMon = { x = 1126 , y = 520 , z = 7 }, --A Position que todos os monsters iram nascer name = "snake", name1 = "nukenin", name2 = "renegade", pos = { x = 1024 , y = 914 , z = 5 }, ---onde tp vai ser criado topos = { x = 1018 , y = 514 , z = 7 } ---a position para onde sera teleportado } if param == "open" then if getTileItemById(t.pos, 1387).uid > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O teleporte já foi aberto, digite !closeteleport para fechar o portal.") else doBroadcastMessage("O Evento Vai Todo Mundo Pro Inferno irá começar, corra antes que você perca a chance de conhecer o capata!", 25) doCreateTeleport(1387, t.topos , t.pos) doSendMagicEffect(t.pos , math.random(28,30)) doCreateMonster(t.name, t.posMon) doCreateMonster(t.name1, t.posMon) doCreateMonster(t.name2, t.posMon) end elseif param == "close" then local t = getTileItemById(t.pos, 1387).uid if t > 0 then doRemoveItem(t,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O teleporte não foi aberto.") end end return TRUE end Tente assim. Dependendo o TFS o espaçamento nas posições influenciam no funcionamento do script. Se não funcionar, tenha certeza que a posição topos é realmente um tile "walkeable", e não tem nada que impeça de o player andar por cima.
  25. @ZikaLord Oque realmente está acontecendo? Vc diz que quando digita o comando vc não é teleportado, ou o teleport criado não leva a lugar nenhum?

Informação Importante

Confirmação de Termo