Ir para conteúdo

luangop

Membro
  • Registro em

  • Última visita

Solutions

  1. luangop's post in Como faço para não poder usar essa magia em monstro? was marked as the answer   
    function onCastSpell(cid, var) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} local waittime = 15 --tempo em segundos local storage = 2560 --storage do exuast, em cada magia uma storage diferente. local target = getCreatureTarget(cid) if not isPlayer(target) then return doPlayerSendTextMessage(cid, 23, "Essa magia só pode ser usada em players.") and false end if exhaustion.check(cid, storage) then doPlayerSendTextMessage(cid, 23, "Essa magia saira do cooldown em " .. exhaustion.get(cid, storage) .. " segundos.") return false end exhaustion.set(cid, storage, waittime) local Hp = (getCreatureHealth(target))*0.2 if isCreature(target) then doCreatureAddHealth(target, -Hp) -- remove o valor de 20% da vida do jogador doSendMagicEffect(position1, 269) -- EFEITO DA MAGIA end return true end  
  2. luangop's post in Acesso boss diario + quest was marked as the answer   
    Mano, uma dica que dou pra todo mundo que está aprendendo programação/script... aprenda usar identação. Ajuda muito hehe.
    movement:
     
    Creaturescript:
     
     
  3. luangop's post in Wand dois hits elementais was marked as the answer   
    w = { [1] = {ef = 37, sh = 4, dmg = COMBAT_ENERGYDAMAGE}, [2] = {ef = 43, sh = 36, dmg = COMBAT_ICEDAMAGE}, } function onUseWeapon(cid, var) local storage = getPlayerStorageValue(cid, 8445601) if storage <= 0 then atual = 1 else atual = 2 end min, max = 110, 150 -- dano minimo e maximo target = getCreatureTarget(cid) if target ~= 0 then wx = w[atual] doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh) addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef) setPlayerStorageValue(cid, atual == 1 and 1 or 0) end return true end  
  4. luangop's post in (Resolvido)Npc não funciona da maneira certa was marked as the answer   
    Entendi.. Vou te ensinar a pescar nos 2 primeiros, o resto vc pesca sozinho.
    elseif msgcontains(msg, "shenron") or msgcontains(msg, "SHENRON") and talk_state == 1 then if getPlayerStorageValue(cid, 30023) >= 1 then doPlayerSetVocation(cid, XXX) -- Vocation rebornada. selfSay("Parabens, voce virou um Shenron Reborn.", cid) else doPlayerSetVocation(cid, 376) -- Vocation normal. selfSay("Parabens, voce virou um Shenron.", cid) end elseif msgcontains(msg, "vegetto") or msgcontains(msg, "VEGETTO") and talk_state == 1 then if getPlayerStorageValue(cid, 30023) >= 1 then doPlayerSetVocation(cid, XXX) -- Vocation rebornada. selfSay("Parabens, voce virou um Vegetto Reborn.", cid) else doPlayerSetVocation(cid, 388) -- Vocation normal. selfSay("Parabens, voce virou um Veggeto.", cid) end  
  5. luangop's post in (Resolvido)[PEDIDO] Usar X Item e ganhar outfit was marked as the answer   
    Na pasta xml abra o arquivo outfits.xml
    Configure sua outfit dessa forma:
     
    <outfit id="ID DA OUTFIT" quest="UM NOMERO DE STORAGE VAGO"> <list gender="0" lookType="NUMERO DA OUTFIT NO OBJECT BUILDER" name="NOME DA OUTFIT"/> <list gender="1" lookType="NUMERO DA OUTFIT NO OBJECT BUILDER" name="NOME DA OUTFIT"/> </outfit> em data/actions abre actions.xml e add isso:
    (obviamente configure de acordo com seu item)
    <action itemid="ID DO ITEM QUE VAI DAR A OUTFIT" event="script" value="NOME DO ARQUIVO.lua"/> em data/actions/scripts crie um arquivo .lua com o mesmo nome que vc registrou no actions.xml e coloque isso dentro:
     
    function onUse(cid, item, fromPosition, itemEx, toPosition) local sto = XXXX --- <<< NUMERO DA STORAGE QUE VC COLOCOU NO OUTFITS.XML local outname = "NOME DA OUTFIT" --- <<< COLOQUE O NOME DA OUTFIT ALI if getPlayerStorageValue(cid, sto) >= 1 then doPlayerSendCancel(cid, "Voce ja tem esta outfit!!") return true elseif getPlayerStorageValue(cid, sto) <= 0 then setPlayerStorageValue(cid, sto, 1) doPlayerSendCancel(cid, "Voce acaba de obter a outfit ".. outname .."!") doRemoveItem(item.uid, 1) return true end end  
    Qualquer erro me informe, escrevi o sistema na mão mesmo.
  6. luangop's post in (Resolvido)Como passar de segundos para minutos was marked as the answer   
    E como exatamente vc ta digitando? pq essa mensagem deve aparecer quando digita errado o comando..
  7. luangop's post in (Resolvido)[Ajuda] System Look was marked as the answer   
    Não testei, vê ai se funciona:
    data/creaturescripts creaturescripts.xml
    <event type="look" name="PlayerLookInfo" event="script" value="pli.lua"/> Em data/creaturescripts/scripts abra login.lua
    Abaixo de qualquer linha que possua 'registerCreatureEvent' adicione essa linha:
     
    registerCreatureEvent(cid, "PlayerLookInfo") Em data/creaturescripts/scripts crie um arquivo pli.lua com o seguinte:
    function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and not (thing.uid == cid) then local player = thing.uid doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Informações de '".. getCreatureName(player) .."':") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "-- HP: ".. getCreatureHealth(player) .."/".. getCreatureMaxHealth(player) .."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "-- MP: ".. getCreatureMana(player) .."/".. getCreatureMaxMana(player) .."") return true end end  
  8. luangop's post in (Resolvido)[PEDIDO] Entrega de donate was marked as the answer   
    data/talkactions talkactions.xml
    <talkaction words="/entregar" log="yes" access="6" script="entregar.lua"/> data/talkactions/scripts entregar.lua

    data/actions actions.xml
    <action actionid="65470" event="script" value="BauDonate.lua"/> *actionid="65470" <~~ Action do bau no map-editor.
     
    data/actions/scripts BauDonate.lua
     
    Observações:
    O comando que criei pra vc armazena um log em data/logs com nome de entregar-log.txt com todos os detalhes dos pontos entregues.
    A action do bau armazena um log em data/logs com nome de entregue-log.txt com todos os detalhes de quando alguem recebe os pontos no bau.
     
    Qualquer dúvida e só avisar, mas como já deve ter percebido eu demoro um pouco a responder rsrs.
  9. luangop's post in (Resolvido)Comprar item de forma diferente? (complexo?) was marked as the answer   
    Nossa, sofri agora kkk
    Depois de várias tentativas frustradas, consegui da seguinte maneira:
     
     
  10. luangop's post in (Resolvido)ajuda com efeito na outfit was marked as the answer   
    O script está certo, creio que o problema seja a sprite que não está devidamente alinhada.
    Mas se quiser tentar realinhar a aura por script (não garanto nada que irá funcionar), tente assim:
    local tab = { [9] = {effect = 27}, -- [vocationID] = {effect = Number} [10] = {effect = 28}, [11] = {effect = 29}, [12] = {effect = 30} } local delay = 3 -- tempo do efeito da aura em segundos function ariseAura(cid) local pos = getThingPos(cid) doSendMagicEffect({x=pos.x+1, y=pos.y, z=pos.z}, tab[getPlayerVocation(cid)].effect) addEvent(ariseAura, delay * 1000, cid) return true end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseAura(cid) end return true end Obs: Tente aprender a utilizar o CODE da próxima vez que for postar um script.
     
  11. luangop's post in (Resolvido)Bug com script de storage acess was marked as the answer   
    kkk fiz besteira, agora fui reler o código e vi.
    Testa:
     
    function onStepIn(cid, item, position, fromPosition) local newPosition = {x=632, y=737, z=7} if not isPlayer(cid) then return true end if getPlayerStorageValue(cid, 10102) <= os.time() then doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 19, "Voce nao possui acesso vip, faça a quest!.") return true end doPlayerSendTextMessage(cid, 19, "Bem Vindo a ViP 1.") doSendMagicEffect(getPlayerPosition(cid), 2) doTeleportThing(cid, newPosition) doSendMagicEffect(newPosition, 10) return true end  
  12. luangop's post in (Resolvido)Ajuda Torneio was marked as the answer   
    NPC:
    PORTA 150+:
    PORTA 150-:
     
     
  13. luangop's post in (Resolvido)[BUG] Teleporte Automático was marked as the answer   
    Tente assim:
    local config = { pos = {x=753, y=1544, z=6}, topos = {x=892, y=2659, z=7}, time = 5, -- tempo que o teleport ira sumir em minutos msg_open = "O Portal para a Quest Diaria Vai se Abrir. E Tente Ganhar Blue Tokens. Corra para a sala de Quests, Voce tem 5 Minutos!", msg_close = "O Portal para Quest Diaria se Fechou. Tente Amanha no mesmo Horario!" } local function DelTp() local t = getTileItemById(config.pos, 1387) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(config.pos, CONST_ME_POFF) end end function onTime() if (os.date("%A") == "Monday" or "Tuesday" or "Wednesday" or "Thursday" or "Friday" or "Sunday") then doCreateTeleport(1387, config.topos, config.pos) doBroadcastMessage(config.msg_open) addEvent(DelTp, config.time*60*1000) addEvent(doBroadcastMessage, config.time*60*1000, config.msg_close) end return true end  
  14. luangop's post in (Resolvido)Adicionar função para determinados dias was marked as the answer   
    function onTime() if not realCastle.isOpen() and (os.date("%A") == "Tuesday" or "Thursday" or "Saturday") then realCastle.open() else realCastle.close() end return true end  
  15. luangop's post in (Resolvido)(Duvida) Como Adicionar Exaust de 2 minutos was marked as the answer   
    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  
  16. luangop's post in (Resolvido)Teleporte do evento Dota was marked as the answer   
    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)  
  17. luangop's post in (Resolvido)Tempo para usar novamente [MOD] was marked as the answer   
    Obs: Não testei...

     
    local config = { rate = 1, storage = 1011, expstorage = 1111, register = 1211, waitsto = 8445601, waittime = 1800, time = 3600, } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, config.storage) <= 0 then if getPlayerStorageValue(cid, config.waitsto) >= os.time() + 1 then doCreatureSay(cid, "You should wait 30 minutes after the last exp condition to start another exp condition!", TALKTYPE_ORANGE_1, true, cid) return true end setPlayerStorageValue(cid, config.waitsto, os.time() + config.waittime) local rates = getPlayerRates(cid) setPlayerStorageValue(cid, config.expstorage, rates[SKILL__LEVEL]) setPlayerStorageValue(cid, config.register, 1) itemEx=itemid == 2345 doCreatureSay(cid, "Your extra experience rate has been activated! It now is: " .. config.rate .. "x added to your former experience rate.", TALKTYPE_ORANGE_1, true, cid) setPlayerStorageValue(cid, config.storage, os.time()+config.time) doPlayerSetExperienceRate(cid, rates[SKILL__LEVEL]+config.rate) doRemoveItem(item.uid,1) registerCreatureEvent(cid, "ExpStage") else doCreatureSay(cid, "You must finish first exp condition to start other exp condition !", TALKTYPE_ORANGE_1, true, cid) end return true end function onThink(cid, interval) if getPlayerStorageValue(cid, config.register) == 1 then if getPlayerStorageValue(cid, config.storage) <= os.time() then doCreatureSay(cid, "Your extra experience rate has finished! It is now normaly experience rate.", TALKTYPE_ORANGE_1, true, cid) setPlayerStorageValue(cid, config.storage, 0) setPlayerStorageValue(cid, config.register, 0) local oldexp = getPlayerStorageValue(cid, config.expstorage) doPlayerSetExperienceRate(cid, oldexp) unregisterCreatureEvent(cid, "ExpStage") end end return true end function onLogin(cid) if getPlayerStorageValue(cid, config.register) == 1 then registerCreatureEvent(cid, "ExpStage") local rates = getPlayerRates(cid) doCreatureSay(cid, "Your extra experience rate is still here! It is: " .. config.rate .. "x added to your former experience rate.", TALKTYPE_ORANGE_1, true, cid) if getPlayerStorageValue(cid, config.storage) > os.time() then local oldexp = getPlayerStorageValue(cid, config.expstorage) doPlayerSetExperienceRate(cid, oldexp+config.rate) end end return true end  
  18. luangop's post in (Resolvido)Editar Script - FireStorm Quantidade de Player [HELP]! was marked as the answer   
    Tudo que você quer modificar está nesta parte:
    fireStormMaxPlayers = 2  << 2 é a quantia máxima de players no evento, por exemplo se vc botar 10, ao atingir 10 players ja inicia.
    fireStormMinPlayers = 1  << quantia minima, como vc quer que inicia somente com 5 players, bota 5 aqui
    fireStormAccesToIgnore = 5
    timeOnJoinToEvent = 10 --in minutes   << 10 e o tempo em minutos que o evento espera para entrar players, se quiser aumentar para por exemplo uma hora, coloca 60, assim o evento aguarda ate uma hora para entrar 5 players
     
    Espero ter ajudado.
  19. luangop's post in (Resolvido)[PEDIDO] Event OnTime Not Found was marked as the answer   
    Apenas troque:
    por
     
    Teste e poste o resultado.
  20. luangop's post in (Resolvido)[AJUDA] Item de Tp was marked as the answer   
    Script do item para dar use:
     
    Script da quest:
     
    Ajudei? REP +
  21. luangop's post in (Resolvido)[Pedido] Summo regeneration spell was marked as the answer   
    Tenta ai    
  22. luangop's post in (Resolvido)PEDIDO Script Teleportar Por Click was marked as the answer   
    Tag em data/actions/actions.xml
     
    data/actions/scripts/clickport.lua
     
    Ajudei? da um  Gostei! 
  23. luangop's post in (Resolvido)Ajuda Nesse script was marked as the answer   
    Não sei se vai funcionar, testa ai:
     

Informação Importante

Confirmação de Termo