Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    73

Tudo que zipter98 postou

  1. Não. Só é necessário mexer nas coordenadas. Esse [1] é o valor da storage. Se quiser se orientar melhor sobre qual número é qual clan, siga a tabela que o Akumah postou logo acima.
  2. Suponho que não haja muita diferença, porém, melhor prevenir do que remediar. O script em si, pelo que vi, está funcionando direitinho. É só configurar corretamente no map editor.
  3. Pensei que você soubesse fazer ;/ jaja edito com a tag. <action actionid="xxx" event="script" value="arquivo.lua"/> Troque xxx pelo actionid da porta. Troque arquivo pelo nome do arquivo .lua com o conteúdo que passei acima.
  4. zipter98

    Script de war

    Só pra testar, veja se está mudando a outfit, e retirando no de saída. Blue team function onStepIn(cid, item, frompos, item2, topos) local outfit = {lookType = 128, lookHead = 88, lookBody = 114, lookLegs = 114, lookFeet = 88, lookAddons = 3} if item.actionid == 5031 then if not isCreature(cid) then return true end doSetCreatureOutfit(cid, outfit, -1) end return true end Saída function onStepIn(cid, item, frompos, item2, topos) if getCreatureCondition(cid, CONDITION_OUTFIT) then doRemoveCondition(cid, CONDITION_OUTFIT) end return true end
  5. Tenta upar seu char exatamente pra um dos levels da tabela: function onAdvance(cid, skill, oldLevel, newLevel) local t = { [100] = {items = {2160}, quantidade = {1}, storage = 110291}, [300] = {items = {2160, 12618}, quantidade = {3, 1}, storage = 110292}, [500] = {items = {2160, 12618}, quantidade = {5, 1}, storage = 110293}, } if skill == 8 then if t[newLevel] then item = t[newLevel].items quantidade = t[newLevel].quantidade for a, b in pairs(t) do if newLevel >= a and getPlayerStorageValue(cid, b.storage) < 1 then for i = 1, #item do doPlayerAddItem(cid, item[i], quantidade[i]) setPlayerStorageValue(cid, b.storage, 1) end end end end end return true end
  6. function onAdvance(cid, skill, oldLevel, newLevel) local t = { [100] = {items = {2160}, quantidade = {1}, storage = 110291}, [300] = {items = {2160, 12618}, quantidade = {3, 1}, storage = 110292}, [500] = {items = {2160, 12618}, quantidade = {5, 1}, storage = 110293}, } if t[newLevel] then item = t[newLevel].items quantidade = t[newLevel].quantidade end if skill == 8 then for a, b in pairs(t) do if newLevel >= a and getPlayerStorageValue(cid, b.storage) < 1 then for i = 1, #item do doPlayerAddItem(cid, item[i], quantidade[i]) setPlayerStorageValue(cid, b.storage, 1) end end end end return true end
  7. data/actions/scripts
  8. Este meu script está completo. A explicação, editei acima.
  9. Tenta: data/creaturescripts/scripts. function onAdvance(cid, skill, oldLevel, newLevel) local t = { [100] = {items = {2160}, quantidade = {1}, storage = 110291}, [300] = {items = {2160, 12618}, quantidade = {3, 1}, storage = 110292}, [500] = {items = {2160, 12618}, quantidade = {5, 1}, storage = 110293}, } local item = t[newLevel].items local quantidade = t[newLevel].quantidade if skill == 8 then for a, b in pairs(t) do if newLevel >= a and getPlayerStorageValue(cid, b.storage) < 1 then for i = 1, #item do doPlayerAddItem(cid, item[i], quantidade[i]) setPlayerStorageValue(cid, b.storage, 1) end end end end return true end Não se esqueça de registrar no login.lua. Você deve alterar apenas a tabela t. local t = { [100] = {items = {2160}, quantidade = {1}, storage = 110291}, [300] = {items = {2160, 12618}, quantidade = {3, 1}, storage = 110292}, [500] = {items = {2160, 12618}, quantidade = {5, 1}, storage = 110293}, } "Traduzindo" uma linha dela, ficaria assim: [Level] = {items = {IDs do(s) item(s)}, quantidade = {quantidade do(s) item(s)}, storage = 110291}, Na parte quantidade =, você deve colocar em ordem, igual à items. Por exemplo, no lv 300, items está {2160, 12618}. O primeiro ID, é o do thousand dollar (prefiri utilizá-lo, como dica de um amigo, já que 100 HDs = 1 TD, mais fácil); o segundo, Boost Stone. No quantidade, está {3, 1}. O primeiro valor (3), está relacionado ao primeiro valor de items (o TD). O segundo, (1), está relacionado ao segundo valor de items; no caso, a Boost Stone.
  10. Eu não coloquei nada sobre adicionar bônus de speed e.e Depois, se quiser, eu edito lá. Mas, de resto, o script está funcionando direitinho?
  11. O prêmio será apenas 1 item específico e uma quantidade x de level? Você poderia informar o(s) ID(s) do(s) do(s) item(s), a quantidade de levels que o player irá receber e o level que o player irá receber os prêmios? E, suponhamos que o level necessário para receber os prêmios seja 45. Se o player estiver, por exemplo, no level 44, e avançar 2 levels, irá mesmo assim receber o prêmio? Ou apenas se avançar para 45, exato?
  12. /\ http://www.xtibia.com/forum/topic/222682-pokemon-mysterion-dowload/
  13. se quiser tentar.. e sobre as skills bônus, acho q só sei fazer a de speed :x function onUse(cid, item, frompos, item2, topos) local max_time = 100 --tempo máximo (no caso do seu exemplo, 1min e 40 segundos). local min_soul = 200 --Mínimo de soul pra usar o item. local slot = 8 --Slot do item. local id_item = xxx --ID do item. local storage = 410294 local t = { [1] = {xxx, xxx, xxx, xxx}, --[id da vocation] = {id da outfit male de lv 100 a 150, female de 100 a 150, male de 200+, female de 200+}, [2] = {xxx, xxx, xxx, xxx}, [3] = {xxx, xxx, xxx, xxx}, [4] = {xxx, xxx, xxx, xxx}, } if getPlayerSlotItem(cid, slot).itemid ~= id_item then return doPlayerSendCancel(cid, "Você deve colocar o item no local correto!") end if getPlayerStorageValue(cid, storage) < 1 then return doPlayerSendCancel(cid, "Você não pode usar esse item.") end if getPlayerSoul(cid) < min_soul then return doPlayerSendCancel(cid, "Você precisa ter no mínimo "..min_soul.." soul para poder usar esse item.") end if getPlayerStorageValue(cid, 110291) > os.time () then return doPlayerSendCancel(cid, "Aguarde "..getPlayerStorageValue(cid, 110291) - os.time ().." segundo(s) para usar este item novamente.") end i = 2 local function doRemoveSoul(cid) if i == max_time then return true end if not isCreature(cid) then return true end if getPlayerSlotItem(cid, slot).itemid ~= id_item then doRemoveCondition(cid, CONDITION_OUTFIT) doRemoveSoul(cid) return true end i = i + 2 doPlayerAddSoul(cid, -1) addEvent(doRemoveSoul, 2000, cid) end local d = getPlayerVocation(cid) doRemoveSoul(cid) setPlayerStorageValue(cid, 110291, os.time () + max_time) if getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 150 then if getPlayerSex(cid) == 0 then doSetCreatureOutfit(cid, {lookType = t[d][2]}, -1) elseif getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = t[d][1]}, -1) end elseif getPlayerLevel(cid) >= 200 then if getPlayerSex(cid) == 0 then doSetCreatureOutfit(cid, {lookType = t[d][4]}, -1) elseif getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = t[d][3]}, -1) end end addEvent(function() if not isCreature(cid) then return true end if getCreatureCondition(cid, CONDITION_OUTFIT) then doRemoveCondition(cid, CONDITION_OUTFIT) end end, max_time*1000) return true end
  14. Poderia informar as storages de cada clan, e a storage de rank 5?
  15. /\ Isso que você mudou, é o custo base de stones. O que o brunnoo quer, é que a boost stone dê 10 boosts. Só editar a variável boost_id (tá indicado no script, é logo no comecinho). Testado, funcionando.
  16. Eu também penso isso, já houveram inúmeras vezes que procurei sobre tal coisa, e quando pensava que finalmente tinha encontrado o que procurava (pelo fato de estar na seção de resolvidos), apenas via o pedido do autor, e, ou o tópico sem resposta alguma, ou com apenas o comentário do moderador sobre o tópico ter sido movido; maaas, regras são regras :x desculpem meu flood ._.
  17. Caso passe 7 dias e seu tópico esteja sem movimento, do autor e nem da comunidade, o tópico será movido para a Lixeira da Moderação ou Duvida e pedido resolvido.
  18. Tenta: function onUse(cid, item, frompos, item2, topos) local max_time = 100 --tempo máximo (no caso do seu exemplo, 1min e 40 segundos). local min_soul = 200 --Mínimo de soul pra usar o item. local slot = 8 --Slot do item. local id_item = xxx --ID do item. local storage = 410294 local t = { [1] = {xxx, xxx, xxx, xxx}, --[id da vocation] = {id da outfit male de lv 100 a 150, female de 100 a 150, male de 200+, female de 200+}, [2] = {xxx, xxx, xxx, xxx}, [3] = {xxx, xxx, xxx, xxx}, [4] = {xxx, xxx, xxx, xxx}, } if getPlayerSlotItem(cid, slot).itemid ~= id_item then return doPlayerSendCancel(cid, "Você deve colocar o item no local correto!") end if getPlayerStorageValue(cid, storage) < 1 then return doPlayerSendCancel(cid, "Você não pode usar esse item.") end if getPlayerSoul(cid) < min_soul then return doPlayerSendCancel(cid, "Você precisa ter no mínimo "..min_soul.." soul para poder usar esse item.") end i = 2 local function doRemoveSoul(cid) if i == max_time then return true end if not isCreature(cid) then return true end if getPlayerSlotItem(cid, slot).itemid ~= id_item then doRemoveCondition(cid, CONDITION_OUTFIT) return true end i = i + 2 doPlayerAddSoul(cid, -1) addEvent(doRemoveSoul, 2000, cid) end local d = getPlayerVocation(cid) doRemoveSoul(cid) if getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 150 then if getPlayerSex(cid) == 0 then doSetCreatureOutfit(cid, {lookType = t[d][2]}, -1) elseif getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = t[d][1]}, -1) end elseif getPlayerLevel(cid) >= 200 then if getPlayerSex(cid) == 0 then doSetCreatureOutfit(cid, {lookType = t[d][4]}, -1) elseif getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = t[d][3]}, -1) end end addEvent(function() if not isCreature(cid) then return true end if getCreatureCondition(cid, CONDITION_OUTFIT) then doRemoveCondition(cid, CONDITION_OUTFIT) end end, max_time*1000) return true end
  19. De nada xD Sobre o caso de retirar o item do slot, já está corrigido (graças a um amigo meu; vide Akumah). Só vou dar uns ajustes finais, e edito aqui. Infelizmente, ainda não sou capaz de fazer isso que você pediu sobre as vocations :x
  20. O de, ao retirar o item parar o script, acho que já sei o que é. To testando aqui, e jaja edito lá, se funcionar. E sobre a diferença de outfit pra vocation, tentarei também.
  21. zipter98

    Consetar essa script

    Tenta trocar isso if getPlayerStorageValue(cid, 10005) > os.time() then doPlayerSendCancel(cid, "Você tem que esperar "..getPlayerStorageValue(cid, 10005) - os.time().." segundos para usar a magia novamente.") return false end Por: if getPlayerStorageValue(cid, 10005) > os.time() then return doPlayerSendCancel(cid, "Você tem que esperar "..getPlayerStorageValue(cid, 10005) - os.time().." segundos para usar a magia novamente.") end Suponho que seja porque está retornando falso esse seu sendcancel. (eu acho ._.)
  22. Substitua a tag por: <instant name="Susano Full" words="Susano'o" prem="0" aggressive="0" selftarget="1" lvl="200" mana="0" exhaustion="1000" event="script" value="madara/buff.lua"> <vocation id="210"/> <vocation id="211"/> <vocation id="212"/> <vocation id="213"/> <vocation id="214"/> <vocation id="215"/> <vocation id="216"/> <vocation id="217"/> <vocation id="218"/> </instant> Ou <instant name="Susano Full" words="Susano'o" prem="0" aggressive="0" selftarget="1" lvl="200" exhaustion="1000" event="script" value="madara/buff.lua"> <vocation id="210"/> <vocation id="211"/> <vocation id="212"/> <vocation id="213"/> <vocation id="214"/> <vocation id="215"/> <vocation id="216"/> <vocation id="217"/> <vocation id="218"/> </instant> Não conheço muito magias desse tipo, então não sei qual das duas formas é a correta. Portanto, se uma não funcionar, tente a outra.
  23. fiz aqui rapidinho, tenta: ops, deu um erro, jaja edito
  24. Tenta: function onUse(cid, item, frompos, item2, topos) local remove_time = 2 --A cada x em x tempo que será retirada a quantidade de soul. local max_time = 100 --Segundos que vai durar a retirada de soul. local slot = 8 --Slot do item. local id_item = xxx --ID do item. if getPlayerSlotItem(cid, slot).itemid ~= id_item then return doPlayerSendCancel(cid, "Você deve colocar o item no local correto!") end for i = 2, max_time, remove_time do addEvent(function() if isCreature(cid) then doPlayerAddSoul(cid, -1) end end, i*1000) end return true end Está removendo 1 soul point a cada 2 segundos. Se quiser editar essa quantidade, basta ir na linha doPlayerAddSoul(cid, -1) E mudar na parte do -1. Se você colocar um número positivo, estará adicionando soul points. Se colocar um negativo (no caso), estará removendo.
  • Quem Está Navegando   0 membros estão online

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